FirebaseVertexAI

class FirebaseVertexAI


Entry point for all Vertex AI for Firebase functionality.

Summary

Public companion functions

FirebaseVertexAI

Returns the FirebaseVertexAI instance for the provided FirebaseApp

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?,
    location: String
)

Instantiates a new GenerativeModel given the provided parameters.

Public companion functions

getInstance

fun getInstance(app: FirebaseApp): FirebaseVertexAI

Returns the FirebaseVertexAI instance for the provided FirebaseApp

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,
    location: String = "us-central1"
): 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

location: String = "us-central1"

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