Class TextResponseFormat

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.TextResponseFormat

public abstract class TextResponseFormat extends JsonSerializable
Configuration for text-specific output formatting.
  • Constructor Details

    • TextResponseFormat

      public TextResponseFormat()
  • Method Details

    • mimeType

      public abstract Optional<String> mimeType()
      Optional. The IANA standard MIME type of the response.
    • schema

      public abstract Optional<Object> schema()
      Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON.
    • builder

      public static TextResponseFormat.Builder builder()
      Instantiates a builder for TextResponseFormat.
    • toBuilder

      public abstract TextResponseFormat.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static TextResponseFormat fromJson(String jsonString)
      Deserializes a JSON string to a TextResponseFormat object.