feat: set default last n on redisadapter
This commit is contained in:
parent
dc519f5d26
commit
48c832bf5f
2 changed files with 2 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ class CacheDBInterface(ABC):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@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.
|
Retrieve the most recent Q/A/context triplets for a session.
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ class RedisAdapter(CacheDBInterface):
|
||||||
logger.error(error_msg)
|
logger.error(error_msg)
|
||||||
raise CacheConnectionError(error_msg) from e
|
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.
|
Retrieve the most recent Q/A/context triplet(s) for the given session.
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue