Firebase Machine Learning.
Functions
| Function | Description | 
|---|---|
| getMachineLearning(app) | Gets the MachineLearning service for the default app or a given app. getMachineLearning()can be called with no arguments to access the default app'sMachineLearningservice or asgetMachineLearning(app)to access theMachineLearningservice associated with a specific app. | 
Classes
| Class | Description | 
|---|---|
| MachineLearning | The Firebase MachineLearningservice interface. | 
| Model | A Firebase ML Model output object. | 
Interfaces
| Interface | Description | 
|---|---|
| GcsTfliteModelOptions | |
| ListModelsOptions | Interface representing options for listing Models. | 
| ListModelsResult | Response object for a listModels operation. | 
| ModelOptionsBase | Firebase ML Model input objects | 
| TFLiteModel | A TensorFlow Lite Model output object | 
Type Aliases
| Type Alias | Description | 
|---|---|
| ModelOptions | 
getMachineLearning(app)
Gets the MachineLearning service for the default app or a given app.
getMachineLearning() can be called with no arguments to access the default app's MachineLearning service or as getMachineLearning(app) to access the MachineLearning service associated with a specific app.
Signature:
export declare function getMachineLearning(app?: App): MachineLearning;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| app | App | Optional app whose MachineLearningservice to return. If not provided, the defaultMachineLearningservice will be returned. | 
Returns:
The default MachineLearning service if no app is provided or the MachineLearning service associated with the provided app.
Example 1
// Get the MachineLearning service for the default app
const defaultMachineLearning = getMachineLearning();
Example 2
// Get the MachineLearning service for a given app
const otherMachineLearning = getMachineLearning(otherApp);
ModelOptions
Signature:
export type ModelOptions = ModelOptionsBase | GcsTfliteModelOptions;