pub struct CreateMessageParams {
pub messages: Vec<SamplingMessage>,
pub model_preferences: Option<ModelPreferences>,
pub system_prompt: Option<String>,
pub include_context: Option<String>,
pub temperature: Option<f64>,
pub max_tokens: u32,
pub stop_sequences: Option<Vec<String>>,
pub metadata: Option<Value>,
pub tools: Option<Vec<McpToolDefinition>>,
pub tool_choice: Option<ToolChoice>,
pub task: Option<TaskMetadata>,
pub meta: Option<Value>,
}Expand description
Parameters for sampling/createMessage request.
Fields§
§messages: Vec<SamplingMessage>§model_preferences: Option<ModelPreferences>The server’s preferences for which model to select.
system_prompt: Option<String>An optional system prompt the server wants to use for sampling.
include_context: Option<String>A request to include context from one or more MCP servers.
temperature: Option<f64>§max_tokens: u32The requested maximum number of tokens to sample.
stop_sequences: Option<Vec<String>>§metadata: Option<Value>Optional metadata to pass through to the LLM provider.
tools: Option<Vec<McpToolDefinition>>Tools that the model may use during generation.
tool_choice: Option<ToolChoice>Controls how the model uses tools.
task: Option<TaskMetadata>Task metadata if requesting task-augmented execution.
meta: Option<Value>Request metadata.
Trait Implementations§
Source§impl Clone for CreateMessageParams
impl Clone for CreateMessageParams
Source§fn clone(&self) -> CreateMessageParams
fn clone(&self) -> CreateMessageParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateMessageParams
impl Debug for CreateMessageParams
Source§impl<'de> Deserialize<'de> for CreateMessageParams
impl<'de> Deserialize<'de> for CreateMessageParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CreateMessageParams
impl RefUnwindSafe for CreateMessageParams
impl Send for CreateMessageParams
impl Sync for CreateMessageParams
impl Unpin for CreateMessageParams
impl UnwindSafe for CreateMessageParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more