Can anyone tell me Why this agent does not even attempt to call the tool parsing functions when it gets the perfectly formatted response form the LLM? Ive been digging through the sourcecode for hours now....
def add(x: int, y:int) -> int:
"""
Add two numbers together
"""
return x + y
add_tool = FunctionTool.from_defaults(fn=add)
tools: List[BaseTool] = [add_tool, subtract_tool, multiply_tool]
llm = OpenAILike(
logprobs=None,
api_version="v2",
model="Llama-3.1-8b", # Replace with your model's name
api_base=API_BASE,
api_key=API_KEY,
max_tokens=100,
is_chat_model=True,
is_function_calling_model=True,
)
agent = OpenAIAgent.from_tools(
system_prompt=system_prompt,
chat_history=messages,
tools=tools,
llm=llm,
verbose=True,
tool_call_parser=advanced_tool_call_parser,
is_function_calling_model=True,
allow_parallel_tool_calls=True,
is_chat_model=True,
)
res: str = agent.chat("Can you add together 5 + 9 for me.")