forked from phoenix/litellm-mirror
fix(vertex_ai.py): correctly parse optional params and pass vertex ai project
This commit is contained in:
parent
4e395bf244
commit
cdb960eb34
5 changed files with 78 additions and 25 deletions
|
@ -231,31 +231,6 @@ 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)
|
||||
except Exception as e:
|
||||
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