Documentation
¶
Overview ¶
Package memory 提供基于 SQLite 的 ADK memory.Service 实现。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
ID string
Content *genai.Content
Author string
Timestamp time.Time
CustomMetadata map[string]any
}
Entry 单条记忆。
type SQLiteService ¶
type SQLiteService struct {
// contains filtered or unexported fields
}
SQLiteService 基于 SQLite 的持久化 memory.Service。
func NewSQLiteService ¶
func NewSQLiteService(db *sql.DB) (*SQLiteService, error)
NewSQLiteService 创建 SQLite memory 服务。 db 必须是已打开的 *sql.DB 连接。
func (*SQLiteService) AddSessionToMemory ¶
AddSessionToMemory 从 session 的 LLM 响应中提取记忆并存储。
func (*SQLiteService) SearchMemory ¶
func (s *SQLiteService) SearchMemory(ctx context.Context, req *SearchRequest) (*SearchResponse, error)
SearchMemory 搜索与查询匹配的记忆。
type SearchRequest ¶
SearchRequest 记忆搜索请求。
Click to show internal directories.
Click to hide internal directories.