mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
test(test_async_fn.py): addding sync test
This commit is contained in:
parent
6b715597e9
commit
a30fca4f60
1 changed files with 11 additions and 1 deletions
|
@ -10,7 +10,17 @@ sys.path.insert(
|
|||
0, os.path.abspath("../..")
|
||||
) # Adds the parent directory to the system path
|
||||
import litellm
|
||||
from litellm import acompletion, acreate
|
||||
from litellm import completion, acompletion, acreate
|
||||
|
||||
def test_sync_response():
|
||||
litellm.set_verbose = True
|
||||
user_message = "Hello, how are you?"
|
||||
messages = [{"content": user_message, "role": "user"}]
|
||||
try:
|
||||
response = completion(model="gpt-3.5-turbo", messages=messages)
|
||||
except Exception as e:
|
||||
pytest.fail(f"An exception occurred: {e}")
|
||||
|
||||
|
||||
def test_async_response():
|
||||
import asyncio
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue