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

Set "$. messages [0] (SystemMessage). content (ArrayOfContentParts)" as an empty list, and no 400 is returned #1812

Open
steadyfirmness opened this issue Oct 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@steadyfirmness
Copy link

steadyfirmness commented Oct 23, 2024

Describe the bug

It is mentioned in the official openapi document (https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-f9320ebf347140052c7f8b0bc5c7db24f5e367c368c8cb34c3606af4e2b6591b.yml)
image

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

@steadyfirmness steadyfirmness added the bug Something isn't working label Oct 23, 2024
@steadyfirmness
Copy link
Author

whats more, other "ArrayOfContent" have this issue too.

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

1 participant