pub struct CallSettings {
pub max_output_tokens: Option<u32>,
pub temperature: Option<f64>,
pub top_p: Option<f64>,
pub top_k: Option<u32>,
pub presence_penalty: Option<f64>,
pub frequency_penalty: Option<f64>,
pub stop_sequences: Option<Vec<String>>,
pub seed: Option<u64>,
pub reasoning: ReasoningEffort,
pub headers: Headers,
pub provider_options: ProviderOptions,
}Expand description
Sampling and request settings applied to every model call.
Rust types absorb most validation (u32, f64, Vec<String>); the
remaining runtime checks are max_output_tokens >= 1 and finite floats.
Fields§
§max_output_tokens: Option<u32>Maximum number of output tokens.
temperature: Option<f64>Sampling temperature.
top_p: Option<f64>Nucleus sampling.
top_k: Option<u32>Top-k sampling.
presence_penalty: Option<f64>Presence penalty.
frequency_penalty: Option<f64>Frequency penalty.
stop_sequences: Option<Vec<String>>Stop sequences.
seed: Option<u64>Random seed.
reasoning: ReasoningEffortReasoning effort.
headers: HeadersExtra request headers.
provider_options: ProviderOptionsProvider-specific options.
Implementations§
Source§impl CallSettings
impl CallSettings
Sourcepub fn apply(&self, options: &mut CallOptions)
pub fn apply(&self, options: &mut CallOptions)
Copies the settings into options, merging headers and provider
options.
Sourcepub fn merge(&mut self, other: &CallSettings)
pub fn merge(&mut self, other: &CallSettings)
Overlays the set fields of other onto self (used by
prepare_step and default-settings middleware).
Trait Implementations§
Source§impl Clone for CallSettings
impl Clone for CallSettings
Source§fn clone(&self) -> CallSettings
fn clone(&self) -> CallSettings
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 CallSettings
impl Debug for CallSettings
Source§impl Default for CallSettings
impl Default for CallSettings
Source§fn default() -> CallSettings
fn default() -> CallSettings
Returns the “default value” for a type. Read more
Source§impl PartialEq for CallSettings
impl PartialEq for CallSettings
impl StructuralPartialEq for CallSettings
Auto Trait Implementations§
impl Freeze for CallSettings
impl RefUnwindSafe for CallSettings
impl Send for CallSettings
impl Sync for CallSettings
impl Unpin for CallSettings
impl UnsafeUnpin for CallSettings
impl UnwindSafe for CallSettings
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