From 959c057bd9138176c8578e0cfc9c2736ab73cc9d Mon Sep 17 00:00:00 2001 From: Francis Couture-Harpin Date: Sat, 6 Jul 2024 19:40:41 -0400 Subject: [PATCH] server-tests : strip "chat" from base_url in oai_chat_completions --- examples/server/tests/features/steps/steps.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/server/tests/features/steps/steps.py b/examples/server/tests/features/steps/steps.py index 2ad6eac6c..b32d7fe8c 100644 --- a/examples/server/tests/features/steps/steps.py +++ b/examples/server/tests/features/steps/steps.py @@ -903,8 +903,8 @@ async def request_completion(prompt, async def oai_chat_completions(user_prompt, seed, system_prompt, - base_url, - base_path, + base_url: str, + base_path: str, async_client, debug=False, temperature=None, @@ -993,7 +993,7 @@ async def oai_chat_completions(user_prompt, else: try: openai.api_key = user_api_key - openai.base_url = f'{base_url}{base_path}/' + openai.base_url = f'{base_url}{base_path.removesuffix("chat")}' assert model is not None chat_completion = openai.chat.completions.create( messages=payload['messages'],