fix(vertex_ai.py): add async embedding support for vertex ai

This commit is contained in:
Krrish Dholakia 2024-02-03 10:35:17 -08:00
parent 5bf51a6058
commit 0ffdf57dec
3 changed files with 102 additions and 0 deletions

View file

@ -243,6 +243,19 @@ def test_vertexai_embedding():
pytest.fail(f"Error occurred: {e}")
@pytest.mark.asyncio
async def test_vertexai_aembedding():
try:
# litellm.set_verbose=True
response = await litellm.aembedding(
model="textembedding-gecko@001",
input=["good morning from litellm", "this is another item"],
)
print(f"response: {response}")
except Exception as e:
pytest.fail(f"Error occurred: {e}")
def test_bedrock_embedding_titan():
try:
# this tests if we support str input for bedrock embedding