pub struct Config {
pub default_model: String,
pub providers: BTreeMap<String, ProviderConfig>,
pub models: BTreeMap<String, ModelProfile>,
pub ui: UiConfig,
pub tools: ToolsConfig,
pub context: ContextConfig,
pub session: SessionConfig,
}Fields§
§default_model: String§providers: BTreeMap<String, ProviderConfig>§models: BTreeMap<String, ModelProfile>§ui: UiConfig§tools: ToolsConfig§context: ContextConfig§session: SessionConfigImplementations§
Source§impl Config
impl Config
pub fn ensure_user_config(home: &Path) -> Result<Option<PathBuf>>
pub fn load_from(cwd: &Path, home: &Path) -> Result<Self>
pub fn load(cwd: &Path) -> Result<Self>
pub fn model_names(&self) -> Vec<&str>
pub fn resolve_model( &self, name: Option<&str>, effort_override: Option<&str>, ) -> Result<ModelSelection>
pub fn resolve_session_model( &self, profile: Option<&str>, provider_type: &str, model: &str, effort: Option<&str>, ) -> Result<ModelSelection>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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