pub struct ToolResultReadTool { /* private fields */ }Expand description
Read back a bounded slice from an oversized tool result stored by
ConfigurableToolOutputTruncationStrategy.
Implementations§
Source§impl ToolResultReadTool
impl ToolResultReadTool
pub fn new( store: Arc<dyn ToolOutputArtifactStore>, max_read_bytes: usize, ) -> Self
Trait Implementations§
Source§impl Clone for ToolResultReadTool
impl Clone for ToolResultReadTool
Source§fn clone(&self) -> ToolResultReadTool
fn clone(&self) -> ToolResultReadTool
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Tool for ToolResultReadTool
impl Tool for ToolResultReadTool
Source§fn invoke<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: ToolRequest,
_ctx: &'life1 mut ToolContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn invoke<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: ToolRequest,
_ctx: &'life1 mut ToolContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Executes the tool and returns a result or error. Read more
Source§fn current_spec(&self) -> Option<ToolSpec>
fn current_spec(&self) -> Option<ToolSpec>
Returns the current specification for this tool, if it should be
advertised right now. Read more
Source§fn proposed_requests(
&self,
_request: &ToolRequest,
) -> Result<Vec<Box<dyn PermissionRequest>>, ToolError>
fn proposed_requests( &self, _request: &ToolRequest, ) -> Result<Vec<Box<dyn PermissionRequest>>, ToolError>
Auto Trait Implementations§
impl Freeze for ToolResultReadTool
impl !RefUnwindSafe for ToolResultReadTool
impl Send for ToolResultReadTool
impl Sync for ToolResultReadTool
impl Unpin for ToolResultReadTool
impl UnsafeUnpin for ToolResultReadTool
impl !UnwindSafe for ToolResultReadTool
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