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

Release Notes:

- N/A
This commit is contained in:
Xiaobo Liu authored and GitHub committed 2026-05-25 17:01:58 +00:00
1 parent b72e57da65
commit a6780a5a47
1 file changed
+1 -4
+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))),