I dont understand the difference between an agent worker and an agent runner. Neither do I understand the difference between the function calling agent and the React agent ?
I see ReAct agent response is accurate compared to FunctionCallingAgentWorker. below is one such example, am using gpt-4 model. Have anyone faced same issue? ReAct Agent response = agent.chat("What is 20+(2*4*3*4)+(15+15)-(15*2)? Calculate step by step.") --So, 20+(2*4*3*4)+(15+15)-(15*2) = 116. FunctionCallingAgentWorker response = agent.chat("What is 20+(2*4*3*4)+(15+15)-(15*2)? Calculate step by step.") -Added user message to memory: What is 20+(2*4*3*4)+(15+15)-(15*2)? Calculate step by step. === Calling Function === Calling function: multiple with args: {"a": 2, "b": 4} === Function Output === 8 === Calling Function === Calling function: multiple with args: {"a": 8, "b": 3} === Function Output === 24 === Calling Function === Calling function: multiple with args: {"a": 24, "b": 4} === Function Output === 96 === Calling Function === Calling function: add with args: {"a": 20, "b": 96} === Function Output === 116 === Calling Function === Calling function: add with args: {"a": 15, "b": 15} === Function Output === 30
I figured out the issue. By default the agent will run a max of 5 function calls. when i changed the value max_function_calls= 50 then results are accurate.
Was wondering if we can use tool calling with a local LLM instead of and API
I dont understand the difference between an agent worker and an agent runner. Neither do I understand the difference between the function calling agent and the React agent ?
great question I'm seeing only usecase of uber and Lyft please provide a more comprehensive guide
Agreed, it’s not clear when and under what circumstances to apply the various agents or sub-agents
Have you understand the difference? If yes, could you please share what you learned. Thank you in advance!!
I see ReAct agent response is accurate compared to FunctionCallingAgentWorker. below is one such example, am using gpt-4 model. Have anyone faced same issue?
ReAct Agent
response = agent.chat("What is 20+(2*4*3*4)+(15+15)-(15*2)? Calculate step by step.")
--So, 20+(2*4*3*4)+(15+15)-(15*2) = 116.
FunctionCallingAgentWorker
response = agent.chat("What is 20+(2*4*3*4)+(15+15)-(15*2)? Calculate step by step.")
-Added user message to memory: What is 20+(2*4*3*4)+(15+15)-(15*2)? Calculate step by step.
=== Calling Function ===
Calling function: multiple with args: {"a": 2, "b": 4}
=== Function Output ===
8
=== Calling Function ===
Calling function: multiple with args: {"a": 8, "b": 3}
=== Function Output ===
24
=== Calling Function ===
Calling function: multiple with args: {"a": 24, "b": 4}
=== Function Output ===
96
=== Calling Function ===
Calling function: add with args: {"a": 20, "b": 96}
=== Function Output ===
116
=== Calling Function ===
Calling function: add with args: {"a": 15, "b": 15}
=== Function Output ===
30
I figured out the issue. By default the agent will run a max of 5 function calls. when i changed the value max_function_calls= 50 then results are accurate.