mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
fix(vertex): drop Final image_tokens redeclaration flagged by basedpyright
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
ac8e1a355c
commit
6cbed7b4c0
1 changed files with 1 additions and 2 deletions
|
|
@ -371,13 +371,12 @@ def _usage_from_embed_content_response(
|
|||
|
||||
details: Final[Sequence[PromptTokensDetails]] = usage_metadata.get("promptTokensDetails") or ()
|
||||
if not details:
|
||||
image_tokens: Final = prompt_tokens if _count_input_images(input, resolved_files) else 0
|
||||
return Usage(
|
||||
prompt_tokens=prompt_tokens,
|
||||
total_tokens=total_tokens,
|
||||
prompt_tokens_details=PromptTokensDetailsWrapper(
|
||||
text_tokens=0,
|
||||
image_tokens=image_tokens,
|
||||
image_tokens=prompt_tokens if _count_input_images(input, resolved_files) else 0,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue