Inspiration

Wanted to create something focused on the CloudFlare platform that is superhero-related. We wanted something that had AI integration, so this idea came from that.

What it does

SuperFriends is an AI-based chat project that allows the user to talk to any available heroes, and it generates an image that is based on whatever hero is selected.

How we built it

This project is built using different tools from CloudFlare. Currently, it is hosted on CloudFlare Workers and it uses CloudFlare's AI gateway to communicate with multiple OpenAI AIs. We used a vite template to start and modified it to fit our needs.

Challenges we ran into

The problems that we encountered during this project can be broken down into two things. The first problem is trying to understand CloudFlare. Originally, CloudFlare had a website feature we tried to use, but it took way too long to get updated for us so we decided to try something else. We found something online that says we can host our code on CloudFlare Workers, which we then got it working with that. Trying to connect all the CloudFlare stuff took some time but we got it figured out. The second problem is that OpenAI has a rate limit for API calls, so when we are running multiple tests, we had to create a new account as adding a payment to increase the rate limit was not working. Our final problem we ran into was having to make our OpenAI API key secret so that we could share our code on Github without the API key being automatically removed from our OpenAI account for security reasons. We solved this by making two separate Github repositories, one where we can deploy our project privately to keep our API secret and another one where our code is public for everyone to see.

Accomplishments that we're proud of

Created an AI chat bot using two different AI's that are all deployed on the cloud using CloudFlare.

What we learned

Learned a lot of the CloudFlare platform, and a lot of OpenAI API and how it interacts with the code we made.

What's next for SuperFriends

Adding more heroes and cleaning up the design aspect. A bigger idea is finetuning the AI to have better superhero responses.

Built With

Share this project:

Updates