LlmCall.Operation (llm_call v0.1.0)

Copy Markdown View Source

A long-running media generation job.

next is the encoded request the caller's transport executes next, built by the codec so the transport needs no knowledge of the protocol's job URL.

  • next_kind: :poll decodes the response body with LlmCall.decode_operation/3.
  • next_kind: :asset means the response body is media bytes; the core never touches them and the caller stores them using next_media_type.

status: :completed is never paired with next_kind: :poll: a codec that knows the asset needs another request says so in the same result.

The core never polls, waits, retries, or downloads.

Summary

Types

status()

@type status() :: :queued | :in_progress | :completed | :failed

t()

@type t() :: %LlmCall.Operation{
  error: LlmCall.Error.t() | nil,
  id: String.t() | nil,
  next: LlmCall.EncodedRequest.t() | nil,
  next_kind: :poll | :asset | nil,
  next_media_type: String.t() | nil,
  progress: 0..100 | nil,
  raw: map() | nil,
  result: LlmCall.Media.Response.t() | nil,
  status: status()
}