# Chatbot Application A chatbot application with document training, private/team chat options, and model switching capability. ## Features - Document training through library page - Private chat functionality - Team chat functionality (multiple users can see each other's interactions) - Model switching capability ## Technology Stack - **Backend**: Flask with FastAPI - **Database**: MySQL - **Vector Database**: Pinecone - **Embeddings**: Sentence Transformers / OpenAI Embeddings - **Chat Models**: Various LLMs (configurable) ## Project Structure ``` app/ ├── api/ # API endpoints (Flask and FastAPI) ├── config/ # Configuration settings ├── database/ # Database connection and utilities ├── models/ # Database models ├── services/ # Business logic services └── utils/ # Utility functions tests/ # Test cases ``` ## Setup Instructions 1. Clone the repository 2. Create a virtual environment: ``` python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate ``` 3. Install dependencies: ``` pip install -r requirements.txt ``` 4. Copy `.env.example` to `.env` and update the values 5. Initialize the database: ``` flask db init flask db migrate flask db upgrade ``` 6. Run the application: ``` python run.py ``` ## API Documentation Once the application is running, you can access the API documentation at: - FastAPI Swagger UI: http://localhost:5000/docs - FastAPI ReDoc: http://localhost:5000/redoc