From bfa0f3418876e1eb3f9fcd09aee3a43eee24a12a Mon Sep 17 00:00:00 2001 From: Roman <66549992+roman-romanov-o@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:18:56 +0300 Subject: [PATCH] fully ingest model field again (#126) --- aidial_adapter_openai/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aidial_adapter_openai/app.py b/aidial_adapter_openai/app.py index 2d556ac..a8b87e7 100644 --- a/aidial_adapter_openai/app.py +++ b/aidial_adapter_openai/app.py @@ -115,7 +115,7 @@ async def chat_completion(deployment_id: str, request: Request): # Azure and non-Azure deployments. # Therefore, we provide the "model" field for all deployments here. # The same goes for /embeddings endpoint. - data["model"] = data.get("model") or deployment_id + data["model"] = deployment_id is_stream = data.get("stream", False) @@ -203,7 +203,7 @@ async def embedding(deployment_id: str, request: Request): data = await parse_body(request) # See note for /chat/completions endpoint - data["model"] = data.get("model") or deployment_id + data["model"] = deployment_id creds = await get_credentials(request) api_version = get_api_version(request)