Closed jeremychone closed 5 months ago
Hey! Ollama can send multiple responses in the same payload (it uses the Newline-Delimited JSON format), I never had this issue myself but some people did when the payload contains multiple responses.
@pepperoni21 Ah, multiple responses to the same GenerationRequest. That's interesting. I'm not certain when that would occur, but if the underlying HTTP API allows for it, it's good to expose this at the library level.
I've implemented the fix, and it works, I've made a note of this in the video's comments/description. A little friction for the user, but I should have locked my code/video to ollama-rs =0.1.5
. My bad.
Note: I'm not sure the currrent will display correctly if there are multiple GenerationResponses for the same request. However, I believe the code is unlikely to produce such a scenario.
Thank you for your response.
Hi, I'm certain it's logical, but I'd like to grasp the reason behind the change in
ollama-rs 0.1.6
, wherestream.next()
now returns aVec<GenerationResponse>
instead of a singleGenerationResponse
.Context
I created a video about the ollama-rs full tutorial using
ollama-rs 0.1.5
. I've begun updating the code to accommodateollama-rs 0.1.6
, but I want to provide context in the readme and YouTube description.