Thank you, this helped. Now that I have set this up I am having troubles setting a custom state to actually save the selected “Q&A” to “Flashcards”.
Basically, users input their class notes and I have the Open AI API set up to return JSON Objects in repeating groups displaying Question and Answer, and a “Save” button. Users should be able to select all the “Q&A” they want to add to their Flashcard set and then give it a title and save that list to 'Flashcards" under the title the user gave it.
My problem is setting a custom state with a json object, here is a screenshot of where I got stuck.