mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
style(gemini): format count_tokens request body per ruff format
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
4e25825b91
commit
3bc391c16e
1 changed files with 13 additions and 3 deletions
|
|
@ -141,10 +141,20 @@ class GoogleAIStudioTokenCounter:
|
|||
"generateContentRequest": { # mutable-ok: httpx json body takes a plain dict
|
||||
"model": f"models/{model}",
|
||||
"contents": cleaned_contents,
|
||||
**( # mutable-ok: httpx json body takes a plain dict
|
||||
{"systemInstruction": system_instruction} if system_instruction is not None else {}
|
||||
**(
|
||||
{ # mutable-ok: httpx json body takes a plain dict
|
||||
"systemInstruction": system_instruction,
|
||||
}
|
||||
if system_instruction is not None
|
||||
else {} # mutable-ok: httpx json body takes a plain dict
|
||||
),
|
||||
**(
|
||||
{ # mutable-ok: httpx json body takes a plain dict
|
||||
"tools": tools,
|
||||
}
|
||||
if tools is not None
|
||||
else {} # mutable-ok: httpx json body takes a plain dict
|
||||
),
|
||||
**({"tools": tools} if tools is not None else {}), # mutable-ok: httpx json body takes a plain dict
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue