---
title: "Chat with any GitHub repo"
description: "A Python tool that ingests a GitHub repository, builds embeddings with LangChain, and lets you ask questions about the codebase through OpenAI models."
url: "https://davidezambiasi.dev/projects/chat-with-repo-langchain-openai"
---

python · langchain · openai

# Chat with any GitHub repo

A Python tool that ingests a GitHub repository, builds embeddings with LangChain, and lets you ask questions about the codebase through OpenAI models.

Published June 4, 2023 · 1 min read

[Repository ↗](https://github.com/soos3d/chat-with-repo-langchain-openai)

## The problem

Reading an unfamiliar codebase is slow: you clone, grep, and guess at structure before you can ask a single useful question. When LLMs made “ask the code” plausible, most examples stopped at a single file.

## What I built

A Python project that takes a GitHub repository URL, loads and splits the source, generates vector embeddings with LangChain, and wires them to ChatGPT models so you can query the whole repository conversationally. The repo doubles as a tutorial: it is structured to teach the loader → splitter → embeddings → retrieval chain pattern, not just to run.

## What developers do with it

Clone it, point it at a repo they need to understand, and adapt the pipeline to their own stack. It was written when LangChain’s retrieval API was settling; the pattern still holds even where the imports have moved.

DZ

Davide Zambiasi

Senior Developer Relations Engineer

I ship the docs, guides, and example apps that get developers building, and I hire for the roles that do the same.

[GitHub](https://github.com/soos3d)[LinkedIn](https://www.linkedin.com/in/davide-zambiasi)[Blog](https://blog.davideai.dev)

[

Migrating a production bot to Nebius Token Factory

Previous Page

](/projects/translator-bot-token-factory)[

Overview

Next Page

](/reference)
