Skip to content

feat: add grounding with google search - #1084

Merged
sedanah-m merged 7 commits into
masterfrom
feat/grounding-with-google-search
Sep 8, 2026
Merged

feat: add grounding with google search#1084
sedanah-m merged 7 commits into
masterfrom
feat/grounding-with-google-search

Conversation

@sedanah-m

@sedanah-m sedanah-m commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Adds a new Quickstart sample demonstrating Grounding with Google Search : https://firebase.google.com/docs/ai-logic/grounding-google-search?api=dev

@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 introduces a new feature for grounding content with Google Search using Firebase AI and the Gemini model. It includes a React view component for user interaction and a service file for generating and streaming grounded content. Feedback was provided to improve the React list rendering by using the source URI as a unique key instead of the array index, ensuring safer rendering.

Comment thread ai/ai-samples/src/features/grounding-with-google-search/index.tsx Outdated
…it as a unique key for the list items led to duplicated sources, so deduplicated sources
- rendered groundingMetadata.searchEntryPoint.renderedContent in a sandboxed iframe (which was required per firebase's usage terms)
- add required compliance comments
- removed streamGroundedContent (figured it didn't make sense to have)
…ck to anything; it'd just go blank.

so, replaced the sandboxed iframe with Shadow DOM for search suggestions widget to fix this.
@sedanah-m
sedanah-m marked this pull request as ready for review September 3, 2026 17:00
- registered /grounding-with-google-search route in App.tsx and index.tsx
- add dev:grounding npm script for isolated feature development
- document the feature in README.md

(also carried over the same readme changes and adding automatic function calling so nothing gets lost while merging)
Comment thread ai/ai-samples/README.md
@sedanah-m
sedanah-m merged commit e15e04f into master Sep 8, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants