mirror of
https://github.com/katanemo/plano.git
synced 2026-07-14 16:22:12 +02:00
refactor a bit
This commit is contained in:
parent
bd43b1793e
commit
413f36a918
2 changed files with 8 additions and 9 deletions
|
|
@ -2,7 +2,6 @@ use crate::stream_context::{ResponseHandlerType, StreamCallContext, StreamContex
|
|||
use common::{
|
||||
api::open_ai::{
|
||||
self, ArchState, ChatCompletionStreamResponse, ChatCompletionTool, ChatCompletionsRequest,
|
||||
ContentType,
|
||||
},
|
||||
consts::{
|
||||
ARCH_FC_MODEL_NAME, ARCH_INTERNAL_CLUSTER_NAME, ARCH_ROUTING_HEADER,
|
||||
|
|
@ -238,12 +237,12 @@ impl HttpContext for StreamContext {
|
|||
Duration::from_secs(5),
|
||||
);
|
||||
|
||||
if let Some(ContentType::Text(content)) =
|
||||
if let Some(content) =
|
||||
self.user_prompt.as_ref().unwrap().content.as_ref()
|
||||
{
|
||||
let call_context = StreamCallContext {
|
||||
response_handler_type: ResponseHandlerType::ArchFC,
|
||||
user_message: Some(content.clone()),
|
||||
user_message: Some(content.to_string()),
|
||||
prompt_target_name: None,
|
||||
request_body: self.chat_completions_request.as_ref().unwrap().clone(),
|
||||
similarity_scores: None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue