"examples/vscode:/vscode.git/clone" did not exist on "2cf4bd0acf479d8d51347b6b524aebd3fdcc8d9f"
Unverified Commit 44aab7f9 authored by Ravi Theja's avatar Ravi Theja Committed by GitHub
Browse files

oai: fix openAI client error with single request via batch api (#6170)


Co-authored-by: default avatarRavi Theja Desetty <ravitheja@Ravis-MacBook-Pro.local>
parent 43baba64
...@@ -1395,7 +1395,9 @@ def v1_chat_generate_response( ...@@ -1395,7 +1395,9 @@ def v1_chat_generate_response(
"id": ret[i]["meta_info"]["id"], "id": ret[i]["meta_info"]["id"],
"object": "chat.completion", "object": "chat.completion",
"created": created, "created": created,
"model": request[i].model, "model": (
request[i].model if isinstance(request, list) else request.model
),
"choices": choice, "choices": choice,
"usage": { "usage": {
"prompt_tokens": ret[i]["meta_info"]["prompt_tokens"], "prompt_tokens": ret[i]["meta_info"]["prompt_tokens"],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment