Introducing Bot Verse - A hub for chatbots
Introduction
AI is everywhere!
Ever thought of a hub where users can create and share chatbots? This is the core idea of this project.
Bot Verse is an innovative platform for creating, sharing, and interacting with AI chatbots. Users can manage their chatbots, explore public and system chatbots, and leverage pre-made solutions for various tasks. This project is open source and welcomes contributions from the community.
Here's the GitHub repo for it: kom-senapati/bot-verse
Here's a quick demo of the project:
Features
These are the features of Bot Verse:
Authentication: Register and login pages
System Chatbots: Pre-built chatbots available for user interaction
Your Chatbots: Users can create custom chatbots with titles and system prompts
Public Chatbots (aka Hub): User-built chatbots can be made public for others to use
How I built
I stumbled upon a flask starter template - https://github.com/pheonix-coder/flask-minimal-template. It's good as it comes with a database and authN setup out of the box.
Then I added my models (Chatbot and Chat).
class Chatbot(db.Model):
__tablename__ = "chatbots"
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(100), nullable=False)
prompt = db.Column(db.Text, nullable=False)
generated_by = db.Column(db.String(10), nullable=False)
user_id = db.Column(db.Integer, nullable=True)
public = db.Column(db.Boolean, default=False)
def __repr__(self):
return f"<Chatbot: \nName: {self.name}\nPrompt: {self.prompt}>"
class Chat(db.Model):
__tablename__ = "chats"
id = db.Column(db.Integer, primary_key=True)
chatbot_id = db.Column(db.Integer, nullable=False)
user_id = db.Column(db.Integer, nullable=False)
user_query = db.Column(db.Text, nullable=False)
response = db.Column(db.Text, nullable=False)
def __repr__(self):
return f"<Chat: \nQuery: {self.user_query}\nResponse: {self.response}>"
Chatbot model includes:
name, prompt - Information about the chatbot
generated_by - To identify system chatbots
public - To identify public chatbots
user_id - To identify user chatbots
The Chat model stores previous conversations for a specific chatbot and user.
Next, I created templates and routes one by one:
CRUD operations for chatbots
Chatting with a chatbot
A profile page to view profile information with public chatbots
That's it for the backend side.
Now, for the UI, I used bg.ibelick for the application's background.
For the landing page, I took inspiration from cursor.com. I liked the simple yet impressive design of their landing page.
The dashboard UI is straightforward, using basic Tailwind CSS.
I also used a back button in many places, which I found on Uiverse.io. Here's the link: Button by AKAspidey01 made with Tailwind.
Motivation
I made this for the United Hacks V3 hackathon. I wanted to try building a hub of chatbots, and I thought it would be a fun challenge. Instead of spending the weekend doing nothing, I decided to make something useful. It was a great way to learn and create something that could help people.
How it works
This project is a Flask-based web app that acts as a hub for different chatbots.
Routing: Flask takes care of the different routes (URLs), guiding users to the right pages where they can chat with various chatbots.
Database: It uses SQLite to keep track of all the data, making sure chatbot interactions are saved smoothly.
Templating: Jinja2 is used to render HTML files on the fly, making it easy to show data and let users interact with the chatbots.
User Interaction: Users can pick different chatbots from the hub, type in their questions, and get answers in real-time (thanks to Groq) through a simple, easy-to-use interface.
Installation steps can be found here - installation.
Conclusion
Building this project over a weekend was an exciting experience. I learned a lot and was surprised at what I could accomplish in such a short time. While there's room for improvement, I’m proud of the progress I made.
Subscribe to my newsletter
Read articles from K OM SENAPATI directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
K OM SENAPATI
K OM SENAPATI
I am a CSE student from Bhubaneswar, India. I love exploring things.