litellm-mirror/litellm/proxy/tests/test_vtx_embedding.py
2024-08-21 17:05:47 -07:00

21 lines
533 B
Python

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)