PtcLlmHttp.StreamHalt (PtcLlmHttp v0.1.0)

Copy Markdown View Source

Terminal facts for a consumer-halted text stream.

Partial generated text is never retained and inspection is redacted.

Summary

Functions

Returns delivered decoded-text byte and chunk counts.

Returns bounded numeric transport metadata observed before halt.

Returns the closed halt reason.

Returns usage observed before the halt, if any.

Returns false; a halted stream never has authoritative terminal usage.

Types

t()

@opaque t()

Functions

delivered(halt)

@spec delivered(t()) :: %{bytes: non_neg_integer(), chunks: non_neg_integer()}

Returns delivered decoded-text byte and chunk counts.

metadata(stream_halt)

@spec metadata(t()) :: map()

Returns bounded numeric transport metadata observed before halt.

reason(stream_halt)

@spec reason(t()) :: :consumer_halted

Returns the closed halt reason.

usage(stream_halt)

@spec usage(t()) :: PtcLlmHttp.Usage.t() | nil

Returns usage observed before the halt, if any.

usage_complete?(stream_halt)

@spec usage_complete?(t()) :: false

Returns false; a halted stream never has authoritative terminal usage.