pub struct CreateMessageParams {
pub messages: Vec<SamplingMessage>,
pub model_preferences: Option<ModelPreferences>,
pub system_prompt: Option<String>,
pub include_context: Option<IncludeContext>,
pub temperature: Option<f64>,
pub max_tokens: i64,
pub stop_sequences: Option<Vec<String>>,
pub metadata: Option<Value>,
}Fields§
§messages: Vec<SamplingMessage>§model_preferences: Option<ModelPreferences>The server’s preferences for which model to select. The client MAY ignore these preferences.
system_prompt: Option<String>An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
include_context: Option<IncludeContext>A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
temperature: Option<f64>§max_tokens: i64The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.
stop_sequences: Option<Vec<String>>§metadata: Option<Value>Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
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 (const: unstable) · 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 UnsafeUnpin 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