Skip to content

Commit

Permalink
fix: allow multiple tools to be called by LLM and rewrite request (#992)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacker authored Feb 12, 2024
1 parent 440961b commit 515c540
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion memgpt/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,10 @@ def _handle_ai_response(
if response_message.function_call:
raise DeprecationWarning(response_message)
if response_message.tool_calls is not None and len(response_message.tool_calls) > 1:
raise NotImplementedError(f">1 tool call not supported")
# raise NotImplementedError(f">1 tool call not supported")
# TODO eventually support sequential tool calling
printd(f">1 tool call not supported, using index=0 only\n{response_message.tool_calls}")
response_message.tool_calls = [response_message.tool_calls[0]]
assert response_message.tool_calls is not None and len(response_message.tool_calls) > 0

# The content if then internal monologue, not chat
Expand Down

0 comments on commit 515c540

Please # to comment.