forked from phoenix/litellm-mirror
fix(utils.py): fix replicate completion cost calculation
This commit is contained in:
parent
c8a1cf6ce2
commit
1cecdc4690
2 changed files with 3 additions and 1 deletions
|
@ -3853,7 +3853,7 @@ def get_replicate_completion_pricing(completion_response=None, total_time=0.0):
|
|||
)
|
||||
if total_time == 0.0: # total time is in ms
|
||||
start_time = completion_response["created"]
|
||||
end_time = completion_response["ended"]
|
||||
end_time = getattr(completion_response, "ended", time.time())
|
||||
total_time = end_time - start_time
|
||||
|
||||
return a100_80gb_price_per_second_public * total_time / 1000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue