mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(vertex_ai.py): add async embedding support for vertex ai
This commit is contained in:
parent
5bf51a6058
commit
0ffdf57dec
3 changed files with 102 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue