Saving chatgpt data into variables?

Let’s say I send chatgpt a request to create a daily meal plan. How do I save each ingredient into a different variable? ie.:

Meal > Ingredients

Is this possible? Can’t someone provide this custom service?

Ask ChatGPT to respond as JSON, pass the JSON into an API call to your Bubble app, then use the Bulk Create API to create things based on the JSON provided by ChatGPT.

You should also provide the json structure (labels, etc) for ChatGPT to use in the response for easier parsing and like any other API response, avoid nested items unless the potential number is high and you know how to iterate thru a nested item.

1 Like

Oooh this is going to cause you some anxiety then :joy:

And to process the response:

1 Like

sweet! well yes for people who aren’t able to loop thru nested items its can be a huge clusterf$%^.

@code-escapee @georgecollier Thank you both for these responses, I’m trying to do something similar. I might follow up with you guys later when I’m building this out!

This topic was automatically closed after 70 days. New replies are no longer allowed.