mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
chat_completion_response_includes_annotations
This commit is contained in:
parent
c2b9e96b3d
commit
8321159889
1 changed files with 6 additions and 1 deletions
|
@ -104,7 +104,12 @@ class StandardBuiltInToolCostTracking:
|
|||
) -> bool:
|
||||
for _choice in response_object.choices:
|
||||
message = getattr(_choice, "message", None)
|
||||
if message is not None and hasattr(message, "annotations"):
|
||||
if (
|
||||
message is not None
|
||||
and hasattr(message, "annotations")
|
||||
and message.annotations is not None
|
||||
and len(message.annotations) > 0
|
||||
):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue