class UserMessage extends Message

Properties

MessageRole $role

The message role.

from  Message
string|null $content

The message content.

from  Message
Collection $attachments

The message's attachments.

Methods

__construct(string|null $content, Collection|array $attachments = [])

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 19
__construct(string|null $content, Collection|array $attachments = [])

Create a new text conversation message instance.

Parameters

string|null $content
Collection|array $attachments

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