Firebase. AI. FirebaseAI
The entry point for all FirebaseAI SDK functionality.
Summary
Properties |
|
|---|---|
DefaultInstance
|
static FirebaseAI
|
Public static functions |
|
|---|---|
GetInstance(Backend? backend, bool useLimitedUseAppCheckTokens)
|
|
GetInstance(FirebaseApp app, Backend? backend, bool useLimitedUseAppCheckTokens)
|
|
Public functions |
|
|---|---|
GetGenerativeModel(string modelName, GenerationConfig? generationConfig, SafetySetting[] safetySettings, Tool[] tools, ToolConfig? toolConfig, ModelContent? systemInstruction, RequestOptions? requestOptions)
|
Initializes a generative model with the given parameters.
|
GetLiveModel(string modelName, LiveGenerationConfig? liveGenerationConfig, Tool[] tools, ModelContent? systemInstruction, RequestOptions? requestOptions)
|
Initializes a
LiveGenerativeModel for real-time interaction. |
GetTemplateGenerativeModel(RequestOptions? requestOptions)
|
Initializes a
TemplateGenerativeModel with the given parameters. |
Structs |
|
|---|---|
|
Firebase. |
Defines which backend AI service is being used, provided to |
Properties
DefaultInstance
static FirebaseAI DefaultInstance
Returns a FirebaseAI instance with the default FirebaseApp and GoogleAI Backend.
Public static functions
GetInstance
FirebaseAI GetInstance( Backend? backend, bool useLimitedUseAppCheckTokens )
Returns a FirebaseAI instance with the default FirebaseApp and the given Backend.
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
|
||||
| Returns |
A configured instance of
FirebaseAI. |
GetInstance
FirebaseAI GetInstance( FirebaseApp app, Backend? backend, bool useLimitedUseAppCheckTokens )
Returns a FirebaseAI instance with the given FirebaseApp and Backend.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
||||||
| Returns |
A configured instance of
FirebaseAI. |
Public functions
GetGenerativeModel
GenerativeModel GetGenerativeModel( string modelName, GenerationConfig? generationConfig, SafetySetting[] safetySettings, Tool[] tools, ToolConfig? toolConfig, ModelContent? systemInstruction, RequestOptions? requestOptions )
Initializes a generative model with the given parameters.
- Note: Refer to Gemini models for guidance on choosing an appropriate model for your use case.
| Details | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
||||||||||||||
| Returns |
The initialized
GenerativeModel instance. |
GetLiveModel
LiveGenerativeModel GetLiveModel( string modelName, LiveGenerationConfig? liveGenerationConfig, Tool[] tools, ModelContent? systemInstruction, RequestOptions? requestOptions )
Initializes a LiveGenerativeModel for real-time interaction.
- Note: Refer to Gemini models for guidance on choosing an appropriate model for your use case.
Warning: This API is in Public Preview, which means that the feature is not subject to any SLA or deprecation policy and could change in backwards-incompatible ways.
| Details | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
||||||||||
| Returns |
The initialized
LiveGenerativeModel instance. |
GetTemplateGenerativeModel
TemplateGenerativeModel GetTemplateGenerativeModel( RequestOptions? requestOptions )
Initializes a TemplateGenerativeModel with the given parameters.
| Details | |||
|---|---|---|---|
| Parameters |
|
||
| Returns |
The initialized
TemplateGenerativeModel instance. |