Skip to content

Commit

Permalink
fix: Fix GCS URLs for sample data in tutorial_langgraph_rag_agent not…
Browse files Browse the repository at this point in the history
…ebook (#1397)

# Description

This PR fixes the sample data path in GCS to one that is publicly
accessible.

- [X] Follow the [`CONTRIBUTING`
Guide](https://github.com/GoogleCloudPlatform/generative-ai/blob/main/CONTRIBUTING.md).
- [X] You are listed as the author in your notebook or README file.
- [X] Your account is listed in
[`CODEOWNERS`](https://github.com/GoogleCloudPlatform/generative-ai/blob/main/.github/CODEOWNERS)
for the file(s).
- [X] Make your Pull Request title in the
<https://www.conventionalcommits.org/> specification.
- [X] Ensure the tests and linter pass (Run `nox -s format` from the
repository root to format).
- [X] Appropriate docs were updated (if necessary)

---------

Co-authored-by: Holt Skinner <[email protected]>
  • Loading branch information
koverholt and holtskinner authored Nov 12, 2024
1 parent 01da1f7 commit f557cef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions gemini/reasoning-engine/tutorial_langgraph_rag_agent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
"\n",
" storage_client = storage.Client()\n",
" bucket = storage_client.bucket(bucket_name)\n",
" blob = bucket.blob(blob_name)\n",
" blob = bucket.blob(f\"{gcs_dir}/{blob_name}\")\n",
"\n",
" if not blob.exists():\n",
" print(f\"File not found: gs://{bucket_name}/{gcs_dir}/{blob_name}\")\n",
Expand Down Expand Up @@ -453,7 +453,9 @@
" ),\n",
")\n",
"docs = get_docs_from_gcs(\n",
" \"reasoning-engine-test-1-bucket\", \"harry_potter\", \"harry_potter_movies.json\"\n",
" \"github-repo\",\n",
" \"generative-ai/gemini/reasoning-engine/sample_data\",\n",
" \"harry_potter_movies.json\",\n",
")\n",
"# Add data to the vector store\n",
"ids = [str(uuid.uuid4()) for i in range(len(docs))]\n",
Expand Down Expand Up @@ -486,7 +488,9 @@
" ),\n",
")\n",
"docs = get_docs_from_gcs(\n",
" \"reasoning-engine-test-1-bucket\", \"harry_potter\", \"harry_potter_books.json\"\n",
" \"github-repo\",\n",
" \"generative-ai/gemini/reasoning-engine/sample_data\",\n",
" \"harry_potter_books.json\",\n",
")\n",
"# Add data to the vector store\n",
"ids = [str(uuid.uuid4()) for i in range(len(docs))]\n",
Expand Down

0 comments on commit f557cef

Please sign in to comment.