<T is array<string, mixed>>final | |
|---|---|
readonly | |
implements |
JsonSerializable, Arrayable<array{role: ('assistant'|'user'), content: T}> |
Describes a message returned as part of a prompt. This is similar to SamplingMessage, but also supports the embedding of resources from the MCP server.
| Methods | ||
|---|---|---|
public
|
__construct(Role $role, Arrayable<T>&ContentBlock $content)
|
# |
public
|
toArray(): array
|
# |
public
|
jsonSerialize(): template-type<self<T>, Arrayable, 'T'>
|
# |
| Properties | |||
|---|---|---|---|
public
|
Role
|
$role
|
# |
public
|
Arrayable<T>&ContentBlock
|
$content
|
# |