Skip to content

Commit

Permalink
allow path-like deployments (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-romanov-o authored Jun 26, 2024
1 parent 29c1684 commit 50a3d6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aidial_adapter_openai/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 50a3d6f

Please sign in to comment.