How to use local image in the chat template?

#15
by dutta18 - opened

I was trying feeding the chat template with PIL images but its producing an error. And no example is there in the doc which shows passing a local image to this template.

messages = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What action do you think I should take in this situation? List all the possible actions and explain why you think they are good or bad.",
},
{"type": "image_url", "image_url": {"url": image_url}},
],
},
]

Sign up or log in to comment