Skip to content

SSK-14/chatbot-guardrails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’‚πŸΌ Build your Documentation AI with Nemo Guardrails

OpenAI Google Gemini Nvidia Nemo

πŸ“œ 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

Without Guardrails
Without Guardrails
With 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
  1. Install required libraries
pip3 install -r requirements.txt

Create an .env file from .env.example

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.
  1. 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. Feel free to use, modify, and distribute the code as per the terms of the license.