FirebaseVertexAI
class FirebaseVertexAI
Entry point for all Vertex AI in Firebase functionality.
Summary
Public companion functions |
|
|---|---|
FirebaseVertexAI |
getInstance(app: FirebaseApp) |
FirebaseVertexAI |
getInstance(app: FirebaseApp, location: String)Returns the |
Public companion properties |
|
|---|---|
FirebaseVertexAI |
The |
Public functions |
|
|---|---|
GenerativeModel |
generativeModel(Instantiates a new |
ImagenModel |
@PublicPreviewAPIInstantiates a new |
LiveGenerativeModel |
@PublicPreviewAPIInstantiates a new |
Public companion functions
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 |
Public companion properties
Public functions
generativeModel
fun generativeModel(
modelName: String,
generationConfig: GenerationConfig? = null,
safetySettings: List<SafetySetting>? = null,
tools: List<Tool>? = null,
toolConfig: ToolConfig? = null,
systemInstruction: Content? = null,
requestOptions: RequestOptions = RequestOptions()
): GenerativeModel
Instantiates a new GenerativeModel given the provided parameters.
| Parameters | |
|---|---|
modelName: String |
The name of the model to use, for example |
generationConfig: GenerationConfig? = null |
The configuration parameters to use for content generation. |
safetySettings: List<SafetySetting>? = null |
The safety bounds the model will abide to during content generation. |
tools: List<Tool>? = null |
A list of |
toolConfig: ToolConfig? = null |
The |
systemInstruction: Content? = null |
|
requestOptions: RequestOptions = RequestOptions() |
Configuration options for sending requests to the backend. |
| Returns | |
|---|---|
GenerativeModel |
The initialized |
imagenModel
@PublicPreviewAPI
fun imagenModel(
modelName: String,
generationConfig: ImagenGenerationConfig? = null,
safetySettings: ImagenSafetySettings? = null,
requestOptions: RequestOptions = RequestOptions()
): ImagenModel
Instantiates a new ImagenModel given the provided parameters.
| Parameters | |
|---|---|
modelName: String |
The name of the model to use, for example |
generationConfig: ImagenGenerationConfig? = null |
The configuration parameters to use for image generation. |
safetySettings: ImagenSafetySettings? = null |
The safety bounds the model will abide by during image generation. |
requestOptions: RequestOptions = RequestOptions() |
Configuration options for sending requests to the backend. |
| Returns | |
|---|---|
ImagenModel |
The initialized |
liveModel
@PublicPreviewAPI
fun liveModel(
modelName: String,
generationConfig: LiveGenerationConfig? = null,
tools: List<Tool>? = null,
systemInstruction: Content? = null,
requestOptions: RequestOptions = RequestOptions()
): LiveGenerativeModel
Instantiates a new LiveGenerationConfig given the provided parameters.
| Parameters | |
|---|---|
modelName: String |
The name of the model to use, for example |
generationConfig: LiveGenerationConfig? = null |
The configuration parameters to use for content generation. |
tools: List<Tool>? = null |
A list of |
systemInstruction: Content? = null |
|
requestOptions: RequestOptions = RequestOptions() |
Configuration options for sending requests to the backend. |
| Returns | |
|---|---|
LiveGenerativeModel |
The initialized |