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

GoogleGenerativeAI streaming #1

Open
gomander opened this issue Aug 17, 2024 · 0 comments
Open

GoogleGenerativeAI streaming #1

gomander opened this issue Aug 17, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@gomander
Copy link
Owner

The @google/generative-ai package exposes a somewhat different API than the openai and @anthropic-ai/sdk packages do. This is clearest in the implementation of streaming responses.
The others expose a .toReadableStream() method on the return value of their streaming methods. Google does not do this, instead returning an AsyncGenerator.
I've tried to find a way to convert the output into a ReadableStream, but nothing I've tried has worked. I suspect that there is a fairly simple solution, I just don't have the experience with streams required to find it.

For now, using the GoogleAI API will just force streaming to be disabled.

@gomander gomander added enhancement New feature or request help wanted Extra attention is needed labels Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant