1.5 KiB
1.5 KiB
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
- Clone the repository
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate - Install dependencies:
pip install -r requirements.txt - Copy
.env.exampleto.envand update the values - Initialize the database:
flask db init flask db migrate flask db upgrade - 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