Skip to content

prithwiraj84/Orion-AI-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AI Chatbot with Interactive Web Interface

A stunning, modern AI chatbot powered by Groq's lightning-fast inference API

Python Flask Groq JavaScript HTML5 CSS3


✨ Features

πŸš€ Powered by Groq's Ultra-Fast Inference

Experience lightning-fast AI responses with Groq's cutting-edge inference technology!

Feature Description
⚑ Ultra-Fast AI Powered by Groq's high-performance inference API for instant responses
🎨 Modern UI Design Beautiful gradient backgrounds with smooth, eye-catching animations
πŸ’¬ Real-time Chat Interactive chat interface with live typing indicators
πŸ“± Fully Responsive Seamlessly works on desktop, tablet, and mobile devices
✨ Cool Animations Smooth transitions, typewriter effects, and animated backgrounds
🎯 User-Friendly Character counter, auto-resize input, and intuitive keyboard shortcuts
πŸ”’ Secure Environment-based API key management for maximum security
🌈 Beautiful Design Modern dark theme with gradient accents and glassmorphism effects

🎯 Why Groq?

  • ⚑ Lightning Fast: Get responses in milliseconds, not seconds
  • πŸ’° Cost-Effective: More affordable than traditional APIs
  • πŸ”₯ High Performance: Optimized for speed and efficiency
  • πŸš€ Easy Integration: Simple API with excellent documentation
  • πŸ“ˆ Scalable: Handles high traffic with ease

πŸ“‹ Prerequisites

Before you begin, ensure you have:

  • βœ… Python 3.8+ installed on your system
  • βœ… Groq API Key (Get one here)
  • βœ… pip package manager
  • βœ… A modern web browser

πŸš€ Quick Start

Step 1: Clone the Repository

git clone https://github.com/yourusername/ai-chatbot.git
cd ai-chatbot

Step 2: Install Dependencies

pip install -r requirements.txt

Step 3: Configure API Key

Create a .env file in the root directory:

# Create .env file
touch .env  # On Windows: create .env file manually

Add your Groq API key to .env:

GROQ_API_KEY=your_groq_api_key_here

πŸ’‘ Get your API key: Visit Groq Console to generate your API key

Step 4: Run the Application

python app.py

Step 5: Open in Browser

Navigate to: Orion AI chatbot

πŸŽ‰ You're all set! Start chatting with your AI assistant!


πŸ“ Project Structure

ai-chatbot/
β”‚
β”œβ”€β”€ πŸ“„ app.py                 # Flask backend server with Groq API integration
β”œβ”€β”€ πŸ“ templates/
β”‚   └── πŸ“„ index.html         # Main HTML interface
β”œβ”€β”€ πŸ“ static/
β”‚   β”œβ”€β”€ 🎨 styles.css         # Beautiful CSS with animations
β”‚   └── ⚑ script.js          # Interactive JavaScript functionality
β”œβ”€β”€ πŸ“¦ requirements.txt       # Python dependencies
β”œβ”€β”€ πŸ”§ Procfile              # Deployment configuration
β”œβ”€β”€ πŸ“ README.md             # This file
β”œβ”€β”€ πŸ“š DEPLOYMENT.md         # Deployment guide
└── πŸ”‘ .env                  # Environment variables (create this)

🎨 Features in Detail

Backend (Python/Flask)

  • ⚑ Groq API Integration - Ultra-fast AI inference
  • πŸ”„ RESTful API - Clean endpoint for chat interactions
  • πŸ›‘οΈ Error Handling - Comprehensive error management
  • 🌐 CORS Enabled - Cross-origin request support
  • πŸ” Secure Configuration - Environment variable management

Frontend (HTML/CSS/JS)

  • 🎭 Animated Background - Floating gradient circles with smooth motion
  • πŸ’¬ Message Bubbles - Distinct styles for user and AI messages
  • ⌨️ Typing Indicator - Visual feedback when AI is processing
  • ✍️ Typewriter Effect - AI responses appear with realistic typing animation
  • πŸ“œ Smooth Scrolling - Auto-scrolls to latest messages
  • πŸ”’ Character Counter - Real-time count with color-coded warnings
  • πŸ“ Auto-resize Input - Textarea expands dynamically as you type
  • ⌨️ Keyboard Shortcuts - Enter to send, Shift+Enter for new line

πŸŽ›οΈ Customization

Changing the AI Model

In app.py, you can switch between different Groq models:

model="llama-3.1-70b-versatile"  # Default - fast and versatile
# Other options:
# model="mixtral-8x7b-32768"      # For longer context
# model="gemma-7b-it"             # Google's Gemma model

Adjusting Colors & Theme

Edit CSS variables in static/styles.css:

:root {
    --primary-color: #6366f1;      /* Change primary color */
    --secondary-color: #8b5cf6;    /* Change secondary color */
    --bg-dark: #0f172a;            /* Change background */
    /* ... customize more colors ... */
}

Modifying System Prompt

Customize the AI's personality in app.py:

{"role": "system", "content": "You are a helpful, friendly, and conversational AI assistant. Provide clear and concise responses."}

πŸ› Troubleshooting

API Key Issues

Problem Solution
"API key not configured" Ensure .env file exists with GROQ_API_KEY=your-key
"Invalid API key" Verify your key at Groq Console
Key not working Check for extra spaces or quotes in .env file

Port Already in Use

If port 5000 is busy, change it in app.py:

port = int(os.environ.get('PORT', 5001))  # Use port 5001 instead

Dependencies Issues

Reinstall dependencies:

pip install --upgrade -r requirements.txt

CORS Errors

Ensure flask-cors is installed:

pip install flask-cors

🌐 Deployment

Deploy your chatbot to the cloud and share it with the world!

πŸš€ Quick Deploy Options

Platform Free Tier Difficulty Best For
Render βœ… Yes ⭐ Easy Beginners
Railway βœ… Yes ⭐ Easy Quick deployment
PythonAnywhere βœ… Yes ⭐⭐ Medium Python-focused
Fly.io βœ… Yes ⭐⭐ Medium Global deployment

πŸ“– Detailed deployment guide: See DEPLOYMENT.md

🎯 For Your Portfolio

  1. βœ… Deploy to Render or Railway (free tiers available)
  2. βœ… Add the live URL to your portfolio
  3. βœ… Include screenshots and project description
  4. βœ… Link to GitHub repository

πŸ“Έ Screenshots

Desktop View

image

Mobile View

image

πŸ’‘ Add your own screenshots to showcase the beautiful UI!


πŸ› οΈ Tech Stack

Category Technology
Backend Python 3.8+, Flask 3.0
AI Engine Groq API (Ultra-fast inference)
Frontend HTML5, CSS3, Vanilla JavaScript
Styling Custom CSS with animations
Deployment Render, Railway, or any Python host

πŸ“š Documentation


🀝 Contributing

Contributions are welcome! Feel free to:

  • πŸ› Report bugs
  • πŸ’‘ Suggest new features
  • πŸ”§ Submit pull requests
  • πŸ“ Improve documentation

Ideas for Enhancement

  • πŸ’Ύ Conversation history persistence
  • πŸ” User authentication
  • 🎨 Multiple chat themes
  • πŸ“Ž File upload capabilities
  • 🌍 Multi-language support
  • πŸ“Š Usage analytics

πŸ“„ License

This project is open source and available under the MIT License.


πŸ™ Acknowledgments

  • Groq - For the amazing ultra-fast inference API
  • Flask - For the lightweight web framework
  • Poppins Font - For the beautiful typography

πŸ“ž Support & Resources

Need Help?


⭐ If you like this project, give it a star! ⭐

Built with ❀️ using Groq's lightning-fast AI inference

πŸš€ Happy Chatting! πŸš€

About

AI Chatbot with Interactive Web Interface

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors