Skip to content

Feat: Add Google Gemini Streaming Support #279

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Sixzero
Copy link
Collaborator

@Sixzero Sixzero commented Mar 28, 2025

This PR introduces streaming support for Google Gemini models via the . It includes necessary refactoring of payload conversion and updates API key handling in user preferences.

- Implement streaming for GoogleOpenAISchema via streamGenerateContent.
- Refactor convert_openai_to_gemini for clarity and robustness.
- Update user_preferences.jl with new API keys (OpenRouter, XAI, MiniMax).
- Adjust configure_callback! for GoogleOpenAISchema.
Copy link

codecov bot commented Mar 28, 2025

Codecov Report

Attention: Patch coverage is 13.15789% with 33 lines in your changes missing coverage. Please review.

Project coverage is 91.40%. Comparing base (1acd4ad) to head (50d2cad).

Files with missing lines Patch % Lines
src/llm_openai_schema_defs.jl 8.57% 32 Missing ⚠️
src/streaming.jl 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #279      +/-   ##
==========================================
- Coverage   92.00%   91.40%   -0.61%     
==========================================
  Files          50       50              
  Lines        4967     5003      +36     
==========================================
+ Hits         4570     4573       +3     
- Misses        397      430      +33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@svilupp
Copy link
Owner

svilupp commented Apr 8, 2025

Thanks for the PR! We need to release the StreamCallbacks version first.

Also, would it be possible to add some tests for behavior of convert_openai_to_gemini? Also, is that really that badly mapped when streaming Google models in the OpenAI compatibility mode? Or are you using standard Gemini streaming endpoints

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.

2 participants