Skip to contents

An S3 class representing the full response from a single prompt. Returned internally by HalClient's prompt() method and used by HalChat.

Usage

# S3 method for class 'hal_response'
print(x, ...)

Arguments

x

A hal_response object.

...

Ignored.

Value

The print() method returns x invisibly. hal_response objects are created internally by the transport clients.

Fields

text

Character: the full response text.

stop_reason

Character: why the model stopped (e.g., "end_turn", "interrupted").

tool_calls

List of hal_tool_call objects.

thoughts

Character vector of agent thought text.

events

List of raw session/update events.