pub trait ToolExt: Tool {
// Required methods
fn category(&self) -> ToolCategory;
fn as_any(&self) -> &(dyn Any + 'static);
// Provided method
fn to_openai_schema(&self) -> Value { ... }
}Expand description
扩展的 Tool trait (Foundation 特有方法)
注意:这是 Foundation 层提供的扩展 trait,不是 kernel 层的 Tool trait
Required Methods§
Sourcefn category(&self) -> ToolCategory
fn category(&self) -> ToolCategory
工具分类
Provided Methods§
Sourcefn to_openai_schema(&self) -> Value
fn to_openai_schema(&self) -> Value
转换为 OpenAI function schema 格式 (兼容性方法)