Hello, colleagues.
I want to configure PAD to have ChatGPT analyze multiple images in one “Invoke web service” request.
I found the instruction “Uploading Base64 encoded images” https://platform.openai.com/docs/guides/vision#uploading-base64-encoded-images.
How can I make multiple image inputs into this request if the exact number of files is not known in advance?
For example.
This request works with one image:
{
“model": “gpt-4o-mini”,
“messages": [
{
“role": { “user”,
{ “content”: [
{
“type": ‘text’,
{ “text”: “What is in these images?”
},
{
“type": ‘image_url’,
{ “image_url”: {
{ “url”: “data:image/jpeg;base64,%Base64_Image1%”
}
}
]
}
]
}
How do I add more files to this query to fulfill it?
{
{ “model”: “gpt-4o-mini”,
“messages": [
{
“role": { “user”,
{ “content”: [
{
“type": ‘text’,
{ “text”: “What is in these images?”
},
{
“type": ‘image_url’,
{ “image_url”: {
{ “url”: “data:image/jpeg;base64,%Base64_Image1%”
}
},
{
“type": ‘image_url’,
{ “image_url”: {
{ “url”: “data:image/jpeg;base64,%Base64_Image2%”
}
}
...
]
}
]
}
The second problem is that between each set, you have to put a comma, but at the end of the last set, you don't need a comma.
I would be grateful if you could help me with my problem in PAD.
I will give a like + mark the question as solved.