feat!(ai): Remove GroundingAttribution (#9079) · firebase/firebase-js-sdk@cb19688 (original) (raw)

7 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
1 +---
2 +'firebase': major
3 +'@firebase/ai': major
4 +---
5 +
6 +Remove GroundingAttribution
Original file line number Diff line number Diff line change
@@ -501,27 +501,13 @@ export interface GoogleSearchTool {
501 501 googleSearch: GoogleSearch;
502 502 }
503 503
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 -
516 504 // @public
517 505 export interface GroundingChunk {
518 506 web?: WebGroundingChunk;
519 507 }
520 508
521 509 // @public
522 510 export interface GroundingMetadata {
523 -// @deprecated (undocumented)
524 - groundingAttributions: GroundingAttribution[];
525 511 groundingChunks?: GroundingChunk[];
526 512 groundingSupports?: GroundingSupport[];
527 513 // @deprecated (undocumented)
Original file line number Diff line number Diff line change
@@ -80,8 +80,6 @@ toc:
80 80 path: /docs/reference/js/ai.googlesearch.md
81 81 - title: GoogleSearchTool
82 82 path: /docs/reference/js/ai.googlesearchtool.md
83 - - title: GroundingAttribution
84 -path: /docs/reference/js/ai.groundingattribution.md
85 83 - title: GroundingChunk
86 84 path: /docs/reference/js/ai.groundingchunk.md
87 85 - title: GroundingMetadata

| Original file line number | Diff line number | Diff line change | | | | | ------------------------------------------------------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | @@ -26,26 +26,12 @@ export interface GroundingMetadata | | | | | | | 26 | 26 | | | | | | 27 | 27 | | Property | Type | Description | | | 28 | 28 | | --- | --- | --- | | | 29 | | -| [groundingAttributions](./ai.groundingmetadata.md#groundingmetadatagroundingattributions) | [GroundingAttribution](./ai.groundingattribution.md#groundingattribution_interface)\[\] | | | | 30 | 29 | | [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. | | | 31 | 30 | | [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>. | | | 32 | 31 | | [retrievalQueries](./ai.groundingmetadata.md#groundingmetadataretrievalqueries) | string\[\] | | | | 33 | 32 | | [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's “Grounded Response”. | | | 34 | 33 | | [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. | | | 35 | 34 | | | | | | 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 | | - | | | | | 49 | 35 | ## GroundingMetadata.groundingChunks | | | | | 50 | 36 | | | | | | 51 | 37 | 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. | | | |

| Original file line number | Diff line number | Diff line change | | | | ------------------------------------------ | ---------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | @@ -77,7 +77,6 @@ The Firebase AI Web SDK. | | | | | | 77 | 77 | | [GenerativeContentBlob](./ai.generativecontentblob.md#generativecontentblob_interface) | Interface for sending an image. | | | 78 | 78 | | [GoogleSearch](./ai.googlesearch.md#googlesearch_interface) | Specifies the Google Search configuration. | | | 79 | 79 | | [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) | | | | 81 | 80 | | [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. | | | 82 | 81 | | [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). | | | 83 | 82 | | [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. | |

Original file line number Diff line number Diff line change
@@ -212,10 +212,6 @@ export interface GroundingMetadata {
212 212 * @deprecated Use {@link GroundingSupport} instead.
213 213 */
214 214 retrievalQueries?: string[];
215 -/**
216 - * @deprecated Use {@link GroundingChunk} instead.
217 - */
218 -groundingAttributions: GroundingAttribution[];
219 215 }
220 216
221 217 /**
@@ -334,17 +330,6 @@ export interface Segment {
334 330 text: string;
335 331 }
336 332
337 -/**
338 - * @deprecated
339 - * @public
340 - */
341 -export interface GroundingAttribution {
342 -segment: Segment;
343 -confidenceScore?: number;
344 -web?: WebAttribution;
345 -retrievedContext?: RetrievedContextAttribution;
346 -}
347 -
348 333 /**
349 334 * @public
350 335 */