From 8938d11718d1963378caf1072e88228d219852e9 Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 22 Apr 2025 00:26:16 +0800 Subject: [PATCH] Fix PostgreSQL get_by_mode_and_id bugs --- 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 2d249e05..11b71284 100644 --- a/lightrag/kg/postgres_impl.py +++ b/lightrag/kg/postgres_impl.py @@ -345,7 +345,7 @@ class PGKVStorage(BaseKVStorage): async def get_by_mode_and_id(self, mode: str, id: str) -> Union[dict, None]: """Specifically for llm_response_cache.""" sql = SQL_TEMPLATES["get_by_mode_id_" + self.namespace] - params = {"workspace": self.db.workspace, mode: mode, "id": id} + params = {"workspace": self.db.workspace, "mode": mode, "id": id} if is_namespace(self.namespace, NameSpace.KV_STORE_LLM_RESPONSE_CACHE): array_res = await self.db.query(sql, params, multirows=True) res = {}