docs-devsite/ai.groundingmetadata.md
Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference
{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}
Metadata returned when grounding is enabled.
Currently, only Grounding with Google Search is supported (see GoogleSearchTool<!-- -->).
Important: If using Grounding with Google Search, you are required to comply with the "Grounding with Google Search" usage requirements for your chosen API provider: Gemini Developer API or Vertex AI Gemini API (see Service Terms section within the Service Specific Terms).
<b>Signature:</b>
export interface GroundingMetadata
| Property | Type | Description |
|---|---|---|
| groundingChunks | GroundingChunk<!-- -->[] | A list of GroundingChunk objects. Each chunk represents a piece of retrieved content (for example, from a web page). that the model used to ground its response. |
| groundingSupports | GroundingSupport<!-- -->[] | A list of GroundingSupport objects. Each object details how specific segments of the model's response are supported by the <code>groundingChunks</code>. |
| retrievalQueries | string[] | |
| searchEntryPoint | SearchEntrypoint | Google Search entry point for web searches. This contains an HTML/CSS snippet that must be embedded in an app to display a Google Search entry point for follow-up web searches related to a model's "Grounded Response". |
| webSearchQueries | string[] | A list of web search queries that the model performed to gather the grounding information. These can be used to allow users to explore the search results themselves. |
A list of GroundingChunk objects. Each chunk represents a piece of retrieved content (for example, from a web page). that the model used to ground its response.
<b>Signature:</b>
groundingChunks?: GroundingChunk[];
A list of GroundingSupport objects. Each object details how specific segments of the model's response are supported by the groundingChunks<!-- -->.
<b>Signature:</b>
groundingSupports?: GroundingSupport[];
Warning: This API is now obsolete.
Use GroundingSupport instead.
<b>Signature:</b>
retrievalQueries?: string[];
Google Search entry point for web searches. This contains an HTML/CSS snippet that must be embedded in an app to display a Google Search entry point for follow-up web searches related to a model's "Grounded Response".
<b>Signature:</b>
searchEntryPoint?: SearchEntrypoint;
A list of web search queries that the model performed to gather the grounding information. These can be used to allow users to explore the search results themselves.
<b>Signature:</b>
webSearchQueries?: string[];