pub struct FoundryAgentBuilder { /* private fields */ }Expand description
Builds a FoundryAgent from a FoundryChatClient plus the pieces of
a PromptAgentDefinition (name/instructions/model/tools).
Implementations§
Source§impl FoundryAgentBuilder
impl FoundryAgentBuilder
Sourcepub fn name(self, name: impl Into<String>) -> Self
pub fn name(self, name: impl Into<String>) -> Self
Set the agent’s name (default: the client’s configured model name).
Sourcepub fn model(self, model: impl Into<String>) -> Self
pub fn model(self, model: impl Into<String>) -> Self
Override the model deployment (default: the client’s configured model).
Sourcepub fn instructions(self, instructions: impl Into<String>) -> Self
pub fn instructions(self, instructions: impl Into<String>) -> Self
Set the system prompt / instructions.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set a human-readable description of what the agent does.
Sourcepub fn tool(self, tool: ToolDefinition) -> Self
pub fn tool(self, tool: ToolDefinition) -> Self
Add one tool.
Sourcepub fn tools(self, tools: impl IntoIterator<Item = ToolDefinition>) -> Self
pub fn tools(self, tools: impl IntoIterator<Item = ToolDefinition>) -> Self
Add several tools.
Sourcepub fn build(self) -> FoundryAgent
pub fn build(self) -> FoundryAgent
Build the FoundryAgent.
Auto Trait Implementations§
impl !RefUnwindSafe for FoundryAgentBuilder
impl !UnwindSafe for FoundryAgentBuilder
impl Freeze for FoundryAgentBuilder
impl Send for FoundryAgentBuilder
impl Sync for FoundryAgentBuilder
impl Unpin for FoundryAgentBuilder
impl UnsafeUnpin for FoundryAgentBuilder
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