fix(proxy_server.py): fix setting offset-aware datetime

This commit is contained in:
Krrish Dholakia 2024-04-25 21:18:32 -07:00
parent 1bb82ef42f
commit 5583197d63
2 changed files with 4 additions and 2 deletions

View file

@ -3668,7 +3668,7 @@ async def chat_completion(
logging_obj, data = litellm.utils.function_setup(
original_function="acompletion",
rules_obj=litellm.utils.Rules(),
start_time=litellm.utils.get_utc_datetime(),
start_time=datetime.now(),
**data,
)

View file

@ -523,7 +523,9 @@ async def test_key_info_spend_values_streaming():
)
rounded_response_cost = round(response_cost, 8)
rounded_key_info_spend = round(key_info["info"]["spend"], 8)
assert rounded_response_cost == rounded_key_info_spend
assert (
rounded_response_cost == rounded_key_info_spend
), f"Expected={rounded_response_cost}, Got={rounded_key_info_spend}"
@pytest.mark.asyncio