Find answers from the community

Updated 2 months ago

Hey I tried following the llama tutorial

Hey I tried following the llama tutorial oto make each agent have a document but sometimes it calls a tool that doesn't exists and crashs, any idea why it calls an unexisting tool and how to prevent it?
Enter a query: Create a Python script that fetches processing orders from the API, counts occurrences of endpoint IDs, and updates endpoint tags through PATCH requests, use the tools to get infos about the routes
L
t
4 comments
OpenAI isn't garunteed to call a tool that exists.

Judging by the traceback, the tool names seem to be quite complex. I would suggest simplifying them a bit if possible (or making them a bit more meaningful)
the real tool name was close enough so I modified: File "/home/thomawoo/PycharmProjects/OneBotPastQuestions/venv/lib/python3.10/site-packages/llama_index/agent/openai/utils.py", line 12, in get_function_by_name
raise ValueError(f"Tool with name {name} not found")

To use a closest match approach,

Is there a cleaner way then overriding it in the package itself btw?
hmmm right now, that would be the easiest way. Alternatively, a PR adds some function to override how tools are called?
Will try to do a PR
Add a reply
Sign up and join the conversation on Discord