diff --git a/src/generation/completion/mod.rs b/src/generation/completion/mod.rs index 7a2abdd..f58dc1c 100644 --- a/src/generation/completion/mod.rs +++ b/src/generation/completion/mod.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; -use crate::{error::OllamaError, Ollama}; +use crate::Ollama; use request::GenerationRequest; @@ -9,7 +9,7 @@ pub mod request; #[cfg(feature = "stream")] /// A stream of `GenerationResponse` objects pub type GenerationResponseStream = std::pin::Pin< - Box>>, + Box>>, >; pub type GenerationResponseStreamChunk = Vec; @@ -23,6 +23,8 @@ impl Ollama { ) -> crate::error::Result { use tokio_stream::StreamExt; + use crate::error::OllamaError; + let mut request = request; request.stream = true;