Skip to content

Latest commit

 

History

History
97 lines (69 loc) · 3.1 KB

README.md

File metadata and controls

97 lines (69 loc) · 3.1 KB

💂🏼 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.