Ask a question
Claude is like ChatGPT
I expect you will have heard of Open AI and ChatGPT, but have you heard of Anthropic and Claude? Claude is Anthropic's response to ChatGPT, and it is a text generative tool powered by AI. And I'm going to demo to you how to set it up with your Bubble app.
I've not tried this before. I'm going to be following the API documentation, maybe making some mistakes along the way. But let's see how far I get.
Bubble API Connector
So I've got a Bubble app here, and I'm going to add in a new API and call this Anthropic. And I'm going to authenticate in the header of the call. And if I go into the documentation and look at authentication, I need to put the API key in the header. Okay, there we go. And what are some of the basic parameters that I need? Well, let's just use their example. So I have to add in another header of content-type, application/json. And let's just just name this AI text generation. I think it's going to have to be POST. And the endpoint is here. Just that bit there. And then here's the data. And I'm just going to put these on new lines so that it spaces it out a bit more.
Test AI text generation by Claude in Bubble
Okay. Right. I think I've now got everything there to test out. So let's initialize the call and see if we get any errors.
No, we get a response. And the response is here's a haiku about trees, it's rushing branches away, reaching to the open sky, sheltering all below. There we go. There we have a working implementation of Claws engine version 1 into a Bubble app.
And from this point on, you could follow any of our other tutorials where we focus on using the Bubble API connector, how to get this to work in the front end.
I would suggest that if you have access to Anthropic's API, you would carefully read through the API documentation here. As there's a lot of very similar ways that it works compared to OpenAI, such as the use of tokens and stop sequences and temperature. But there are things I think you'd want to account for. They basically give you very specific advice on how you lay out the content and your prompts that you send through. To be honest, it seems a little bit less versatile than OpenAI and chatGPT, especially GPT 3.5 turbo and GPT 4.
But this is definitely a company to keep an eye on. And that's one reason why we wanted to get a Bubble tutorial out there ASAP.
So yeah, let me know, leave a message in the comments. If you have used the Anthropic API or you've used the chat tool within the account, let me know if you think that there is a difference. What differences do you notice between Anthropic and OpenAI? Leave it down in the comments. I'd be really interested to know.