From 50a3d6fe753b292ef98e6bbe94771103ae698bf4 Mon Sep 17 00:00:00 2001 From: Roman <66549992+roman-romanov-o@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:44:41 +0300 Subject: [PATCH] allow path-like deployments (#125) --- 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 79c0b87..2d556ac 100644 --- a/aidial_adapter_openai/app.py +++ b/aidial_adapter_openai/app.py @@ -103,7 +103,7 @@ def get_api_version(request: Request): return api_version -@app.post("/openai/deployments/{deployment_id}/chat/completions") +@app.post("/openai/deployments/{deployment_id:path}/chat/completions") async def chat_completion(deployment_id: str, request: Request): data = await parse_body(request) @@ -198,7 +198,7 @@ async def chat_completion(deployment_id: str, request: Request): ) -@app.post("/openai/deployments/{deployment_id}/embeddings") +@app.post("/openai/deployments/{deployment_id:path}/embeddings") async def embedding(deployment_id: str, request: Request): data = await parse_body(request)