pub struct LocalModelConfig {
pub enabled: bool,
pub base_url: String,
pub model: String,
}Expand description
Configuration for a local OpenAI-compatible model server (Ollama, LM Studio, llama.cpp’s server, etc.).
Why: callers want a single struct they can deserialize from config files
and pass to auto_detect_local_provider without juggling defaults.
What: holds an enable flag, the server’s base URL (no trailing slash),
and the default model to request. Defaults target Ollama’s standard
localhost binding.
Test: local_model_config_defaults asserts the default values.
Fields§
§enabled: bool§base_url: String§model: StringTrait Implementations§
Source§impl Clone for LocalModelConfig
impl Clone for LocalModelConfig
Source§fn clone(&self) -> LocalModelConfig
fn clone(&self) -> LocalModelConfig
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 LocalModelConfig
impl Debug for LocalModelConfig
Source§impl Default for LocalModelConfig
impl Default for LocalModelConfig
Source§impl<'de> Deserialize<'de> for LocalModelConfig
impl<'de> Deserialize<'de> for LocalModelConfig
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
Auto Trait Implementations§
impl Freeze for LocalModelConfig
impl RefUnwindSafe for LocalModelConfig
impl Send for LocalModelConfig
impl Sync for LocalModelConfig
impl Unpin for LocalModelConfig
impl UnsafeUnpin for LocalModelConfig
impl UnwindSafe for LocalModelConfig
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