Class TextResponseFormat

java.lang.Object
com.google.genai.gaos.models.interactions.TextResponseFormat

public class TextResponseFormat extends Object
TextResponseFormat

Configuration for text output format.

  • Constructor Details

  • Method Details

    • mimeType

      The MIME type of the text output.
    • schema

      public Optional<Map<String,Object>> schema()
      The JSON schema that the output should conform to. Only applicable when mime_type is application/json.

      Supports a subset of JSON Schema. `minLength`, `maxLength`, `minProperties`, `maxProperties`, `uniqueItems`, `contains`, `minContains`, and `maxContains` are ignored and not enforced; validate these in your application. `minItems` and `maxItems` are enforced. Schemas that are too complex to enforce (for example, large `maxItems` on nested arrays) return a 400 INVALID_ARGUMENT error.

    • type

      public Optional<String> type()
    • builder

      public static TextResponseFormat.Builder builder()
    • withMimeType

      public TextResponseFormat withMimeType(@Nullable TextResponseFormatMimeType mimeType)
      The MIME type of the text output.
    • withSchema

      public TextResponseFormat withSchema(@Nullable Map<String,Object> schema)
      The JSON schema that the output should conform to. Only applicable when mime_type is application/json.

      Supports a subset of JSON Schema. `minLength`, `maxLength`, `minProperties`, `maxProperties`, `uniqueItems`, `contains`, `minContains`, and `maxContains` are ignored and not enforced; validate these in your application. `minItems` and `maxItems` are enforced. Schemas that are too complex to enforce (for example, large `maxItems` on nested arrays) return a 400 INVALID_ARGUMENT error.

    • equals

      public boolean equals(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