Skip to content

Added StreamCallbacks parameter to generateContentStream() (#322) #446

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 1 commit into
base: main
Choose a base branch
from

Conversation

sakshipimpale33
Copy link

Changes Made:
Added new test cases in callbacks test suite.
Used mock responses from getMockResponseStreaming.
Improved test coverage for streaming responses.

Test for onData callback: Ensures onData is called with non-empty data chunks.
Test for onError callback: Ensures onError is triggered with a GoogleGenerativeAIError when the response contains an error.
Test for onEnd callback: Ensures onEnd is correctly called with the final processed data.
Test for all callbacks: Verifies that onData and onEnd are properly called in a long response

🔹 Additional Notes:
The test suite improvements enhance the reliability of the streaming functionality by validating the correct execution of all callback functions.

all Test Cases are Passes

@Annhiluc Annhiluc added type:feature request New feature request/enhancement status:triaged Issue/PR triaged to the corresponding sub-team p3 labels Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3 status:triaged Issue/PR triaged to the corresponding sub-team type:feature request New feature request/enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants