pub struct ToolsBuilder { /* private fields */ }Available on non-
target_family=wasm only.Expand description
Builder for the built-in tool selection.
Implementations§
Source§impl ToolsBuilder
impl ToolsBuilder
Sourcepub const fn without_defaults(self) -> Self
pub const fn without_defaults(self) -> Self
Starts from an empty built-in tool set.
Sourcepub const fn workspace(self, enabled: bool) -> Self
pub const fn workspace(self, enabled: bool) -> Self
Enables or disables the standard command, patch, plan, and file tools.
Sourcepub const fn web_search(self, enabled: bool) -> Self
pub const fn web_search(self, enabled: bool) -> Self
Enables or disables the built-in direct web-search tool.
Sourcepub const fn image_generation(self, enabled: bool) -> Self
pub const fn image_generation(self, enabled: bool) -> Self
Enables or disables the built-in image-generation tool.
Sourcepub fn working_directory(self, directory: impl Into<Arc<str>>) -> Self
pub fn working_directory(self, directory: impl Into<Arc<str>>) -> Self
Overrides the default working directory described to the model.
Sourcepub fn default_shell(self, shell: impl Into<Arc<str>>) -> Self
pub fn default_shell(self, shell: impl Into<Arc<str>>) -> Self
Overrides the default shell described to the model.
Sourcepub fn process_environment<I, K, V>(self, variables: I) -> Self
pub fn process_environment<I, K, V>(self, variables: I) -> Self
Adds explicit environment overrides to workspace-tool child processes.
Overrides are scoped to commands spawned by this tool selection and do not mutate the embedding process. A later value for the same name wins.
Sourcepub fn remote_http_client(self, client: Client) -> Self
pub fn remote_http_client(self, client: Client) -> Self
Overrides the HTTP client used by in-process remote tools.
Sourcepub fn tool<T: Tool + 'static>(self, tool: T) -> Self
pub fn tool<T: Tool + 'static>(self, tool: T) -> Self
Adds a function or freeform tool to the runtime.
Sourcepub fn provider<P: DynamicToolProvider + 'static>(self, provider: P) -> Self
pub fn provider<P: DynamicToolProvider + 'static>(self, provider: P) -> Self
Adds a dynamic family of Code Mode tools.
Trait Implementations§
Source§impl Default for ToolsBuilder
impl Default for ToolsBuilder
Source§fn default() -> ToolsBuilder
fn default() -> ToolsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ToolsBuilder
impl !UnwindSafe for ToolsBuilder
impl Freeze for ToolsBuilder
impl Send for ToolsBuilder
impl Sync for ToolsBuilder
impl Unpin for ToolsBuilder
impl UnsafeUnpin for ToolsBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.