How to summarise a whole conversation with AI in Bubble.io
Learn how to add a "summarize" button and generate a conversation summary using OpenAI API in your Bubble.io chat application. This quick tip will help you present condensed information to your users with ease, making your no-code development process even more efficient.
Unlock conversation summaries: Learn how to add a powerful summarize button to your ChatGPT clone in Bubble!
Master OpenAI integration: Discover the secrets to formatting OpenAI responses and creating seamless chat experiences in Bubble.
Elevate your Bubble skills: From API calls to custom buttons, learn essential techniques for building advanced ChatGPT clones in Bubble.
Introducing Our Upcoming Udemy Course
In the next few days, we're going to be releasing our first ever Udemy course, and that's going to be my most complete and detailed how to build a ChatGPT clone with Bubble set videos course that I've ever made. But in the meantime, I want to show you a quick tip for how you can summarize a whole conversation using OpenAI API and then present that back to your user in your chat window.
Adding a Summarize Button
So if you want to learn how to get to this stage, you can piece together based on some of our previous videos or watch out for the Udemy course coming soon by subscribing to our channel. That's how you'll find out about the news. But right now, I'm going to add in a button that is going to summarize this conversation. So basically, it is inserting a pre-written prompt into the midst of the conversation that you trigger with a button press.
Creating the Workflow
Let's go ahead and add another button and I'm going to say summarize. So when this button is clicked, I want to run a call to the OpenAI API and I want to send all of the previous messages along with it. So it's actually very similar to our send button. But we don't create a message because we basically just want... we don't want the user's message to go into the conversation, we just want the AI to respond with a summary.
Configuring the API Call
I'm going to copy this step because this is the step where we list through all our messages and we generate the JSON needed in order to communicate with the OpenAI API. So I'm going to copy this, paste it in here, and then copy this. This is the important bit. This is the saving of the response and paste it in here. So just reconnect back up and so this is the result of step one, choices, first item, message, content, and then we give it the role that we need and the thread ID. Again, check out our previous videos which kind of jump in in the depends here.
Adding the Summarize Prompt
This sends this template of a message and it sends it through every single message in the current thread and we just basically want to add a message to it. Yeah, we do and so that I could type straight into here but I'm actually going to do it in the API connector. So we'll go into plugins and our duplicate it. So we can say get summary of conversation and so then all our messages go in there.
Formatting the API Request
I'm going to add in a comma because remember each of our messages is basically formatted exactly the same as this. So I'm going to paste that in and then I'm going to say the role is user because effectively our button is just like insert a prompt and so our prompt can be in less than three sentences. Summarize our conversation so far. Now I want to reinitialize this and that's only going to work because I've got some dummy content in here.
Testing the Summarize Function
Let's try that and that's good. There's no errors. I've not introduced any JSON syntax issues in the conversation so far. I would point out of course that the summarize button won't work if there are no messages. You would get a syntax error because this will effectively be blank. So just be aware of that.
Implementing the Summarize Button
Now I actually want to now use our summarize. So I'm going to copy this into here. Move it, delete this, reconnect it back up and let's go ahead and preview. So while it reloads I've got a bit of a conversation here going on about a trip to Europe and I'm going to click summarize.
Reviewing the Summary
Right so it says in our conversation I shared information about proper destinations in Europe and then yeah it picks up that I basically said I like the sound of Paris. So there you go that's how you can add in a summarize button or you can summarize a conversation so far with OpenAI in your Bubble ChatGPT clone or however you are introducing the OpenAI API into your Bubble app.
Get the Complete Bundle for Just $99
Access 3 courses, 390+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 390+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Save over 70%!
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Have questions?
We have answers!
Find answers to common questions about our membership plans, programs, and more.
We're here to help you launch your no code SaaS. Reach out to the team and we'll double check our vast library for useful content. We'll advise you on how we'd tackle the same problem and there's a good chance we'll record the video to help the wider community.
As a Planet No Code member, you'll receive a discount on our Bubble coaching sessions. Monthly members receive a 10% discount, while Annual members receive a 17.5% discount. To redeem your discount, simply log into your account and book a coaching session through our platform.
Our 8-week intensive mentorship program is designed to provide personalized guidance and support to help you accelerate your startup journey. You'll be matched with a startup expert who will work with you one-on-one to set goals, overcome challenges, and make rapid progress.
To apply for the Mastery Program, simply click the "Request Invitation" button on our pricing page and fill out the application form. Our team will review your application and schedule a call with you to discuss your goals and determine if the program is a good fit for your needs.
We accept all major credit cards, including Visa, Mastercard, American Express, and Discover.
While we don't offer a free trial, we do provide a 14-day money-back guarantee. If you're not completely satisfied with your membership within the first 14 days, simply contact our support team, and we'll issue a full refund.