fix(azure.py): use openai client sdk for handling sync+async calling

This commit is contained in:
Krrish Dholakia 2023-11-16 12:08:04 -08:00
parent 3285113d2d
commit bf0f8b824c
7 changed files with 136 additions and 167 deletions

View file

@ -481,7 +481,7 @@ def test_completion_openai_litellm_key():
except Exception as e:
pytest.fail(f"Error occurred: {e}")
test_completion_openai_litellm_key()
# test_completion_openai_litellm_key()
def test_completion_openrouter1():
try:
@ -562,6 +562,8 @@ def test_completion_azure():
except Exception as e:
pytest.fail(f"Error occurred: {e}")
test_completion_azure()
def test_azure_openai_ad_token():
# this tests if the azure ad token is set in the request header
# the request can fail since azure ad tokens expire after 30 mins, but the header MUST have the azure ad token