Why is at least one property required in tool definitions? #999
mattparlane
started this conversation in
General
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there...
I recently moved to Langchain.rb from my own manual solution, and I noticed that tool definitions require at least one property. Can I ask why?
My former manual solution had several tool definitions that required no parameters, ie resend the latest report, mark all outstanding tasks as completed, that sort of thing.
I manually commented out the
if parameters[:properties].empty?
condition inLangchain::ToolDefinition#add_function
and everything worked fine, including my zero-property tools, I tested with OpenAI and Gemini.If the condition is necessary, can you suggest some sort of no-op property that I could add?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions