mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-05 08:07:05 +00:00
fix divide by 0 bug
This commit is contained in:
parent
91a89eb4ed
commit
02fc507b01
1 changed files with 2 additions and 1 deletions
|
|
@ -875,7 +875,8 @@ Model Info:
|
|||
|
||||
if isinstance(response_obj, litellm.ModelResponse):
|
||||
completion_tokens = response_obj.usage.completion_tokens
|
||||
final_value = float(response_s.total_seconds() / completion_tokens)
|
||||
if completion_tokens is not None and completion_tokens > 0:
|
||||
final_value = float(response_s.total_seconds() / completion_tokens)
|
||||
|
||||
await self.async_update_daily_reports(
|
||||
DeploymentMetrics(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue