final | |
|---|---|
readonly | |
extends |
Result<array{_meta?: array<string, mixed>, role: ('assistant'|'user'), content: template-type<AudioContent|ImageContent|TextContent, Arrayable, 'T'>, model: non-empty-string, stopReason?: non-empty-string}> |
implements |
ClientResult |
The client's response to a sampling/create_message request from the server. The client should inform the
user before returning the sampled message, to allow them to inspect the response (human in the loop) and
decide whether to allow the server to see it.
| Methods | ||
|---|---|---|
public
|
__construct(
Role $role,
AudioContent|ImageContent|TextContent $content,
non-empty-string $model,
null|non-empty-string $stopReason = null,
?array $meta = null,
)
|
# |
public
|
toArray(): array
|
# |
| Methods inherited from Nexus\Mcp\Schema\Result\Result |
|---|
jsonSerialize() |
| Properties | |||
|---|---|---|---|
public
|
Role
|
$role
|
# |
public
|
AudioContent|ImageContent|TextContent
|
$content
|
# |
public
|
non-empty-string
|
$model
|
# |
public
|
null|non-empty-string
|
$stopReason
|
# |
| Properties inherited from Nexus\Mcp\Schema\Result\Result |
|---|
$meta |