Skip to content

Commit

Permalink
fully ingest model field again (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-romanov-o authored Jun 27, 2024
1 parent 50a3d6f commit bfa0f34
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 @@ -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)

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

0 comments on commit bfa0f34

Please sign in to comment.