Gemini.Types.Blob (GeminiEx v0.2.1)

View Source

Binary data with MIME type for Gemini API.

Summary

Types

Base64 encoded binary data.

MIME type of the data.

t()

Functions

Create a blob from a file path.

Create a new blob with base64 encoded data.

Types

blob_data()

@type blob_data() :: String.t()

Base64 encoded binary data.

mime_type()

@type mime_type() :: String.t()

MIME type of the data.

t()

@type t() :: %Gemini.Types.Blob{data: String.t(), mime_type: String.t()}

Functions

from_file(file_path)

@spec from_file(String.t()) :: {:ok, t()} | {:error, Gemini.Error.t()}

Create a blob from a file path.

new(data, mime_type)

@spec new(String.t(), String.t()) :: t()

Create a new blob with base64 encoded data.