request/FieldsInput.java

langchain4j · langchain4j-core/src/main/java/dev/langchain4j/model/decision/request/FieldsInput.java · java · Apache-2.0
ai, tag:knn-classified

Immutable wrapper for decision input fields, validating and copying nested structures for safe use.

// 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.decision.request;

import static dev.langchain4j.internal.ValidationUtils.ensureNotEmpty;

import dev.langchain4j.Experimental;
import dev.langchain4j.data.message.Content;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * A {@link DecisionInput} made of named fields, for example a support ticket together with the customer's plan:
 * {@code Map.of("ticket", ticket, "plan", "enterprise")}.
 * <p>
 * The val

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key