Check if completion_tokens is none in error handler.
This commit is contained in:
parent
12b7f2f4e9
commit
99ff175562
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ class ErrorResponseFormatters:
|
|||
return 400, ErrorResponse(
|
||||
message=message.format(
|
||||
context_window,
|
||||
completion_tokens + prompt_tokens,
|
||||
(completion_tokens or 0) + prompt_tokens,
|
||||
prompt_tokens,
|
||||
completion_tokens,
|
||||
), # type: ignore
|
||||
|
|
Loading…
Reference in a new issue