File tree Expand file tree Collapse file tree
src/agents/extensions/memory Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ async def get_session_id(self) -> str:
4747 async def get_items (
4848 self ,
4949 limit : int | None = None ,
50- * ,
5150 wrapper : RunContextWrapper [Any ] | None = None ,
5251 ) -> list [Any ]:
5352 session_id = await self ._ensure_session_id ()
@@ -59,7 +58,6 @@ async def get_items(
5958 async def add_items (
6059 self ,
6160 items : list [Any ],
62- * ,
6361 wrapper : RunContextWrapper [Any ] | None = None ,
6462 ) -> None :
6563 if not items :
Original file line number Diff line number Diff line change @@ -143,9 +143,8 @@ async def add_items(
143143 async def get_items (
144144 self ,
145145 limit : int | None = None ,
146+ wrapper : RunContextWrapper [Any ] | str | None = None ,
146147 branch_id : str | None = None ,
147- * ,
148- wrapper : RunContextWrapper [Any ] | None = None ,
149148 ) -> list [TResponseInputItem ]:
150149 """Get items from current or specified branch.
151150
@@ -156,6 +155,10 @@ async def get_items(
156155 Returns:
157156 List of conversation items from the specified branch.
158157 """
158+ if isinstance (wrapper , str ) and branch_id is None :
159+ branch_id = wrapper
160+ wrapper = None
161+
159162 session_limit = resolve_session_limit (limit , self .session_settings )
160163
161164 if branch_id is None :
You can’t perform that action at this time.
0 commit comments