pub struct ModelSettings {Show 19 fields
pub max_tokens: Option<u32>,
pub temperature: Option<f64>,
pub top_p: Option<f64>,
pub top_k: Option<u32>,
pub timeout_ms: Option<u64>,
pub parallel_tool_calls: Option<bool>,
pub tool_choice: Option<ToolChoice>,
pub seed: Option<u64>,
pub stop_sequences: Vec<String>,
pub presence_penalty: Option<f64>,
pub frequency_penalty: Option<f64>,
pub logit_bias: BTreeMap<String, i32>,
pub thinking: Option<ThinkingSettings>,
pub service_tier: Option<ServiceTier>,
pub provider_replay: Option<ProviderReplaySettings>,
pub provider_settings: ProviderSettings,
pub provider_options: Option<Value>,
pub extra_headers: BTreeMap<String, String>,
pub extra_body: Map<String, Value>,
}Expand description
Per-request generation configuration.
Fields§
§max_tokens: Option<u32>Maximum generated tokens.
temperature: Option<f64>Sampling temperature.
top_p: Option<f64>Nucleus sampling.
top_k: Option<u32>Top-k sampling.
timeout_ms: Option<u64>Request timeout in milliseconds.
This is the Rust transport-friendly representation of a cross-provider
timeout model setting.
parallel_tool_calls: Option<bool>Allow multiple tool calls in one response.
tool_choice: Option<ToolChoice>Tool forcing or availability policy.
seed: Option<u64>Best-effort deterministic seed.
stop_sequences: Vec<String>Stop strings.
presence_penalty: Option<f64>Presence penalty.
frequency_penalty: Option<f64>Frequency penalty.
logit_bias: BTreeMap<String, i32>Token-level logit bias.
thinking: Option<ThinkingSettings>Reasoning or thinking controls.
service_tier: Option<ServiceTier>Latency/cost tier.
provider_replay: Option<ProviderReplaySettings>Provider replay and server-side state controls.
provider_settings: ProviderSettingsTyped provider-specific settings.
provider_options: Option<Value>Provider-specific raw settings escape hatch.
extra_headers: BTreeMap<String, String>Request headers merged after adapter defaults and before request-level overrides.
extra_body: Map<String, Value>Extra JSON object merged into the top-level request body.
Implementations§
Source§impl ModelSettings
impl ModelSettings
Trait Implementations§
Source§impl Clone for ModelSettings
impl Clone for ModelSettings
Source§fn clone(&self) -> ModelSettings
fn clone(&self) -> ModelSettings
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 ModelSettings
impl Debug for ModelSettings
Source§impl Default for ModelSettings
impl Default for ModelSettings
Source§fn default() -> ModelSettings
fn default() -> ModelSettings
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelSettings
impl<'de> Deserialize<'de> for ModelSettings
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 ModelSettings
impl PartialEq for ModelSettings
Source§impl Serialize for ModelSettings
impl Serialize for ModelSettings
impl StructuralPartialEq for ModelSettings
Auto Trait Implementations§
impl Freeze for ModelSettings
impl RefUnwindSafe for ModelSettings
impl Send for ModelSettings
impl Sync for ModelSettings
impl Unpin for ModelSettings
impl UnsafeUnpin for ModelSettings
impl UnwindSafe for ModelSettings
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