Gemini.Types.Part (GeminiEx v0.2.1)

View Source

Part type for content in Gemini API.

Summary

Types

Inline data (base64 encoded).

t()

Text content.

Functions

Create a blob part with raw data and MIME type.

Create a part from a file path.

Create an inline data part with base64 encoded data.

Create a text part.

Types

inline_data()

@type inline_data() :: Gemini.Types.Blob.t() | nil

Inline data (base64 encoded).

t()

@type t() :: %Gemini.Types.Part{
  function_call: Altar.ADM.FunctionCall.t() | nil,
  inline_data: Gemini.Types.Blob.t() | nil,
  text: String.t() | nil
}

text_content()

@type text_content() :: String.t() | nil

Text content.

Functions

blob(data, mime_type)

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

Create a blob part with raw data and MIME type.

file(path)

@spec file(String.t()) :: t()

Create a part from a file path.

inline_data(data, mime_type)

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

Create an inline data part with base64 encoded data.

text(text)

@spec text(String.t()) :: t()

Create a text part.