ExAgent.Message.Response (ExAgent v0.1.0)

Copy Markdown View Source

A message returned by the model.

Summary

Functions

True if the response contains no tool calls and no text.

Concatenate all TextPart contents of the response.

All ToolCall parts in order.

Types

part()

t()

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

Functions

empty?(resp)

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

True if the response contains no tool calls and no text.

text(response)

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

Concatenate all TextPart contents of the response.

tool_calls(response)

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

All ToolCall parts in order.