Skip to content

fix: add missing requirements.txt for government_rag and llm_simple_qa examples#571

Open
31groot wants to merge 2 commits into
kubeedge:mainfrom
31groot:fix/add-requirements-llm-examples
Open

fix: add missing requirements.txt for government_rag and llm_simple_qa examples#571
31groot wants to merge 2 commits into
kubeedge:mainfrom
31groot:fix/add-requirements-llm-examples

Conversation

@31groot

@31groot 31groot commented Jul 1, 2026

Copy link
Copy Markdown

What type of PR is this?
/kind documentation

What this PR does / why we need it:
government_rag and llm_simple_qa examples had no requirements.txt,
this causes new contributors to hit ModuleNotFoundError with no guidance
on what to install. Both llm-agent and llm-edge-benchmark-suite
already have requirements.txt, this brings the remaining LLM examples
to the same standard.

Added dependencies based on actual imports found in each example's
basemodel.py and algorithm files.

Which issue(s) this PR fixes:
Fixes #563

…a examples

Signed-off-by: Parv Agrawal <agrawalparv13@gmail.com>
@kubeedge-bot kubeedge-bot added the kind/documentation Categorizes issue or PR as related to documentation. label Jul 1, 2026
@kubeedge-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 31groot
To complete the pull request process, please assign moorezheng after the PR has been reviewed.
You can assign the PR to them by writing /assign @moorezheng in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces requirements.txt files for the government_rag and llm_simple_qa examples. The feedback highlights that numpy and requests are missing from the government_rag requirements, which are necessary to prevent ModuleNotFoundError during execution.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +1 to +7
torch>=2.0.0
transformers>=4.30.0
langchain>=0.1.0
langchain-community>=0.0.20
chromadb>=0.4.0
tqdm>=4.65.0
unstructured[docx]>=0.10.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The government_rag example's basemodel.py imports numpy at the top level (line 26) and uses requests in the default qianfan model response method (line 118). To prevent ModuleNotFoundError when running this example, both numpy and requests should be added to the requirements.txt file.

torch>=2.0.0
transformers>=4.30.0
numpy>=1.24.0
requests>=2.28.0
langchain>=0.1.0
langchain-community>=0.0.20
chromadb>=0.4.0
tqdm>=4.65.0
unstructured[docx]>=0.10.0

Signed-off-by: Parv Agrawal <agrawalparv13@gmail.com>
@31groot

31groot commented Jul 3, 2026

Copy link
Copy Markdown
Author

/assign @MooreZheng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/documentation Categorizes issue or PR as related to documentation. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Core setup failures on fresh install: API rename, missing class, wrong docs path, undocumented deps

3 participants