-
Notifications
You must be signed in to change notification settings - Fork 201
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
Error when using Gemini OpenAI API #412
Comments
Yes. I get this too. Is there a way to have deserialization ignore missing fields? |
I emailed the Google guy asking them to add it |
I asked an AI, they said if they change:
to:
it should then work |
better yet this:
|
git clone https://github.com/aallam/openai-kotlin.git cd openai-kotlin edit the ChatCompletion.kt in core to
and save ./gradlew :openai-core:assemble :openai-client:assemble put the two jar files in libs folder add dependencies // implementation("com.aallam.openai:openai-client:4.0.1") sync, clean rebuild, test Voila! It works now with Gemini! |
It is probably important to also note though that the gemini api's are actually openai compliant because of the missing id field which is actually not a required field. https://platform.openai.com/docs/api-reference/chat/create |
Description
When using the Gemini OpenAI API, an error occurs, but the packet capture shows that the request is normal.
Steps to Reproduce
Environment
Additional Info
Captured packet request image:

The text was updated successfully, but these errors were encountered: