Value not found in options in parameter 'imageUploadType'

I’m trying to pass an array of images to an OpenAI module, so it can analyse it and return a response based on the attached images and prompt, however I keep getting the same error despite all my efforts. Any thoughts on what I might be doing wrong?

I’m using the mapping functionality, so I can build the array using an iterator and aggregator:

According to OpenAI’s module I need to pass the array using the following parameters:
[{ “imageUploadType”: “imageUrl”, “imageUrl”: “https://your.image/url” }, { “imageUploadType”: “imageData”, “imageFileData”: }]

But despite my efforts, I keep getting the following error message in the OpenAI module:

BundleValidationError

Validation failed for 20 parameter(s).

  • Value not found in options in parameter ‘imageUploadType’.

Blueprint:
blueprint.json (131.0 KB)

Here’s the output bundle for the array I use to pass to OpenAI’s module:

[
    {
        "array": [
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipOx57nY1ww1GfKoT8_VHkLxwft4t80jDoNPwW1X=w1836-h1046-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipM_UNWW_jcxUml-F8jb2nxSf9Zga3HHWPp4AJFM=w480-h480-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipMy7NMln8lXm1MPatb_PKWYnmAMOon1dUS3BIqr=w1920-h1081-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipOKkBlZ56JPiOnKRXAXTppG3jVzPX0R0dmi95dU=w4032-h1960-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipNnOcuVZN3fr-VAUHuk8e_ZshS3MnIScFVbV2T6=w1365-h1366-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipN8CxBdMJF3QobaGbxGsPFnRGuhotrW-nFe8xI=w3024-h4032-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipO8R8YoSDKiw5HiZGZgzkgimNVJhZlIZmBj5coM=w4032-h3024-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipMDUVneph6pLA4zNuvfla-fKtW3_oyHJ8HwwW0h=w720-h720-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipN4Pu6Fj-IQaOEdmXzDYw4iqjjpBzH6rp51eo1m=w765-h707-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipNTCu9_LVJgAUrQd5qIt8nibT4euRhzzynQbtOl=w4640-h3472-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipPeVdgDSHEcMn3EK8o776jMH-6ex7k8Ab-z9V3l=w4032-h3024-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipN2E8ZH2NMOBoO5yrp_OxaL4_HHc7oG3y-ocw2S=w4624-h3468-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipMTBUxXrKOK98-LeMvvVAldtn2DtF-VrCNm8_G4=w3024-h4032-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipMFpDuhE_9XKf7hgzySvsVNgehQ3sZZ6DqOi42E=w640-h640-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipMrCZFyyxiGNcn1Q9MX1LjKIdx48HiuvmfgXhiY=w4000-h2250-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipPGnTAElTijDLkhHwH0gGvGIhiT43a4zYy6S0T4=w3024-h4032-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipNV21MvxxLZjdPX-TWJmna6x_TecY8pshSqnICP=w1109-h855-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipNGty06ZyZnwKOydKXRFj6vQbGdF2CXadCzee5f=w1211-h1212-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipP3wcJCSNGkNdvL1Qqv06cvuUtS9cPoRA-f4ULa=w4032-h1908-k-no",
                "imageUploadType": "imageUrl"
            },
            {
                "imageUrl": "https://lh5.googleusercontent.com/p/AF1QipNu3EJrVkd1bx4Kx8j5cgl-nS2e8fQ1SkoFoBhr=w480-h360-k-no",
                "imageUploadType": "imageUrl"
            }
        ],
        "__IMTAGGLENGTH__": 20
    }
]

Maybe instead of Create and Parse JSON in your Iterator-Aggregator loop,

You can try setting the Target Structure field of your aggregator to the Images field (it might or might not work sometimes).

The Array Aggregator module also allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.

Here is an example of using the “Target structure type” of an Array Aggregator module:

As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.

samliewrequest private consultation

Join the unofficial Make Discord server to chat with us!

3 Likes

I encountered the exact same issue. It turns out the documentation is wrong. The value for imageUploadType should be “url” NOT “imageURL”.
Ex.
“imageUploadType”: “url”

I determined this by manually configuring the ChatGPT module and then inspecting its input bundle.

Welcome to the Make community!

Well, it looks like OpenAI has changed their API yet once again.

Please contact support to get this fixed asap.

For technical issues or bugs like this, directly contacting support can often lead to a faster resolution.

samliewrequest private consultation

Join the unofficial Make Discord server to chat with other makers!

2 Likes