Skip to content

sohan2311/Sohan-s-GPT-AI-Chatbot-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Sohan's GPT - AI Chat Assistant

Sohan's AI Chatbot Assistant

A Beautiful, Feature-Rich AI Chat Interface Powered by Together.ai

Streamlit Python Together.ai


πŸ“Έ Screenshots

Main Chat Interface

Chat Interface

Model Selection & Configuration

Configuration Panel

Chat Statistics & Export

Chat Stats

Chat Model

Chatbot model

Chat Stats and Export to Json Button

Chat Stats and Export to Json Button


✨ Features

🎨 Beautiful UI/UX

  • Gradient Design: Modern gradient backgrounds and smooth animations
  • Responsive Layout: Optimized for desktop and mobile devices
  • Typing Animation: Real-time typing effect for AI responses
  • Custom Styling: Hand-crafted CSS for premium look and feel

🧠 Multiple AI Models

  • Mixtral 8x7B: High-performance instruction-following model
  • Llama 3 8B/70B: Meta's latest language models
  • CodeLlama 34B: Specialized for code generation and assistance

βš™οΈ Advanced Configuration

  • Temperature Control: Adjust creativity (0.0 - 2.0)
  • Token Limit: Customize response length (50 - 4000 tokens)
  • Real-time Settings: Change models and parameters on-the-fly

πŸ“Š Smart Features

  • Chat Statistics: Track message counts and conversation metrics
  • Export Functionality: Download chat history as JSON
  • Session Management: Persistent chat history during session
  • Error Handling: Robust error handling with user-friendly messages

πŸ”§ Technical Excellence

  • Streaming Support: Fast response delivery
  • Timeout Protection: 30-second request timeout
  • API Integration: Seamless Together.ai API integration
  • State Management: Efficient Streamlit session state handling

πŸš€ Quick Start

Prerequisites

  • Python 3.8+
  • Together.ai API Key
  • Streamlit

Installation

  1. Clone the repository

    git clone https://github.com/sohan2311/Sohan-s-GPT-AI-Chatbot-Assistant.git
    cd Sohan-s-GPT-AI-Chatbot-Assistant
  2. Install dependencies

    pip install -r requirements.txt
  3. Set up environment

    # Create .streamlit/secrets.toml
    mkdir .streamlit
    echo 'TOGETHERAI_API_KEY = "your-api-key-here"' > .streamlit/secrets.toml
  4. Run the application

    streamlit run streamlit_app.py
  5. Open your browser

    http://localhost:8501
    

πŸ“‹ Requirements

Create a requirements.txt file:

streamlit>=1.28.0
requests>=2.31.0
python-dateutil>=2.8.2

πŸ”‘ API Configuration

Getting Together.ai API Key

  1. Visit Together.ai
  2. Sign up for an account
  3. Navigate to API section
  4. Generate your API key
  5. Add it to your Streamlit secrets

Environment Setup

Option 1: Streamlit Secrets (Recommended)

# .streamlit/secrets.toml
TOGETHERAI_API_KEY = "your-together-ai-api-key"

Option 2: Environment Variables

export TOGETHERAI_API_KEY="your-together-ai-api-key"

🎯 Usage Examples

Basic Chat

# Simply type your message and get AI responses
"Hello, how are you today?"

Code Assistance

# Ask for programming help
"Write a Python function to calculate fibonacci numbers"

Creative Writing

# Get creative assistance
"Write a short story about a robot learning to paint"

πŸ—οΈ Architecture

graph TD
    A[User Input] --> B[Streamlit Frontend]
    B --> C[Session State Management]
    C --> D[Together.ai API]
    D --> E[AI Model Processing]
    E --> F[Response Generation]
    F --> G[Typing Animation]
    G --> H[Display to User]
Loading

πŸ› οΈ Customization

Adding New Models

model_options = {
    "Your Model Name": "model-id-from-together-ai",
    # Add more models here
}

Styling Modifications

Edit the CSS in the st.markdown() section to customize:

  • Colors and gradients
  • Animations and transitions
  • Layout and spacing
  • Typography and fonts

Feature Extensions

The codebase is modular and extensible:

  • Add new AI providers
  • Implement conversation memory
  • Add file upload capabilities
  • Create custom chat themes

πŸ“Š Performance

  • Response Time: < 3 seconds average
  • Concurrent Users: Supports multiple simultaneous sessions
  • Memory Usage: Optimized session state management
  • API Efficiency: Smart request batching and error handling

🀝 Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Make your changes
  4. Add tests if applicable
  5. Commit your changes
    git commit -m "Add amazing feature"
  6. Push to your branch
    git push origin feature/amazing-feature
  7. Open a Pull Request

Development Guidelines

  • Follow PEP 8 style guide
  • Add docstrings to functions
  • Test your changes locally
  • Update documentation as needed

πŸ™ Acknowledgments

πŸ“ž Support

πŸ”„ Version History

  • v1.0.0 - Initial release with core features
  • v1.1.0 - Added multiple model support
  • v1.2.0 - Enhanced UI/UX with animations
  • v1.3.0 - Added export functionality and statistics

🎯 Roadmap

  • Voice Chat: Add speech-to-text and text-to-speech
  • File Upload: Support document and image uploads
  • Custom Themes: Multiple UI themes
  • Conversation Memory: Long-term chat history
  • Multi-language: Support for multiple languages
  • Mobile App: Native mobile application

Built with ❀️ by Sohan Maity

⭐ Star this repository if you found it helpful! ⭐

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages