mirror of
https://github.com/katanemo/plano.git
synced 2026-05-15 11:02:39 +02:00
don't compute embeddings for names and other fixes see description (#126)
* serialize tools - 2 * fix int tests * fix int test * fix unit tests
This commit is contained in:
parent
0e5ea3d6db
commit
2a747df7c0
16 changed files with 125 additions and 86 deletions
|
|
@ -12,3 +12,4 @@ pub const ARCH_ROUTING_HEADER: &str = "x-arch-llm-provider";
|
|||
pub const ARCH_MESSAGES_KEY: &str = "arch_messages";
|
||||
pub const ARCH_PROVIDER_HINT_HEADER: &str = "x-arch-llm-provider-hint";
|
||||
pub const CHAT_COMPLETIONS_PATH: &str = "v1/chat/completions";
|
||||
// pub const ARCH_STATE_HEADER: &str = "x-arch-state";
|
||||
|
|
|
|||
|
|
@ -72,11 +72,6 @@ impl FilterContext {
|
|||
fn process_prompt_targets(&self) {
|
||||
for values in self.prompt_targets.iter() {
|
||||
let prompt_target = values.1;
|
||||
self.schedule_embeddings_call(
|
||||
&prompt_target.name,
|
||||
&prompt_target.name,
|
||||
EmbeddingType::Name,
|
||||
);
|
||||
self.schedule_embeddings_call(
|
||||
&prompt_target.name,
|
||||
&prompt_target.description,
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ pub trait Client: Context {
|
|||
}
|
||||
Err(status) => Err(ClientError::DispatchError {
|
||||
upstream_name: String::from(call_args.upstream),
|
||||
internal_status: status.clone(),
|
||||
internal_status: status,
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -469,6 +469,7 @@ impl StreamContext {
|
|||
tools: Some(chat_completion_tools),
|
||||
stream: false,
|
||||
stream_options: None,
|
||||
metadata: None,
|
||||
};
|
||||
|
||||
let msg_body = match serde_json::to_string(&chat_completions) {
|
||||
|
|
@ -686,6 +687,7 @@ impl StreamContext {
|
|||
tools: None,
|
||||
stream: callout_context.request_body.stream,
|
||||
stream_options: callout_context.request_body.stream_options,
|
||||
metadata: None,
|
||||
};
|
||||
|
||||
let json_string = match serde_json::to_string(&chat_completions_request) {
|
||||
|
|
@ -875,6 +877,7 @@ impl StreamContext {
|
|||
tools: None,
|
||||
stream: callout_context.request_body.stream,
|
||||
stream_options: callout_context.request_body.stream_options,
|
||||
metadata: None,
|
||||
};
|
||||
let json_resp = serde_json::to_string(&chat_completion_request).unwrap();
|
||||
debug!("sending response back to default llm: {}", json_resp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue