Use ChatGPT in a repeating group

Hi all,

I have connected ChatGPT via API in my app and I would like to use it in a repeating group, but I’m not able to come up with a solution.

The repeating group is containing a “product” and also an “output field” field, that should be filled by the ChatGPT answer. But the challenge is a bit that ChatGPT should repeat the action for each different product in the repeating group.
I can do it for a text field without a repeating group, but with the repeating group it is taking the “list of products” in the call. That’s causing some issues in the output.

Any ideas?
Thanks a lot!

Are you looking to store the responses in your DB or just display them for a moment?

Just display them.

I think it might be harder to just display rather than store the response against the product object as a field, so then in the RG you just display a list of products including their response field.

If you wanted to just display it you could use something like Orchestra (repeating group addon) Plugin | Bubble

So that each cell would be making their api call and then can display the result in an element within that cell.

Either way works but I would be storing the data, because if the user refreshes the page etc, less economical GPT wise too

If that’s really what you want to do, place a reuseable element inside the repeating group cell which takes Current cell’s Product and inside the reuseable element add a when page is loaded workflow that calls the ChatGPT API and sets the state of the reuseable element to the response. Then you can access the ChatGPT response within each cell.

However, this is almost certainly not what you want to do, and should instead generate it and save it to a field on the Product when it’s uploaded/edited, and then display that instead of generating it each time.

1 Like

Oh nice, thats cleaner than using Orchestra, love it