https://github.com/ssk-14/chatbot-guardrails
💂🏼 Build your Documentation AI with Nemo Guardrails
https://github.com/ssk-14/chatbot-guardrails
chatbot documentation github gradio guardrails langchain llm nemo-guardrails rag
Last synced: 2 months ago
JSON representation
💂🏼 Build your Documentation AI with Nemo Guardrails
- Host: GitHub
- URL: https://github.com/ssk-14/chatbot-guardrails
- Owner: SSK-14
- License: mit
- Created: 2023-07-30T05:08:44.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-18T05:04:19.000Z (8 months ago)
- Last Synced: 2025-03-20T17:40:17.730Z (3 months ago)
- Topics: chatbot, documentation, github, gradio, guardrails, langchain, llm, nemo-guardrails, rag
- Language: Python
- Homepage: https://ssk-14-nemo-ai.hf.space/
- Size: 14.1 MB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 💂🏼 Build your Documentation AI with Nemo Guardrails


## 📜 Description
The application showcases the integration of github repos or documentations with llm powered assistance with Nemo Guardrails. By combining these technologies, the application ensures advanced safety features and effective mitigation's, enhancing the overall security and reliability of the chatbot system.## 🚀 Demo
[NeMo Guardrails Chatbot](https://ssk-14-nemo-ai.hf.space/)
| Without Guardrails |
|------------|
|  || With Guardrails |
|------------|
|  |---
## 🛠️ Run The Application
#### Clone the repo
```
git clone https://github.com/SSK-14/chatbot-guardrails.git
```#### If running for the first time,
1. Create virtual environment
```
pip3 install env
python3 -m venv env
source env/bin/activate
```2. Install required libraries
```
pip3 install -r requirements.txt
```#### Create an .env file from .env.example
- Get an [Gemini API key](https://makersuite.google.com/app/apikey) or [OpenAI API key](https://platform.openai.com/account/api-keys) or [Groq API key](https://console.groq.com) or Use local models using [Ollama](https://ollama.ai/).
- Setup a vector database [Qdrant Cloud](https://cloud.qdrant.io/).
Make sure you replace your key rightly.
```
# You can use your preferred models.
MODEL_API_KEY = "Your OpenAI/Gemini/Groq API Key"
QDRANT_URL = "Your Qdrant cloud cluster URL"
#If you are using qdrant cloud
QDRANT_API_KEY = "Your Qdrant API Key"
```#### Loading the Vectorstore 🗃️
1. Update the constants in `vectorstore.py` and `nemo/config.py`
- Change GITHUB_URL and BRANCH for your preferred github repo.
2. Run the command - `python vectorstore.py`#### Run the Gradio app
```
gradio app.py
```#### Run using NeMo Guardrails UI
- Update the `nemo/config.yml` file with models and `export OPENAI_API_KEY=sk...`
```
nemoguardrails server --config nemo
```## 📁 Project Structure
```
chatbot-guardrails/
│
├── nemo/ // Contains all files for Guardrails
├── app.py // Main file to run for gradio UI
├── vectorstore.py // Run this to create vectorstore
├── README.md
└── requirements.txt
```## Contributing 🤝
Contributions to this project are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request on the project's GitHub repository.## License 📝
This project is licensed under the [MIT License](https://github.com/SSK-14/chatbot-guardrails/blob/main/LICENSE). Feel free to use, modify, and distribute the code as per the terms of the license.