pub struct ChatBackendSelectionConfig {
pub criteria: SelectionCriteria,
pub provider_override: Option<String>,
}Expand description
Contract-level configuration for selecting a chat backend.
This type is pure selection input. It does not instantiate providers, inspect API keys, or import adapter crates. Runtimes and products may build it from config/env, then pass it to an adapter registry supplied by the host.
Fields§
§criteria: SelectionCriteria§provider_override: Option<String>Implementations§
Source§impl ChatBackendSelectionConfig
impl ChatBackendSelectionConfig
pub fn with_criteria(self, criteria: SelectionCriteria) -> Self
pub fn with_provider_override(self, provider: impl Into<String>) -> Self
Sourcepub fn from_env() -> Result<Self, ChatBackendSelectionConfigError>
pub fn from_env() -> Result<Self, ChatBackendSelectionConfigError>
Build selection config from the conventional Converge LLM environment.
This only parses typed selection inputs. Provider availability and API key inspection stay in adapter or product assembly.
§Errors
Returns an error when an environment variable has an unsupported value.
Trait Implementations§
Source§impl Clone for ChatBackendSelectionConfig
impl Clone for ChatBackendSelectionConfig
Source§fn clone(&self) -> ChatBackendSelectionConfig
fn clone(&self) -> ChatBackendSelectionConfig
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 ChatBackendSelectionConfig
impl Debug for ChatBackendSelectionConfig
Source§impl Default for ChatBackendSelectionConfig
impl Default for ChatBackendSelectionConfig
Source§impl<'de> Deserialize<'de> for ChatBackendSelectionConfig
impl<'de> Deserialize<'de> for ChatBackendSelectionConfig
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 ChatBackendSelectionConfig
impl PartialEq for ChatBackendSelectionConfig
Source§fn eq(&self, other: &ChatBackendSelectionConfig) -> bool
fn eq(&self, other: &ChatBackendSelectionConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChatBackendSelectionConfig
Auto Trait Implementations§
impl Freeze for ChatBackendSelectionConfig
impl RefUnwindSafe for ChatBackendSelectionConfig
impl Send for ChatBackendSelectionConfig
impl Sync for ChatBackendSelectionConfig
impl Unpin for ChatBackendSelectionConfig
impl UnsafeUnpin for ChatBackendSelectionConfig
impl UnwindSafe for ChatBackendSelectionConfig
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