FirebaseVertexAI

class FirebaseVertexAI


Entry point for all Vertex AI for Firebase functionality.

Summary

Public companion functions

FirebaseVertexAI
FirebaseVertexAI
getInstance(app: FirebaseApp, location: String)

Returns the FirebaseVertexAI instance for the provided FirebaseApp and location

Public companion properties

FirebaseVertexAI

The FirebaseVertexAI instance for the default FirebaseApp

Public functions

GenerativeModel
generativeModel(
    modelName: String,
    generationConfig: GenerationConfig?,
    safetySettings: List<SafetySetting>?,
    requestOptions: RequestOptions,
    tools: List<Tool>?,
    toolConfig: ToolConfig?,
    systemInstruction: Content?
)

Instantiates a new GenerativeModel given the provided parameters.

Public companion functions

getInstance

fun getInstance(app: FirebaseApp): FirebaseVertexAI

getInstance

fun getInstance(app: FirebaseApp = Firebase.app, location: String): FirebaseVertexAI

Returns the FirebaseVertexAI instance for the provided FirebaseApp and location

Parameters
location: String

location identifier, defaults to us-central1; see available Vertex AI regions

Public companion properties

instance

val instanceFirebaseVertexAI

The FirebaseVertexAI instance for the default FirebaseApp

Public functions

generativeModel

fun generativeModel(
    modelName: String,
    generationConfig: GenerationConfig? = null,
    safetySettings: List<SafetySetting>? = null,
    requestOptions: RequestOptions = RequestOptions(),
    tools: List<Tool>? = null,
    toolConfig: ToolConfig? = null,
    systemInstruction: Content? = null
): GenerativeModel

Instantiates a new GenerativeModel given the provided parameters.

Parameters
modelName: String

name of the model in the backend

generationConfig: GenerationConfig? = null

configuration parameters to use for content generation

safetySettings: List<SafetySetting>? = null

safety bounds to use during alongside prompts during content generation

requestOptions: RequestOptions = RequestOptions()

configuration options to utilize during backend communication

tools: List<Tool>? = null

list of tools to make available to the model

toolConfig: ToolConfig? = null

configuration that defines how the model handles the tools provided

systemInstruction: Content? = null

contains a Content that directs the model to behave a certain way