Enum Class ResponseFormat.Type

java.lang.Object
java.lang.Enum<ResponseFormat.Type>
com.tnsai.llm.format.ResponseFormat.Type
All Implemented Interfaces:
Serializable, Comparable<ResponseFormat.Type>, Constable
Enclosing class:
ResponseFormat

public static enum ResponseFormat.Type extends Enum<ResponseFormat.Type>
Response format type.
  • Enum Constant Details

    • TEXT

      public static final ResponseFormat.Type TEXT
      Default text output with no special formatting.
    • JSON_OBJECT

      public static final ResponseFormat.Type JSON_OBJECT
      Generic JSON object output.

      The model will output valid JSON, but structure is not enforced.

    • JSON_SCHEMA

      public static final ResponseFormat.Type JSON_SCHEMA
      Structured output with JSON Schema validation.

      The model will output JSON that conforms to the provided schema.

  • Method Details

    • values

      public static ResponseFormat.Type[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ResponseFormat.Type valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Gets the API value for this type.