Class FieldsInput

java.lang.Object
org.springframework.ai.decision.input.FieldsInput
All Implemented Interfaces:
DecisionInput

public final class FieldsInput extends Object implements DecisionInput
A DecisionInput made of named fields, sent to the model as a JSON object. A value can be a string, a number, a boolean, null, a map, a list, or, at the top level only, a MessagePart or a list of parts, such as the text and images of an attachment.
Since:
2.1.0
Author:
Thomas Vitale, Christian Tzolov
  • Method Details

    • isPartList

      public static boolean isPartList(@Nullable Object value)
      Whether a field value is a list of content parts rather than a JSON array.
      Parameters:
      value - the field value
      Returns:
      whether the value is a non-empty list of MessageParts
    • getFields

      public Map<String,@Nullable Object> getFields()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object