A Messages API response.
The fields mirror the API's JSON with string keys.
body holds the complete decoded body, including fields Jibu does not lift.
Summary
Functions
Decodes the text of a structured output as JSON.
Returns the text of all text blocks, joined without a separator.
Types
Functions
@spec json(t()) :: {:ok, term()} | {:error, Jibu.Error.t()}
Decodes the text of a structured output as JSON.
A refusal returns an error instead of a result.
Output cut off at max_tokens or at the context window returns an error, never partial JSON.
See the structured output guide.
Returns the text of all text blocks, joined without a separator.