Fix PostgreSQL get_by_mode_and_id bugs
This commit is contained in:
@@ -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 = {}
|
||||
|
Reference in New Issue
Block a user