pub struct AgentConfig {
pub default_provider: String,
pub providers: HashMap<String, ProviderConfig>,
}Fields§
§default_provider: String§providers: HashMap<String, ProviderConfig>Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn vertex_from_env() -> Result<Self, AgentConfigError>
pub fn vertex_from_env() -> Result<Self, AgentConfigError>
Create config with Vertex AI defaults from environment.
Reads GOOGLE_CLOUD_PROJECT env var. Returns error if missing.
Sourcepub fn add_provider(&mut self, name: impl Into<String>, config: ProviderConfig)
pub fn add_provider(&mut self, name: impl Into<String>, config: ProviderConfig)
Add or replace a provider.
Sourcepub fn set_vertex_project(&mut self, project_id: &str)
pub fn set_vertex_project(&mut self, project_id: &str)
Set Vertex project_id on all vertex-ai providers.
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 AgentConfig
impl Debug for AgentConfig
Source§impl<'de> Deserialize<'de> for AgentConfig
impl<'de> Deserialize<'de> for AgentConfig
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 AgentConfig
impl RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnsafeUnpin for AgentConfig
impl UnwindSafe for AgentConfig
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