Package com.t4a.predict
Class HttpRestPredictionLoader
java.lang.Object
com.t4a.predict.HttpRestPredictionLoader
The HttpRestPredictionLoader class is responsible for loading and parsing HTTP REST predictions.
It reads the configuration from a JSON file and creates a map of AIAction predictions.
The class uses Gson for JSON processing and handles exceptions by throwing a LoaderException.
It also constructs a list of action names.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
load
(Map<String, AIAction> predictions, StringBuilder actionNameList) void
parseConfig
(Map<String, AIAction> predictions, StringBuilder actionNameList)
-
Constructor Details
-
HttpRestPredictionLoader
public HttpRestPredictionLoader()
-
-
Method Details
-
load
public void load(Map<String, AIAction> predictions, StringBuilder actionNameList) throws LoaderException- Throws:
LoaderException
-
parseConfig
public void parseConfig(Map<String, AIAction> predictions, StringBuilder actionNameList) throws IOException- Throws:
IOException
-