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 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:
      predictAsync in interface org.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

      protected Map<String,Object> toMap(List<org.kie.kogito.explainability.model.Feature> features)
    • 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)