from setuptools import setup, find_packages
import os
import json

# Function to read the version from package.json
def get_version():
    with open("package.json", "r", encoding="utf-8") as f:
        package_info = json.load(f)
        return package_info.get("version", "0.1.0")

# Read the long description from README.md
with open("README.md", "r", encoding="utf-8") as fh:
    long_description = fh.read()

setup(
    name="amai_ai_chatbot",
    version=get_version(),  # Dynamically read the version
    description="African Multimodal Artificial Intelligence",
    long_description=long_description,
    long_description_content_type="text/markdown",
    author="Manish Kumar Thota",
    author_email="mansih.thota1999@gmail.com",
    license="MIT",
    license_files=("LICENSE",),
    classifiers=[
        "Development Status :: 4 - Beta",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.11",
        "Topic :: Communications :: Chat",
        "Topic :: Multimedia",
    ],
    python_requires=">= 3.11, < 3.12.0a1",
    install_requires=[
        "fastapi==0.111.0",
        "uvicorn[standard]==0.30.6",
        "pydantic==2.8.2",
        "python-multipart==0.0.9",
        
        "Flask==3.0.3",
        "Flask-Cors==5.0.0",
        
        "python-socketio==5.11.3",
        "python-jose==3.3.0",
        "passlib[bcrypt]==1.7.4",
        
        "requests==2.32.3",
        "aiohttp==3.10.5",
        
        "sqlalchemy==2.0.32",
        "alembic==1.13.2",
        "peewee==3.17.6",
        "peewee-migrate==1.12.2",
        "psycopg2-binary==2.9.9",
        "PyMySQL==1.1.1",
        "bcrypt==4.2.0",
        
        "pymongo",
        "redis",
        "boto3==1.35.0",
        
        "argon2-cffi==23.1.0",
        "APScheduler==3.10.4",
        
        "openai",
        "anthropic",
        "google-generativeai==0.7.2",
        "tiktoken",
        
        "langchain==0.2.15",
        "langchain-community==0.2.12",
        "langchain-chroma==0.1.2",
        
        "fake-useragent==1.5.1",
        "chromadb==0.5.5",
        "pymilvus==2.4.6",
        
        "sentence-transformers==3.0.1",
        "colbert-ai==0.2.21",
        "einops==0.8.0",
        
        "pypdf==4.3.1",
        "docx2txt==0.8",
        "python-pptx==1.0.0",
        "unstructured==0.15.9",
        "nltk==3.9.1",
        "Markdown==3.7",
        "pypandoc==1.13",
        "pandas==2.2.2",
        "openpyxl==3.1.5",
        "pyxlsb==1.0.10",
        "xlrd==2.0.1",
        "validators==0.33.0",
        "psutil",
        
        "opencv-python-headless==4.10.0.84",
        "rapidocr-onnxruntime==1.3.24",
        
        "fpdf2==2.7.9",
        "rank-bm25==0.2.2",
        
        "faster-whisper==1.0.3",
        
        "PyJWT[crypto]==2.9.0",
        "authlib==1.3.2",
        
        "black==24.8.0",
        "langfuse==2.44.0",
        "youtube-transcript-api==0.6.2",
        "pytube==15.0.0",
        
        "extract_msg",
        "pydub",
        "duckduckgo-search~=6.2.11",
        
        "docker~=7.1.0",
        "pytest~=8.2.2",
        "pytest-docker~=3.1.1",
    ],
    packages=find_packages(),
    entry_points={
        "console_scripts": [
            "amai = open_webui:app",  # Changed from 'open-webui' to 'amai'
        ],
    },
    include_package_data=True,
)
