Limited Time Offer: Watch All Our Bubble Tutorial Videos for Only $99 per Year!

How to add lightning fast AI to your Bubble app with Groq

Discover how integrating Groq, a lightning-fast AI model powered by its specialized hardware, can revolutionize your no-code applications.

Check out Groq

But second is you need to check out Groq. Not to be confused with Grok. This is Elon Musk's Twitter X. Is Groq not what I'm talking about? I am talking about Groq spelled with a q because it is seriously fast. One of the areas that AI application and in the bubble coaching that I run, I notice a lot of the time with people is that AI gives amazing results, but it seems to take too long to get the responses back.

Quick demo of Groq

So let me give you a really quick demo and then we will even launch and add this right into a bubble application. So I've written a system prompt here that you are a social media content creation AI. Take the video transcript sent by the user and write a high performing SEO YouTube description. So I'm going to add in my transcript. Here we go. So this is the transcript of a seven minute video that I recorded last week. It's not big, but it also is not small.

Groq's speedy response

How quick do you think it's going to take Groq to reply? Well, let's see. I'm going to click submit and there we go. Now that's something that I think you would agree will have taken GPT 3.5, turbo, GPT Four, or even Claude three. It would have taken much longer to reply back. So this is seriously something worth experimenting with both in terms of quality and in terms of speed. Because when AI gets as quick as basically clicking a button and there is your answer, then just what you can do with it. The horizons. Oh yeah, you can say, I'm just excited by this.

Adding Groq to a Bubble application

So how would we go about adding this into our bubble application? I'm going to click view code and has it got CRM? There we go. So I just take this and I add it into bubble. So let's go into my bubble app and go into the API connector and add in a connection and we're going to say private key and header. How do I know that? Well, if I go back to the playground, I see I've got to add an authorization bearer and then my API key. I need this endpoint here and I need it to be a post command. So let's expand this out and we'll say chat. Where we'll just say chat. We'll just say chat. Paste in the endpoint, change it to post change this to action. That means I'd be at access in a workflow in the future if I wanted. And then it basically follows a very similar, in fact, I think they have intentionally made this very similar to OpenAI. So let's copy this into here. Oh, and that's my, oh, it's got the whole conversation. So let's get rid of this. In fact, you know what, just so that it's a little sense when copying this across to you guys going to remove the conversation and just say view code now. Okay. Because now all it has got is my system prompt. Let's copy that, paste it in, paste it in. There we go. And then I want to add in my user prompt. So I'm just going to copy this, add in a comma, paste it in, change this to user, and then make this bit here dynamic. Using triangle brackets tells me how to do so there. So I'll say user message. Perfect.

Running Groq in Bubble

Okay, so I'm just gonna, for the purpose of this demo, I'm just gonna say you are a general AI assistant and we could say list all the USA presidents from present to past. Okay. Basically I'm just wanting to show how quick it is. I need my API key. Let me grab that. So I've added in my API key with the word bearer in front as requested in the documentation. And now let's initialize and test it. Okay, I have an error and I've just worked out why that is. It's because I said that stream is true and bubble can't yet stream in word by word from AI API. So let's change that to false. And now let's try. There we go. And let's look at the full content. Here is the list of presidents, Biden, Trump, Obama. Ok. Yeah, there we go. And we've even got dates.

The speed of Groq

Now, how fast was that? Should we run it again? So here we go. Let's run again. Three, two, one. Now, part of what makes Groq so fast is that, and maybe you've bought Nvidia stocks in the last couple of years because you need this serious computing power to run an LLM and to run it well. But what Groq have done is they've developed their own hardware specifically for AI llMs. So unlike the fact that a lot of LLMs will run on hardware which may have initially been intended for gaming, like video graphics cards, Groq have got this speed because they have built a AI well. They're using AI models that are freely available, such as ones from meta, but they've built their own AI hardware. That's what I'm getting at. And so it's the combination with these new exciting models. In fact, let's go back into the playground and just see. We're using llama from meta, and they've got some good documentation here about the pros and cons of each one. You can find that elsewhere on their site. But yeah, they have the hardware advantage because they've built their own compute power instances that are built specifically for running on AI. And that's why it's so quick.


So remember, if you're wanting to build a startup and you wanted to do it with no code, then click the link down in the description. But also, I'd love you to share your thoughts on what could be achieved as AI gets faster and faster. When you can generate paragraphs of content, you can input a three seven minute video script and it basically gives your response back in a second. In fact, it tells me down there how quick it was. So let's run this again. Look, so quick indeed. In fact, it gives me a breakdown of all of the time. There we go. Quarter of a second, and I've mixed up my system prompt. Let's just do the full thing. So you are an AI assistant. Let's remove this. Right. How long does it take to list all the US presidents, from present to past? Boom, done. How long will that take? That took less than three quarters of a second to list all of the presidents. Now, I don't know enough about american history to know if that's all true or not, but you can't deny it is very quick indeed.

Latest videos