This repository provides a custom AI-powered support chat bot, built using:
- 🖥 C# API utilizing the Ollama AI server with the
all-minilmmodel - 📊 Qdrant Vector Database for storing and retrieving support topics
- 🌐 Angular and React as UI options
This guide will walk you through setting up the chat bot, installing dependencies, and running the project.
For a detailed video explanation, watch this video:
Ensure you have the following installed:
- 🐳 Docker (for running Qdrant)
- 🏗 .NET Core 9+ (for running the API)
- 📦 Node.js & npm/yarn (for running Angular or React UI)
- 🔗 Git (for cloning the repository)
Ollama is required to generate embeddings using the all-minilm model.
curl -fsSL https://ollama.ai/install.sh | sh- Download the Windows installer from Ollama AI
- Run the installer and follow the instructions
Verify the installation:
ollama --versionOnce Ollama is installed, pull the all-minilm model:
ollama pull all-minilmConfirm the model is available:
ollama listQdrant is used as a vector database to store and retrieve support topics efficiently.
Pull Qdrant using the following command:
docker pull qdrant/qdrantRun Qdrant using the following command:
docker run -p 6333:6333 -p 6334:6334 -v qdrant_storage:/qdrant/storage qdrant/qdrantCheck if Qdrant is running: 🌐 http://localhost:6333/
Qdrant dashboard: 🌐 http://localhost:6333/dashboard
Clone the chat bot repository from GitHub:
git clone https://github.com/cikavelja/support-chat-bot.git
cd support-chat-botNavigate to the backend folder:
cd backenddotnet restoredotnet runThe API should now be running at 🌐 http://localhost:5140/.
Navigate to the Angular frontend directory:
cd frontend-angularnpm installnpm startThe Angular UI should now be accessible at 🌐 http://localhost:4200/.
Navigate to the React frontend directory:
cd frontend-reactnpm installnpm startThe React UI should now be accessible at 🌐 http://localhost:3000/.
- Open the Angular or React UI.
- Enter a support query or topic.
- The query is converted to an embedding vector using Ollama AI.
- The Qdrant vector database searches for the most relevant support topics.
- The result is displayed in the UI.
- Request Body:
{
"userPrompt": "How do I update my payment details?",
"connectionId": "12345"
}- Response:
{
"response": "To update your payment method, go to the 'Billing' section and update your payment details."
}- Request Body:
{
"title": "Payment Update",
"description": "To update payment details, navigate to 'Billing' and select 'Payment Methods'."
}- Response:
{
"message": "Support topic added successfully!",
"id": 123456789
}- Fork the repository
- Create a new branch
- Make your changes
- Submit a pull request
Check if the container is running:
docker psIf not, restart it:
docker start qdrantCheck if the API is running at 🌐 http://localhost:5140/:
curl http://localhost:5140/api/Support/queryEnsure that the React/Angular app is running and check the console for errors.
This project is licensed under the MIT License.
For support, contact: ✉️ veljkovic.nenad@gmail.com
🚀 Happy Coding!
