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.")