Problem Defining Tools with Optional Input Parameters #666
Unanswered
jasontjahjono
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi i'm trying to create a tool-calling agent in Langgraph typescript. I've defined the agent, tool, and tool input schema as follows:
Tool Schema:
Tool:
I also prompted the agent to default to unspecified if user does not specify an optional field.
The problem is that every time a user prompts: "i wanna book a room", the agent always returns an AIMessage "do you have any view preference (Ocean, Forest, Resort)" instead of defaulting to "unspecified".
How do I implement optional input params for tools correctly? Thank you
Beta Was this translation helpful? Give feedback.
All reactions