Skip to content

deepak-lenka/XLanguage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XLanguage - Multilingual Chat

🌍 Overview

XLanguage is a sophisticated multilingual chat interface that leverages the power of X.AI to provide seamless communication across multiple languages. With support for various languages across European, Asian, Middle Eastern, African, and other regions, XLanguage breaks down language barriers in real-time conversation.

✨ Features

  • 🌐 Multilingual Support

    • European Languages (English, Spanish, French, German, etc.)
    • Asian Languages (Chinese, Japanese, Korean, Hindi, etc.)
    • Middle Eastern Languages (Arabic, Hebrew, Persian, Turkish)
    • African Languages (Swahili, Amharic, Zulu)
    • Other Regional Variants
  • 🎯 Key Capabilities

    • Real-time language switching
    • Intuitive user interface
    • Responsive design
    • Typing indicators
    • Message history
    • Error handling
    • Copy message functionality with formatting preservation
    • Secure API key management

🚀 Quick Start

Prerequisites

  • Python 3.7 or higher
  • pip requirement.txt
  • X.AI API key

Installation

  1. Clone the repository
git clone https://github.com/deepak-lenka/XLanguage.git
cd XLanguage
  1. Install dependencies
pip install -r requirements.txt
  1. Set up environment variables
  • Copy .env.example to .env:
cp .env.example .env
  • Edit .env and add your X.AI API key:
XAI_API_KEY=your_api_key_here
  1. Run the application
flask run

The application will be available at http://127.0.0.1:5000

🛠 Technical Stack

  • Backend: Flask (Python web framework)
  • API Integration: X.AI API for language processing
  • Error Handling: Comprehensive logging and error management
  • Configuration: Environment-based configuration
  • Session Management: Conversation state management

📁 Project Structure

XLanguage/
├── app.py              # Main Flask application
├── config/            # Configuration files
├── services/          # Core services (XAI, Conversation)
├── static/            # Static assets
├── templates/         # HTML templates
└── requirements.txt   # Project dependencies

🔧 Configuration

  1. Environment Variables Create a .env file with the following variables:

    XAI_API_KEY=your_api_key_here
    FLASK_DEBUG=False  # Set to True for development
    
  2. API Configuration

    • Configure X.AI API settings in config/config.py
    • Adjust conversation settings in services/conversation_manager.py

💻 Development Setup

  1. Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

🔒 Security

  • API keys are stored securely in .env file
  • .env is excluded from git repository
  • Environment-specific configurations are supported
  • Proper error handling for missing API keys

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

chat and ask with any language you want.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published