mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
fix(azure.py): adding support for aiohttp calls on azure + openai
This commit is contained in:
parent
bbc2cb43aa
commit
1d46891ceb
7 changed files with 93 additions and 30 deletions
|
@ -25,16 +25,19 @@ def test_sync_response():
|
|||
def test_async_response():
|
||||
import asyncio
|
||||
async def test_get_response():
|
||||
litellm.set_verbose = True
|
||||
user_message = "Hello, how are you?"
|
||||
messages = [{"content": user_message, "role": "user"}]
|
||||
try:
|
||||
response = await acompletion(model="gpt-3.5-turbo", messages=messages)
|
||||
print(f"response: {response}")
|
||||
response = await acompletion(model="azure/chatgpt-v-2", messages=messages)
|
||||
print(f"response: {response}")
|
||||
except Exception as e:
|
||||
pytest.fail(f"An exception occurred: {e}")
|
||||
|
||||
response = asyncio.run(test_get_response())
|
||||
# print(response)
|
||||
test_async_response()
|
||||
|
||||
def test_get_response_streaming():
|
||||
import asyncio
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue