New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
anthropic[patch]: handle lists in function calling #18609
anthropic[patch]: handle lists in function calling #18609
Conversation
The latest updates on your projects. Learn more about Vercel for Git 鈫楋笌 1 Ignored Deployment
|
return json.dumps({"anyOf": parameter["anyOf"]}) | ||
if "allOf" in parameter: | ||
return json.dumps({"allOf": parameter["allOf"]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dumping json schema like js
if tool["parameters"]["properties"][key][ | ||
"type" | ||
] == "array" and not isinstance(value, list): | ||
arguments[key] = [value] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crawl for list
and isinstance(value, dict) | ||
and len(value.keys()) == 1 | ||
): | ||
arguments[key] = list(value.values())[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crawl for objects like {"item": "my string"}
that should really just be "my string"
No description provided.