groq: handle null queue_time (#20839)

This commit is contained in:
ccurme 2024-04-24 12:50:09 -04:00 committed by GitHub
parent 30e48c9878
commit 3bcfbcc871
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -469,7 +469,7 @@ class ChatGroq(BaseChatModel):
token_usage = output["token_usage"]
if token_usage is not None:
for k, v in token_usage.items():
if k in overall_token_usage:
if k in overall_token_usage and v is not None:
overall_token_usage[k] += v
else:
overall_token_usage[k] = v