From 84013783ca5fc5ac1334c6e2f1897e928da77c84 Mon Sep 17 00:00:00 2001 From: Windpicker-owo <3431391539@qq.com> Date: Thu, 13 Nov 2025 17:26:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(visualizer):=20=E5=A2=9E=E5=8A=A0=E5=8F=AF?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E8=8A=82=E7=82=B9=E5=92=8C=E8=BE=B9=E7=9A=84?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E9=99=90=E5=88=B6=EF=BC=8C=E6=8F=90=E9=AB=98?= =?UTF-8?q?=E5=9B=BE=E5=BD=A2=E5=A4=84=E7=90=86=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/templates/visualizer.html | 4 ++-- src/memory_graph/utils/memory_formatter.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/templates/visualizer.html b/src/api/templates/visualizer.html index c21c5ffca..0f1f29838 100644 --- a/src/api/templates/visualizer.html +++ b/src/api/templates/visualizer.html @@ -1028,8 +1028,8 @@ console.log(`准备更新图形: ${nodeCount} 个节点, ${edgeCount} 条边`); // 对于超大数据集,进一步限制 - const MAX_RENDERABLE_NODES = 5000; - const MAX_RENDERABLE_EDGES = 10000; + const MAX_RENDERABLE_NODES = 10000; + const MAX_RENDERABLE_EDGES = 20000; let nodesToRender = data.nodes; let edgesToRender = data.edges; diff --git a/src/memory_graph/utils/memory_formatter.py b/src/memory_graph/utils/memory_formatter.py index fac7d45a2..7731ca256 100644 --- a/src/memory_graph/utils/memory_formatter.py +++ b/src/memory_graph/utils/memory_formatter.py @@ -84,12 +84,12 @@ def format_memory_for_prompt(memory: Memory, include_metadata: bool = False) -> if object_node is not None: # 有完整的主谓宾 if core_relation: - parts.append(f"{subject_text}{topic_text}{core_relation}{object_node.content}") + parts.append(f"{subject_text}-{topic_text}{core_relation}{object_node.content}") else: - parts.append(f"{subject_text}{topic_text}{object_node.content}") + parts.append(f"{subject_text}-{topic_text}{object_node.content}") else: # 只有主谓 - parts.append(f"{subject_text}{topic_text}") + parts.append(f"{subject_text}-{topic_text}") # 添加属性信息 if attributes: