From 76164a1b17a301e7e4eef8397262d799dc505456 Mon Sep 17 00:00:00 2001 From: yangdx Date: Thu, 13 Feb 2025 04:52:54 +0800 Subject: [PATCH] Use namespace for graph_name before falling back to env or default value - Update graph_name initialization - Add namespace override support - Maintain backward compatibility - Prioritize namespace over env variable --- lightrag/kg/postgres_impl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/kg/postgres_impl.py b/lightrag/kg/postgres_impl.py index cb636d7f..377d5979 100644 --- a/lightrag/kg/postgres_impl.py +++ b/lightrag/kg/postgres_impl.py @@ -587,7 +587,7 @@ class PGGraphStorage(BaseGraphStorage): print("no preloading of graph with AGE in production") def __post_init__(self): - self.graph_name = os.environ.get("AGE_GRAPH_NAME", "lightrag") + self.graph_name = self.namespace or os.environ.get("AGE_GRAPH_NAME", "lightrag") self._node_embed_algorithms = { "node2vec": self._node2vec_embed, }