+
Skip to content
forked from kanakOS01/git-chat

A bot that helps you understand a GitHub repository easily through question and answering.

License

Notifications You must be signed in to change notification settings

all0x0/git-chat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Chat

Git Chat is a RAG application that allows you to have a q/a session with any github repository of your choice. This is especially helpful for beginners who find it difficult to understand complex open source code bases on github.

It uses weaviate cloud vector database to store the embeddings, MindsDB to host llm models and engines and facilitate queries with context and streamlit for UI along with LangChain for some other processes.

Demo

Git Chat Demo Video

Getting started

Prerequisites

  • Python 3.7 or higher
  • Pip package manager
  • Docker

Setup

1. Clone the Repository

git clone https://github.com/kanakOS01/git-chat.git && cd git-chat

2. Setup python virtual environment

3. Install dependencies

pip install -r requirements

4. Create .env file

  • Create a .env file and add the following keys inside it
  • Get the google gemini api key here
  • Get the weaviate api key and cluster url here
    • Create a new weaviate cluster and you will get the required api key and cluster url. Refer this
GOOGLE_API_KEY=""
WEAVIATE_API_KEY=""
WEAVIATE_CLUSTER_URL=""

5. Setup MindsDB locally

  • Run the MindsDB docker image.
docker run --name mindsdb_container -p 47334:47334 -p 47335:47335 mindsdb/mindsdb
  • Install google-generativeai package in this docker image
docker exec -it <container_id> /bin/bash
pip install google-generativeai

Start the application

  • Start mindsdb_container
docker start mindsdb_container
  • For a fresh setup run the python file using python create_mindsdb_handlers.py. This will create the required projects and models in you MindsDB container.

  • Run the application using

streamlit run main.py
  • The app will start on localhost:8501

Note

  • The repo data is stored in weaviate cloud. The data is persistent. If the repo is not present it is automatically created however this can take a long time depending on the size of the repository.
  • It is recommended to use relatively smaller directories while testing (you may use a large repo although that will take some time)
  • The process of embedding new repo data creates a transient repo subdirectory in the main directory. Make sure you do not have conflicting subdirectory.

About

A bot that helps you understand a GitHub repository easily through question and answering.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载