pub struct AgentEngine { /* private fields */ }Expand description
Generic engine that builds a BamlRegistry from AgentConfig.
Implementations§
Source§impl AgentEngine
impl AgentEngine
pub fn new(config: AgentConfig) -> Self
Sourcepub fn build_registry<R: BamlRegistry>(&self) -> Result<R, String>
pub fn build_registry<R: BamlRegistry>(&self) -> Result<R, String>
Build a BAML ClientRegistry from the agent config.
Iterates all providers, sets options (model, base_url, location, project_id, api_key), and sets the primary client.
pub fn config(&self) -> &AgentConfig
Auto Trait Implementations§
impl Freeze for AgentEngine
impl RefUnwindSafe for AgentEngine
impl Send for AgentEngine
impl Sync for AgentEngine
impl Unpin for AgentEngine
impl UnsafeUnpin for AgentEngine
impl UnwindSafe for AgentEngine
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