API: Fix usage reporting for chat completions
Resolves #106 Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
e4bb709305
commit
0e9385e023
1 changed files with 1 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ def _create_response(generation: dict, model_name: Optional[str]):
|
|||
)
|
||||
|
||||
prompt_tokens = unwrap(generation.get("prompt_tokens"), 0)
|
||||
completion_tokens = unwrap(generation.get("completion_tokens"), 0)
|
||||
completion_tokens = unwrap(generation.get("generated_tokens"), 0)
|
||||
|
||||
response = ChatCompletionResponse(
|
||||
choices=[choice],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue