ADK.Types.Part (adk_ex v1.1.0)

Copy Markdown View Source

A single part of a Content message.

Parts use a tagged-union style: exactly one of text, function_call, function_response, or inline_data should be set.

Summary

Types

t()

@type t() :: %ADK.Types.Part{
  function_call: ADK.Types.FunctionCall.t() | nil,
  function_response: ADK.Types.FunctionResponse.t() | nil,
  inline_data: ADK.Types.Blob.t() | nil,
  text: String.t() | nil,
  thought: boolean()
}

Functions

function_call?(part)

@spec function_call?(t()) :: boolean()

function_response?(part)

@spec function_response?(t()) :: boolean()

new_function_call(fc)

@spec new_function_call(ADK.Types.FunctionCall.t()) :: t()

new_function_response(fr)

@spec new_function_response(ADK.Types.FunctionResponse.t()) :: t()

new_inline_data(data, mime_type)

@spec new_inline_data(binary(), String.t()) :: t()

new_text(text)

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