From b8e6762cb21e263b67b4499e432abedd60260e00 Mon Sep 17 00:00:00 2001 From: robrichardson13 Date: Mon, 23 Jun 2025 22:01:26 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20ensure=20fact=5Fembedding=20is=20removed?= =?UTF-8?q?=20from=20attributes=20in=20format=5Ffact=5F=E2=80=A6=20(#611)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: ensure fact_embedding is removed from attributes in format_fact_result This ensures that fact_embedding is completely cleaned from the result, both from the main level and from the attributes dictionary. --- mcp_server/graphiti_mcp_server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mcp_server/graphiti_mcp_server.py b/mcp_server/graphiti_mcp_server.py index bada22f7..f369d9c4 100644 --- a/mcp_server/graphiti_mcp_server.py +++ b/mcp_server/graphiti_mcp_server.py @@ -628,12 +628,14 @@ def format_fact_result(edge: EntityEdge) -> dict[str, Any]: Returns: A dictionary representation of the edge with serialized dates and excluded embeddings """ - return edge.model_dump( + result = edge.model_dump( mode='json', exclude={ 'fact_embedding', }, ) + result.get('attributes', {}).pop('fact_embedding', None) + return result # Dictionary to store queues for each group_id