Back to Firebase Js Sdk

AI interface

docs-devsite/ai.ai.md

12.12.12.4 KB
Original Source

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 %}

AI interface

An instance of the Firebase AI SDK.

Do not create this instance directly. Instead, use getAI()<!-- -->.

<b>Signature:</b>

typescript
export interface AI 

Properties

PropertyTypeDescription
appFirebaseAppThe FirebaseApp this AI instance is associated with.
backendBackendA Backend instance that specifies the configuration for the target backend, either the Gemini Developer API (using GoogleAIBackend<!-- -->) or the Vertex AI Gemini API (using VertexAIBackend<!-- -->).
locationstring
optionsAIOptionsOptions applied to this AI instance.

AI.app

The FirebaseApp this AI instance is associated with.

<b>Signature:</b>

typescript
app: FirebaseApp;

AI.backend

A Backend instance that specifies the configuration for the target backend, either the Gemini Developer API (using GoogleAIBackend<!-- -->) or the Vertex AI Gemini API (using VertexAIBackend<!-- -->).

<b>Signature:</b>

typescript
backend: Backend;

AI.location

Warning: This API is now obsolete.

use AI.backend.location instead.

The location configured for this AI service instance, relevant for Vertex AI backends.

<b>Signature:</b>

typescript
location: string;

AI.options

Options applied to this AI instance.

<b>Signature:</b>

typescript
options?: AIOptions;