From 4e6fcdec25fc134c0b9a159420de016ab754ec01 Mon Sep 17 00:00:00 2001 From: Vasilije <8619304+Vasilije1990@users.noreply.github.com> Date: Fri, 17 May 2024 14:21:16 +0200 Subject: [PATCH] fixes to cognee --- cognee/api/v1/cognify/cognify.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cognee/api/v1/cognify/cognify.py b/cognee/api/v1/cognify/cognify.py index ed456f5a7..3cf5804ce 100644 --- a/cognee/api/v1/cognify/cognify.py +++ b/cognee/api/v1/cognify/cognify.py @@ -32,7 +32,7 @@ from cognee.modules.data.get_cognitive_layers import get_cognitive_layers from cognee.modules.data.get_layer_graphs import get_layer_graphs from cognee.modules.topology.topology import TopologyEngine from cognee.shared.GithubClassification import CodeContentPrediction -from cognee.shared.data_models import ChunkStrategy +from cognee.shared.data_models import ChunkStrategy, DefaultGraphModel from cognee.utils import send_telemetry @@ -178,8 +178,10 @@ async def process_text(chunk_collection: str, chunk_id: str, input_text: str, fi graph_topology = infrastructure_config.get_config()["graph_topology"] - print("got here") - + if graph_topology == "default": + parent_node_id = f"{file_metadata['name']}.{file_metadata['extension']}" + elif graph_topology == DefaultGraphModel: + parent_node_id = f"DefaultGraphModel__{USER_ID}" document_id = await add_document_node( graph_client,