Skip to content

Commit cd3d645

Browse files
authored
fix: Workflow global variables (#2069)
1 parent 13571ef commit cd3d645

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/application/flow/workflow_manage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,9 @@ def reset_prompt(self, prompt: str):
742742
if global_fields is not None:
743743
for field in global_fields:
744744
globeLabel = f"全局变量.{field.get('value')}"
745+
globeLabelNew = f"global.{field.get('value')}"
745746
globeValue = f"context.get('global').get('{field.get('value', '')}','')"
746-
prompt = prompt.replace(globeLabel, globeValue)
747+
prompt = prompt.replace(globeLabel, globeValue).replace(globeLabelNew, globeLabel)
747748
return prompt
748749

749750
def generate_prompt(self, prompt: str):

0 commit comments

Comments
 (0)