Skip to content

Commit 20256e5

Browse files
committed
update docs
1 parent a7a9eb8 commit 20256e5

File tree

7 files changed

+53
-16
lines changed

7 files changed

+53
-16
lines changed

docs-devsite/ai.groundingchunk.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ https://github.com/firebase/firebase-js-sdk
1212
# GroundingChunk interface
1313
Represents a chunk of retrieved data that supports a claim in the model's response. This is part of the grounding information provided when grounding is enabled.
1414

15+
When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search".
16+
1517
<b>Signature:</b>
1618

1719
```typescript

docs-devsite/ai.groundingmetadata.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ https://github.com/firebase/firebase-js-sdk
1212
# GroundingMetadata interface
1313
Metadata returned to client when grounding is enabled.
1414

15+
If using Grounding with Google Search, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search".
16+
1517
<b>Signature:</b>
1618

1719
```typescript
@@ -23,16 +25,17 @@ export interface GroundingMetadata
2325
| Property | Type | Description |
2426
| --- | --- | --- |
2527
| [groundingAttributions](./ai.groundingmetadata.md#groundingmetadatagroundingattributions) | [GroundingAttribution](./ai.groundingattribution.md#groundingattribution_interface)<!-- -->\[\] | |
26-
| [groundingChunks](./ai.groundingmetadata.md#groundingmetadatagroundingchunks) | [GroundingChunk](./ai.groundingchunk.md#groundingchunk_interface)<!-- -->\[\] | A list of [GroundingChunk](./ai.groundingchunk.md#groundingchunk_interface) objects. Each chunk represents a piece of retrieved content (e.g. from a web page). that the model used to ground its response. |
27-
| [groundingSupports](./ai.groundingmetadata.md#groundingmetadatagroundingsupports) | [GroundingSupport](./ai.groundingsupport.md#groundingsupport_interface)<!-- -->\[\] | A list of [GroundingSupport](./ai.groundingsupport.md#groundingsupport_interface) objects. Each object details how specific segments of the model's response are supported by the <code>groundingChunks</code>. |
28+
| [groundingChunks](./ai.groundingmetadata.md#groundingmetadatagroundingchunks) | [GroundingChunk](./ai.groundingchunk.md#groundingchunk_interface)<!-- -->\[\] | A list of [GroundingChunk](./ai.groundingchunk.md#groundingchunk_interface) objects. Each chunk represents a piece of retrieved content (e.g. from a web page). that the model used to ground its response.<!-- -->When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search". |
29+
| [groundingSupports](./ai.groundingmetadata.md#groundingmetadatagroundingsupports) | [GroundingSupport](./ai.groundingsupport.md#groundingsupport_interface)<!-- -->\[\] | A list of [GroundingSupport](./ai.groundingsupport.md#groundingsupport_interface) objects. Each object details how specific segments of the model's response are supported by the <code>groundingChunks</code>.<!-- -->When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search". |
2830
| [retrievalQueries](./ai.groundingmetadata.md#groundingmetadataretrievalqueries) | string\[\] | |
29-
| [searchEntryPoint](./ai.groundingmetadata.md#groundingmetadatasearchentrypoint) | [SearchEntrypoint](./ai.searchentrypoint.md#searchentrypoint_interface) | Google search entry for the following web searches. An HTML/CSS snippet that can be embedded in a web page to display a Google Search Entry point for follow-up web searches related to the model's response. |
30-
| [webSearchQueries](./ai.groundingmetadata.md#groundingmetadatawebsearchqueries) | 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. |
31+
| [searchEntryPoint](./ai.groundingmetadata.md#groundingmetadatasearchentrypoint) | [SearchEntrypoint](./ai.searchentrypoint.md#searchentrypoint_interface) | 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 the model's "Grounded Response".<!-- -->When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search". |
32+
| [webSearchQueries](./ai.groundingmetadata.md#groundingmetadatawebsearchqueries) | 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.<!-- -->When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search". |
3133

3234
## GroundingMetadata.groundingAttributions
3335

3436
> Warning: This API is now obsolete.
3537
>
38+
> Use [GroundingChunk](./ai.groundingchunk.md#groundingchunk_interface) instead.
3639
>
3740

3841
<b>Signature:</b>
@@ -45,6 +48,8 @@ groundingAttributions: GroundingAttribution[];
4548

4649
A list of [GroundingChunk](./ai.groundingchunk.md#groundingchunk_interface) objects. Each chunk represents a piece of retrieved content (e.g. from a web page). that the model used to ground its response.
4750

51+
When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search".
52+
4853
<b>Signature:</b>
4954

5055
```typescript
@@ -55,6 +60,8 @@ groundingChunks?: GroundingChunk[];
5560

5661
A list of [GroundingSupport](./ai.groundingsupport.md#groundingsupport_interface) objects. Each object details how specific segments of the model's response are supported by the `groundingChunks`<!-- -->.
5762

63+
When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search".
64+
5865
<b>Signature:</b>
5966

6067
```typescript
@@ -65,7 +72,7 @@ groundingSupports?: GroundingSupport[];
6572

6673
> Warning: This API is now obsolete.
6774
>
68-
> Use [GroundingMetadata.groundingSupports](./ai.groundingmetadata.md#groundingmetadatagroundingsupports) instead.
75+
> Use [GroundingSupport](./ai.groundingsupport.md#groundingsupport_interface) instead.
6976
>
7077

7178
<b>Signature:</b>
@@ -76,7 +83,9 @@ retrievalQueries?: string[];
7683

7784
## GroundingMetadata.searchEntryPoint
7885

79-
Google search entry for the following web searches. An HTML/CSS snippet that can be embedded in a web page to display a Google Search Entry point for follow-up web searches related to the model's response.
86+
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 the model's "Grounded Response".
87+
88+
When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search".
8089

8190
<b>Signature:</b>
8291

@@ -88,6 +97,8 @@ searchEntryPoint?: SearchEntrypoint;
8897

8998
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.
9099

100+
When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search".
101+
91102
<b>Signature:</b>
92103

93104
```typescript

docs-devsite/ai.groundingsupport.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ https://github.com/firebase/firebase-js-sdk
1212
# GroundingSupport interface
1313
Provides information about how a specific segment of the model's response is supported by the retrieved grounding chunks.
1414

15+
When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search".
16+
1517
<b>Signature:</b>
1618

1719
```typescript

docs-devsite/ai.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ The Firebase AI Web SDK.
9898
| [GoogleSearch](./ai.googlesearch.md#googlesearch_interface) | Configuration for the [GoogleSearchTool](./ai.googlesearchtool.md#googlesearchtool_interface)<!-- -->. |
9999
| [GoogleSearchTool](./ai.googlesearchtool.md#googlesearchtool_interface) | A tool that allows the generative model to connect to Google Search to access and incorporate up-to-date information from the web into its responses.<!-- -->When this tool is used, the model's responses may include "Grounded Results" which are subject to the Grounding with Google Search terms outlined in the [Service Specific Terms](https://cloud.google.com/terms/service-terms)<!-- -->. |
100100
| [GroundingAttribution](./ai.groundingattribution.md#groundingattribution_interface) | |
101-
| [GroundingChunk](./ai.groundingchunk.md#groundingchunk_interface) | Represents a chunk of retrieved data that supports a claim in the model's response. This is part of the grounding information provided when grounding is enabled. |
102-
| [GroundingMetadata](./ai.groundingmetadata.md#groundingmetadata_interface) | Metadata returned to client when grounding is enabled. |
103-
| [GroundingSupport](./ai.groundingsupport.md#groundingsupport_interface) | Provides information about how a specific segment of the model's response is supported by the retrieved grounding chunks. |
101+
| [GroundingChunk](./ai.groundingchunk.md#groundingchunk_interface) | Represents a chunk of retrieved data that supports a claim in the model's response. This is part of the grounding information provided when grounding is enabled.<!-- -->When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search". |
102+
| [GroundingMetadata](./ai.groundingmetadata.md#groundingmetadata_interface) | Metadata returned to client when grounding is enabled.<!-- -->If using Grounding with Google Search, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search". |
103+
| [GroundingSupport](./ai.groundingsupport.md#groundingsupport_interface) | Provides information about how a specific segment of the model's response is supported by the retrieved grounding chunks.<!-- -->When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search". |
104104
| [ImagenGCSImage](./ai.imagengcsimage.md#imagengcsimage_interface) | An image generated by Imagen, stored in a Cloud Storage for Firebase bucket.<!-- -->This feature is not available yet. |
105105
| [ImagenGenerationConfig](./ai.imagengenerationconfig.md#imagengenerationconfig_interface) | <b><i>(Public Preview)</i></b> Configuration options for generating images with Imagen.<!-- -->See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images-imagen) for more details. |
106106
| [ImagenGenerationResponse](./ai.imagengenerationresponse.md#imagengenerationresponse_interface) | <b><i>(Public Preview)</i></b> The response from a request to generate images with Imagen. |
@@ -120,7 +120,7 @@ The Firebase AI Web SDK.
120120
| [SchemaParams](./ai.schemaparams.md#schemaparams_interface) | Params passed to [Schema](./ai.schema.md#schema_class) static methods to create specific [Schema](./ai.schema.md#schema_class) classes. |
121121
| [SchemaRequest](./ai.schemarequest.md#schemarequest_interface) | Final format for [Schema](./ai.schema.md#schema_class) params passed to backend requests. |
122122
| [SchemaShared](./ai.schemashared.md#schemashared_interface) | Basic [Schema](./ai.schema.md#schema_class) properties shared across several Schema-related types. |
123-
| [SearchEntrypoint](./ai.searchentrypoint.md#searchentrypoint_interface) | Google search entry point. |
123+
| [SearchEntrypoint](./ai.searchentrypoint.md#searchentrypoint_interface) | Google search entry point.<!-- -->When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search". |
124124
| [Segment](./ai.segment.md#segment_interface) | Represents a specific segment within a [Content](./ai.content.md#content_interface) object, often used to pinpoint the exact location of text or data that grounding information refers to. |
125125
| [StartChatParams](./ai.startchatparams.md#startchatparams_interface) | Params for [GenerativeModel.startChat()](./ai.generativemodel.md#generativemodelstartchat)<!-- -->. |
126126
| [TextPart](./ai.textpart.md#textpart_interface) | Content part interface if the part represents a text string. |
@@ -129,7 +129,7 @@ The Firebase AI Web SDK.
129129
| [VertexAIOptions](./ai.vertexaioptions.md#vertexaioptions_interface) | Options when initializing the Firebase AI SDK. |
130130
| [VideoMetadata](./ai.videometadata.md#videometadata_interface) | Describes the input video content. |
131131
| [WebAttribution](./ai.webattribution.md#webattribution_interface) | |
132-
| [WebGroundingChunk](./ai.webgroundingchunk.md#webgroundingchunk_interface) | A grounding chunk from the web. |
132+
| [WebGroundingChunk](./ai.webgroundingchunk.md#webgroundingchunk_interface) | A grounding chunk from the web.<!-- -->When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search". |
133133

134134
## Variables
135135

docs-devsite/ai.searchentrypoint.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ https://github.com/firebase/firebase-js-sdk
1212
# SearchEntrypoint interface
1313
Google search entry point.
1414

15+
When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search".
16+
1517
<b>Signature:</b>
1618

1719
```typescript

docs-devsite/ai.webgroundingchunk.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ https://github.com/firebase/firebase-js-sdk
1212
# WebGroundingChunk interface
1313
A grounding chunk from the web.
1414

15+
When using this feature, you are required to comply with the [Service Specific Terms](https://cloud.google.com/terms/service-terms) for "Grounding with Google Search".
16+
1517
<b>Signature:</b>
1618

1719
```typescript

packages/ai/src/types/responses.ts

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,43 +173,55 @@ export interface Citation {
173173
/**
174174
* Metadata returned to client when grounding is enabled.
175175
*
176+
* If using Grounding with Google Search, you are required to comply with the {@link https://cloud.google.com/terms/service-terms | Service Specific Terms} for "Grounding with Google Search".
177+
*
176178
* @public
177179
*/
178180
export interface GroundingMetadata {
179181
/**
180-
* Google search entry for the following web searches.
181-
* An HTML/CSS snippet that can be embedded in a web page to display a Google Search Entry point
182-
* for follow-up web searches related to the model's response.
182+
* Google search entry point for web searches.
183+
* This contains An HTML/CSS snippet that *must* be embedded in an app to display a Google Search Entry point
184+
* for follow-up web searches related to the model's "Grounded Response".
185+
*
186+
* When using this feature, you are required to comply with the {@link https://cloud.google.com/terms/service-terms | Service Specific Terms} for "Grounding with Google Search".
183187
*/
184188
searchEntryPoint?: SearchEntrypoint;
185189
/**
186190
* A list of {@link GroundingChunk} objects. Each chunk represents a piece of retrieved content
187191
* (e.g. from a web page). that the model used to ground its response.
192+
*
193+
* When using this feature, you are required to comply with the {@link https://cloud.google.com/terms/service-terms | Service Specific Terms} for "Grounding with Google Search".
188194
*/
189195
groundingChunks?: GroundingChunk[];
190196
/**
191197
* A list of {@link GroundingSupport} objects. Each object details how specific
192198
* segments of the model's response are supported by the `groundingChunks`.
199+
*
200+
* When using this feature, you are required to comply with the {@link https://cloud.google.com/terms/service-terms | Service Specific Terms} for "Grounding with Google Search".
193201
*/
194202
groundingSupports?: GroundingSupport[];
195203
/**
196204
* A list of web search queries that the model performed to gather the grounding information.
197205
* These can be used to allow users to explore the search results themselves.
206+
*
207+
* When using this feature, you are required to comply with the {@link https://cloud.google.com/terms/service-terms | Service Specific Terms} for "Grounding with Google Search".
198208
*/
199209
webSearchQueries?: string[];
200210
/**
201-
* @deprecated Use {@link GroundingMetadata.groundingSupports} instead.
211+
* @deprecated Use {@link GroundingSupport} instead.
202212
*/
203213
retrievalQueries?: string[];
204214
/**
205-
* @deprecated
215+
* @deprecated Use {@link GroundingChunk} instead.
206216
*/
207217
groundingAttributions: GroundingAttribution[];
208218
}
209219

210220
/**
211221
* Google search entry point.
212222
*
223+
* When using this feature, you are required to comply with the {@link https://cloud.google.com/terms/service-terms | Service Specific Terms} for "Grounding with Google Search".
224+
*
213225
* @public
214226
*/
215227
export interface SearchEntrypoint {
@@ -235,6 +247,8 @@ export interface SearchEntrypoint {
235247
* Represents a chunk of retrieved data that supports a claim in the model's response.
236248
* This is part of the grounding information provided when grounding is enabled.
237249
*
250+
* When using this feature, you are required to comply with the {@link https://cloud.google.com/terms/service-terms | Service Specific Terms} for "Grounding with Google Search".
251+
*
238252
* @public
239253
*/
240254
export interface GroundingChunk {
@@ -247,6 +261,8 @@ export interface GroundingChunk {
247261
/**
248262
* A grounding chunk from the web.
249263
*
264+
* When using this feature, you are required to comply with the {@link https://cloud.google.com/terms/service-terms | Service Specific Terms} for "Grounding with Google Search".
265+
*
250266
* @public
251267
*/
252268
export interface WebGroundingChunk {
@@ -275,6 +291,8 @@ export interface WebGroundingChunk {
275291
* Provides information about how a specific segment of the model's response
276292
* is supported by the retrieved grounding chunks.
277293
*
294+
* When using this feature, you are required to comply with the {@link https://cloud.google.com/terms/service-terms | Service Specific Terms} for "Grounding with Google Search".
295+
*
278296
* @public
279297
*/
280298
export interface GroundingSupport {

0 commit comments

Comments
 (0)