Mojentic.LLM.GatewayResponse (Mojentic v1.2.0)

Copy Markdown View Source

Represents a response from an LLM gateway.

A response can contain text content, a structured object, and/or tool calls that the LLM wants to execute.

Examples

iex> %GatewayResponse{content: "Hello!"}
%GatewayResponse{content: "Hello!", object: nil, tool_calls: [], thinking: nil}

iex> %GatewayResponse{object: %{"answer" => 42}}
%GatewayResponse{content: nil, object: %{"answer" => 42}, tool_calls: [], thinking: nil}

Summary

Types

t()

@type t() :: %Mojentic.LLM.GatewayResponse{
  content: String.t() | nil,
  object: term() | nil,
  thinking: String.t() | nil,
  tool_calls: [Mojentic.LLM.ToolCall.t()]
}