Skip to content

Commit cb19688

Browse files
authored
feat!(ai): Remove GroundingAttribution (#9079)
1 parent d91169f commit cb19688

File tree

7 files changed

+6
-108
lines changed

7 files changed

+6
-108
lines changed

.changeset/slimy-mirrors-nail.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'firebase': major
3+
'@firebase/ai': major
4+
---
5+
6+
Remove GroundingAttribution

common/api-review/ai.api.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -501,27 +501,13 @@ export interface GoogleSearchTool {
501501
googleSearch: GoogleSearch;
502502
}
503503

504-
// @public @deprecated (undocumented)
505-
export interface GroundingAttribution {
506-
// (undocumented)
507-
confidenceScore?: number;
508-
// (undocumented)
509-
retrievedContext?: RetrievedContextAttribution;
510-
// (undocumented)
511-
segment: Segment;
512-
// (undocumented)
513-
web?: WebAttribution;
514-
}
515-
516504
// @public
517505
export interface GroundingChunk {
518506
web?: WebGroundingChunk;
519507
}
520508

521509
// @public
522510
export interface GroundingMetadata {
523-
// @deprecated (undocumented)
524-
groundingAttributions: GroundingAttribution[];
525511
groundingChunks?: GroundingChunk[];
526512
groundingSupports?: GroundingSupport[];
527513
// @deprecated (undocumented)

docs-devsite/_toc.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ toc:
8080
path: /docs/reference/js/ai.googlesearch.md
8181
- title: GoogleSearchTool
8282
path: /docs/reference/js/ai.googlesearchtool.md
83-
- title: GroundingAttribution
84-
path: /docs/reference/js/ai.groundingattribution.md
8583
- title: GroundingChunk
8684
path: /docs/reference/js/ai.groundingchunk.md
8785
- title: GroundingMetadata

docs-devsite/ai.groundingattribution.md

Lines changed: 0 additions & 62 deletions
This file was deleted.

docs-devsite/ai.groundingmetadata.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,12 @@ export interface GroundingMetadata
2626

2727
| Property | Type | Description |
2828
| --- | --- | --- |
29-
| [groundingAttributions](./ai.groundingmetadata.md#groundingmetadatagroundingattributions) | [GroundingAttribution](./ai.groundingattribution.md#groundingattribution_interface)<!-- -->\[\] | |
3029
| [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 (for example, from a web page). that the model used to ground its response. |
3130
| [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>. |
3231
| [retrievalQueries](./ai.groundingmetadata.md#groundingmetadataretrievalqueries) | string\[\] | |
3332
| [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 a model'sGrounded Response”. |
3433
| [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. |
3534

36-
## GroundingMetadata.groundingAttributions
37-
38-
> Warning: This API is now obsolete.
39-
>
40-
> Use [GroundingChunk](./ai.groundingchunk.md#groundingchunk_interface) instead.
41-
>
42-
43-
<b>Signature:</b>
44-
45-
```typescript
46-
groundingAttributions: GroundingAttribution[];
47-
```
48-
4935
## GroundingMetadata.groundingChunks
5036

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

docs-devsite/ai.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ The Firebase AI Web SDK.
7777
| [GenerativeContentBlob](./ai.generativecontentblob.md#generativecontentblob_interface) | Interface for sending an image. |
7878
| [GoogleSearch](./ai.googlesearch.md#googlesearch_interface) | Specifies the Google Search configuration. |
7979
| [GoogleSearchTool](./ai.googlesearchtool.md#googlesearchtool_interface) | A tool that allows a Gemini model to connect to Google Search to access and incorporate up-to-date information from the web into its responses.<!-- -->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](https://ai.google.dev/gemini-api/terms#grounding-with-google-search) or Vertex AI Gemini API (see [Service Terms](https://cloud.google.com/terms/service-terms) section within the Service Specific Terms). |
80-
| [GroundingAttribution](./ai.groundingattribution.md#groundingattribution_interface) | |
8180
| [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. |
8281
| [GroundingMetadata](./ai.groundingmetadata.md#groundingmetadata_interface) | Metadata returned when grounding is enabled.<!-- -->Currently, only Grounding with Google Search is supported (see [GoogleSearchTool](./ai.googlesearchtool.md#googlesearchtool_interface)<!-- -->).<!-- -->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](https://ai.google.dev/gemini-api/terms#grounding-with-google-search) or Vertex AI Gemini API (see [Service Terms](https://cloud.google.com/terms/service-terms) section within the Service Specific Terms). |
8382
| [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. |

packages/ai/src/types/responses.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,6 @@ export interface GroundingMetadata {
212212
* @deprecated Use {@link GroundingSupport} instead.
213213
*/
214214
retrievalQueries?: string[];
215-
/**
216-
* @deprecated Use {@link GroundingChunk} instead.
217-
*/
218-
groundingAttributions: GroundingAttribution[];
219215
}
220216

221217
/**
@@ -334,17 +330,6 @@ export interface Segment {
334330
text: string;
335331
}
336332

337-
/**
338-
* @deprecated
339-
* @public
340-
*/
341-
export interface GroundingAttribution {
342-
segment: Segment;
343-
confidenceScore?: number;
344-
web?: WebAttribution;
345-
retrievedContext?: RetrievedContextAttribution;
346-
}
347-
348333
/**
349334
* @public
350335
*/

0 commit comments

Comments
 (0)