oai: fix openAI client error with single request via batch api (#6170)
Co-authored-by: Ravi Theja Desetty <ravitheja@Ravis-MacBook-Pro.local>
This commit is contained in:
@@ -1395,7 +1395,9 @@ def v1_chat_generate_response(
|
||||
"id": ret[i]["meta_info"]["id"],
|
||||
"object": "chat.completion",
|
||||
"created": created,
|
||||
"model": request[i].model,
|
||||
"model": (
|
||||
request[i].model if isinstance(request, list) else request.model
|
||||
),
|
||||
"choices": choice,
|
||||
"usage": {
|
||||
"prompt_tokens": ret[i]["meta_info"]["prompt_tokens"],
|
||||
|
||||
Reference in New Issue
Block a user