final | |
|---|---|
readonly | |
implements |
JsonSerializable, Arrayable<array{role: ('assistant'|'user'), content: template-type<AudioContent|ImageContent|TextContent, Arrayable, 'T'>}> |
Describes a message issued to or received from an LLM API.
| Methods | ||
|---|---|---|
public
|
__construct(Role $role, AudioContent|ImageContent|TextContent $content)
|
# |
public
|
toArray(): array
|
# |
public
|
jsonSerialize(): template-type<self, Arrayable, 'T'>
|
# |
| Properties | |||
|---|---|---|---|
public
|
Role
|
$role
|
# |
public
|
AudioContent|ImageContent|TextContent
|
$content
|
# |