Adds error_for_status() for ollama requests
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user