Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions github-rag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,22 @@ This project leverages GitIngest to parse a GitHub repo in markdown format and t
## Installation and setup

**Install Dependencies**:
Ensure you have Python 3.11 or later installed.
Ensure you have Python 3.9 or later installed (tested with Python 3.11.9).

**Option 1: Using requirements.txt (Recommended)**
```bash
pip install gitingest llama-index llama-index-llms-ollama llama-index-agent-openai llama-index-llms-openai --upgrade --quiet
pip install -r requirements.txt
```

**Option 2: Manual installation**
```bash
pip install gitingest llama-index llama-index-llms-ollama llama-index-llms-openai llama-index-agent-openai llama-index-embeddings-huggingface streamlit pandas python-dotenv huggingface-hub
```

**Environment Setup**:
For OpenAI integration, create a `.env` file in the project directory:
```
OPENAI_API_KEY=your_openai_api_key_here
```

**Running**:
Expand Down
18 changes: 18 additions & 0 deletions github-rag/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# GitHub RAG Application Requirements
# Supports Python >=3.9, <4.0

# Core dependencies
gitingest
streamlit
python-dotenv
pandas

# LlamaIndex core and integrations - using compatible versions
llama-index
llama-index-llms-ollama
llama-index-llms-openai
llama-index-agent-openai
llama-index-embeddings-huggingface

Comment on lines +10 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Lack of version bounds may re-introduce the original incompatibility later.

The PR purposefully avoids “strict” pinning, but leaving every package unbounded (llama-index and its ecosystem evolve weekly) risks silent breaking changes for all users tomorrow.

Recommend at least safe lower bounds or using a constraint/lock file generated by pip-compile to guarantee today’s working set:

-llama-index
-llama-index-llms-ollama
+# Versions tested together on 2024-08-??; bump in lockfile when re-tested
+llama-index>=0.13.0,<0.14
+llama-index-llms-ollama>=0.1.4,<0.2

Even a comment referencing a hash-pinned requirements.lock checked into the repo would mitigate this.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# LlamaIndex core and integrations - using compatible versions
llama-index
llama-index-llms-ollama
llama-index-llms-openai
llama-index-agent-openai
llama-index-embeddings-huggingface
# LlamaIndex core and integrations - using compatible versions
# Versions tested together on 2024-08-??; bump in lockfile when re-tested
llama-index>=0.13.0,<0.14
llama-index-llms-ollama>=0.1.4,<0.2
llama-index-llms-openai
llama-index-agent-openai
llama-index-embeddings-huggingface
🤖 Prompt for AI Agents
In github-rag/requirements.txt around lines 10 to 16, the dependencies for
llama-index and related packages lack version bounds, risking future
incompatibility due to unpinned updates. To fix this, add safe lower version
bounds for each package to ensure compatibility or generate and commit a
constraints or lock file (e.g., using pip-compile) that pins exact versions.
Additionally, include a comment referencing the lock file or constraints file to
clarify the source of version constraints for future maintainers.

# Additional dependencies for local model support
huggingface-hub