You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using withStructuredOutput, the tools bind to the llm are ignored.
If we add a tools to the structured schema as a workaround it almost never works as expected.
On the invoke method, if it's a withStructuredOutput it will declare just one tool, to force the model to call a parser method to the response.
constllm=newChatOpenAI({modelName: 'gpt-4o-mini'});llm.bindTools(tools};// these tools will be ignoredconstllmResult=awaitllm.withStructuredOutput(outputSchema,{name: 'Response'}).invoke(messages);
Could be a way to use withStructuredOutput with custom tools as well.
The text was updated successfully, but these errors were encountered:
When using
withStructuredOutput
, the tools bind to the llm are ignored.If we add a
tools
to the structured schema as a workaround it almost never works as expected.On the
invoke
method, if it's awithStructuredOutput
it will declare just one tool, to force the model to call a parser method to the response.Could be a way to use
withStructuredOutput
with custom tools as well.The text was updated successfully, but these errors were encountered: