Cookies

With your permission, we use Google Analytics cookies to measure visits and improve the site. Necessary cookies are always on. You can change your choice or withdraw consent anytime in the footer, under Cookie settings. Cookie Policy

Skip to content

Chat with Your Data ·Easy

Chat With GitHub

About this app

LLM app with RAG to chat with GitHub Repo in just 30 lines of Python Code. The app uses Retrieval Augmented Generation (RAG) to provide accurate answers to questions based on the content of the specified GitHub repository.

  • Complete open-source code
  • Step-by-step tutorial
  • Runs on your computer

Technical sheet

Category
Chat with Your Data
Difficulty
Easy
Models
OpenAI, Llama
Frameworks
Ollama (local)
Runs locally?
Yes (Ollama)
Required keys
GITHUB_TOKENOPENAI_API_KEY

License Apache-2.0 · content curated and maintained by Doutor AI.

Full tutorial

💬 Chat with GitHub Repo

LLM app with RAG to chat with GitHub Repo in just 30 lines of Python Code. The app uses Retrieval Augmented Generation (RAG) to provide accurate answers to questions based on the content of the specified GitHub repository.

Features

  • Provide the name of GitHub Repository as input
  • Ask questions about the content of the GitHub repository
  • Get accurate answers using OpenAI's API and Embedchain

How to get Started?

  1. Clone the GitHub repository
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
cd advanced_llm_apps/chat_with_X_tutorials/chat_with_github
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Get your OpenAI API Key
  • Sign up for an OpenAI account (or the LLM provider of your choice) and obtain your API key.
  1. Get your GitHub Access Token
  • Create a personal access token with the necessary permissions to access the desired GitHub repository.
  1. Run the Streamlit App
streamlit run chat_github.py

How it Works?

  • The app prompts the user to enter their OpenAI API key, which is used to authenticate requests to the OpenAI API.
  • It initializes an instance of the Embedchain App class and a GithubLoader with the provided GitHub Access Token.
  • The user is prompted to enter a GitHub repository URL, which is then added to the Embedchain app's knowledge base using the GithubLoader.
  • The user can ask questions about the GitHub repository using the text input.
  • When a question is asked, the app uses the chat method of the Embedchain app to generate an answer based on the content of the GitHub repository.
  • The app displays the generated answer to the user.

From the same category

Chat with Your DataEasy

Chat With Gmail

LLM app with RAG to chat with Gmail in just 30 lines of Python Code. The app uses Retrieval Augmented Generation (RAG) to provide accurate answers to …

  • OpenAI
Chat with Your DataEasy

Chat With PDF

LLM app with RAG to chat with PDF in just 30 lines of Python Code. The app uses Retrieval Augmented Generation (RAG) to provide accurate answers to qu…

  • OpenAI
  • Llama
  • local
Chat with Your DataEasy

Chat With Research Papers

This Streamlit app enables you to engage in interactive conversations with arXiv, a vast repository of scholarly articles, using GPT-4o. With this RAG…

  • OpenAI
  • Llama
  • local

Need a tailor-made solution?

Not sure where to start with AI in your business? Get a free assessment and a tailored plan - no commitment.

Save hours every week with AI, no hassle

Doutor AI gives you 1,859 ready-to-copy AI prompts, by industry and in plain English - plus a complete technical library for those who want to go further.

See plans