mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
test test_vertexai_embedding_embedding_latest
This commit is contained in:
parent
aaa4a32d65
commit
8dffc8620c
1 changed files with 5 additions and 1 deletions
|
|
@ -816,10 +816,14 @@ def test_vertexai_embedding_embedding_latest():
|
|||
litellm.set_verbose = True
|
||||
response = embedding(
|
||||
model="vertex_ai/text-embedding-004",
|
||||
input=["hi"],
|
||||
input=[
|
||||
{"text": "good morning from litellm", "task_type": "RETRIEVAL_DOCUMENT"}
|
||||
],
|
||||
dimensions=1,
|
||||
auto_truncate=True,
|
||||
)
|
||||
assert len(response.data[0]["embedding"]) == 1
|
||||
assert response.usage.prompt_tokens > 0
|
||||
print(f"response:", response)
|
||||
except litellm.RateLimitError as e:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue