Class ModelLibrary
java.lang.Object
eu.svjatoslav.alyverkko_cli.model.ModelLibrary
-
Constructor Summary
ConstructorDescriptionModelLibrary
(File modelsBaseDirectory, List<ConfigurationModel> configModels) Represents a library of AI models. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a given model to the existing models list if it does not already exist.findModelByAlias
(String alias) Finds a model by its alias.Returns a list of all the models.void
Prints the details of each model in the list.
-
Constructor Details
-
ModelLibrary
Represents a library of AI models.- Parameters:
modelsBaseDirectory
- the directory containing the models
-
-
Method Details
-
addModel
Adds a given model to the existing models list if it does not already exist.- Parameters:
model
- the model to be added- Throws:
RuntimeException
- if a model with the same alias already exists in the models list
-
getModels
Returns a list of all the models.- Returns:
- a list of
Model
objects representing the models
-
findModelByAlias
Finds a model by its alias. -
getDefaultModel
-
printModels
public void printModels()Prints the details of each model in the list.
-