mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
feat(vertex_ai.py): vertex ai gecko text embedding support
This commit is contained in:
parent
6cdb9aede0
commit
d9ba8668f4
6 changed files with 154 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue