MCPcopy Create free account
hub / github.com/astercloud/aster / Delete

Method Delete

pkg/memory/semantic.go:378–384  ·  view source on GitHub ↗

Delete 删除单个记忆(不考虑谱系)。

(ctx context.Context, docID string)

Source from the content-addressed store, hash-verified

376
377// Delete 删除单个记忆(不考虑谱系)。
378func (sm *SemanticMemory) Delete(ctx context.Context, docID string) error {
379 if sm == nil || sm.cfg.Store == nil {
380 return nil
381 }
382
383 return sm.cfg.Store.Delete(ctx, []string{docID})
384}
385
386// UpdateMetadata 更新记忆的元数据。
387func (sm *SemanticMemory) UpdateMetadata(ctx context.Context, docID string, metadata map[string]any) error {

Callers

nothing calls this directly

Calls 1

DeleteMethod · 0.65

Tested by

no test coverage detected