diff --git a/.changeset/slimy-mirrors-nail.md b/.changeset/slimy-mirrors-nail.md new file mode 100644 index 00000000000..e68a3b900b4 --- /dev/null +++ b/.changeset/slimy-mirrors-nail.md @@ -0,0 +1,5 @@ +--- +'@firebase/ai': major +--- + +Remove GroundingAttribution diff --git a/common/api-review/ai.api.md b/common/api-review/ai.api.md index 23c13688fb1..67e2c31507f 100644 --- a/common/api-review/ai.api.md +++ b/common/api-review/ai.api.md @@ -485,22 +485,8 @@ export interface GoogleAIGenerateContentResponse { usageMetadata?: UsageMetadata; } -// @public @deprecated (undocumented) -export interface GroundingAttribution { - // (undocumented) - confidenceScore?: number; - // (undocumented) - retrievedContext?: RetrievedContextAttribution; - // (undocumented) - segment: Segment; - // (undocumented) - web?: WebAttribution; -} - // @public export interface GroundingMetadata { - // @deprecated (undocumented) - groundingAttributions: GroundingAttribution[]; // (undocumented) retrievalQueries?: string[]; // (undocumented) diff --git a/docs-devsite/_toc.yaml b/docs-devsite/_toc.yaml index b77a6b5910e..46c5e4b5080 100644 --- a/docs-devsite/_toc.yaml +++ b/docs-devsite/_toc.yaml @@ -76,8 +76,6 @@ toc: path: /docs/reference/js/ai.generativemodel.md - title: GoogleAIBackend path: /docs/reference/js/ai.googleaibackend.md - - title: GroundingAttribution - path: /docs/reference/js/ai.groundingattribution.md - title: GroundingMetadata path: /docs/reference/js/ai.groundingmetadata.md - title: ImagenGCSImage diff --git a/docs-devsite/ai.groundingattribution.md b/docs-devsite/ai.groundingattribution.md deleted file mode 100644 index a0895550bf1..00000000000 --- a/docs-devsite/ai.groundingattribution.md +++ /dev/null @@ -1,62 +0,0 @@ -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 %} - -# GroundingAttribution interface -> Warning: This API is now obsolete. -> -> - -Signature: - -```typescript -export interface GroundingAttribution -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [confidenceScore](./ai.groundingattribution.md#groundingattributionconfidencescore) | number | | -| [retrievedContext](./ai.groundingattribution.md#groundingattributionretrievedcontext) | [RetrievedContextAttribution](./ai.retrievedcontextattribution.md#retrievedcontextattribution_interface) | | -| [segment](./ai.groundingattribution.md#groundingattributionsegment) | [Segment](./ai.segment.md#segment_interface) | | -| [web](./ai.groundingattribution.md#groundingattributionweb) | [WebAttribution](./ai.webattribution.md#webattribution_interface) | | - -## GroundingAttribution.confidenceScore - -Signature: - -```typescript -confidenceScore?: number; -``` - -## GroundingAttribution.retrievedContext - -Signature: - -```typescript -retrievedContext?: RetrievedContextAttribution; -``` - -## GroundingAttribution.segment - -Signature: - -```typescript -segment: Segment; -``` - -## GroundingAttribution.web - -Signature: - -```typescript -web?: WebAttribution; -``` diff --git a/docs-devsite/ai.groundingmetadata.md b/docs-devsite/ai.groundingmetadata.md index 90994d9c01c..60bb4d23cbe 100644 --- a/docs-devsite/ai.groundingmetadata.md +++ b/docs-devsite/ai.groundingmetadata.md @@ -22,22 +22,9 @@ export interface GroundingMetadata | Property | Type | Description | | --- | --- | --- | -| [groundingAttributions](./ai.groundingmetadata.md#groundingmetadatagroundingattributions) | [GroundingAttribution](./ai.groundingattribution.md#groundingattribution_interface)\[\] | | | [retrievalQueries](./ai.groundingmetadata.md#groundingmetadataretrievalqueries) | string\[\] | | | [webSearchQueries](./ai.groundingmetadata.md#groundingmetadatawebsearchqueries) | string\[\] | | -## GroundingMetadata.groundingAttributions - -> Warning: This API is now obsolete. -> -> - -Signature: - -```typescript -groundingAttributions: GroundingAttribution[]; -``` - ## GroundingMetadata.retrievalQueries Signature: diff --git a/docs-devsite/ai.md b/docs-devsite/ai.md index 286c8351fd7..3d2511b0d5f 100644 --- a/docs-devsite/ai.md +++ b/docs-devsite/ai.md @@ -95,7 +95,6 @@ The Firebase AI Web SDK. | [GenerateContentStreamResult](./ai.generatecontentstreamresult.md#generatecontentstreamresult_interface) | Result object returned from [GenerativeModel.generateContentStream()](./ai.generativemodel.md#generativemodelgeneratecontentstream) call. Iterate over stream to get chunks as they come in and/or use the response promise to get the aggregated response when the stream is done. | | [GenerationConfig](./ai.generationconfig.md#generationconfig_interface) | Config options for content-related requests | | [GenerativeContentBlob](./ai.generativecontentblob.md#generativecontentblob_interface) | Interface for sending an image. | -| [GroundingAttribution](./ai.groundingattribution.md#groundingattribution_interface) | | | [GroundingMetadata](./ai.groundingmetadata.md#groundingmetadata_interface) | Metadata returned to client when grounding is enabled. | | [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. | | [ImagenGenerationConfig](./ai.imagengenerationconfig.md#imagengenerationconfig_interface) | (Public Preview) Configuration options for generating images with Imagen.See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images-imagen) for more details. | diff --git a/packages/ai/src/types/responses.ts b/packages/ai/src/types/responses.ts index e33b8a86bd3..87e2a0d1be2 100644 --- a/packages/ai/src/types/responses.ts +++ b/packages/ai/src/types/responses.ts @@ -177,21 +177,6 @@ export interface Citation { export interface GroundingMetadata { webSearchQueries?: string[]; retrievalQueries?: string[]; - /** - * @deprecated - */ - groundingAttributions: GroundingAttribution[]; -} - -/** - * @deprecated - * @public - */ -export interface GroundingAttribution { - segment: Segment; - confidenceScore?: number; - web?: WebAttribution; - retrievedContext?: RetrievedContextAttribution; } /**