[
{"role": "system", "content": "You are a helpful assistant designed to output JSON."},
{"role": "user", "content": "Who won the world series in 2020?"}
]
I don’t know what is wrong. Is it a bug with Make?
So this is not actually a bug, but the info message could be clearer that you cannot pass a JSON (string variable) into the field.
The message below the field says you have to pass in a variable of type “Array”.
If you pass in a JSON string (which is a variable of STRING type), you are not passing in a variable of type ARRAY).
The second line basically shows you the format of the array in JSON, but is misleading you to think that you can pass in that exact string as JSON.
How to create an ARRAY
To use the “Map” feature on the Messages field, here are some examples to create an ARRAY first
1. Aggregate to an array
If you select the “Target structure type” as the OpenAI “Messages” field, you can create an array of (Role/Message Content) fields, using an “Array Aggregator” module.
If you want to learn more about Make, you can read up in the Help Center. I also recommend doing the tutorials in the Make Academy, and learn advanced skills like how to make custom apps to any API in the Make Partner Training Portal - both have certificates for successful completion.