fix divide by 0 bug

This commit is contained in:
Ishaan Jaff 2024-05-20 14:26:30 -07:00
parent 91a89eb4ed
commit 02fc507b01

View file

@ -875,6 +875,7 @@ Model Info:
if isinstance(response_obj, litellm.ModelResponse):
completion_tokens = response_obj.usage.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(