mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-06 02:07:49 +08:00
Fix: get user_id from variables (#13716)
### What problem does this PR solve?
Get user_id from canvas variable when input a {} pattern value.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -273,6 +273,10 @@ class Retrieval(ToolBase, ABC):
|
||||
# query message
|
||||
filter_dict: dict = {"memory_id": memory_ids}
|
||||
if user_id:
|
||||
import re
|
||||
# is variable
|
||||
if re.match(r"^{.*}$", user_id):
|
||||
user_id = self._canvas.get_variable_value(user_id)
|
||||
filter_dict["user_id"] = user_id
|
||||
message_list = memory_message_service.query_message(filter_dict, {
|
||||
"query": query,
|
||||
|
||||
Reference in New Issue
Block a user