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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["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;"]]