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

[NA] fix gemini streaming #1106

Merged
merged 3 commits into from
Jan 22, 2025
Merged

[NA] fix gemini streaming #1106

merged 3 commits into from
Jan 22, 2025

Conversation

idoberko2
Copy link
Contributor

Details

FE reported that Gemini streaming isn't working properly:

It just waits for the full response and then returns 200 status

I was able to reproduce locally and noticed that GoogleAiGeminiStreamingChatModel::generate() is blocking and therefore the chat completions endpoint only responds when the above is finished.
This PR fixes the issue as you can see in this video:
Jan-22-2025 10-32-40

Testing

Tested locally by running the application and calling the relevant endpoint.

@idoberko2 idoberko2 self-assigned this Jan 22, 2025
@idoberko2 idoberko2 requested a review from a team as a code owner January 22, 2025 08:39
andrescrz
andrescrz previously approved these changes Jan 22, 2025
Copy link
Collaborator

@andrescrz andrescrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend adding a test, if missing.

@idoberko2 idoberko2 merged commit 3385232 into main Jan 22, 2025
8 checks passed
@idoberko2 idoberko2 deleted the ido/fix-gemini-streaming branch January 22, 2025 10:08
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