deepseek: Simplify error mapping in DeepSeek stream_completion (#57582)
Release Notes: - N/A
This commit is contained in:
1 parent
b72e57da65
commit
a6780a5a47
1 file changed
+1
-4
@@ -319,10 +319,7 @@ pub async fn stream_completion(
|
||||
if line == "[DONE]" {
|
||||
None
|
||||
} else {
|
||||
match serde_json::from_str(line) {
|
||||
Ok(response) => Some(Ok(response)),
|
||||
Err(error) => Some(Err(anyhow!(error))),
|
||||
}
|
||||
Some(serde_json::from_str(line).map_err(Into::into))
|
||||
}
|
||||
}
|
||||
Err(error) => Some(Err(anyhow!(error))),
|
||||
|
||||
Reference in new issue
Block a user