mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
(feat) Embedding: Async Azure
This commit is contained in:
parent
8dfab66a67
commit
dc9bafa959
3 changed files with 45 additions and 3 deletions
|
@ -192,7 +192,26 @@ def test_aembedding():
|
|||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
test_aembedding()
|
||||
# test_aembedding()
|
||||
|
||||
|
||||
def test_aembedding_azure():
|
||||
try:
|
||||
import asyncio
|
||||
async def embedding_call():
|
||||
try:
|
||||
response = await litellm.aembedding(
|
||||
model="azure/azure-embedding-model",
|
||||
input=["good morning from litellm", "this is another item"]
|
||||
)
|
||||
print(response)
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
asyncio.run(embedding_call())
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
# test_aembedding_azure()
|
||||
|
||||
# def test_custom_openai_embedding():
|
||||
# litellm.set_verbose=True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue