mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
add test vtx embedding
This commit is contained in:
parent
e9537c6560
commit
f947cec7fc
2 changed files with 80 additions and 0 deletions
21
litellm/proxy/tests/test_vtx_embedding.py
Normal file
21
litellm/proxy/tests/test_vtx_embedding.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
import openai
|
||||
|
||||
client = openai.OpenAI(api_key="sk-1234", base_url="http://0.0.0.0:4000")
|
||||
|
||||
# # request sent to model set on litellm proxy, `litellm --model`
|
||||
response = client.embeddings.create(
|
||||
model="multimodalembedding@001",
|
||||
input=[],
|
||||
extra_body={
|
||||
"instances": [
|
||||
{
|
||||
"image": {
|
||||
"gcsUri": "gs://cloud-samples-data/vertex-ai/llm/prompts/landmark1.png"
|
||||
},
|
||||
"text": "this is a unicorn",
|
||||
},
|
||||
],
|
||||
},
|
||||
)
|
||||
|
||||
print(response)
|
Loading…
Add table
Add a link
Reference in a new issue