fix logs a bit more and refactor code

This commit is contained in:
Adil Hafeez 2025-01-27 15:44:41 -08:00
parent a0b13b99ce
commit cc730d8b3d
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
4 changed files with 40 additions and 21 deletions

View file

@ -517,8 +517,11 @@ impl HttpContext for StreamContext {
let chat_completions_response: ChatCompletionsResponse =
match serde_json::from_str(body_utf8.as_str()) {
Ok(de) => de,
Err(_e) => {
debug!("invalid response: {}", body_utf8);
Err(err) => {
debug!(
"non chat-completion compliant response received err: {}, body: {}",
err, body_utf8
);
return Action::Continue;
}
};