class AssistantMessage extends Message

Properties

MessageRole $role

The message role.

from  Message
string|null $content

The message content.

from  Message
ToolCall> $toolCalls
array<array-key, mixed> $replayBlocks

Raw provider replay state populated by the SDK's response parser.

string|null $replayBlocksProvider

The provider the replay state belongs to, or null when it was produced within the current run.

Methods

__construct(string|null $content, Collection|null $toolCalls = null, array $replayBlocks = [], string|null $replayBlocksProvider = null)

Create a new text conversation message instance.

static Message
tryFrom(mixed $message)

Attempt to create a new message instance from the given value.

from  Message

Details

at line 33
__construct(string|null $content, Collection|null $toolCalls = null, array $replayBlocks = [], string|null $replayBlocksProvider = null)

Create a new text conversation message instance.

Parameters

string|null $content
Collection|null $toolCalls
array $replayBlocks
string|null $replayBlocksProvider

in Message at line 36
static Message tryFrom(mixed $message)

Attempt to create a new message instance from the given value.

Parameters

mixed $message

Return Value

Message