pub struct ToolOutput {
pub content: String,
}Expand description
Output returned by a tool handler.
Contains the content string that will be sent back to the LLM. For application-level metadata (metrics, request IDs, etc.), use the context parameter to write to shared state instead.
§Example
use llm_stack_core::tool::ToolOutput;
let output = ToolOutput::new("Result: 42");Fields§
§content: StringThe content to return to the LLM.
Implementations§
Trait Implementations§
Source§impl Clone for ToolOutput
impl Clone for ToolOutput
Source§fn clone(&self) -> ToolOutput
fn clone(&self) -> ToolOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolOutput
impl Debug for ToolOutput
Source§impl Default for ToolOutput
impl Default for ToolOutput
Source§fn default() -> ToolOutput
fn default() -> ToolOutput
Returns the “default value” for a type. Read more
Source§impl From<&str> for ToolOutput
impl From<&str> for ToolOutput
Auto Trait Implementations§
impl Freeze for ToolOutput
impl RefUnwindSafe for ToolOutput
impl Send for ToolOutput
impl Sync for ToolOutput
impl Unpin for ToolOutput
impl UnwindSafe for ToolOutput
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