pub struct SamplingParams {
pub max_tokens: Option<u32>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub top_k: Option<u32>,
pub stop_sequences: Vec<String>,
pub thinking: ThinkingConfig,
pub reasoning_effort: Option<ReasoningEffort>,
}Expand description
Sampling parameters.
Fields§
§max_tokens: Option<u32>§temperature: Option<f32>§top_p: Option<f32>§top_k: Option<u32>§stop_sequences: Vec<String>§thinking: ThinkingConfig§reasoning_effort: Option<ReasoningEffort>The reasoning_effort level in the OpenAI-compatible protocol. When Some(_),
the codec writes it directly to the wire; when None, the codec falls back to
deriving it from Self::thinking.
This is the runtime authoritative representation of the value — it can be
switched per-session (ACP session/set_config_option, category=ThoughtLevel). The
config layer has its own defect_config::ReasoningEffort for deserialization,
which is converted into this enum during assembly and placed into the initial
SamplingParams. Providers that do not support this concept should ignore this
field.
Trait Implementations§
Source§impl Clone for SamplingParams
impl Clone for SamplingParams
Source§fn clone(&self) -> SamplingParams
fn clone(&self) -> SamplingParams
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 SamplingParams
impl Debug for SamplingParams
Source§impl Default for SamplingParams
impl Default for SamplingParams
Source§fn default() -> SamplingParams
fn default() -> SamplingParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SamplingParams
impl<'de> Deserialize<'de> for SamplingParams
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
Source§impl PartialEq for SamplingParams
impl PartialEq for SamplingParams
Source§fn eq(&self, other: &SamplingParams) -> bool
fn eq(&self, other: &SamplingParams) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SamplingParams
impl Serialize for SamplingParams
impl StructuralPartialEq for SamplingParams
Auto Trait Implementations§
impl Freeze for SamplingParams
impl RefUnwindSafe for SamplingParams
impl Send for SamplingParams
impl Sync for SamplingParams
impl Unpin for SamplingParams
impl UnsafeUnpin for SamplingParams
impl UnwindSafe for SamplingParams
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