mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
refactor(utils.py): fix linting errors
This commit is contained in:
parent
25311293e4
commit
a343c4d22f
1 changed files with 3 additions and 3 deletions
|
@ -5252,9 +5252,9 @@ def convert_to_model_response_object(
|
|||
model_response_object.model = response_object["model"]
|
||||
|
||||
if start_time is not None and end_time is not None:
|
||||
model_response_object._response_ms = (
|
||||
model_response_object._response_ms = ( # type: ignore
|
||||
end_time - start_time
|
||||
).total_seconds() * 1000 # return response latency in ms like openai
|
||||
).total_seconds() * 1000
|
||||
|
||||
return model_response_object
|
||||
elif response_type == "embedding" and (
|
||||
|
@ -5281,7 +5281,7 @@ def convert_to_model_response_object(
|
|||
model_response_object.usage.total_tokens = response_object["usage"].get("total_tokens", 0) # type: ignore
|
||||
|
||||
if start_time is not None and end_time is not None:
|
||||
model_response_object._response_ms = (
|
||||
model_response_object._response_ms = ( # type: ignore
|
||||
end_time - start_time
|
||||
).total_seconds() * 1000 # return response latency in ms like openai
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue