Skip to content
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

Got Validation Error on Create Thread and Run #663

Closed
dibikhairurrazi opened this issue Feb 17, 2024 · 2 comments
Closed

Got Validation Error on Create Thread and Run #663

dibikhairurrazi opened this issue Feb 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dibikhairurrazi
Copy link

dibikhairurrazi commented Feb 17, 2024

I have no problem running this code until today
Screenshot 2024-02-17 at 18 06 18
Now it return validation error.
error, status code: 400, message: 4 validation errors for Request\nbody -> tools -> 0 -> type\n unexpected value; permitted: <ToolTypeParam.CODE_INTERPRETER: 'code_interpreter'> (type=value_error.const; given=retrieval; permitted=(<ToolTypeParam.CODE_INTERPRETER: 'code_interpreter'>,))\nbody -> tools -> 0 -> function\n extra fields not permitted (type=value_error.extra)\nbody -> tools -> 0 -> function\n extra fields not permitted (type=value_error.extra)\nbody -> tools -> 0 -> type\n unexpected value; permitted: <ToolTypeParam.FUNCTION: 'function'> (type=value_error.const; given=retrieval; permitted=(<ToolTypeParam.FUNCTION: 'function'>,))

Based on this thread, they made changes to the validation which disallow any unknown fields. Is there any way to solve this?

Thanks

Env:

  • go-openai version: 1.19.4
  • Go version: 1.21.4
  • OS: Mac OS 13.5
@dibikhairurrazi dibikhairurrazi added the bug Something isn't working label Feb 17, 2024
@CaoPengflying
Copy link
Contributor

i have the same prolbem.
Official reply:
Hi all, we did recently tighten up the validation logic here, apologies for the issues. We now check for unknown fields in each tool definition and disallow them. This was a bug in our original validation logic that we intended to fix. @CheongFan it looks like you might be passing “function: null” …

@dibikhairurrazi
Copy link
Author

closing this, no issue after using the latest commit. thanks @CaoPengflying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants