Closed dhruv-clootrack closed 2 months ago
🤖
It's great that you've identified the potential cause of the issue with the description
field exceeding the size limit for the OpenAI request. Have you considered any potential solutions or workarounds for this issue? Your insights could be valuable in finding a resolution. If you're able to propose a fix or a workaround, we'd encourage you to consider creating a pull request to contribute your solution to the repository. Your contribution could help improve the tool for everyone.
Theres not really much we can do about this? Indeed, OpenAI has a limit for the lengths of tools/descriptions in their API
Need to shorten the tool names/descriptions I think, would be the main course of action?
Yes that is the only way around with OpenAI Limit
Can we try solution like:
Instead of passing all the function-names, function-docs into a description, can we create each function into a separate tool and pass them along with query_plan_tool
?
I haven't tried it.
Hi, @dhruv-clootrack,
I'm helping the LlamaIndex team manage their backlog and am marking this issue as stale. The issue was raised by you regarding the QueryPlanTool failing due to a BadRequestError from OpenAI. The cause was identified as the description of the tool exceeding the max-size-limit of 1024 characters. You suggested a potential solution of creating each function into a separate tool and passing them along with query_plan_tool
to address the issue. Other contributors acknowledged the limitation imposed by OpenAI and discussed the need to shorten tool names/descriptions as the main course of action.
Could you please confirm if this issue is still relevant to the latest version of the LlamaIndex repository? If it is, please let the LlamaIndex team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or the issue will be automatically closed in 7 days.
Bug Description
I'm trying to use QueryPlanTool for task of planning and executing the custom function-as-tool created, for 3 tools it was working fine but when i tried to increase the no of tools it failed with exception from OpenAI
I have identified the issue with QueryPlanTool, while sending the request to OpenAI, it convert all the function-names, function-docs into a string and send in the description of tool named
query_plan_tool
, but the description became very large where asdescription
field has max-size-limit of 1024 chars on openAIVersion
llama-index==0.10.6
Steps to Reproduce
Use colab-notebook as base: link
Add another cell with code:
and run
Relevant Logs/Tracbacks