Skip to content

fix(rag): pass gcs_path to quickstart entrypoint - #14612

Open
aniruddhaadak80 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
aniruddhaadak80:fix/rag-quickstart-entrypoint
Open

aniruddhaadak80 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
aniruddhaadak80:fix/rag-quickstart-entrypoint

Conversation

@aniruddhaadak80

Copy link
Copy Markdown

Description

Fixes #14610

The RAG quickstart entry point passed a paths keyword to quickstart, whose signature accepts gcs_path. The sample therefore raised TypeError before making an API request. This change passes the GCS path using the supported argument and removes the unused Drive placeholder from that entry point.

A dependency-free regression test executes the entry-point call with the real function signature, so the pre-fix keyword mismatch fails before the API is reached.

Validation:

  • python -m pytest generative_ai/rag/test_quickstart_entrypoint.py -q — 1 passed
  • Pre-fix entry-point execution — reproduced TypeError: quickstart() got an unexpected keyword argument 'paths'
  • python -m ruff check generative_ai/rag/quickstart_example.py generative_ai/rag/test_quickstart_entrypoint.py — passed
  • python -m mypy --follow-imports=skip --ignore-missing-imports generative_ai/rag/quickstart_example.py — no issues found
  • python -m black --check generative_ai/rag/test_quickstart_entrypoint.py — passed
  • Live GCP execution was not run because this fix is exercised without credentials.

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

Fixes GoogleCloudPlatform#14610

Signed-off-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
@aniruddhaadak80
aniruddhaadak80 requested review from a team as code owners September 25, 2026 03:57
@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Sep 25, 2026

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

Copy link
Copy Markdown
Contributor

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 updates the entry point in quickstart_example.py to pass gcs_path instead of a list of paths containing a Google Drive path. Additionally, a new test file test_quickstart_entrypoint.py is introduced to verify that the entry point correctly invokes the quickstart function with the expected arguments using AST parsing and execution. There are no review comments, and I have no feedback to provide.

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

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RAG quickstart entry point passes an unsupported paths argument

1 participant