pub struct ComputerUseTool { /* private fields */ }Expand description
Computer Use tool that can be registered with ToolRegistry and used by
any agent.
Implementations§
Source§impl ComputerUseTool
impl ComputerUseTool
Sourcepub fn new_anthropic(
api_key: impl Into<String>,
display_width: u32,
display_height: u32,
) -> Self
pub fn new_anthropic( api_key: impl Into<String>, display_width: u32, display_height: u32, ) -> Self
Create a new tool in AnthropicApi mode.
Sourcepub fn with_base_url(self, url: impl Into<String>) -> Self
pub fn with_base_url(self, url: impl Into<String>) -> Self
Create with a custom Anthropic-compatible base URL.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Create with a custom HTTP timeout.
Sourcepub fn mode(&self) -> &ComputerMode
pub fn mode(&self) -> &ComputerMode
Return the current mode.
Trait Implementations§
Source§impl BaseTool for ComputerUseTool
impl BaseTool for ComputerUseTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Returns the tool description. Read more
Source§fn run<'life0, 'async_trait>(
&'life0 self,
input: String,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
input: String,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool (string version). Read more
Source§fn return_direct(&self) -> bool
fn return_direct(&self) -> bool
Whether to return result directly to user. Read more
Source§fn risk(&self) -> ToolRiskProfile
fn risk(&self) -> ToolRiskProfile
Declared Rule-of-Two risk profile (A2, v0.22.1). Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ComputerUseTool
impl !UnwindSafe for ComputerUseTool
impl Freeze for ComputerUseTool
impl Send for ComputerUseTool
impl Sync for ComputerUseTool
impl Unpin for ComputerUseTool
impl UnsafeUnpin for ComputerUseTool
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