pub struct Config {
pub provider: ProviderConfig,
pub update: UpdateConfig,
/* private fields */
}Fields§
§provider: ProviderConfig§update: UpdateConfigImplementations§
Source§impl Config
impl Config
Sourcepub fn init_user_config(layout: &Layout) -> Result<PathBuf>
pub fn init_user_config(layout: &Layout) -> Result<PathBuf>
Write a starter config.toml into the instance unless it has one, and
return its path.
Source§impl Config
impl Config
Sourcepub fn load(
layout: &Layout,
workspace: &Path,
overrides: ConfigOverrides,
) -> Result<Self>
pub fn load( layout: &Layout, workspace: &Path, overrides: ConfigOverrides, ) -> Result<Self>
The configuration a session started in workspace of the instance at
layout runs with.
Sourcepub fn load_user(layout: &Layout, overrides: ConfigOverrides) -> Result<Self>
pub fn load_user(layout: &Layout, overrides: ConfigOverrides) -> Result<Self>
Load without a project layer, for settings that project configuration
can never set (such as [agents]), so the caller’s directory is irrelevant.
Sourcepub fn settings_with_origins(
layout: &Layout,
workspace: Option<&Path>,
overrides: &ConfigOverrides,
) -> Result<Vec<Setting>>
pub fn settings_with_origins( layout: &Layout, workspace: Option<&Path>, overrides: &ConfigOverrides, ) -> Result<Vec<Setting>>
Every leaf setting after layering, as a session started in
workspace would see it, with the layer that set it. Secret values are
replaced by <hidden>. Channel accounts are left out: scv config show reports them with their credentials.
Source§impl Config
impl Config
Sourcepub fn hosted_web_search(&self) -> bool
pub fn hosted_web_search(&self) -> bool
Whether to offer the provider’s hosted web search to tool-enabled sessions.
pub fn adapters(&self) -> HashMap<String, AgentAdapterConfig>
Sourcepub fn layout(&self) -> Layout
pub fn layout(&self) -> Layout
The paths under this instance’s home. It does not know whether the
instance is the default one, so take the service unit name from the
Layout the process resolved instead.