pub struct AgentBuilder<H: HttpClient> { /* private fields */ }Expand description
Fluent constructor for DeepSeekAgent. Mirrors the pre-port API.
Implementations§
Source§impl<H: HttpClient> AgentBuilder<H>
impl<H: HttpClient> AgentBuilder<H>
pub fn new( http: H, api_key: impl Into<String>, model: impl Into<String>, ) -> Self
pub fn preamble(self, p: &str) -> Self
pub fn tool(self, t: impl Tool + 'static) -> Self
Sourcepub fn base_url(self, url: &str) -> Self
pub fn base_url(self, url: &str) -> Self
Back-compat: callers historically passed the https://api.deepseek.com
host (no /v1). The loop appends /v1/chat/completions itself, so we
store both shapes.
pub fn worker_id(self, id: impl Into<String>) -> Self
Sourcepub fn options(self, opts: RunOptions) -> Self
pub fn options(self, opts: RunOptions) -> Self
Override the full RunOptions for advanced control (max_turns,
permission mode, hooks, etc.). Settings that overlap with the legacy
builder methods (base_url, model) are kept in sync.
pub fn build(self) -> DeepSeekAgent<H>
Auto Trait Implementations§
impl<H> Freeze for AgentBuilder<H>where
H: Freeze,
impl<H> !RefUnwindSafe for AgentBuilder<H>
impl<H> Send for AgentBuilder<H>where
H: Send,
impl<H> Sync for AgentBuilder<H>where
H: Sync,
impl<H> Unpin for AgentBuilder<H>where
H: Unpin,
impl<H> UnsafeUnpin for AgentBuilder<H>where
H: UnsafeUnpin,
impl<H> !UnwindSafe for AgentBuilder<H>
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