How do I select from multiple bundles in DALL-E?

I have GPT creating a short script for a comic book, which then sends the output to Tools, and splits the values in result by newlines.

Then an iterator takes the array.

At this point, I now have 14 bundles, the first bundle being the NAME from the script, the second bundle being the EMOTION from the script, and the third bundle being the LINES from the script (and this continues for each comic book character until the end of the script).

When I try to add a DALL-E module, I want to be able to use each bundle in the prompt, so the prompt might read something like:
“This is a character called (bundle 1)NAME.
Create an image of NAME expressing (bundle 2)EMOTION.
Then, create a speech bubble using text from (bundle3)LINES.”

The issue is that I can only map the field Total Bundles, and not each individual bundle for its individual value.

I’ve tried searching similar topics and trying their answers, but whatever I try, I can’t seem to get these bundles separated.

Any help would be appreciated!

GPT


Tools


Iterator


Aggregator


DALL-E

Hi @Fitzee and welcome back to the Make Community!

Is it possible for you to modify the ChatGPT so it generates a structure (think JSON) where the emotion, the character name, and the lines are all bundled together? Then, you can parse the JSON and use that to send your prompt to DALL·E. It seems simpler than trying to parse and aggregate multiple bundles.

L

Hey! Thanks for the comment.

I’ll be honest, I have no idea if that’s possible, I’m still quite new at all this haha.

If you can give me an idea of how to go about this, I’ll defo give it a go!

Oops, there was a word missing in my response.

Can you modify the ChatGPT prompt so it returns JSON?

You could add something like this to your prompt:

“Format the response as a JSON structure with a structut that contains the character name, the emotion, and the line.”

Since I can’t see your prompt, I’m just guessing here.

After that, add a JSON Parser to parse the answer.

Then, in your iterator, you should be able to build your prompt and send each prompt to DallE. So if a character has 8 lines, that would be 8 calls to create images.

L