firebase-admin.machine-learning package
Stay organized with collections
Save and categorize content based on your preferences.
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's MachineLearning service or as getMachineLearning(app) to access the MachineLearning service associated with a specific app. |
Classes
Class |
Description |
MachineLearning |
The Firebase MachineLearning service interface. |
Model |
A Firebase ML Model output object. |
Interfaces
Type Aliases
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 MachineLearning service to return. If not provided, the default MachineLearning service will be returned. |
Returns:
MachineLearning
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;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-16 UTC.
[null,null,["Last updated 2024-04-16 UTC."],[],[],null,["# firebase-admin.machine-learning package\n\nFirebase Machine Learning.\n\nFunctions\n---------\n\n| Function | Description |\n|--------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [getMachineLearning(app)](./firebase-admin.machine-learning.md#getmachinelearning_8a40afc) | Gets the [MachineLearning](./firebase-admin.machine-learning.machinelearning.md#machinelearning_class) 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. |\n\nClasses\n-------\n\n| Class | Description |\n|-----------------------------------------------------------------------------------------------|---------------------------------------------------|\n| [MachineLearning](./firebase-admin.machine-learning.machinelearning.md#machinelearning_class) | The Firebase `MachineLearning` service interface. |\n| [Model](./firebase-admin.machine-learning.model.md#model_class) | A Firebase ML Model output object. |\n\nInterfaces\n----------\n\n| Interface | Description |\n|---------------------------------------------------------------------------------------------------------------------|----------------------------------------------------|\n| [GcsTfliteModelOptions](./firebase-admin.machine-learning.gcstflitemodeloptions.md#gcstflitemodeloptions_interface) | |\n| [ListModelsOptions](./firebase-admin.machine-learning.listmodelsoptions.md#listmodelsoptions_interface) | Interface representing options for listing Models. |\n| [ListModelsResult](./firebase-admin.machine-learning.listmodelsresult.md#listmodelsresult_interface) | Response object for a listModels operation. |\n| [ModelOptionsBase](./firebase-admin.machine-learning.modeloptionsbase.md#modeloptionsbase_interface) | Firebase ML Model input objects |\n| [TFLiteModel](./firebase-admin.machine-learning.tflitemodel.md#tflitemodel_interface) | A TensorFlow Lite Model output object |\n\nType Aliases\n------------\n\n| Type Alias | Description |\n|-------------------------------------------------------------------|-------------|\n| [ModelOptions](./firebase-admin.machine-learning.md#modeloptions) | |\n\ngetMachineLearning(app)\n-----------------------\n\nGets the [MachineLearning](./firebase-admin.machine-learning.machinelearning.md#machinelearning_class) service for the default app or a given app.\n\n`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.\n\n**Signature:** \n\n export declare function getMachineLearning(app?: App): MachineLearning;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|------|----------------------------------------------------------------------------------------------------------------------------------|\n| app | App | Optional app whose `MachineLearning` service to return. If not provided, the default `MachineLearning` service will be returned. |\n\n**Returns:**\n\n[MachineLearning](./firebase-admin.machine-learning.machinelearning.md#machinelearning_class)\n\nThe default `MachineLearning` service if no app is provided or the `MachineLearning` service associated with the provided app.\n\n### Example 1\n\n // Get the MachineLearning service for the default app\n const defaultMachineLearning = getMachineLearning();\n\n### Example 2\n\n // Get the MachineLearning service for a given app\n const otherMachineLearning = getMachineLearning(otherApp);\n\nModelOptions\n------------\n\n**Signature:** \n\n export type ModelOptions = ModelOptionsBase | GcsTfliteModelOptions;"]]