pub struct MemoryStoreTool { /* private fields */ }Expand description
记忆存储工具:存储信息到长期记忆。
让 Agent 将事实、偏好或笔记存储到长期记忆中。 支持不同类别:core(永久)、daily(会话)、conversation(对话)。
输入格式:
{
"key": "user_lang",
"content": "用户偏好 Rust 语言",
"category": "core"
}Implementations§
Trait Implementations§
Source§impl Default for MemoryStoreTool
impl Default for MemoryStoreTool
Source§impl Tool for MemoryStoreTool
impl Tool for MemoryStoreTool
Source§fn description(&self) -> Option<&str>
fn description(&self) -> Option<&str>
返回工具描述。
Source§fn categories(&self) -> &'static [ToolCategory]
fn categories(&self) -> &'static [ToolCategory]
返回工具分类。
Source§fn input_schema(&self) -> Value
fn input_schema(&self) -> Value
返回输入参数的 JSON Schema。
Source§fn call<'life0, 'async_trait>(
&'life0 self,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call<'life0, 'async_trait>(
&'life0 self,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
执行记忆存储。
Source§fn definition(&self) -> ToolDefinition
fn definition(&self) -> ToolDefinition
获取工具定义 (ToolDefinition) Read more
Auto Trait Implementations§
impl Freeze for MemoryStoreTool
impl !RefUnwindSafe for MemoryStoreTool
impl Send for MemoryStoreTool
impl Sync for MemoryStoreTool
impl Unpin for MemoryStoreTool
impl UnsafeUnpin for MemoryStoreTool
impl !UnwindSafe for MemoryStoreTool
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