Add tool_choice to createOpenAIToolsAgent #5131
SebastianStehle
started this conversation in
Ideas
Replies: 1 comment
-
When setting up my agent, I use both the system prompt and a description of the tool to get the model to use the appropriate tools, more often than not the AI is able to utilize the right tool. Furthermore, using a schema will let the agent know what is required before initiating the tool, these work really good with GPT4. new DynamicStructuredTool({ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
The tool_choice parameter is supported by OpenAI (not sure about other models) and can be used to force using a tool.
It seems that this parameter is available when you use
bind
, but not forcreateOpenAIToolsAgent
. It would be great to support this parameter as well.Motivation
Sometimes models do not use tools and you have to force them with the right prompts. This requires some knowledge that we cannot expect from end users in a chat application. Therefore it makes sense to enforce a tool, if it is supported by the model.
Proposal (If applicable)
No response
Beta Was this translation helpful? Give feedback.
All reactions