Class FunctionResponseBlob

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

public abstract class FunctionResponseBlob extends JsonSerializable
Raw media bytes for function response. Text should not be sent as raw bytes, use the 'text' field.
  • Constructor Details

    • FunctionResponseBlob

      public FunctionResponseBlob()
  • Method Details

    • mimeType

      public abstract Optional<String> mimeType()
      Required. The IANA standard MIME type of the source data.
    • data

      public abstract Optional<byte[]> data()
      Required. Raw bytes.
    • displayName

      public abstract Optional<String> displayName()
      Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API.
    • builder

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

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

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