Skip to content

feat!(ai): Remove GroundingAttribution #9079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/slimy-mirrors-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/ai': major
---

Remove GroundingAttribution
14 changes: 0 additions & 14 deletions common/api-review/ai.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions docs-devsite/_toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
62 changes: 0 additions & 62 deletions docs-devsite/ai.groundingattribution.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs-devsite/ai.groundingmetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
>
>

<b>Signature:</b>

```typescript
groundingAttributions: GroundingAttribution[];
```

## GroundingMetadata.retrievalQueries

<b>Signature:</b>
Expand Down
1 change: 0 additions & 1 deletion docs-devsite/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>stream</code> to get chunks as they come in and/or use the <code>response</code> 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) | <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. |
Expand Down
15 changes: 0 additions & 15 deletions packages/ai/src/types/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
Loading