From 678963a5ea2cfebe92db2c55a58bcd7f2d008990 Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Fri, 21 Mar 2025 15:02:36 -0700 Subject: [PATCH] fix tests --- README.md | 2 +- crates/prompt_gateway/src/http_context.rs | 2 +- demos/shared/chatbot_ui/common.py | 2 +- demos/shared/chatbot_ui/run_stream.py | 4 ++-- tests/rest/api_model_server.rest | 2 +- tests/rest/api_prompt_gateway.rest | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d3b13d69..81d88e01 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,7 @@ client = OpenAI( response = client.chat.completions.create( # we select model from arch_config file - model="--", + model="None", messages=[{"role": "user", "content": "What is the capital of France?"}], ) diff --git a/crates/prompt_gateway/src/http_context.rs b/crates/prompt_gateway/src/http_context.rs index b8eb2797..df0d4748 100644 --- a/crates/prompt_gateway/src/http_context.rs +++ b/crates/prompt_gateway/src/http_context.rs @@ -190,7 +190,7 @@ impl HttpContext for StreamContext { messages: deserialized_body.messages.clone(), metadata, stream: deserialized_body.stream, - model: "--".to_string(), + model: deserialized_body.model.clone(), stream_options: deserialized_body.stream_options.clone(), tools: Some(tool_calls), }; diff --git a/demos/shared/chatbot_ui/common.py b/demos/shared/chatbot_ui/common.py index cfcc6556..42e50bd4 100644 --- a/demos/shared/chatbot_ui/common.py +++ b/demos/shared/chatbot_ui/common.py @@ -38,7 +38,7 @@ def chat( try: response = client.chat.completions.create( # we select model from arch_config file - model="--", + model="None", messages=history, temperature=1.0, stream=True, diff --git a/demos/shared/chatbot_ui/run_stream.py b/demos/shared/chatbot_ui/run_stream.py index 407d4c05..b406e147 100644 --- a/demos/shared/chatbot_ui/run_stream.py +++ b/demos/shared/chatbot_ui/run_stream.py @@ -54,13 +54,13 @@ def chat( if model_selector and model_selector != "": headers["x-arch-llm-provider-hint"] = model_selector client = OpenAI( - api_key="--", + api_key="None", base_url=CHAT_COMPLETION_ENDPOINT, default_headers=headers, ) response = client.chat.completions.create( # we select model from arch_config file - model="--", + model="None", messages=history, temperature=1.0, stream=True, diff --git a/tests/rest/api_model_server.rest b/tests/rest/api_model_server.rest index 3e5d2f47..5fdbf968 100644 --- a/tests/rest/api_model_server.rest +++ b/tests/rest/api_model_server.rest @@ -238,7 +238,7 @@ POST {{model_server_endpoint}}/function_calling HTTP/1.1 Content-Type: application/json { - "model": "--", + "model": "None", "messages": [ { "role": "user", diff --git a/tests/rest/api_prompt_gateway.rest b/tests/rest/api_prompt_gateway.rest index db06cafe..f28690c9 100644 --- a/tests/rest/api_prompt_gateway.rest +++ b/tests/rest/api_prompt_gateway.rest @@ -82,7 +82,7 @@ POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1 Content-Type: application/json { - "model": "--", + "model": "None", "messages": [ { "role": "user",