Trait IntoToolOutput
pub trait IntoToolOutput {
// Required method
fn into_tool_output(self) -> ToolOutput;
}Expand description
A value a tool can return as its output.
| Type | The model sees |
|---|---|
ToolOutput | itself (text, error flag, artifacts) |
String, &'static str, Cow<'static, str> | that text |
serde_json::Value | its compact JSON text (a string is quoted) |
Json<T> | T as compact JSON text |
use adam_llm_agent::{IntoToolOutput, Json, ToolOutput};
assert_eq!("12:00".into_tool_output(), ToolOutput::text("12:00"));
assert_eq!(Json([1, 2]).into_tool_output(), ToolOutput::text("[1,2]"));Required Methods§
fn into_tool_output(self) -> ToolOutput
fn into_tool_output(self) -> ToolOutput
The output the model sees.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".