mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-23 15:59:14 +00:00
OAI: Fix completion token fetching
The generator returns generated_tokens in the dict. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -43,7 +43,7 @@ def create_completion_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 = CompletionResponse(
|
response = CompletionResponse(
|
||||||
choices=[choice],
|
choices=[choice],
|
||||||
|
|||||||
Reference in New Issue
Block a user