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

[Bug]: Error with OpenAI server: API request failed with status code 400 #3906

Closed
boy-hack opened this issue Apr 8, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@boy-hack
Copy link

boy-hack commented Apr 8, 2024

Your current environment

The output of `python collect_env.py`

🐛 Describe the bug

I encountered an error with the OpenAI server:

[openai_api_compatible] Error: API request failed with status code 400: {"object":"error","message":"{'type': 'string_type', 'loc': ('body', 'messages', 2, 'function_call'), 'msg': 'Input should be a valid string', 'input': {'name': 'function call', 'arguments': '{}'}, 'url': '[https://errors.pydantic.dev/2.6/v/string_type'}]","type":"BadRequestError","param":null,"code":400}

@boy-hack boy-hack added the bug Something isn't working label Apr 8, 2024
@boy-hack
Copy link
Author

boy-hack commented Apr 8, 2024

After thorough investigation of the code, I suspect the issue may lie in the formatting of the 'message'.

image

@hmellor
Copy link
Collaborator

hmellor commented Apr 20, 2024

Should be resolved by #3467

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

Successfully merging a pull request may close this issue.

3 participants