RepoChat-200k: Revolutionizing GitHub Repositories Interaction
RepoChat-200k is an innovative solution that transforms the way developers interact with GitHub repositories, eliminating the need for Retrieval-Augmented Generation (RAG). Leveraging a 200k context window provided by Claude, this tool simplifies the coding process by allowing seamless integration of examples and codes directly into the conversation.
Why Choose RepoChat-200k?
Beyond Mere Conversations: Writing Code with Up-to-Date Documentation
Developers often struggle to remember every API in complex systems like llama-index or langchain. RepoChat-200k addresses this by incorporating component examples and documentation from repositories into the interaction, enabling Claude Opus—the model with a formidable 200k context window—to write effective code agents effortlessly.
Intuitive File Selection Without Copy-Paste
By simply downloading or cloning a GitHub repository, users can select specific files they wish to include, bypassing the traditional copy-paste hassle. RepoChat-200k assists in constructing relevant prompts, streamlining the coding workflow.
Freedom from RAG Constraints
Many existing "Chat with Repo" projects suffer from the challenge of determining which files a query requires. Unlike them, RepoChat-200k empowers developers to make their own file selection decisions during coding. Whether it's selecting specific components for frontend development or choosing relevant Jupyter Notebooks for agent or RAG coding, the choice is in the user’s hands.
Expanded Use Cases
- Llamaindex Documentation: Craft RAG graphs by selecting pipeline examples.
- Shadcn Documentation: Develop frontend projects by picking example components and definitions.
Additional Suggestions
- Haiku can be used for most tasks.
- Adjust models according to specific requirements.
- Tailor file selection based on tasks.
- Clone and explore repositories of interest.
- Including the README of the repo helps Claude understand it better.
- Use the
COUNT TOKENS
feature to track token usage.
Key Features
- Repository Download: Automatically downloads and analyzes a GitHub repository based on the provided URL.
- File and Folder Selection: Users can handpick specific files or folders to include in the language model's input.
- Language Filtering: Focus on particular code sections by filtering files according to programming languages.
- Token Limit Control: Manage the information quantity sent to the language model, aiding performance and cost management.
- Chat Interface: Interact with the language model in a conversational style for queries and code generation.
- Streaming Output: Receive real-time, engaging responses from the language model.
Getting Started
- Environment Setup: Execute
pip install -r requirements.txt
to prepare the environment. - Configure .env File: Add your OpenRouter API key to a
.env
file. For using OpenAI GPT models, include your OpenAI API key too. - Run the Application: Launch the application using Streamlit with the command
streamlit run app.py
. - Application Usage: Follow on-screen instructions to download repositories, select files, and converse with the language model.
In case of repository issues, one can always delete and re-download the repository from the ./repos
directory.
Configuration Options
- Model Selection: Choose the language model suited to your needs (e.g., "anthropic/claude-3-haiku").
- Temperature Adjustment: Set the creativity level of the model's responses.
- System Prompt: Configure the initial behavior prompt for the language model.
These settings can be modified in the application's sidebar.
Contributions and Licensing
Contributions to RepoChat-200k are welcome on its GitHub repository. The project operates under the MIT License.