class StepResponse implements Arrayable, JsonSerializable

Traits

Properties

Response|null $raw

The raw HTTP response, if available for the provider.

from  HasRawResponse

Methods

withRawResponse(Response|null $response)

Set the raw HTTP response.

array
__serialize()

Prepare the instance for serialization, discarding the unserializable raw HTTP response.

__construct(string $text, array $toolCalls, FinishReason $finishReason, TextUsage $usage, Meta $meta, array|null $structured = null, string|null $continuationToken = null, array $replayBlocks = [], array $pendingApprovals = [], string $reasoning = '', array $providerToolCalls = [])

Create a response for one generation step.

array
toArray()

Get the instance as an array.

array
jsonSerialize()

Get the JSON serializable representation of the instance.

Details

in HasRawResponse at line 19
HasRawResponse withRawResponse(Response|null $response)

Set the raw HTTP response.

Parameters

Response|null $response

Return Value

HasRawResponse

in HasRawResponse at line 29
array __serialize()

Prepare the instance for serialization, discarding the unserializable raw HTTP response.

Return Value

array

at line 30
__construct(string $text, array $toolCalls, FinishReason $finishReason, TextUsage $usage, Meta $meta, array|null $structured = null, string|null $continuationToken = null, array $replayBlocks = [], array $pendingApprovals = [], string $reasoning = '', array $providerToolCalls = [])

Create a response for one generation step.

Parameters

string $text
array $toolCalls
FinishReason $finishReason
TextUsage $usage
Meta $meta
array|null $structured
string|null $continuationToken
array $replayBlocks
array $pendingApprovals
string $reasoning
array $providerToolCalls

at line 48
array toArray()

Get the instance as an array.

Return Value

array

at line 66
array jsonSerialize()

Get the JSON serializable representation of the instance.

Return Value

array