pub struct CreateMessageRequest {
pub method: SamplingCreateMessageMethod,
pub params: CreateMessageRequestParams,
}Deprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Expand description
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.
Fieldsยง
ยงmethod: SamplingCreateMessageMethodDeprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
params: CreateMessageRequestParamsDeprecated as of protocol version 2026-07-28 (SEP-2577). Remains in the specification for at least twelve months; see the deprecated features registry.
Implementationsยง
Sourceยงimpl CreateMessageRequest
impl CreateMessageRequest
Sourcepub fn new(params: CreateMessageRequestParams) -> Self
pub fn new(params: CreateMessageRequestParams) -> Self
Creates a value from its required fields; optional fields are None.