Merge remote-tracking branch 'origin/dev' into feature/cog-3014-refactor-delete-feature

This commit is contained in:
Boris Arzentar 2025-11-09 21:54:25 +01:00
commit 183852b8b5
No known key found for this signature in database
GPG key ID: D5CC274C784807B7

View file

@ -1,4 +1,6 @@
from typing import Any, Optional
from fastapi.encoders import jsonable_encoder
from cognee.infrastructure.databases.graph import get_graph_engine
from cognee.modules.retrieval.base_retriever import BaseRetriever
from cognee.modules.retrieval.utils.completion import generate_completion
@ -50,7 +52,7 @@ class CypherSearchRetriever(BaseRetriever):
logger.warning("Search attempt on an empty knowledge graph")
return []
result = await graph_engine.query(query)
result = jsonable_encoder(await graph_engine.query(query))
except Exception as e:
logger.error("Failed to execture cypher search retrieval: %s", str(e))
raise CypherSearchError() from e