pub struct SamplingContext {
pub server_info: Option<ServerContextInfo>,
pub available_tools: Option<Vec<ToolContextInfo>>,
pub available_resources: Option<Vec<ResourceContextInfo>>,
pub conversation_history: Option<Vec<SamplingMessage>>,
pub user_preferences: Option<UserPreferences>,
}Expand description
Context information for sampling requests
Fields§
§server_info: Option<ServerContextInfo>Server information if context is included
available_tools: Option<Vec<ToolContextInfo>>Available tools if context is included
available_resources: Option<Vec<ResourceContextInfo>>Available resources if context is included
conversation_history: Option<Vec<SamplingMessage>>Conversation history if context is included
user_preferences: Option<UserPreferences>User preferences and settings
Trait Implementations§
Source§impl Clone for SamplingContext
impl Clone for SamplingContext
Source§fn clone(&self) -> SamplingContext
fn clone(&self) -> SamplingContext
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 SamplingContext
impl Debug for SamplingContext
Source§impl<'de> Deserialize<'de> for SamplingContext
impl<'de> Deserialize<'de> for SamplingContext
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SamplingContext, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SamplingContext, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SamplingContext
impl Serialize for SamplingContext
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SamplingContext
impl RefUnwindSafe for SamplingContext
impl Send for SamplingContext
impl Sync for SamplingContext
impl Unpin for SamplingContext
impl UnwindSafe for SamplingContext
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