mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-07 08:26:06 +00:00
feat(memory): update profile management with time-based filtering
This commit is contained in:
parent
3989a3c1c4
commit
3684eb25eb
2 changed files with 13 additions and 5 deletions
|
|
@ -214,7 +214,7 @@ class ReMe(Application):
|
|||
enable_thinking_params: bool = False,
|
||||
version: str = "default",
|
||||
retrieve_top_k: int = 20,
|
||||
enable_memory_target: bool = True,
|
||||
enable_time_filter: bool = True,
|
||||
return_dict: bool = False,
|
||||
**kwargs,
|
||||
) -> str | dict:
|
||||
|
|
@ -231,7 +231,7 @@ class ReMe(Application):
|
|||
RetrieveMemory(
|
||||
enable_thinking_params=enable_thinking_params,
|
||||
top_k=retrieve_top_k,
|
||||
enable_memory_target=enable_memory_target,
|
||||
enable_time_filter=enable_time_filter,
|
||||
),
|
||||
ReadHistory(enable_thinking_params=enable_thinking_params),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -17,12 +17,20 @@ class AddDraftAndReadAllProfiles(BaseMemoryTool):
|
|||
def _build_query_parameters(self) -> dict:
|
||||
"""Build the query parameters schema"""
|
||||
properties = {
|
||||
"profile_draft": {
|
||||
"message_time": {
|
||||
"type": "string",
|
||||
"description": "profile_draft",
|
||||
"description": "Message time, e.g. '2020-01-01 00:00:00'",
|
||||
},
|
||||
"profile_key": {
|
||||
"type": "string",
|
||||
"description": "Profile key or category, e.g. 'name'",
|
||||
},
|
||||
"profile_value": {
|
||||
"type": "string",
|
||||
"description": "Profile value or content, e.g. 'John Smith'",
|
||||
},
|
||||
}
|
||||
required = ["profile_draft"]
|
||||
required = ["message_time", "profile_key", "profile_value"]
|
||||
|
||||
if self.enable_memory_target:
|
||||
properties["memory_target"] = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue