Fix/actr config (#49)
* [fix]Remove the LLM * [fix]Failed to restore access history record
This commit is contained in:
@@ -246,7 +246,7 @@ class AccessHistoryManager:
|
||||
if not node_data:
|
||||
return ConsistencyCheckResult.CONSISTENT, None
|
||||
|
||||
access_history = node_data.get('access_history', [])
|
||||
access_history = node_data.get('access_history') or []
|
||||
last_access_time = node_data.get('last_access_time')
|
||||
access_count = node_data.get('access_count', 0)
|
||||
activation_value = node_data.get('activation_value')
|
||||
@@ -409,7 +409,7 @@ class AccessHistoryManager:
|
||||
logger.error(f"节点不存在,无法修复: {node_label}[{node_id}]")
|
||||
return False
|
||||
|
||||
access_history = node_data.get('access_history', [])
|
||||
access_history = node_data.get('access_history') or []
|
||||
importance_score = node_data.get('importance_score', 0.5)
|
||||
|
||||
# 准备修复数据
|
||||
@@ -530,7 +530,7 @@ class AccessHistoryManager:
|
||||
Returns:
|
||||
Dict[str, Any]: 更新数据,包含所有需要更新的字段
|
||||
"""
|
||||
access_history = node_data.get('access_history', [])
|
||||
access_history = node_data.get('access_history') or []
|
||||
importance_score = node_data.get('importance_score', 0.5)
|
||||
|
||||
# 追加新的访问时间
|
||||
|
||||
@@ -722,7 +722,12 @@ SET m += {
|
||||
chunk_ids: summary.chunk_ids,
|
||||
content: summary.content,
|
||||
summary_embedding: summary.summary_embedding,
|
||||
config_id: summary.config_id
|
||||
config_id: summary.config_id,
|
||||
importance_score: CASE WHEN summary.importance_score IS NOT NULL THEN summary.importance_score ELSE coalesce(m.importance_score, 0.5) END,
|
||||
activation_value: CASE WHEN summary.activation_value IS NOT NULL THEN summary.activation_value ELSE m.activation_value END,
|
||||
access_history: CASE WHEN summary.access_history IS NOT NULL THEN summary.access_history ELSE coalesce(m.access_history, []) END,
|
||||
last_access_time: CASE WHEN summary.last_access_time IS NOT NULL THEN summary.last_access_time ELSE m.last_access_time END,
|
||||
access_count: CASE WHEN summary.access_count IS NOT NULL THEN summary.access_count ELSE coalesce(m.access_count, 0) END
|
||||
}
|
||||
RETURN m.id AS uuid
|
||||
"""
|
||||
|
||||
@@ -58,7 +58,7 @@ class EntityRepository(BaseNeo4jRepository[ExtractedEntityNode]):
|
||||
# 处理 ACT-R 属性 - 确保字段存在且有默认值
|
||||
n['importance_score'] = n.get('importance_score', 0.5)
|
||||
n['activation_value'] = n.get('activation_value')
|
||||
n['access_history'] = n.get('access_history', [])
|
||||
n['access_history'] = n.get('access_history') or []
|
||||
n['last_access_time'] = n.get('last_access_time')
|
||||
n['access_count'] = n.get('access_count', 0)
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ class StatementRepository(BaseNeo4jRepository[StatementNode]):
|
||||
# 处理 ACT-R 属性 - 确保字段存在且有默认值
|
||||
n['importance_score'] = n.get('importance_score', 0.5)
|
||||
n['activation_value'] = n.get('activation_value')
|
||||
n['access_history'] = n.get('access_history', [])
|
||||
n['access_history'] = n.get('access_history') or []
|
||||
n['last_access_time'] = n.get('last_access_time')
|
||||
n['access_count'] = n.get('access_count', 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user