How to integrate your Bubble app with OpenAI & ChatGPT to receive JSON Objects
ฝัง
- เผยแพร่เมื่อ 25 ส.ค. 2024
- 🎥 In this video: Trying to integrate ChatGPT (Open AI) API calls with Bubble but stuck on how to manipulate the response in granular way? In this video we go over exactly how to receive the API response not as a combined text string, but as a JSON object using the new ‘response format’ parameter.
The example we go over is using a ChatGPT prompt to generate 3 answers and ensuring we receive this not as a long text but as a list of answers which we can display as separate items in a repeating group.
🎓If you like this tutorial, you might like our free No-Code Bootcamp where you can learn how to build complex web apps without code for your own projects or to earn money building for clients through our Partner Program. Access now: build.airdev.c...
You can follow us on:
▼ Twitter / airdevco
▼ LinkedIn / airdev
▼ Facebook / airdevco
Dude, you have no idea, how helpful this video is. I searched entire youtube and Chatgpt but could not find a solution to this. Thanks a ton man. Keep up the good work.
This is by far the best solution. God knows how many hours of videos I watched on youtube till I found this one. Also beautifully explained.
Dude thank you thank you thank you! I have literally watched 10+ hours of tutorials and posted on so many message boards to find this answer.
Thank you so much! Exactly what I was looking for :)
Thanks for the guide!
If, for an AI text generation platform, you use an API call to openAI AND a backend API call to Bubble (to convert the content to JSON to Bubble to understand) - will it create many more Workload units? Cost more? Is this the most efficient way to do so?
Merci infiniment pour cette vidéo 😊 It was extremely helpful to me! Thanks to your clear and precise explanations, I managed to effectively integrate OpenAI with my Bubble application to process JSON objects. Your step-by-step approach made the process much more affordable and clarified several technical points that I found complex. Thanks again for sharing your expertise !
Pure gold!! Thanks
This was a great video and very helpful for what I'm working on. Thanks a lot!
So helpful, thank you!
Great!! can't wait to try it
Excelente explicación, me ha sido de mucha ayuda para mi proyecto, thank you so much !!
Super useful!
thanks a lot
@airdevco, Great thanks for the video! Newbie question: now how do I save the items to the DB as separate objects?
@reaganpieter you can just create an API workflow that creates a single object and then schedule it on a the list of items returned from OpenAI
@@airdevco okay will try it out. Thanks!
This was really cool. Thank you. Is there a way to return tables from chatgpt and display in bubble?
I have a prompt that creates a social media content calendar that displays in a table, I want to add that into my bubble app 😁
Yep! you would just have it return a JSON with an array of objects inside of it and then format that array as a table on the Bubble end
Great video. Quick question if you don't mind. Where does this "convert json poem" at 15:14 comes from?
It gets created when you initialize the API call to convert JSON (to the app's own API). When you do that Bubble automatically creates data sources not just for the main object received but also any nested objects and, in this case, a poem is a nested object
@@airdevco Thanks for your reply. Interesting as I only get one option within the type of content dropdown. Even tho I initialized the call like you did in the video. If I have multiple prompts for different purposes, each with slightly different JSON responses, do I have to create multiple convert JSON API connections then?
@@IMlab I would make sure that when you're asking API to generate your objects, you're asking it to wrap them in an array, which is "poems" in the example above. And as far as your second question, that is correct, you'd have to create a convert JSON API call for each of your prompt that returns a different JSON
@@airdevco Thank you so much for your help 🙏 Let's see if I can figure it out 👍
@@airdevcoI am a bit confused the more I work through this video, sorry to bother you again :( Is the "display data" action still required when you directly access the data through the repeating group's connection?
Helpful BUT not versatile since you need an API call for each expected JSON format you are going to need. Isn't there a way to just "process" any JSON instead of pre-defined ones?
Unfortunately there isn't a way to do that as far as we know - each call needs to be initialized separately in order for Bubble to understand the structure of the objects received
Thanks for the reply. @@airdevco