mirror of
https://github.com/katanemo/plano.git
synced 2026-06-23 15:38:07 +02:00
fix tests
This commit is contained in:
parent
786bb40253
commit
00cf848a8f
4 changed files with 35 additions and 5 deletions
|
|
@ -504,6 +504,10 @@ impl HttpContext for StreamContext {
|
|||
};
|
||||
|
||||
if self.streaming_response {
|
||||
if body_utf8 == "data: [DONE]\n" {
|
||||
return Action::Continue;
|
||||
}
|
||||
|
||||
let chat_completions_chunk_response_events =
|
||||
match ChatCompletionStreamResponseServerEvents::try_from(body_utf8.as_str()) {
|
||||
Ok(response) => response,
|
||||
|
|
@ -517,7 +521,10 @@ impl HttpContext for StreamContext {
|
|||
};
|
||||
|
||||
if chat_completions_chunk_response_events.events.is_empty() {
|
||||
debug!("empty streaming response");
|
||||
debug!(
|
||||
"cound't parse any streaming events: body str: {}",
|
||||
body_utf8
|
||||
);
|
||||
return Action::Continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ impl HttpContext for StreamContext {
|
|||
if endpoints.len() == 1 {
|
||||
let (name, _) = endpoints.iter().next().unwrap();
|
||||
debug!("Setting ARCH_PROVIDER_HINT_HEADER to {}", name);
|
||||
self.set_http_request_header(ARCH_ROUTING_HEADER, Some(&name));
|
||||
self.set_http_request_header(ARCH_ROUTING_HEADER, Some(name));
|
||||
} else {
|
||||
warn!("Need single endpoint when use_agent_orchestrator is set");
|
||||
self.send_server_error(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue