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
Fix: document and sdk support of searching message with user_id (#14283)
Lynn3ce1e44b2d66
diff --git a/docs/references/http_api_reference.md b/docs/references/http_api_reference.mdindex d10397820e..7326f997a8 100644--- a/docs/references/http_api_reference.md+++ b/docs/references/http_api_reference.md@@ -6629,6 +6629,10 @@ curl --location 'http://{address}/api/v1/messages/search?query=%22who%20are%20yoThe ID of the message's session. Defaults to `None`.+- `user_id`: (*Filter parameter*), `string`, *Optional*++ The user participating in the conversation with the agent. Defaults to `None`.+- `similarity_threshold`: (*Filter parameter*), `float`, *Optional*The minimum cosine similarity score required for a message to be considered a match. A higher value yields more precise but fewer results. Defaults to `0.2`.diff --git a/docs/references/python_api_reference.md b/docs/references/python_api_reference.mdindex 2ee199b46d..41336ba17e 100644--- a/docs/references/python_api_reference.md+++ b/docs/references/python_api_reference.md@@ -2589,7 +2589,8 @@ Ragflow.search_message(query: str,memory_id: list[str],agent_id: str=None,- session_id: str=None,+ session_id: str=None,+ user_id: str=None,similarity_threshold: float=0.2,keywords_similarity_weight: float=0.7,top_n: int=10@@ -2616,6 +2617,10 @@ The ID of the message's source agent. Defaults to `None`.The ID of the message's session. Defaults to `None`.+##### user_id: `string`, *Optional*++The user participating in the conversation with the agent. Defaults to `None`.+##### similarity_threshold: `float`, *Optional*The minimum cosine similarity score required for a message to be considered a match. A higher value yields more precise but fewer results. Defaults to `0.2`.diff --git a/sdk/python/ragflow_sdk/ragflow.py b/sdk/python/ragflow_sdk/ragflow.pyindex e60a4eeab8..163fe0eeec 100644--- a/sdk/python/ragflow_sdk/ragflow.py+++ b/sdk/python/ragflow_sdk/ragflow.py@@ -341,12 +341,13 @@ class RAGFlow:raise Exception(res["message"])return res["message"]- def search_message(self, query: str, memory_id: list[str], agent_id: str=None, session_id: str=None, similarity_threshold: float=0.2, keywords_similarity_weight: float=0.7, top_n: int=10) -> list[dict]:+ def search_message(self, query: str, memory_id: list[str], agent_id: str=None, session_id: str=None, user_id: str=None, similarity_threshold: float=0.2, keywords_similarity_weight: float=0.7, top_n: int=10) -> list[dict]:params = {"query": query,"memory_id": memory_id,"agent_id": agent_id,"session_id": session_id,+ "user_id": user_id,"similarity_threshold": similarity_threshold,"keywords_similarity_weight": keywords_similarity_weight,"top_n": top_n