This repository contains code for chatting with a GitHub Repo that leverages an Open Source large language model (LLM) to provide informative responses to user queries.
![AI_Repo](https://private-user-images.githubusercontent.com/63769209/294113484-4d0f069a-a501-4a55-8cf4-8339a8b469a3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNjM3MTIsIm5iZiI6MTczOTI2MzQxMiwicGF0aCI6Ii82Mzc2OTIwOS8yOTQxMTM0ODQtNGQwZjA2OWEtYTUwMS00YTU1LThjZjQtODMzOWE4YjQ2OWEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA4NDMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyNzE5YTczNWU3Njc2OTJhYmEwNmMyMjdhY2MwOWY5ZjgxMzZlN2E1ZmE4MDk2YmExNWNkMDUwNDdiMjRhM2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Wo0--tvD62WUWhjgacMgYnLKE04hdtzbRjLW_BRRrzY)
Assignment_Demo.mp4
Before running the code, please ensure you have the following installed:
- Python 3.7 or later (3.10 was used in the project)
API tokens for:
- Replicate (LLM provider)
- Activeloop
- GitHub
Clone this repository:
git clone https://github.com/<your-username>/AI_Repo.git
Navigate to the repository directory:
cd <repo-name>
Create a .env file:
In the root of the repository, create a file named .env.
Add the following lines to the .env file, replacing the placeholders with your actual API tokens:
REPLICATE_API_TOKEN=<your_replicate_token>
ACTIVELOOP_TOKEN=<your_activeloop_token>
GITHUB_TOKEN=<your_github_token>
DATASET_PATH=<path_to_store_vector_store>
Install required libraries:
pip install -r requirements.txt
Launch the Gradio interface:
python main.py
- A Gradio interface will open in your web browser.
- Type your question in the chat box and press Enter.
- The system will process your query and provide a response using the LLM.
The code is currently configured to use the segment-anything GitHub repository as the data source. If you want to use a different repository, modify the github_url
variable in the main function.
You can adjust the LLM model
, vector store
settings, and other parameters in the code as needed.