Inspiration
The inspiration for this project came from the rising popularity of ChatGPT. We thought it would be cool to take that concept and combine it with the theme of the hackathon. We found Cohere through the hackathon website and we thought it would be a great way to implement our idea.
What it does
CatGPT allows users to interact with a cat-themed chatbot. CatGPT responds to greetings, thanks, and farewells in a cat-themed manner. In addition, CatGPT allows users to request cat jokes, cat facts, and cat breed information.
How we built it
CatGPT was created using Express for the backend and React for the frontend. The backend includes an API call to the Cohere Intent Recognition endpoint. This allows for user queries to be categorized into pre-defined 'intents' based off what the model thinks the user wants. To train the model, we had to create many different examples for what a user might ask and tell the model what label each example belongs to. Based off the intent categorization from the model, we randomly pick a response from an array of pre-defined responses and then make it more cat-like by randomly adding cat text between spaces. This is done with the exception of the cat facts, which is handled by an external API. Our React app takes these messages and renders them for the user.
Challenges we ran into
Coming up with how we were going to implement Cohere was our biggest struggle initially. We could have used the text generation endpoint, but that would have made the project too simple as we could just feed the user input into the model and print out the output. In addition, there would be no way to ensure that the user sticks to cat-related topics. We dug through the Cohere documentation and settled on using Intent Recognition.
Accomplishments that we're proud of
Both of us come from primarily backend backgrounds so the frontend implementation was not easy. We had begun to learn React in the weeks before the hackathon so being able to successfully create and collaborate on a full-stack application was something that we were both proud of.
What we learned
This project helped us learn more about React. In addition, working with the Cohere API was very fun and while it took us a while to get it set up, it was extremely rewarding to see promising results. This was also our first hackathon so we learned a lot about brainstorming, collaborating, and coding all within a short period of time.
What's next for CatGPT
In the future, CatGPT would allow for a broader range of topics. One thing we wanted was to allow users to ask for specific information about a specific cat breed. This would have been very difficult with intent recognition, but if we were to make our AI more conversational, it could very well be possible. We would also like to have database integration in order to store the possible facts and jokes for more scalability and also to have a cleaner and more sleek feel for our UI and frontend design in general.
Built With
- axios
- cohere
- express.js
- git
- github
- javascript
- node.js
Log in or sign up for Devpost to join the conversation.