Skip to content

Add Google Gemini streaming support#15

Open
Sixzero wants to merge 3 commits intosvilupp:mainfrom
Sixzero:feature/gemini-support
Open

Add Google Gemini streaming support#15
Sixzero wants to merge 3 commits intosvilupp:mainfrom
Sixzero:feature/gemini-support

Conversation

@Sixzero
Copy link
Copy Markdown
Contributor

@Sixzero Sixzero commented Mar 28, 2025

This PR adds support for Google's Gemini API to StreamCallbacks.jl.

Changes

  • Create stream_gemini.jl with GoogleStream flavor implementation
  • Add example script demonstrating Gemini API integration
  • Update interface and precompilation files to support Gemini
  • Implement chunk extraction and content parsing for Gemini's SSE format

This allows StreamCallbacks to work with Google's server-sent events (SSE) format for streaming LLM responses.

- Create stream_gemini.jl with GoogleStream flavor implementation
- Add example script demonstrating Gemini API integration
- Update interface and precompilation files to support Gemini
- Implement chunk extraction and content parsing for Gemini's SSE format
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 28, 2025

Codecov Report

❌ Patch coverage is 53.06122% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.67%. Comparing base (9bc62f3) to head (e686c24).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/stream_gemini.jl 52.08% 23 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
- Coverage   86.81%   81.67%   -5.14%     
==========================================
  Files           6        7       +1     
  Lines         273      322      +49     
==========================================
+ Hits          237      263      +26     
- Misses         36       59      +23     

☔ 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
Copy Markdown
Owner

svilupp commented Mar 29, 2025

Thank you for the PR!

Could you please add tests for the new functions?
The easiest way is to run your example and provide explicit callback instance, then you can simply dump the captured streamed chunks into clipboard and give them to LLM to generate real-world like test cases.

@svilupp
Copy link
Copy Markdown
Owner

svilupp commented Apr 8, 2025

@Sixzero could you please add tests for the new functions? Ideally, using real chunks received from Gemini models.

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.

3 participants