mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
add linting
This commit is contained in:
parent
fa108c998d
commit
2c7ffb7c75
40 changed files with 3110 additions and 1709 deletions
|
@ -5,17 +5,22 @@ import sys, os
|
|||
import pytest
|
||||
import traceback
|
||||
import asyncio
|
||||
sys.path.insert(0, os.path.abspath('../..')) # Adds the parent directory to the system path
|
||||
|
||||
sys.path.insert(
|
||||
0, os.path.abspath("../..")
|
||||
) # Adds the parent directory to the system path
|
||||
from litellm import acompletion
|
||||
|
||||
|
||||
async def test_get_response():
|
||||
user_message = "Hello, how are you?"
|
||||
messages = [{ "content": user_message,"role": "user"}]
|
||||
messages = [{"content": user_message, "role": "user"}]
|
||||
try:
|
||||
response = await acompletion(model="gpt-3.5-turbo", messages=messages)
|
||||
except Exception as e:
|
||||
pytest.fail(f"error occurred: {e}")
|
||||
return response
|
||||
|
||||
|
||||
response = asyncio.run(test_get_response())
|
||||
print(response)
|
||||
print(response)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue