mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-29 02:31:48 +00:00
API: Fix usage reporting for chat completions
Resolves #106 Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -67,7 +67,7 @@ def _create_response(generation: dict, model_name: Optional[str]):
|
|||||||
)
|
)
|
||||||
|
|
||||||
prompt_tokens = unwrap(generation.get("prompt_tokens"), 0)
|
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(
|
response = ChatCompletionResponse(
|
||||||
choices=[choice],
|
choices=[choice],
|
||||||
|
|||||||
Reference in New Issue
Block a user