Documentation
¶
Overview ¶
Package memory 提供与 aggo memory 模块配套使用的 Agent 工具。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SearchUserMemoryTool ¶
func SearchUserMemoryTool(provider memory.UserMemoryEventSearcher) (tool.BaseTool, error)
SearchUserMemoryTool 构造 search_user_memory 工具。
provider: 实现了 UserMemoryEventSearcher 接口的对象(一般直接传 memory provider)。
工具会自动从 adk.SessionValues 取 userID;调用方也可以显式传 user_id 覆盖。
Types ¶
type SearchUserMemoryParams ¶
type SearchUserMemoryParams struct {
Keywords []string `` /* 191-byte string literal not displayed */
Match string `` /* 150-byte string literal not displayed */
Type string `` /* 163-byte string literal not displayed */
Since string `` /* 133-byte string literal not displayed */
Until string `` /* 133-byte string literal not displayed */
Limit int `json:"limit,omitempty" jsonschema:"description=返回上限,默认 10,最大 30"`
UserID string `json:"user_id,omitempty" jsonschema:"description=用户ID。未传时自动取 session 中的 userID"`
}
SearchUserMemoryParams 是 search_user_memory 工具参数。
type SearchUserMemoryResult ¶
type SearchUserMemoryResult struct {
Total int `json:"total"`
Events []SearchUserMemoryResultItem `json:"events"`
}
SearchUserMemoryResult 是 search_user_memory 工具返回值。
Click to show internal directories.
Click to hide internal directories.