RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Feat: adapt to , arglist (#12468)
Lynnca9645f39bba
diff --git a/api/apps/memories_app.py b/api/apps/memories_app.pyindex 72e3e5d72f..efd23388d8 100644--- a/api/apps/memories_app.py+++ b/api/apps/memories_app.py@@ -180,13 +180,18 @@ async def list_memory():page = int(args.get("page", 1))page_size = int(args.get("page_size", 50))# make filter dict- filter_dict = {"memory_type": memory_types, "storage_type": storage_type}+ filter_dict: dict = {"storage_type": storage_type}if not tenant_ids:# restrict to current user's tenantsuser_tenants = UserTenantService.get_user_tenant_relation_by_user_id(current_user.id)filter_dict["tenant_id"] = [tenant["tenant_id"] for tenant in user_tenants]else:+ if len(tenant_ids) == 1 and ',' in tenant_ids[0]:+ tenant_ids = tenant_ids[0].split(',')filter_dict["tenant_id"] = tenant_ids+ if memory_types and len(memory_types) == 1 and ',' in memory_types[0]:+ memory_types = memory_types[0].split(',')+ filter_dict["memory_type"] = memory_typesmemory_list, count = MemoryService.get_by_filter(filter_dict, keywords, page, page_size)[memory.update({"memory_type": get_memory_type_human(memory["memory_type"])}) for memory in memory_list]@@ -211,6 +216,8 @@ async def get_memory_config(memory_id):async def get_memory_detail(memory_id):args = request.argsagent_ids = args.getlist("agent_id")+ if len(agent_ids) == 1 and ',' in agent_ids[0]:+ agent_ids = agent_ids[0].split(',')keywords = args.get("keywords", "")keywords = keywords.strip()page = int(args.get("page", 1))diff --git a/api/apps/messages_app.py b/api/apps/messages_app.pyindex 2963baefa4..d18acb5e03 100644--- a/api/apps/messages_app.py+++ b/api/apps/messages_app.py@@ -104,12 +104,13 @@ async def update_message(memory_id: str, message_id: int):@login_requiredasync def search_message():args = request.args- print(args, flush=True)empty_fields = [f for f in ["memory_id", "query"] if not args.get(f)]if empty_fields:return get_error_argument_result(f"{', '.join(empty_fields)} can't be empty.")memory_ids = args.getlist("memory_id")+ if len(memory_ids) == 1 and ',' in memory_ids[0]:+ memory_ids = memory_ids[0].split(',')query = args.get("query")similarity_threshold = float(args.get("similarity_threshold", 0.2))keywords_similarity_weight = float(args.get("keywords_similarity_weight", 0.7))@@ -137,6 +138,8 @@ async def search_message():async def get_messages():args = request.argsmemory_ids = args.getlist("memory_id")+ if len(memory_ids) == 1 and ',' in memory_ids[0]:+ memory_ids = memory_ids[0].split(',')agent_id = args.get("agent_id", "")session_id = args.get("session_id", "")limit = int(args.get("limit", 10))