Agentix.Provider.Stream (Agentix v0.1.0)

Copy Markdown View Source

A normalized streaming handle.

  • chunks — an Enumerable of ReqLLM.StreamChunk (:content / :thinking / :tool_call / :meta) the agent forwards as live deltas.
  • cancel — a 0-arity closure that aborts the stream and frees resources.
  • finalize — a 0-arity closure returning {assembled_message, usage}; call it after chunks has been fully consumed.

Summary

Types

t()

@type t() :: %Agentix.Provider.Stream{
  cancel: (-> :ok),
  chunks: Enumerable.t(),
  finalize: (-> {ReqLLM.Message.t(), map()})
}