This PR addresses a problem with tools in Open AI that do not accept an empty value as parameters, despite the documentation stating that most of these fields are optional. This PR includes a verification in the TryFrom for GoogleAIStudioFunctionDeclaration to determine if the function requires parameters. If it does not, we assign it a value of None.
Before:
Object {
"name": String("reply_to_user"),
"description": String("Reply to the user with a message. You don't need to generate any arguments for this function."),
"parameters": Object {
"type": "object",
"properties": {},
"required": []
},
},
After:
Object {
"name": String("reply_to_user"),
"description": String("Reply to the user with a message. You don't need to generate any arguments for this function."),
"parameters": Null,
},
Description
See https://github.com/dust-tt/tasks/issues/986.
This PR addresses a problem with tools in Open AI that do not accept an empty value as parameters, despite the documentation stating that most of these fields are optional. This PR includes a verification in the
TryFrom
forGoogleAIStudioFunctionDeclaration
to determine if the function requires parameters. If it does not, we assign it a value of None.Before:
After:
Risk
Deploy Plan