Class ResponseJsonSchema.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • name

        public ResponseJsonSchema.Builder name​(String name)
        The name of the response format.

        Must be a-z, A-Z, 0-9, or contain underscores and dashes.

        Parameters:
        name - the value to set
        Returns:
        this builder
      • description

        public ResponseJsonSchema.Builder description​(String description)
        A description of what the response format is for, used by the model to determine how to respond in the format.
        Parameters:
        description - the value to set
        Returns:
        this builder
      • schema

        public ResponseJsonSchema.Builder schema​(Object schema)
        The schema used by the structured output, described as a JSON Schema object.
        Parameters:
        schema - the value to set
        Returns:
        this builder
      • isStrict

        public ResponseJsonSchema.Builder isStrict​(Boolean isStrict)
        Whether to enable strict schema adherence when generating the output.

        If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true.

        Parameters:
        isStrict - the value to set
        Returns:
        this builder