I am creating an AI tool that allows multiple user inputs to generate an output through OpenAI API.
I have the Ionic toggles working where I can paste text, select the toggle, and it generates appropriately. (one toggle only).
I have 2 things to ask for help with:
1: I want to add a reset button so after the generation has happened the user can reset everything to do another ouput.
2: I want to create multiple boxes as an output. So for example, if a user selects 3 different toggles, it will generate all 3 with an API call, but output each one a different box so everything stands out. I have struggled trying to get this to work.
So there could be 6 boxes or more all outputing different information. I would also assume the workflow would be … > api call option 1 > output > api call option 2 > output… etc. so they all run off the same workflow?
Finally - would I have to set up workflows for every single different combination? Only when option 2 and 4, when option 5,6,7 and so on? Or could this all be done in an easier way?
Create custom states on Page with relevant datatype and use the value from these custom states in Output boxes
Add Reset button and add a workflow to ‘set state’ as empty. This will reset the value on all outputs
Question 2 - Displaying output on boxes
If there are 6 toggles add 6 api calls each with condition to run only if the toggle is ‘yes’ and immediately after each api call add an action to set output as custom state
For eg:
api call 1 (only when toggle 1 is yes > set state 1, value - output 1 > api call 2 (only when toggle 2 is yes > set state 2, value - output 2…
In this way you can get 6 outputs in single workflow.