File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
src/agentscope/memory/_working_memory Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ def __init__(
8888 db = db ,
8989 password = password ,
9090 connection_pool = connection_pool ,
91+ decode_responses = True ,
9192 ** kwargs ,
9293 )
9394
@@ -559,9 +560,17 @@ async def update_messages_mark(
559560 await pipe .execute ()
560561 return updated_count
561562
562- async def close (self ) -> None :
563- """Close the Redis client connection."""
564- await self ._client .close ()
563+ async def close (self , close_connection_pool : bool | None = None ) -> None :
564+ """Close the Redis client connection.
565+
566+ Args:
567+ close_connection_pool (`bool | None`, optional):
568+ Decides whether to close the connection pool used by this
569+ Redis client, overriding Redis.auto_close_connection_pool.
570+ By default, let Redis.auto_close_connection_pool decide
571+ whether to close the connection pool
572+ """
573+ await self ._client .aclose (close_connection_pool = close_connection_pool )
565574
566575 async def __aenter__ (self ) -> "RedisMemory" :
567576 """Enter the async context manager.
You can’t perform that action at this time.
0 commit comments