feat(vertex_ai.py): vertex ai gecko text embedding support

This commit is contained in:
Krrish Dholakia 2024-02-03 09:48:29 -08:00
parent 6cdb9aede0
commit d9ba8668f4
6 changed files with 154 additions and 5 deletions

View file

@ -231,6 +231,19 @@ def test_cohere_embedding3():
# test_cohere_embedding3()
def test_vertexai_embedding():
try:
# litellm.set_verbose=True
response = embedding(
model="textembedding-gecko@001",
input=["good morning from litellm", "this is another item"],
)
print(f"response:", response)
raise Exception("it worked!")
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