From 5d71059f6c7c070585d8a7c089fe6d49d433fb06 Mon Sep 17 00:00:00 2001 From: Rita Aleksziev Date: Wed, 4 Dec 2024 17:00:48 +0100 Subject: [PATCH] fix credentials --- .../build_graph_with_temporal_awareness.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cognee/tasks/temporal_awareness/build_graph_with_temporal_awareness.py b/cognee/tasks/temporal_awareness/build_graph_with_temporal_awareness.py index 4a7df6db0..ac534623b 100644 --- a/cognee/tasks/temporal_awareness/build_graph_with_temporal_awareness.py +++ b/cognee/tasks/temporal_awareness/build_graph_with_temporal_awareness.py @@ -1,3 +1,4 @@ +import os from datetime import datetime from graphiti_core import Graphiti @@ -6,7 +7,10 @@ from graphiti_core.nodes import EpisodeType async def build_graph_with_temporal_awareness(text_list): - graphiti = Graphiti("bolt://localhost:7687", "neo4j", "pleaseletmein") + url = os.getenv("GRAPH_DATABASE_URL") + password = os.getenv("GRAPH_DATABASE_PASSWORD") + graphiti = Graphiti(url, "neo4j", password) + await graphiti.build_indices_and_constraints() print("Graph database initialized.")