final | |
|---|---|
readonly | |
implements |
Arrayable<array{content: (template-type<AudioContent, Arrayable, 'T'>|template-type<EmbeddedResource, Arrayable, 'T'>|template-type<ImageContent, Arrayable, 'T'>|template-type<ResourceLink, Arrayable, 'T'>|template-type<TextContent, Arrayable, 'T'>), role: ('assistant'|'user')}> |
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, AudioContent|EmbeddedResource|ImageContent|ResourceLink|TextContent $content)
|
# |
public
static
|
fromArray(array<string, mixed> $data): static
|
# |
public
|
toArray(): array
|
# |
public
|
jsonSerialize(): array
|
# |
| Properties | |||
|---|---|---|---|
public
|
Role
|
$role
|
# |
public
|
AudioContent|EmbeddedResource|ImageContent|ResourceLink|TextContent
|
$content
|
# |