Class TextResponseFormat.Builder

java.lang.Object
com.google.genai.gaos.models.interactions.TextResponseFormat.Builder
Enclosing class:
TextResponseFormat

public static final class TextResponseFormat.Builder extends Object
  • Method Details

    • mimeType

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

      public TextResponseFormat.Builder schema(@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.

    • build

      public TextResponseFormat build()