feat: add conversation_id and user_id in chatflow/workflow system vars (#3771)

Co-authored-by: Joel <iamjoel007@gmail.com>
This commit is contained in:
takatost
2024-04-24 17:20:01 +08:00
committed by GitHub
parent a34e8cb0bd
commit 3da179f77b
14 changed files with 86 additions and 16 deletions

View File

@@ -385,7 +385,7 @@ class LLMNode(BaseNode):
return None
# get conversation id
conversation_id = variable_pool.get_variable_value(['sys', SystemVariable.CONVERSATION.value])
conversation_id = variable_pool.get_variable_value(['sys', SystemVariable.CONVERSATION_ID.value])
if conversation_id is None:
return None
@@ -545,6 +545,9 @@ class LLMNode(BaseNode):
if node_data.vision.enabled:
variable_mapping['#files#'] = ['sys', SystemVariable.FILES.value]
if node_data.memory:
variable_mapping['#sys.query#'] = ['sys', SystemVariable.QUERY.value]
return variable_mapping
@classmethod