deepseek: Simplify error mapping in DeepSeek stream_completion (#57582)

Release Notes:

- N/A
This commit is contained in:
Xiaobo Liu
2026-05-26 01:01:58 +08:00
committed by GitHub
parent b72e57da65
commit a6780a5a47
+1 -4
View File
@@ -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))),