PtcLlmHttp.Response (PtcLlmHttp v0.1.0)

Copy Markdown View Source

Normalized non-streaming response.

Content and usage are available only through explicit accessors. Inspection never exposes model output or provider facts.

Summary

Functions

Returns the normalized assistant text.

Returns bounded numeric transport metadata.

Returns normalized function-tool calls in provider order.

Returns provider-reported usage, or nil when it was optional and absent.

Types

t()

@opaque t()

Functions

content(response)

@spec content(t()) :: binary()

Returns the normalized assistant text.

metadata(response)

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

Returns bounded numeric transport metadata.

tool_calls(response)

@spec tool_calls(t()) :: [PtcLlmHttp.ToolCall.t()]

Returns normalized function-tool calls in provider order.

usage(response)

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

Returns provider-reported usage, or nil when it was optional and absent.