diff --git a/cognee/infrastructure/databases/cache/cache_db_interface.py b/cognee/infrastructure/databases/cache/cache_db_interface.py index ae8f22f35..801e86188 100644 --- a/cognee/infrastructure/databases/cache/cache_db_interface.py +++ b/cognee/infrastructure/databases/cache/cache_db_interface.py @@ -58,7 +58,7 @@ class CacheDBInterface(ABC): pass @abstractmethod - async def get_latest_qa(self, user_id: str, session_id: str, last_n: int = 10): + async def get_latest_qa(self, user_id: str, session_id: str, last_n: int = 5): """ Retrieve the most recent Q/A/context triplets for a session. """ diff --git a/cognee/infrastructure/databases/cache/redis/RedisAdapter.py b/cognee/infrastructure/databases/cache/redis/RedisAdapter.py index c9e86640e..dd89692bb 100644 --- a/cognee/infrastructure/databases/cache/redis/RedisAdapter.py +++ b/cognee/infrastructure/databases/cache/redis/RedisAdapter.py @@ -157,7 +157,7 @@ class RedisAdapter(CacheDBInterface): logger.error(error_msg) raise CacheConnectionError(error_msg) from e - async def get_latest_qa(self, user_id: str, session_id: str, last_n: int = 10): + async def get_latest_qa(self, user_id: str, session_id: str, last_n: int = 5): """ Retrieve the most recent Q/A/context triplet(s) for the given session. """