avastmick / google-generative-ai-rs

An unofficial rust-based client library to interact with the Google Gemini generative AI API
https://docs.rs/google-generative-ai-rs/
MIT License
21 stars 7 forks source link

implement streaming content processing #20

Closed hitsmaxft closed 7 months ago

hitsmaxft commented 7 months ago

I've changed StreamingGeminiConent related code for iterating response with async streaming,

avastmick commented 7 months ago

@hitsmaxft Thanks for the time you've taken here!

A few minor things before I merge in:

  1. Could you remove the Flake stuff? I'd like to keep the crate as 100% rust and using cargoas the package manager
  2. You've added pin to Cargo.toml- I don't think you meant to... https://crates.io/crates/pin You use std::pin
  3. Finally, could you bump the version to version 0.2.0

Thanks again. 🚀

avastmick commented 7 months ago

I've created a branch for this: streamed_response

Please point your PR at that as the merge target and we can kick this about some. I've got limited time right now, so a branch will be easier for me to play with.

Thanks!