Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
PR Message
Hi, I just read the conversation you guys @yu-iskw, @rohanthacker, @ekzhu had in this PR. I have arrived a bit late to the party.
I started working on the client because I was playing/testing the Gemini models on AutoGen and the new Gemini SDK (
google-genai
) was just released, so I thought it would be a good moment. Additionally I had read about the need to have this client in previous issues.The Gemini SDK has lots of features, way more than OpenAI. The implementation I’m sharing doesn’t include them all, however, I wanted to share the current state so we don’t duplicate work.
Good to mention it includes the important features (all I think) from the Autogen OpenAI client.
Here are the features the provided Gemini client support:
create_stream
and tested using the chainlit example.Missing features & TO DOs
mode_info.py
Some preliminary tests I have run:
test_gemini
insidetest_openai_model_client.py
Important things to consider about the behavior of the Gemini SDK
automatic_function_calling
in the create_args config.json_output
config, put ratherresponse_mime_type
config. Where they not only supportjson
but alsoEnums
.I’ll continue working and testing the client, however, would be good to see if I can get any thumbs up . Thanks
Related issue number
#3741
Checks