A sophisticated AI-powered chatbot with advanced document retrieval capabilities using Qdrant vector search and Mistral AI.
- Mistral AI Integration - Powered by state-of-the-art language models
- Context-Aware Conversations - Maintains conversation history and context
- Multi-thread Support - Separate conversation threads for different topics
- Qdrant Vector Search - Lightning-fast semantic search
- Smart Filtering - Filter by department, document type, and year
- Automatic Filter Extraction - AI-powered metadata extraction from queries
- Cached Retrieval - Optimized performance with intelligent caching
- Modern Web UI - Clean, responsive design with real-time updates
- Real-time Streaming - Live response streaming for better UX
- Thread Management - Organized conversation management
- Comprehensive Testing Tools - Built-in retrieval testing interface
- Python 3.10+
- Qdrant Cloud account
- Mistral AI API key
- Clone the repository
git clone https://github.com/trongkhanh083/chatbot-api.git
cd chatbot-api
- Install dependencies
pip install -r requirements.txt
- Set up environment variables
Edit .env with your credentials:
MISTRAL_API_KEY=your_mistral_api_key
QDRANT_URL=your_qdrant_cloud_url
QDRANT_API_KEY=your_qdrant_api_key
QDRANT_COLLECTION_NAME=your_qdrant_collection_name
- Generate or use your own documents
python -m config.data_generation
- Upload documents to Qdrant
python -m config.upload_to_qdrant
- Run the application
python main.py
- Mistral AI for powerful language models
- Qdrant for excellent vector search capabilities
- FastAPI for the modern Python web framework
- LangChain for the AI framework
Built with ❤️ using FastAPI, Mistral AI, and Qdrant
