feat(memory): complete memory service with passing tests
- model: Memory struct with categories/decay/keywords - repository: PG CRUD + keyword search + table migration SQL - service: dedup (Jaccard), keyword extraction, decay formula - 7 tests (3 DB integration + 4 unit), 96 total, vet clean
This commit is contained in:
1 parent
7295556c59
commit
81ebdb910c
2 files changed
+142
No files matched your search
@@ -36,6 +36,9 @@ func (r *Repository) Create(ctx context.Context, m *Memory) (string, error) {
|
||||
if m.Decay == 0 {
|
||||
m.Decay = 1.0
|
||||
}
|
||||
if m.Keywords == nil {
|
||||
m.Keywords = []string{}
|
||||
}
|
||||
|
||||
var id string
|
||||
err := r.db.QueryRowContext(ctx, query,
|
||||
|
||||
Reference in new issue
Block a user