-
Notifications
You must be signed in to change notification settings - Fork 310
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using OpenAI tools with Assistant fails #852
Comments
the problem seems to be that
and
inherit from Tool
which has a function field that is invalid in the Retrieval and CodeInterpreter case, as OpenAI is expecting so when you do
the tool.model_dump() returns which makes it fail as OpenAI does not like this... The workaround I found is to delete the function field from the models as soon as I import them
|
I would imagine a better solution would be to modify the Tool model so it does not include the "function" field and name it BaseTool, make RetrievalTool and CodeInterpreterTool inherit from BaseTool. Then create a Tool model that inherits from BaseTool and adds the "function" field |
First check
Bug summary
Using
marvin.beta.assistants.Retrieval
marvin.beta.assistants.CodeInterpreter
in Assistant tools fails
Reproduction
Error
Versions
Additional context
No response
The text was updated successfully, but these errors were encountered: