mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(utils.py): add response ms for async calls
This commit is contained in:
parent
898f15af2b
commit
381fdcd37b
2 changed files with 5 additions and 2 deletions
|
@ -47,6 +47,7 @@ def test_async_response_openai():
|
|||
try:
|
||||
response = await acompletion(model="gpt-3.5-turbo", messages=messages, timeout=5)
|
||||
print(f"response: {response}")
|
||||
print(f"response ms: {response._response_ms}")
|
||||
except litellm.Timeout as e:
|
||||
pass
|
||||
except Exception as e:
|
||||
|
@ -55,7 +56,7 @@ def test_async_response_openai():
|
|||
|
||||
asyncio.run(test_get_response())
|
||||
|
||||
# test_async_response_openai()
|
||||
test_async_response_openai()
|
||||
|
||||
def test_async_response_azure():
|
||||
import asyncio
|
||||
|
@ -160,4 +161,4 @@ def test_get_response_non_openai_streaming():
|
|||
return response
|
||||
asyncio.run(test_async_call())
|
||||
|
||||
test_get_response_non_openai_streaming()
|
||||
# test_get_response_non_openai_streaming()
|
Loading…
Add table
Add a link
Reference in a new issue