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

Update to work with Google Gemini #428

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sepatel
Copy link

@sepatel sepatel commented Feb 21, 2025

Q A
Bug fix? yes
New feature? no
BC breaks? yes
Related Issue Fix #412

Describe your change

Enable the id on the ChatCompletion to be nullable. Unfortunately this does technically break backwards compatibility as it was defined as a required field but is not actually provided back by all services that are openai compatible. This is also in direct contradiction of the openai documented standard which states that the id is a required field as well.

What problem is this fixing?

The inability for Gemini to work correctly.

@sepatel
Copy link
Author

sepatel commented Feb 23, 2025

My original description saying that id is supposed to be a required field according to the docs is actually incorrect.

It is probably important to also note though that the gemini api's are actually openai compliant because the missing id field is actually not a required field.

https://platform.openai.com/docs/api-reference/chat/create
https://platform.openai.com/docs/api-reference/chat/object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when using Gemini OpenAI API
1 participant