mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
test(test_embedding.py): add simple azure embedding ad token test
Addresses https://github.com/BerriAI/litellm/issues/4859#issuecomment-2248838617
This commit is contained in:
parent
636c2e2b64
commit
d3953ac2ae
1 changed files with 14 additions and 0 deletions
|
@ -673,3 +673,17 @@ async def test_databricks_embeddings(sync_mode):
|
|||
# print(response)
|
||||
|
||||
# local_proxy_embeddings()
|
||||
|
||||
|
||||
def test_embedding_azure_ad_token():
|
||||
# this tests if we can pass api_key to completion, when it's not in the env.
|
||||
# DO NOT REMOVE THIS TEST. No MATTER WHAT Happens!
|
||||
# If you want to remove it, speak to Ishaan!
|
||||
# Ishaan will be very disappointed if this test is removed -> this is a standard way to pass api_key + the router + proxy use this
|
||||
|
||||
response = embedding(
|
||||
model="azure/azure-embedding-model",
|
||||
input=["good morning from litellm"],
|
||||
azure_ad_token=os.getenv("AZURE_API_KEY"),
|
||||
)
|
||||
print(response)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue