firebase-admin.machine-learning package

Firebase Machine Learning.

Functions

FunctionDescription
getMachineLearning(app)Gets theMachineLearning service for the default app or a given app.getMachineLearning() can be called with no arguments to access the default app'sMachineLearning service or asgetMachineLearning(app) to access theMachineLearning service associated with a specific app.

Classes

ClassDescription
MachineLearningThe FirebaseMachineLearning service interface.
ModelA Firebase ML Model output object.

Interfaces

InterfaceDescription
GcsTfliteModelOptions
ListModelsOptionsInterface representing options for listing Models.
ListModelsResultResponse object for a listModels operation.
ModelOptionsBaseFirebase ML Model input objects
TFLiteModelA TensorFlow Lite Model output object

Type Aliases

Type AliasDescription
ModelOptions

getMachineLearning(app)

Gets theMachineLearning service for the default app or a given app.

getMachineLearning() can be called with no arguments to access the default app'sMachineLearning service or asgetMachineLearning(app) to access theMachineLearning service associated with a specific app.

Signature:

exportdeclarefunctiongetMachineLearning(app?:App):MachineLearning;

Parameters

ParameterTypeDescription
appAppOptional app whoseMachineLearning service to return. If not provided, the defaultMachineLearning service will be returned.

Returns:

MachineLearning

The defaultMachineLearning service if no app is provided or theMachineLearning service associated with the provided app.

Example 1

// Get the MachineLearning service for the default appconstdefaultMachineLearning=getMachineLearning();

Example 2

// Get the MachineLearning service for a given appconstotherMachineLearning=getMachineLearning(otherApp);

ModelOptions

Signature:

exporttypeModelOptions=ModelOptionsBase|GcsTfliteModelOptions;

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-04-16 UTC.