All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opensearch.ml.common.model.Guardrail Maven / Gradle / Ivy

There is a newer version: 2.17.1.0
Show newest version
/*
 * Copyright OpenSearch Contributors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.opensearch.ml.common.model;

import java.io.IOException;
import java.util.Map;

import org.opensearch.client.Client;
import org.opensearch.core.common.io.stream.StreamOutput;
import org.opensearch.core.xcontent.NamedXContentRegistry;
import org.opensearch.core.xcontent.ToXContentObject;

public abstract class Guardrail implements ToXContentObject {

    public abstract void writeTo(StreamOutput out) throws IOException;

    public abstract Boolean validate(String input, Map parameters);

    public abstract void init(NamedXContentRegistry xContentRegistry, Client client);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy