From ad07f22cc8592fbed5b17029b5d08b49d588d996 Mon Sep 17 00:00:00 2001 From: Yannick Stephan Date: Wed, 19 Feb 2025 15:09:41 +0100 Subject: [PATCH] back age --- lightrag/kg/postgres_impl.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lightrag/kg/postgres_impl.py b/lightrag/kg/postgres_impl.py index 8f1128a5..a9c4b3b7 100644 --- a/lightrag/kg/postgres_impl.py +++ b/lightrag/kg/postgres_impl.py @@ -173,6 +173,11 @@ class PostgreSQLDB: ): try: async with self.pool.acquire() as connection: # type: ignore + if with_age and graph_name: + await self.configure_age(connection, graph_name) # type: ignore + elif with_age and not graph_name: + raise ValueError("Graph name is required when with_age is True") + if data is None: await connection.execute(sql) # type: ignore else: