Package org.kie.kogito.explainability
Class RemotePredictionProvider
java.lang.Object
org.kie.kogito.explainability.RemotePredictionProvider
- All Implemented Interfaces:
org.kie.kogito.explainability.model.PredictionProvider
public class RemotePredictionProvider
extends Object
implements org.kie.kogito.explainability.model.PredictionProvider
-
Constructor Summary
ConstructorsConstructorDescriptionRemotePredictionProvider(String serviceUrl, ModelIdentifier modelIdentifier, Collection<? extends HasNameValue<org.kie.kogito.tracing.typedvalue.TypedValue>> predictionOutputs, io.vertx.mutiny.core.Vertx vertx, org.eclipse.microprofile.context.ThreadContext threadContext, Executor asyncExecutor) -
Method Summary
Modifier and TypeMethodDescriptionprotected io.vertx.mutiny.ext.web.client.WebClientprotected List<org.kie.kogito.explainability.model.PredictionOutput>parseRawResult(io.vertx.core.json.JsonArray jsonArray) CompletableFuture<List<org.kie.kogito.explainability.model.PredictionOutput>>predictAsync(List<org.kie.kogito.explainability.model.PredictionInput> inputs) protected CompletableFuture<List<org.kie.kogito.explainability.model.PredictionOutput>>sendPredictRequest(List<org.kie.kogito.explainability.model.PredictionInput> inputs, ModelIdentifier modelIdentifier) protected org.kie.kogito.explainability.model.PredictionOutputtoPredictionOutput(io.vertx.core.json.JsonObject mainObj)
-
Constructor Details
-
RemotePredictionProvider
public RemotePredictionProvider(String serviceUrl, ModelIdentifier modelIdentifier, Collection<? extends HasNameValue<org.kie.kogito.tracing.typedvalue.TypedValue>> predictionOutputs, io.vertx.mutiny.core.Vertx vertx, org.eclipse.microprofile.context.ThreadContext threadContext, Executor asyncExecutor)
-
-
Method Details
-
predictAsync
public CompletableFuture<List<org.kie.kogito.explainability.model.PredictionOutput>> predictAsync(List<org.kie.kogito.explainability.model.PredictionInput> inputs) - Specified by:
predictAsyncin interfaceorg.kie.kogito.explainability.model.PredictionProvider
-
getClient
protected io.vertx.mutiny.ext.web.client.WebClient getClient(io.vertx.mutiny.core.Vertx vertx, URI uri) -
toPredictionOutput
protected org.kie.kogito.explainability.model.PredictionOutput toPredictionOutput(io.vertx.core.json.JsonObject mainObj) -
toMap
-
sendPredictRequest
protected CompletableFuture<List<org.kie.kogito.explainability.model.PredictionOutput>> sendPredictRequest(List<org.kie.kogito.explainability.model.PredictionInput> inputs, ModelIdentifier modelIdentifier) -
parseRawResult
protected List<org.kie.kogito.explainability.model.PredictionOutput> parseRawResult(io.vertx.core.json.JsonArray jsonArray)
-