Skip to content

cikavelja/support-chat-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📌 Support Chat Bot

📖 Overview

This repository provides a custom AI-powered support chat bot, built using:

  • 🖥 C# API utilizing the Ollama AI server with the all-minilm model
  • 📊 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.


🎥 Video Explanation

For a detailed video explanation, watch this video: Watch the video


⚙️ Prerequisites

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)

🏗 1. Install Ollama AI Server

Ollama is required to generate embeddings using the all-minilm model.

🐧 Linux/macOS

curl -fsSL https://ollama.ai/install.sh | sh

🖥 Windows

  1. Download the Windows installer from Ollama AI
  2. Run the installer and follow the instructions

Verify the installation:

ollama --version

🔄 2. Pull the All-MiniLM Model

Once Ollama is installed, pull the all-minilm model:

ollama pull all-minilm

Confirm the model is available:

ollama list

🗄 3. Install and Run Qdrant Vector Database

Qdrant is used as a vector database to store and retrieve support topics efficiently.

🐳 Using Docker

Pull Qdrant using the following command:

docker pull qdrant/qdrant

Run Qdrant using the following command:

docker run -p 6333:6333 -p 6334:6334  -v qdrant_storage:/qdrant/storage qdrant/qdrant

Check if Qdrant is running: 🌐 http://localhost:6333/

Qdrant dashboard: 🌐 http://localhost:6333/dashboard


🔽 4. Clone the Repository

Clone the chat bot repository from GitHub:

git clone https://github.com/cikavelja/support-chat-bot.git
cd support-chat-bot

🏗 5. Set Up the C# API

Navigate to the backend folder:

cd backend

📦 Install Dependencies

dotnet restore

🚀 Run the API

dotnet run

The API should now be running at 🌐 http://localhost:5140/.


🌐 6. Run the Angular UI

Navigate to the Angular frontend directory:

cd frontend-angular

📦 Install Dependencies

npm install

🚀 Run the Angular App

npm start

The Angular UI should now be accessible at 🌐 http://localhost:4200/.


⚛️ 7. Run the React UI

Navigate to the React frontend directory:

cd frontend-react

📦 Install Dependencies

npm install

🚀 Run the React App

npm start

The React UI should now be accessible at 🌐 http://localhost:3000/.


🛠 8. Usage

  1. Open the Angular or React UI.
  2. Enter a support query or topic.
  3. The query is converted to an embedding vector using Ollama AI.
  4. The Qdrant vector database searches for the most relevant support topics.
  5. The result is displayed in the UI.

🔗 9. API Endpoints

📌 POST /api/Support/query (User Query)

  • 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."
}

📌 POST /api/SupportAdmin/add (Admin Adds New Support Topic)

  • 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
}

🤝 10. Contributing

  1. Fork the repository
  2. Create a new branch
  3. Make your changes
  4. Submit a pull request

🛠 11. Troubleshooting

Qdrant Not Running?

Check if the container is running:

docker ps

If not, restart it:

docker start qdrant

API Not Responding?

Check if the API is running at 🌐 http://localhost:5140/:

curl http://localhost:5140/api/Support/query

Frontend Not Loading?

Ensure that the React/Angular app is running and check the console for errors.


📜 12. License

This project is licensed under the MIT License.


📧 13. Contact

For support, contact: ✉️ veljkovic.nenad@gmail.com

🚀 Happy Coding!

About

Sample Tech Support Chat Bot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors