Back to Firebase Js Sdk

AIOptions interface

docs-devsite/ai.aioptions.md

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

AIOptions interface

Options for initializing the AI service using getAI()<!-- -->. This allows specifying which backend to use (Vertex AI Gemini API or Gemini Developer API) and configuring its specific options (like location for Vertex AI).

<b>Signature:</b>

typescript
export interface AIOptions 

Properties

PropertyTypeDescription
backendBackendThe backend configuration to use for the AI service instance. Defaults to the Gemini Developer API backend (GoogleAIBackend<!-- -->).
useLimitedUseAppCheckTokensbooleanWhether to use App Check limited use tokens. Defaults to false.

AIOptions.backend

The backend configuration to use for the AI service instance. Defaults to the Gemini Developer API backend (GoogleAIBackend<!-- -->).

<b>Signature:</b>

typescript
backend?: Backend;

AIOptions.useLimitedUseAppCheckTokens

Whether to use App Check limited use tokens. Defaults to false.

<b>Signature:</b>

typescript
useLimitedUseAppCheckTokens?: boolean;