mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
remove prompt from getting logged (#21831)
This commit is contained in:
parent
3476452774
commit
698c46830b
1 changed files with 5 additions and 3 deletions
|
|
@ -726,10 +726,12 @@ def _count_content_list(
|
|||
if thinking_text:
|
||||
num_tokens += count_function(thinking_text)
|
||||
else:
|
||||
content_type = (
|
||||
c.get("type", type(c).__name__) if isinstance(c, dict) else type(c).__name__
|
||||
)
|
||||
raise ValueError(
|
||||
f"Invalid content item type: {type(c).__name__}. "
|
||||
f"Expected str or dict with 'type' field. "
|
||||
f"Value: {c!r}"
|
||||
f"Invalid content item type: {content_type}. "
|
||||
f"Expected str or dict with 'type' field (text, image_url, tool_use, tool_result, thinking)."
|
||||
)
|
||||
return num_tokens
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue