Class FieldsInput
java.lang.Object
dev.langchain4j.model.decision.request.FieldsInput
- All Implemented Interfaces:
DecisionInput
A
DecisionInput made of named fields, for example a support ticket together with the customer's plan:
Map.of("ticket", ticket, "plan", "enterprise").
The values can be strings, numbers, booleans, nulls, maps and lists. The value of a field can also be a
Content or a list of Contents, for example a named image
(Map.of("comment", comment, "photo", ImageContent.from(...))); which kinds of contents are supported
depends on the decision model, and decision models must send them as contents (never as JSON text) or throw an
UnsupportedFeatureException. Other objects are rejected: convert them to a
Map that holds only what the decision needs.
- Since:
- 1.23.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanfields()The fields, keyed by name, in the iteration order of the map they were created from.static FieldsInputCreates the input from a copy of the given fields.inthashCode()toString()type()The type of this input.
-
Method Details
-
from
Creates the input from a copy of the given fields.- Throws:
IllegalArgumentException- iffieldsisnullor empty, or contains a value that is not supported (see the class description)
-
fields
-
type
Description copied from interface:DecisionInputThe type of this input.- Specified by:
typein interfaceDecisionInput
-
equals
-
hashCode
-
toString
-