pub struct AgentServerBuilder<'a> { /* private fields */ }Expand description
Builder for configuring and launching an AgentServer.
Builder for creating an AgentServer.
Implementations§
Source§impl<'a> AgentServerBuilder<'a>
impl<'a> AgentServerBuilder<'a>
Sourcepub fn new(
port: u16,
provider: Providers,
system_message: &'a str,
model: &'a str,
) -> Self
pub fn new( port: u16, provider: Providers, system_message: &'a str, model: &'a str, ) -> Self
Creates a new AgentServerBuilder with the given port, provider, system message, and model.
Sourcepub fn temperature(self, temperature: f64) -> Self
pub fn temperature(self, temperature: f64) -> Self
Sets the temperature for the provider.
Sourcepub fn max_tokens(self, max_tokens: u64) -> Self
pub fn max_tokens(self, max_tokens: u64) -> Self
Sets the maximum number of tokens for the provider.
Sourcepub fn build(self) -> Result<AgentServer, Error>
pub fn build(self) -> Result<AgentServer, Error>
Builds the AgentServer with the given configuration.
Sourcepub fn build_with_schema<J: JsonSchema>(self) -> Result<AgentServer, Error>
pub fn build_with_schema<J: JsonSchema>(self) -> Result<AgentServer, Error>
Builds the AgentServer with the given configuration and schema.
Sourcepub fn build_with_tool<T: Tool + 'static>(
self,
tool: ToolWrapper<T>,
) -> Result<AgentServer, Error>
pub fn build_with_tool<T: Tool + 'static>( self, tool: ToolWrapper<T>, ) -> Result<AgentServer, Error>
Builds the AgentServer with the given configuration and tool.
Auto Trait Implementations§
impl<'a> Freeze for AgentServerBuilder<'a>
impl<'a> RefUnwindSafe for AgentServerBuilder<'a>
impl<'a> Send for AgentServerBuilder<'a>
impl<'a> Sync for AgentServerBuilder<'a>
impl<'a> Unpin for AgentServerBuilder<'a>
impl<'a> UnsafeUnpin for AgentServerBuilder<'a>
impl<'a> UnwindSafe for AgentServerBuilder<'a>
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