help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
multi-language-chatbot
RSK World
multi-language-chatbot
Multi-language Chatbot - Python + Flask + OpenAI API + NLP + Translation + Language Detection + Cultural Adaptation
multi-language-chatbot
  • __pycache__
  • instance
  • languages
  • logs
  • modules
  • static
  • templates
  • tests
  • .env.example1.1 KB
  • .gitignore2 KB
  • GITHUB_RELEASE_TEMPLATE.md3.3 KB
  • LICENSE1.2 KB
  • README.md9.3 KB
  • RELEASE_NOTES.md6.4 KB
  • app.py18.5 KB
  • config.py4.2 KB
  • manifest.ini2.5 KB
  • requirements.txt1.6 KB
  • run.py2.9 KB
  • setup.py3.1 KB
setup.pyconfig.py
setup.py
Raw Download
Find: Go to:
"""
Multi-language Chatbot Setup Script
Author: RSK World (https://rskworld.in)
Founder: Molla Samser
Designer & Tester: Rima Khatun
Contact: help@rskworld.in, +91 93305 39277
Year: 2026
Description: Setup script for multi-language chatbot package
"""

from setuptools import setup, find_packages

with open("README.md", "r", encoding="utf-8") as fh:
    long_description = fh.read()

with open("requirements.txt", "r", encoding="utf-8") as fh:
    requirements = [line.strip() for line in fh if line.strip() and not line.startswith("#")]

setup(
    name="multi-language-chatbot",
    version="1.0.0",
    author="RSK World",
    author_email="help@rskworld.in",
    description="Multi-language chatbot with automatic translation and cultural adaptation",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://rskworld.in",
    project_urls={
        "Bug Tracker": "https://rskworld.in/contact.php",
        "Source Code": "https://rskworld.in",
        "Documentation": "https://rskworld.in",
    },
    packages=find_packages(),
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
        "Topic :: Communications :: Chat",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Operating System :: OS Independent",
        "Natural Language :: English",
        "Natural Language :: Hindi",
        "Natural Language :: Bengali",
        "Natural Language :: Spanish",
        "Natural Language :: French",
        "Natural Language :: German",
        "Natural Language :: Chinese",
        "Natural Language :: Japanese",
        "Natural Language :: Arabic",
        "Natural Language :: Portuguese",
        "Natural Language :: Russian",
        "Natural Language :: Italian",
    ],
    python_requires=">=3.8",
    install_requires=requirements,
    extras_require={
        "dev": [
            "pytest>=7.4.2",
            "pytest-flask>=1.2.0",
            "black>=23.7.0",
            "flake8>=6.0.0",
        ],
        "advanced": [
            "spacy>=3.6.1",
            "transformers>=4.33.2",
            "torch>=2.0.1",
        ],
    },
    entry_points={
        "console_scripts": [
            "multilang-chatbot=run:main",
        ],
    },
    include_package_data=True,
    package_data={
        "": ["*.html", "*.css", "*.js", "*.json", "*.md", "*.txt"],
    },
    keywords=[
        "chatbot", "multilingual", "translation", "nlp", "ai", "machine-learning",
        "language-detection", "cultural-adaptation", "openai", "google-translate",
        "flask", "web-app", "python", "rsk-world"
    ],
    zip_safe=False,
)
91 lines•3.1 KB
python
config.py
Raw Download
Find: Go to:
"""
Configuration Module
Author: RSK World (https://rskworld.in)
Founder: Molla Samser
Designer & Tester: Rima Khatun
Contact: help@rskworld.in, +91 93305 39277
Year: 2026
Description: Configuration settings for multi-language chatbot
"""

import os
from dotenv import load_dotenv

# Load environment variables
load_dotenv()

class Config:
    """Base configuration"""
    
    # Basic Flask Configuration
    SECRET_KEY = os.getenv('SECRET_KEY', 'multi-language-chatbot-rsk-world-2026')
    DEBUG = os.getenv('FLASK_DEBUG', 'False').lower() == 'true'
    
    # Server Configuration
    HOST = os.getenv('HOST', '0.0.0.0')
    PORT = int(os.getenv('PORT', 5000))
    
    # API Keys
    OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')
    GOOGLE_TRANSLATE_API_KEY = os.getenv('GOOGLE_TRANSLATE_API_KEY')
    
    # Chatbot Configuration
    MAX_CONVERSATION_LENGTH = int(os.getenv('MAX_CONVERSATION_LENGTH', 20))
    DEFAULT_LANGUAGE = os.getenv('DEFAULT_LANGUAGE', 'en')
    SUPPORTED_LANGUAGES = os.getenv('SUPPORTED_LANGUAGES', 'en,hi,bn,es,fr,de,zh,ja,ar,pt,ru,it').split(',')
    
    # Cultural Adaptation
    CULTURAL_ADAPTATION_ENABLED = os.getenv('CULTURAL_ADAPTATION_ENABLED', 'True').lower() == 'true'
    TIMEZONE_AWARENESS = os.getenv('TIMEZONE_AWARENESS', 'True').lower() == 'true'
    
    # Security
    CORS_ORIGINS = os.getenv('CORS_ORIGINS', '*').split(',')
    ENABLE_HTTPS = os.getenv('ENABLE_HTTPS', 'False').lower() == 'true'
    
    # Rate Limiting
    RATE_LIMIT_PER_MINUTE = int(os.getenv('RATE_LIMIT_PER_MINUTE', 60))
    
    # Logging
    LOG_LEVEL = os.getenv('LOG_LEVEL', 'INFO')
    LOG_FILE = os.getenv('LOG_FILE', 'logs/chatbot.log')
    
    # Database (Optional)
    DATABASE_URL = os.getenv('DATABASE_URL', 'sqlite:///chatbot.db')
    
    # Redis (Optional for caching)
    REDIS_URL = os.getenv('REDIS_URL', 'redis://localhost:6379/0')
    
    # Analytics
    ENABLE_ANALYTICS = os.getenv('ENABLE_ANALYTICS', 'False').lower() == 'true'
    ANALYTICS_API_KEY = os.getenv('ANALYTICS_API_KEY')
    
    # Language Detection Settings
    LANGUAGE_DETECTION_CONFIDENCE_THRESHOLD = float(os.getenv('LANGUAGE_DETECTION_CONFIDENCE_THRESHOLD', 0.7))
    
    # Translation Settings
    TRANSLATION_CACHE_SIZE = int(os.getenv('TRANSLATION_CACHE_SIZE', 1000))
    TRANSLATION_TIMEOUT = int(os.getenv('TRANSLATION_TIMEOUT', 10))
    
    # OpenAI Settings
    OPENAI_MODEL = os.getenv('OPENAI_MODEL', 'gpt-3.5-turbo')
    OPENAI_MAX_TOKENS = int(os.getenv('OPENAI_MAX_TOKENS', 500))
    OPENAI_TEMPERATURE = float(os.getenv('OPENAI_TEMPERATURE', 0.7))
    
    @staticmethod
    def init_app(app):
        """Initialize application with configuration"""
        pass

class DevelopmentConfig(Config):
    """Development configuration"""
    DEBUG = True
    LOG_LEVEL = 'DEBUG'

class ProductionConfig(Config):
    """Production configuration"""
    DEBUG = False
    ENABLE_HTTPS = True
    
    @classmethod
    def init_app(cls, app):
        Config.init_app(app)
        
        # Production-specific initialization
        import logging
        from logging.handlers import RotatingFileHandler
        
        if not app.debug:
            file_handler = RotatingFileHandler(
                cls.LOG_FILE, 
                maxBytes=10240000, 
                backupCount=10
            )
            file_handler.setFormatter(logging.Formatter(
                '%(asctime)s %(levelname)s: %(message)s [in %(pathname)s:%(lineno)d]'
            ))
            file_handler.setLevel(logging.INFO)
            app.logger.addHandler(file_handler)
            app.logger.setLevel(logging.INFO)
            app.logger.info('Multi-language Chatbot startup')

class TestingConfig(Config):
    """Testing configuration"""
    TESTING = True
    OPENAI_API_KEY = 'test-key'
    DEBUG = True

# Configuration dictionary
config = {
    'development': DevelopmentConfig,
    'production': ProductionConfig,
    'testing': TestingConfig,
    'default': DevelopmentConfig
}

def get_config():
    """Get current configuration based on environment"""
    env = os.getenv('FLASK_ENV', 'development')
    return config.get(env, config['default'])
129 lines•4.2 KB
python
🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ❤️

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer