pub struct MemoryRecallTool { /* private fields */ }Expand description
记忆回忆工具:从长期记忆中检索信息。
根据键从长期记忆中检索存储的信息。
输入格式:
{
"key": "user_lang",
"category": "core"
}Implementations§
Source§impl MemoryRecallTool
impl MemoryRecallTool
Sourcepub fn from_store(store: &MemoryStoreTool) -> Self
pub fn from_store(store: &MemoryStoreTool) -> Self
从现有 MemoryStoreTool 创建实例以共享存储。
pub fn from_memory(memory: Arc<dyn Memory>) -> Self
Trait Implementations§
Source§impl Default for MemoryRecallTool
impl Default for MemoryRecallTool
Source§impl Tool for MemoryRecallTool
impl Tool for MemoryRecallTool
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 MemoryRecallTool
impl !RefUnwindSafe for MemoryRecallTool
impl Send for MemoryRecallTool
impl Sync for MemoryRecallTool
impl Unpin for MemoryRecallTool
impl UnsafeUnpin for MemoryRecallTool
impl !UnwindSafe for MemoryRecallTool
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