mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
map finish reason
This commit is contained in:
parent
1b346e0139
commit
aaa57abddd
10 changed files with 64 additions and 56 deletions
|
@ -529,6 +529,8 @@ def completion(
|
|||
completion_tokens = len(encoding.encode(completion_response))
|
||||
## RESPONSE OBJECT
|
||||
model_response["choices"][0]["message"]["content"] = completion_response
|
||||
if response[0].finish_reason:
|
||||
model_response.choices[0].finish_reason = response[0].finish_reason
|
||||
model_response["created"] = time.time()
|
||||
model_response["model"] = model
|
||||
model_response["usage"] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue