final | |
|---|---|
readonly | |
extends |
JsonRpcRequest<'sampling/createMessage'> |
implements |
ServerRequest |
A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.
| Methods | ||
|---|---|---|
public
|
__construct(RequestId $id, CreateMessageRequestParams $params)
|
# |
public
static
|
getMethod(): string
|
# |
public
static
|
fromArray(array $data): static
|
# |
| Methods inherited from Nexus\Mcp\Core\Schema\JsonRpc\JsonRpcRequest |
|---|
toArray(), jsonSerialize() |
| Constants inherited from Nexus\Mcp\Core\Schema\JsonRpc\JsonRpcMessage |
|---|
|
| Properties | |||
|---|---|---|---|
public
readonly
|
CreateMessageRequestParams
|
$params
|
# |
| Properties inherited from Nexus\Mcp\Core\Schema\JsonRpc\JsonRpcRequest |
|---|
$id |