Chat
class Chat implements AgentInput
Methods
Create a chat input.
Get the newest user message, if the input contains one.
Get the tool approval decisions the input resumes an interrupted run with, if it contains any.
Get every turn before the one this input resolves to.
Get the stream protocol that reports the input's thread and run identity.
Get the ID of the thread the run belongs to.
Get the ID of the run.
Get the AG-UI messages the input was created from.
Get the newest message when it is a user message.
Get the given input key as an array.
Get the given input key as a string.
Details
at line 20
__construct(array $input)
Create a chat input.
at line 27
UserMessage|null
message()
Get the newest user message, if the input contains one.
at line 43
Decisions|null
decisions()
Get the tool approval decisions the input resumes an interrupted run with, if it contains any.
at line 53
array
history()
Get every turn before the one this input resolves to.
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.
at line 87
string
runId()
Get the ID of the run.
at line 97
protected array
messages()
Get the AG-UI messages the input was created from.
at line 107
protected array|null
trailingUserMessage()
Get the newest message when it is a user message.
at line 121
protected array
array(string $key)
Get the given input key as an array.
at line 131
protected string
string(string $key)
Get the given input key as a string.