Skip to content

Commit

Permalink
groq: handle null queue_time (#20839)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccurme authored and hinthornw committed Apr 26, 2024
1 parent 8161b34 commit df87cd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/partners/groq/langchain_groq/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def _combine_llm_outputs(self, llm_outputs: List[Optional[dict]]) -> dict:
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
Expand Down

0 comments on commit df87cd2

Please sign in to comment.