pub trait IntoToolOutput {
// Required method
fn into_output(self) -> ToolOutput;
}Expand description
Converts a tool fn’s return value into what the model sees.
Text, numbers, bool, (), JSON values, Json<T>, Option<T> and
Result<T, E: Display> convert; an Err becomes an error output so the
model can react to the failure instead of the run stopping.
Required Methods§
Sourcefn into_output(self) -> ToolOutput
fn into_output(self) -> ToolOutput
Consumes the value and returns the model-facing output. Never panics; a value that cannot be rendered becomes an error output. The output content is the text the model reads.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".