openai-python
openai-python copied to clipboard
Set "$. messages [0] (SystemMessage). content (ArrayOfContentParts)" as an empty list, and no 400 is returned
Describe the bug
It is mentioned in the official openapi document (https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-f9320ebf347140052c7f8b0bc5c7db24f5e367c368c8cb34c3606af4e2b6591b.yml)
To Reproduce
1.I made the following request with empty list 2.response said 200 but not 400
I think this is inconsistent with the description in the document
Code snippets
completion = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{
"content": [],
"role": "system"
},
{
"content": "hello",
"role": "user"
}
])
OS
macOS
Python version
Python v3.12.4
Library version
openai v1.50.2
whats more, other "ArrayOfContent" have this issue too.