mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-10-10 03:30:56 +00:00
fix: TypeError in DeleteMemoryOp
This commit is contained in:
parent
66a2d133ba
commit
53a660b813
1 changed files with 3 additions and 3 deletions
|
|
@ -48,10 +48,10 @@ class DeleteMemoryOp(BaseAsyncOp):
|
|||
|
||||
deleted_memory_ids = []
|
||||
for node in nodes:
|
||||
freq = node["metadata"]["metadata"]["freq"]
|
||||
utility = node["metadata"]["metadata"]["utility"]
|
||||
freq = node.metadata.get("freq", 0)
|
||||
utility = node.metadata.get("utility", 0)
|
||||
if freq >= freq_threshold:
|
||||
if utility * 1.0 / freq < utility_threshold:
|
||||
deleted_memory_ids.append(node["unique_id"])
|
||||
deleted_memory_ids.append(node.unique_id)
|
||||
|
||||
self.context.deleted_memory_ids = deleted_memory_ids
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue