ReqLLM.Response.OutputItem (ReqLLM v1.19.0)

View Source

A computed, canonical view of one value produced by a model call.

Output items are projections over values already retained by ReqLLM.Response; they are not stored on the response and do not change its serialization. The data field contains the existing value, such as text, a ReqLLM.Message.ContentPart, or a ReqLLM.ToolCall.

Summary

Functions

Returns the stable result channel for an output item.

Returns all stable output channels in display order.

Returns the Zoi schema for output item projections.

Types

channel()

@type channel() ::
  :message
  | :reasoning
  | :tools
  | :media
  | :sources
  | :annotations
  | :refusals
  | :provider

t()

@type t() :: %ReqLLM.Response.OutputItem{
  data: nil | any(),
  metadata: map(),
  type:
    :text
    | :thinking
    | :image
    | :image_url
    | :video_url
    | :file
    | :tool_call
    | :source
    | :annotation
    | :refusal
    | :provider_item
}

Functions

channel(output_item)

@spec channel(t()) :: channel()

Returns the stable result channel for an output item.

channels()

@spec channels() :: [channel()]

Returns all stable output channels in display order.

schema()

Returns the Zoi schema for output item projections.