mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
(test) verify azure response have expected keys
This commit is contained in:
parent
4247df02c7
commit
3059f30672
1 changed files with 4 additions and 3 deletions
|
@ -39,21 +39,22 @@ def test_openai_embedding():
|
|||
print(openai_response_keys)
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
test_openai_embedding()
|
||||
# test_openai_embedding()
|
||||
|
||||
def test_openai_azure_embedding_simple():
|
||||
try:
|
||||
|
||||
response = embedding(
|
||||
model="azure/azure-embedding-model",
|
||||
input=["good morning from litellm"],
|
||||
)
|
||||
print(response)
|
||||
response_keys = dict(response).keys()
|
||||
assert set(["usage", "model", "object", "data"]) == set(response_keys) #assert litellm response has expected keys from OpenAI embedding response
|
||||
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
# test_openai_azure_embedding_simple()
|
||||
test_openai_azure_embedding_simple()
|
||||
|
||||
def test_openai_azure_embedding():
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue