#[non_exhaustive]pub struct LocalChatSettings { /* private fields */ }Expand description
Settings of a LocalChat: tool mode, the temperature used when a
request has none, the sampling seed, whether end of text is banned
and an optional minimum confidence. Defaults are plan rows S18 to S22.
Implementations§
Source§impl LocalChatSettings
impl LocalChatSettings
Sourcepub fn with_tool_mode(self, tool_mode: ToolMode) -> Self
pub fn with_tool_mode(self, tool_mode: ToolMode) -> Self
Sets whether the model may answer in text when tools are offered.
Required asks for exactly one tool call.
Default Auto.
Sourcepub fn with_default_temperature(self, temperature: f64) -> Self
pub fn with_default_temperature(self, temperature: f64) -> Self
Sets the temperature used when a request has none (0 to 2). Values outside the range are clamped. Default 0.7.
Sourcepub fn with_seed(self, seed: u32) -> Self
pub fn with_seed(self, seed: u32) -> Self
Sets the sampling seed, so runs repeat for the same input.
Input: any u32.
Default 0x5452_4B54.
Sourcepub fn with_ban_eos(self, ban_eos: bool) -> Self
pub fn with_ban_eos(self, ban_eos: bool) -> Self
Bans end of text, so generation runs to max_tokens.
Only for fixed-length runs such as benchmarks and kill tests.
Default false.
Sourcepub fn with_min_confidence(self, min_confidence: Option<f64>) -> Self
pub fn with_min_confidence(self, min_confidence: Option<f64>) -> Self
Sets the minimum confidence (geometric mean token probability,
0 to 1) below which a call fails with a Server error a router
may fall back on. While set, a streamed reply is held and sent only
after it passes. Default None (off: one softmax per token).
Sourcepub fn default_temperature(&self) -> f64
pub fn default_temperature(&self) -> f64
Returns the temperature used when a request has none. Input: none. Default 0.7.
Sourcepub fn ban_eos(&self) -> bool
pub fn ban_eos(&self) -> bool
Returns whether end of text is banned. Input: none. Default false.
Sourcepub fn min_confidence(&self) -> Option<f64>
pub fn min_confidence(&self) -> Option<f64>
Returns the minimum confidence, or None when off.
Input: none.
Default None.