ExAgent.Message.Response (ExAgent v3.0.0)

View Source

A message returned by the model.

Stability — Stable.

Summary

Functions

Citations of the model's original answer, in retained order.

True if the response contains no tool calls or answer text.

Concatenate the answer text in the response.

All ToolCall parts in order.

Types

part()

t()

@type t() :: %ExAgent.Message.Response{
  citations: [ExAgent.Message.Citation.t()],
  continuation: map() | nil,
  finish_reason: atom() | nil,
  model_name: String.t() | nil,
  parts: [part()],
  payload_omitted: term(),
  timestamp: DateTime.t() | nil,
  usage: ExAgent.Message.Usage.t() | nil
}

Functions

citations(response)

(candidate API)
@spec citations(t()) :: [ExAgent.Message.Citation.t()]

Citations of the model's original answer, in retained order.

empty?(resp)

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

True if the response contains no tool calls or answer text.

text(response)

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

Concatenate the answer text in the response.

tool_calls(response)

@spec tool_calls(t()) :: [ExAgent.Message.Part.ToolCall.t()]

All ToolCall parts in order.