class Chat implements AgentInput

Methods

__construct(array $input)

Create a chat input.

message()

Get the newest user message, if the input contains one.

Decisions|null
decisions()

Get the tool approval decisions the input resumes an interrupted run with, if it contains any.

array
history()

Get every turn before the one this input resolves to.

protocol()

Get the stream protocol that reports the input's thread and run identity.

string
threadId()

Get the ID of the thread the run belongs to.

string
runId()

Get the ID of the run.

array
messages()

Get the AG-UI messages the input was created from.

array|null
trailingUserMessage()

Get the newest message when it is a user message.

array
array(string $key)

Get the given input key as an array.

string
string(string $key)

Get the given input key as a string.

Details

at line 20
__construct(array $input)

Create a chat input.

Parameters

array $input

at line 27
UserMessage|null message()

Get the newest user message, if the input contains one.

Return Value

UserMessage|null

at line 43
Decisions|null decisions()

Get the tool approval decisions the input resumes an interrupted run with, if it contains any.

Return Value

Decisions|null

at line 53
array history()

Get every turn before the one this input resolves to.

Return Value

array

at line 65
AgentUserInteractionProtocol protocol()

Get the stream protocol that reports the input's thread and run identity.

at line 79
string threadId()

Get the ID of the thread the run belongs to.

Return Value

string

at line 87
string runId()

Get the ID of the run.

Return Value

string

at line 97
protected array messages()

Get the AG-UI messages the input was created from.

Return Value

array

at line 107
protected array|null trailingUserMessage()

Get the newest message when it is a user message.

Return Value

array|null

at line 121
protected array array(string $key)

Get the given input key as an array.

Parameters

string $key

Return Value

array

at line 131
protected string string(string $key)

Get the given input key as a string.

Parameters

string $key

Return Value

string