#[non_exhaustive]pub struct SamplingParams {
pub temperature: Option<f64>,
pub reasoning_effort: Option<String>,
pub max_output_tokens: Option<u64>,
pub parallel_tool_calls: bool,
pub output_schema: Option<Payload>,
pub stop_sequences: Vec<String>,
pub tool_choice: Option<ToolChoice>,
}Expand description
Sampling controls for one model request.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.temperature: Option<f64>Sampling temperature; absent delegates to the provider.
reasoning_effort: Option<String>Provider-neutral reasoning effort label.
max_output_tokens: Option<u64>Maximum generated token count.
parallel_tool_calls: boolWhether parallel tool calls are requested.
output_schema: Option<Payload>Optional structured-output schema bytes.
This constrains the response. Constraining one tool’s arguments is a
per-tool concern and travels in that tool’s
ClientTool::input_schema, which core likewise never parses.
stop_sequences: Vec<String>Ordered generation stop strings.
tool_choice: Option<ToolChoice>Optional tool-selection constraint.
Trait Implementations§
Source§impl Clone for SamplingParams
impl Clone for SamplingParams
Source§impl Debug for SamplingParams
impl Debug 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