use of org.opensearch.ml.utils.RestActionUtils.PARAMETER_MODEL_ID in project ml-commons by opensearch-project.
the class RestMLDeleteModelAction method prepareRequest.
@Override
protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) throws IOException {
String modelId = request.param(PARAMETER_MODEL_ID);
MLModelDeleteRequest mlModelDeleteRequest = new MLModelDeleteRequest(modelId);
return channel -> client.execute(MLModelDeleteAction.INSTANCE, mlModelDeleteRequest, new RestToXContentListener<>(channel));
}
Aggregations