map finish reason

This commit is contained in:
Krrish Dholakia 2023-09-13 19:22:38 -07:00
parent 1b346e0139
commit aaa57abddd
10 changed files with 64 additions and 56 deletions

View file

@ -114,6 +114,7 @@ def completion(
model_response["choices"][0]["message"]["content"] = completion_response[
"completion"
]
model_response.choices[0].finish_reason = completion_response["stop_reason"]
## CALCULATING USAGE
prompt_tokens = len(