Adds error_for_status() for ollama requests

This commit is contained in:
2026-01-07 14:16:44 +00:00
parent 53353eabe0
commit 96bed8e85b

View File

@@ -76,9 +76,10 @@ impl OllamaClient {
.post(endpoint)
.json(&request)
.send()
.await
.map_err(OllamaError::from)?; // Adjust based on your error type
.await?
.error_for_status()?;
println!("{:?}", response);
let bytes_stream = response.bytes_stream();
let body_reader = StreamReader::new(