Immutable moderation response with result and metadata, built via a fluent builder.
// Source: https://github.com/langchain4j/langchain4j | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package dev.langchain4j.model.moderation;
import static dev.langchain4j.internal.Utils.copy;
import static dev.langchain4j.internal.ValidationUtils.ensureNotNull;
import java.util.Map;
import java.util.Objects;
/**
* Represents a moderation response.
*/
public class ModerationResponse {
private final Moderation moderation;
private final Map<String, Object> metadata;
private ModerationResponse(Builder builder) {
this.moderation = ensureNotNull(builder.moderation, "moderation");
this.metadata = copy(builder.metadata);
}
/**
* Returns
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key