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.
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 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.