pepperoni21 / ollama-rs

A Rust library allowing to interact with the Ollama API.
MIT License
478 stars 73 forks source link

update: update README streaming example #39

Closed milosgajdos closed 5 months ago

milosgajdos commented 5 months ago

There is a small bug in the generate streaming example, specifically the stream actually returns Option<Result<Vec<GenerationResponse>>>, which the example doesnt account for.

This PR updates the README by adding the iteration loop over the returned GenerationResponseStreamChunk(s).