com.google.firebase.ai

Classes

Chat

Representation of a multi-turn interaction with a model.

FirebaseAI

Entry point for all Firebase AI functionality.

GenerativeModel

Represents a multimodal model (like Gemini), capable of generating content based on various input types.

ImagenModel

Represents a generative model (like Imagen), capable of generating images based on various input types.

LiveGenerativeModel

Represents a multimodal model (like Gemini) capable of real-time content generation based on various input types, supporting bidirectional streaming.

Extension functions summary

FirebaseAI
Firebase.ai(
    app: FirebaseApp,
    backend: GenerativeBackend,
    useLimitedUseAppCheckTokens: Boolean
)

Returns the FirebaseAI instance for the provided FirebaseApp and backend.

FirebaseAI

Returns the FirebaseAI instance for the provided FirebaseApp and backend.

Extension properties summary

FirebaseAI

The FirebaseAI instance for the default FirebaseApp using the Google AI Backend.

Extension functions

ai

fun Firebase.ai(
    app: FirebaseApp = Firebase.app,
    backend: GenerativeBackend = GenerativeBackend.googleAI(),
    useLimitedUseAppCheckTokens: Boolean
): FirebaseAI

Returns the FirebaseAI instance for the provided FirebaseApp and backend.

Parameters
backend: GenerativeBackend = GenerativeBackend.googleAI()

the backend reference to make generative AI requests to.

useLimitedUseAppCheckTokens: Boolean

use App Check's limited-use tokens when sending requests to the backend. Learn more about limited-use tokens, including their nuances, when to use them, and best practices for integrating them into your app.

ai

fun Firebase.ai(
    app: FirebaseApp = Firebase.app,
    backend: GenerativeBackend = GenerativeBackend.googleAI()
): FirebaseAI

Returns the FirebaseAI instance for the provided FirebaseApp and backend.

Parameters
backend: GenerativeBackend = GenerativeBackend.googleAI()

the backend reference to make generative AI requests to.

Extension properties

ai

val Firebase.aiFirebaseAI

The FirebaseAI instance for the default FirebaseApp using the Google AI Backend.