Find answers from the community

Updated 2 months ago

Trying to run the OpenAI agent stepwise

Trying to run the OpenAI agent stepwise, but it calls the tool twice in the same step, would love some help @Logan M

Plain Text
> Running step f2581fdf-b673-4d9e-8b46-5b4d731071b2. Step input: What is `(15746 * 17364) + 23123`?
Added user message to memory: What is `(15746 * 17364) + 23123`?
=== Calling Function ===
Calling function: multiply with args: {"a": 15746, "b": 17364}
Got output: 273413544
========================

=== Calling Function ===
Calling function: add with args: {"a": 23123, "b": 0}
Got output: 23123
========================
b
L
7 comments
For context here is some metadata-

Class - OpenAIAgent
LLM - 4o-mini
Tools - add, multiply

All code updated to the lates stable version.
Additionally - ReAct works well, and calls tools once at a time for each step.
Openai can predict multiple tool calls in a single step πŸ‘€
So that's expected actually
React is limited by the prompting structure, which is why it can't do that
Is it possible for me to control it, just one tool call per step? Because in experiments it seems to call the wrong tools.
Nevermind, just saw your other message on custom agent. Trying it now, will get back in a bit.

Thank you so much @Logan M
Add a reply
Sign up and join the conversation on Discord