mirror of
https://github.com/katanemo/plano.git
synced 2026-05-14 02:24:00 +02:00
Break apart common_types mod (#334)
Signed-off-by: José Ulises Niño Rivera <junr03@users.noreply.github.com>
This commit is contained in:
parent
93d3d349a2
commit
d002b2042a
16 changed files with 764 additions and 783 deletions
|
|
@ -1,10 +1,8 @@
|
|||
use crate::stream_context::{ResponseHandlerType, StreamCallContext, StreamContext};
|
||||
use common::{
|
||||
common_types::{
|
||||
open_ai::{
|
||||
to_server_events, ArchState, ChatCompletionStreamResponse, ChatCompletionsRequest,
|
||||
},
|
||||
PromptGuardRequest, PromptGuardTask,
|
||||
api::{
|
||||
open_ai::{self, ArchState, ChatCompletionStreamResponse, ChatCompletionsRequest},
|
||||
prompt_guard::{PromptGuardRequest, PromptGuardTask},
|
||||
},
|
||||
consts::{
|
||||
ARCH_FC_MODEL_NAME, ARCH_INTERNAL_CLUSTER_NAME, ARCH_STATE_HEADER,
|
||||
|
|
@ -324,7 +322,7 @@ impl HttpContext for StreamContext {
|
|||
),
|
||||
];
|
||||
|
||||
let mut response_str = to_server_events(chunks);
|
||||
let mut response_str = open_ai::to_server_events(chunks);
|
||||
// append the original response from the model to the stream
|
||||
response_str.push_str(&body_utf8);
|
||||
self.set_http_response_body(0, body_size, response_str.as_bytes());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue