From cee177e8c463cff10c111b1cb57f328e9eda9a66 Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Mon, 14 Apr 2025 15:48:40 -0700 Subject: [PATCH] spell-check --- README.md | 1 + crates/prompt_gateway/src/http_context.rs | 2 +- crates/prompt_gateway/src/stream_context.rs | 2 +- tests/rest/api_prompt_gateway.rest | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c4b805ad..8a416d51 100644 --- a/README.md +++ b/README.md @@ -277,6 +277,7 @@ $ curl --header 'Content-Type: application/json' \ ], ... } + ``` You can override model selection using `x-arch-llm-provider-hint` header. For example if you want to use mistral using following curl command, diff --git a/crates/prompt_gateway/src/http_context.rs b/crates/prompt_gateway/src/http_context.rs index 559b0fa0..c0e8df94 100644 --- a/crates/prompt_gateway/src/http_context.rs +++ b/crates/prompt_gateway/src/http_context.rs @@ -382,7 +382,7 @@ impl HttpContext for StreamContext { *metadata = Value::Object(serde_json::Map::new()); } - let tool_call_message = self.generate_toll_call_message(); + let tool_call_message = self.generate_tool_call_message(); let tool_call_message_str = serde_json::to_string(&tool_call_message).unwrap(); metadata.as_object_mut().unwrap().insert( X_ARCH_TOOL_CALL.to_string(), diff --git a/crates/prompt_gateway/src/stream_context.rs b/crates/prompt_gateway/src/stream_context.rs index 5bfc6d5e..1cd2fa86 100644 --- a/crates/prompt_gateway/src/stream_context.rs +++ b/crates/prompt_gateway/src/stream_context.rs @@ -626,7 +626,7 @@ impl StreamContext { messages } - pub fn generate_toll_call_message(&mut self) -> Message { + pub fn generate_tool_call_message(&mut self) -> Message { if self.arch_fc_response.is_none() { info!("arch_fc_response is none, generating tool call message"); Message { diff --git a/tests/rest/api_prompt_gateway.rest b/tests/rest/api_prompt_gateway.rest index f28690c9..4a1f77e0 100644 --- a/tests/rest/api_prompt_gateway.rest +++ b/tests/rest/api_prompt_gateway.rest @@ -68,7 +68,7 @@ Content-Type: application/json { "role": "assistant", "content": "It seems I'm missing some information. Could you provide the following details days ?", - "model": "Arch-Function-1.5b" + "model": "Arch-Function" }, { "role": "user", @@ -91,7 +91,7 @@ Content-Type: application/json { "role": "assistant", "content": "It seems I'm missing some information. Could you provide the following details days ?", - "model": "Arch-Function-1.5b" + "model": "Arch-Function" }, { "role": "user",