add test vtx embedding

This commit is contained in:
Ishaan Jaff 2024-08-21 17:05:47 -07:00
parent e9537c6560
commit f947cec7fc
2 changed files with 80 additions and 0 deletions

View 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)