mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
Update utils.py
This commit is contained in:
parent
1492d46df9
commit
c32aad035d
1 changed files with 2 additions and 0 deletions
|
|
@ -724,6 +724,8 @@ def generic_cost_per_token( # noqa: PLR0915
|
|||
# present (character_count, video_length_seconds, or image_count), since
|
||||
# the gap may represent tokens already billed through those dimensions
|
||||
# and converting them to text_tokens would cause double-billing.
|
||||
unaccounted_tokens = usage.prompt_tokens - accounted_tokens
|
||||
prompt_tokens_details["text_tokens"] += unaccounted_tokens
|
||||
|
||||
(
|
||||
prompt_base_cost,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue