provideModel

abstract fun provideModel(modelIdentifier: String, modelConfiguration: Map<String, String>? = null): Model(source)

Provides a model instance based on the given identifier. If the model corresponding to the identifier is available, this method returns the instance of the model.

Return

the model instance corresponding to the provided identifier

Parameters

modelIdentifier

the identifier of the model to retrieve

modelConfiguration

A map of strings representing the model configuration. The key string should contain the necessary information for being able to use the paired string value. The stored string values could be anything. For example, the value could be a JSON string and the key provides information about how to process the JSON. The intent is that the map should be sufficient to build an appropriate Model instance. The map is optional. The function should return a model that is usable.