You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also ran into this. python replied with "You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0" Now that is true in the form of the code below, but I also got the similar error using the client.chat.completions.create form.
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
response = client.chat.completions.create(
# model="alibaba/Qwen1.5-110B-Chat",
model="Qwen/Qwen2-7B-Instruct",
messages=[
{
"role": "system",
"content": [{"type": "text", "text": "you are a dog"}],
"name": "",
},
{
"role": "user",
"content": [{"type": "text", "text": "你好啊"}],
"name": "",
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "你好,我是一条狗,我叫汪昂",
}
],
"name": "",
},
{
"role": "user",
"content": [{"type": "text", "text": "Hello"}],
"name": "",
},
],
stream=True,
)
Am using openai to create, got request format error:
openai.BadRequestError: Error code: 400 - {'code': 50400, 'message': 'The request parameter is invalid, Please check again.', 'data': None, 'error': 'The request parameter is invalid, Please check again.'}
this format previous works OK> why?
To Reproduce
gyiguy
Code snippets
No response
OS
macOS
Python version
3.11
Library version
openai latest
The text was updated successfully, but these errors were encountered: