Skip to content

genai: add Grounding with Parallel Web Search sample - #5651

Open
sakshimaheswri-google wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
sakshimaheswri-google:genai-parallel-ai-search
Open

sakshimaheswri-google wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
sakshimaheswri-google:genai-parallel-ai-search

Conversation

@sakshimaheswri-google

Copy link
Copy Markdown

Description

Adds a Go sample showing how to ground a Gemini response with the Parallel Web
Search tool (genai.Tool.ParallelAISearch), following the structure of the
existing tools_google_search_with_txt.go sample.

  • New sample: genai/tools/tools_parallel_ai_search_with_txt.go
  • Region tag: googlegenaisdk_tools_parallel_ai_search_with_txt
  • Adds a test case to genai/tools/tools_examples_test.go
  • Bumps google.golang.org/genai from v1.40.0 to v1.64.0, required for the
    ToolParallelAISearch type. The full genai module still builds (go build ./...).

Notes

  • Running the sample/test requires access to Parallel Web Search (a Google Cloud
    Marketplace subscription, or a Parallel API key).
  • Verified on both global and regional endpoints (e.g., us-central1).
Add a Go sample that grounds a Gemini response with the Parallel Web Search
tool (genai.Tool.ParallelAISearch), plus a test case in the shared tools
examples test.

Bump google.golang.org/genai from v1.40.0 to v1.64.0, which is required for
the ToolParallelAISearch type. The full genai module still builds.
@sakshimaheswri-google
sakshimaheswri-google requested review from a team as code owners July 22, 2026 13:31
@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Jul 22, 2026
@snippet-bot

snippet-bot Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@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 upgrades dependencies, including google.golang.org/genai to v1.64.0, and introduces a new example demonstrating text generation grounded with Parallel Web Search. A review comment suggests using t.Skipf instead of t.Fatalf in the new test to prevent blocking CI pipelines when external credentials or subscriptions are missing.

Comment thread genai/tools/tools_examples_test.go
sakshimaheswri-google and others added 2 commits July 22, 2026 19:04
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.

1 participant