mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
21 lines
533 B
Python
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)
|