pub struct Agent { /* private fields */ }Implementations§
Source§impl Agent
impl Agent
pub fn validate(&self, config: &SwarmConfig) -> SwarmResult<()>
Source§impl Agent
impl Agent
pub fn new( name: impl Into<String>, model: impl Into<String>, instructions: Instructions, ) -> SwarmResult<Self>
pub fn with_functions(self, functions: Vec<AgentFunction>) -> Self
pub fn with_function_call_policy( self, function_call: FunctionCallPolicy, ) -> Self
pub fn with_tool_call_execution( self, parallel_tool_calls: ToolCallExecution, ) -> Self
pub fn with_expected_response_fields( self, expected_response_fields: Vec<String>, ) -> SwarmResult<Self>
pub fn name(&self) -> &str
pub fn model(&self) -> &str
pub fn instructions(&self) -> &Instructions
pub fn functions(&self) -> &[AgentFunction]
pub fn function_call(&self) -> &FunctionCallPolicy
pub fn tool_call_execution(&self) -> ToolCallExecution
pub fn expected_response_fields(&self) -> &[String]
pub fn capabilities(&self) -> &[String]
pub fn has_capability(&self, cap: &str) -> bool
pub fn agent_ref(&self) -> AgentRef
pub fn with_capabilities(self, capabilities: Vec<String>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Agent
impl<'de> Deserialize<'de> for Agent
Source§fn deserialize<D>(deserializer: D) -> Result<Agent, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Agent, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Agent
impl !RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
impl !UnwindSafe for Agent
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