mirror of
https://github.com/katanemo/plano.git
synced 2026-06-20 15:28:07 +02:00
wip
This commit is contained in:
parent
23ed25342a
commit
7b99379275
11 changed files with 761 additions and 392 deletions
|
|
@ -1095,7 +1095,17 @@ impl StreamContext {
|
|||
{
|
||||
let default_target_response_str = if self.streaming_response {
|
||||
let chat_completion_response =
|
||||
serde_json::from_slice::<ChatCompletionsResponse>(&body).unwrap();
|
||||
match serde_json::from_slice::<ChatCompletionsResponse>(&body) {
|
||||
Ok(chat_completion_response) => chat_completion_response,
|
||||
Err(e) => {
|
||||
warn!(
|
||||
"error deserializing default target response: {}, body str: {}",
|
||||
e,
|
||||
String::from_utf8(body).unwrap()
|
||||
);
|
||||
return self.send_server_error(ServerError::Deserialization(e), None);
|
||||
}
|
||||
};
|
||||
|
||||
let chunks = vec![
|
||||
ChatCompletionStreamResponse::new(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue