Repochat - GitHub Repository Interactive Chatbot
Repochat is an exciting project that transforms the way users interact with GitHub repositories. It is an innovative chatbot designed to facilitate meaningful conversations, allowing users to ask questions and retrieve information from any GitHub repository seamlessly. Leveraging a powerful Large Language Model (LLM), this tool provides a robust platform for engaging discussions around coding projects.
Branches
Repochat presents two distinct operational modes via its branches:
-
Main Branch: This branch operates entirely locally on the user's machine, requiring no external API calls. It is ideal for users who prefer a self-contained solution that provides more control over their data.
-
Cloud Branch: This online variant leverages third-party API calls for model functioning and data storage. It's an excellent choice for those who favor a cloud-based setup without the need for a local environment.
Installation
Setting up Repochat is a straightforward process:
-
Virtual Environment: Start by creating and activating a virtual environment to ensure project dependencies are isolated.
python -m venv repochat-env source repochat-env/bin/activate
-
Clone Repository: Download the Repochat repository and move into the project directory.
git clone https://github.com/pnkvalavala/repochat.git cd repochat
-
Install Packages: Use pip to install the necessary Python packages.
pip install -r requirements.txt
-
Llama-cpp-python Library: Install this library, with or without hardware acceleration depending on system capabilities.
-
Model Directory: Make a 'models' directory within your project space.
-
Language Model: Download a suitable Language Model from Hugging Face Model Hub. A recommended choice for many systems is TheBloke/CodeLlama-7B-GGUF.
-
Model Setup: Copy this model into the 'models' folder and specify its location within the project code.
Usage
To get started, execute the following command in your terminal:
streamlit run app.py
Following startup, input the GitHub repository link. Repochat will clone the repository files into a folder named "cloned_repo," segment them into smaller parts, and process them using a Sentence Transformers model. The results are stored locally in a database for quick retrieval.
Chatbot Functionality
The interactive chatbot allows users to engage by asking questions or inputting queries. The system retrieves related documents and uses a Language Model to craft informed and contextually relevant responses. Users can choose different models based on their system's performance capabilities.
Raising Issues
Should you encounter any problems or have suggestions, the Issues section of the Repochat repository welcomes your feedback. Here, users can report bugs or propose improvements, and efforts will be made to address any issues.
License
Repochat is shared under the Apache License 2.0. The project advises users to review the license details to understand the terms of use.
Repochat represents a sophisticated blend of chat technology and tooling for developers, providing simple yet powerful capabilities for interacting through GitHub repositories.