feat!(ai): remove VertexAI APIs (#9063) · firebase/firebase-js-sdk@ec5f374 (original) (raw)

`@@ -18,7 +18,6 @@ The Firebase AI Web SDK.

`

18

18

`| --- | --- |

`

19

19

`| function(app, ...) |

`

20

20

`| getAI(app, options) | Returns the default AI instance that is associated with the provided FirebaseApp. If no instance exists, initializes a new instance with the default settings. |

`

21

``

`-

| getVertexAI(app, options) | |

`

22

21

`| function(ai, ...) |

`

23

22

`| getGenerativeModel(ai, modelParams, requestOptions) | Returns a GenerativeModel class with methods for inference and other functionality. |

`

24

23

`| getImagenModel(ai, modelParams, requestOptions) | (Public Preview) Returns an ImagenModel class with methods for using Imagen.Only Imagen 3 models (named imagen-3.0-*) are supported. |

`

`@@ -127,7 +126,6 @@ The Firebase AI Web SDK.

`

127

126

`| ThinkingConfig | Configuration for "thinking" behavior of compatible Gemini models.Certain models utilize a thinking process before generating a response. This allows them to reason through complex problems and plan a more coherent and accurate answer. |

`

128

127

`| ToolConfig | Tool config. This config is shared for all tools provided in the request. |

`

129

128

`| UsageMetadata | Usage metadata about a GenerateContentResponse. |

`

130

``

`-

| VertexAIOptions | Options when initializing the Firebase AI SDK. |

`

131

129

`| VideoMetadata | Describes the input video content. |

`

132

130

`| WebAttribution | |

`

133

131

`| WebGroundingChunk | A grounding chunk from the web.Important: If using Grounding with Google Search, you are required to comply with the Service Specific Terms for "Grounding with Google Search". |

`

`@@ -139,8 +137,6 @@ The Firebase AI Web SDK.

`

139

137

`| BackendType | An enum-like object containing constants that represent the supported backends for the Firebase AI SDK. This determines which backend service (Vertex AI Gemini API or Gemini Developer API) the SDK will communicate with.These values are assigned to the backendType property within the specific backend configuration objects (GoogleAIBackend or VertexAIBackend) to identify which service to target. |

`

140

138

`| POSSIBLE_ROLES | Possible roles. |

`

141

139

`| ResponseModality | (Public Preview) Generation modalities to be returned in generation responses. |

`

142

``

`-

| VertexAIError | |

`

143

``

`-

| VertexAIModel | |

`

144

140

``

145

141

`## Type Aliases

`

146

142

``

`@@ -152,7 +148,6 @@ The Firebase AI Web SDK.

`

152

148

`| Role | Role is the producer of the content. |

`

153

149

`| Tool | Defines a tool that model can call to access external knowledge. |

`

154

150

`| TypedSchema | A type that includes all specific Schema types. |

`

155

``

`-

| VertexAI | |

`

156

151

``

157

152

`## function(app, ...)

`

158

153

``

`@@ -205,32 +200,6 @@ const ai = getAI(app, { backend: new VertexAIBackend() });

`

205

200

``

206

201

```` ```


`207`

`202`

``

`208`

``

`-

### getVertexAI(app, options) {:#getvertexai_04094cf}

`

`209`

``

`-`

`210`

``

`-

> Warning: This API is now obsolete.

`

`211`

``

`-

> 

`

`212`

``

`-

> Use the new [getAI()](./ai.md#getai_a94a413) instead. The Vertex AI in Firebase SDK has been replaced with the Firebase AI SDK to accommodate the evolving set of supported features and services. For migration details, see the [migration guide](https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk)<!-- -->.

`

`213`

``

`-

> 

`

`214`

``

`-

> Returns a [VertexAI](./ai.md#vertexai) instance for the given app, configured to use the Vertex AI Gemini API. This instance will be configured to use the Vertex AI Gemini API.

`

`215`

``

`-

> 

`

`216`

``

`-`

`217`

``

`-

<b>Signature:</b>

`

`218`

``

`-`

`219`

``

```` -

```typescript

220

``

`-

export declare function getVertexAI(app?: FirebaseApp, options?: VertexAIOptions): VertexAI;

`

221

``


```

222

``

-

223

``

`-

Parameters

`

224

``

-

225

``

`-

| Parameter | Type | Description |

`

226

``

`-

| --- | --- | --- |

`

227

``

`-

| app | FirebaseApp | The FirebaseApp to use. |

`

228

``

`-

| options | VertexAIOptions | Options to configure the Vertex AI instance, including the location. |

`

229

``

-

230

``

`-

Returns:

`

231

``

-

232

``

`-

VertexAI

`

233

``

-

234

203

`## function(ai, ...)

`

235

204

``

236

205

`### getGenerativeModel(ai, modelParams, requestOptions) {:#getgenerativemodel_80bd839}

`

`@@ -327,36 +296,6 @@ ResponseModality: {

`

327

296

`}

`

328

297

```` ```


`329`

`298`

``

`330`

``

`-

## VertexAIError

`

`331`

``

`-`

`332`

``

`-

> Warning: This API is now obsolete.

`

`333`

``

`-

> 

`

`334`

``

`-

> Use the new [AIError](./ai.aierror.md#aierror_class) instead. The Vertex AI in Firebase SDK has been replaced with the Firebase AI SDK to accommodate the evolving set of supported features and services. For migration details, see the [migration guide](https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk)<!-- -->.

`

`335`

``

`-

> 

`

`336`

``

`-

> Error class for the Firebase AI SDK.

`

`337`

``

`-

> 

`

`338`

``

`-`

`339`

``

`-

<b>Signature:</b>

`

`340`

``

`-`

`341`

``

```` -

```typescript

342

``

`-

VertexAIError: typeof AIError

`

343

``


```

344

``

-

345

``

`-

VertexAIModel

`

346

``

-

347

``

`-

Warning: This API is now obsolete.

`

348

``

`-

`

349

``

`-

Use the new AIModel instead. The Vertex AI in Firebase SDK has been replaced with the Firebase AI SDK to accommodate the evolving set of supported features and services. For migration details, see the migration guide.

`

350

``

`-

`

351

``

`-

Base class for Firebase AI model APIs.

`

352

``

`-

`

353

``

-

354

``

`-

Signature:

`

355

``

-

356

``


```typescript

357

``

`-

VertexAIModel: typeof AIModel

`

358

``


```

359

``

-

360

299

`## BackendType

`

361

300

``

362

301

`` Type alias representing valid backend types. It can be either 'VERTEX_AI' or 'GOOGLE_AI'.

``

`@@ -420,21 +359,6 @@ A type that includes all specific Schema types.

`

420

359

`export type TypedSchema = IntegerSchema | NumberSchema | StringSchema | BooleanSchema | ObjectSchema | ArraySchema;

`

421

360

```` ```


`422`

`361`

``

`423`

``

`-

## VertexAI

`

`424`

``

`-`

`425`

``

`-

> Warning: This API is now obsolete.

`

`426`

``

`-

> 

`

`427`

``

`-

> Use the new [AI](./ai.ai.md#ai_interface) instead. The Vertex AI in Firebase SDK has been replaced with the Firebase AI SDK to accommodate the evolving set of supported features and services. For migration details, see the [migration guide](https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk)<!-- -->.

`

`428`

``

`-

> 

`

`429`

``

`-

> An instance of the Firebase AI SDK.

`

`430`

``

`-

> 

`

`431`

``

`-`

`432`

``

`-

<b>Signature:</b>

`

`433`

``

`-`

`434`

``

```` -

```typescript

435

``

`-

export type VertexAI = AI;

`

436

``


```

437

``

-

438

362

`## AIErrorCode

`

439

363

``

440

364

`Standardized error codes that AIError can have.

`