Repo of the Day
g-emarco/github-assistant
Published: Jun 13, 2023
Open repository ↗An example of using Langchain, Python, Pinecone, and Googles LLM tools to build a chat bot around a specific github code repository.
Summary
github-assistant is a Python project that lets engineers ask natural-language questions about a GitHub repository through a chat interface. It combines a Streamlit front end, LangChain for orchestration, Pinecone as the vector store, and GCP VertexAI for embeddings, and ships with a Cloud Run deployment configuration.
What it is useful for
The project is positioned as a "chat with your repository" tool, useful when engineers want to query codebase content instead of grepping or scrolling through files. Concrete scenarios the README supports include locating specific functions or classes, getting summaries of unfamiliar modules, and onboarding onto a new repository faster. Because answers are grounded in a Pinecone index of repository content, the assistant can return context that spans multiple files rather than keyword-matching within a single one.
How engineers can use it
The README documents both a local path and a Cloud Run path.
Local setup as written:
git clone https://github.com/g-emarco/github-assistant.git
cd github-assistant
pipenv install
streamlit run app.py
A .env file must contain PINECONE_API_KEY, PINECONE_ENVIRONMENT_REGION, PINECONE_INDEX_NAME, GOOGLE_API_KEY, and STREAMLIT_SERVER_PORT. The README also requires GOOGLE_APPLICATION_CREDENTIALS to point at a service account permitted to call VertexAI when running locally.
For team or production use, the README walks through a Cloud Run deployment using cloudbuild.yaml. The documented sequence enables the cloudbuild, run, secretmanager, artifactregistry, and vertexai APIs, then creates a vertex-ai-consumer service account with roles/run.invoker, roles/serviceusage.serviceUsageConsumer, roles/ml.admin, and roles/vertexai.admin. Secrets for PINECONE_API_KEY, PINECONE_ENVIRONMENT_REGION, and PALM2_API_KEY are stored in Secret Manager, the image is pushed to Artifact Registry at us-east1-docker.pkg.dev/$PROJECT_ID/app/github-assitant:latest, and gcloud run deploy rolls it out to Cloud Run with --allow-unauthenticated.
Documented caveats to keep in mind. The README does not describe how repository source is actually loaded into the Pinecone index, so engineers need to read app.py and the LangChain pipeline to find that ingestion step. Every $PROJECT_ID and region placeholder must be replaced before the gcloud commands will work as written, and the repo currently has no listed topics or description beyond the README title.