Skip to content

Commit

Permalink
fix: Workflow global variables
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 committed Jan 22, 2025
1 parent 13571ef commit 85efae6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/application/flow/workflow_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,9 @@ def reset_prompt(self, prompt: str):
if global_fields is not None:
for field in global_fields:
globeLabel = f"全局变量.{field.get('value')}"
globeLabelNew = f"global.{field.get('value')}"
globeValue = f"context.get('global').get('{field.get('value', '')}','')"
prompt = prompt.replace(globeLabel, globeValue)
prompt = prompt.replace(globeLabel, globeValue).replace(globeLabelNew, globeLabel)
return prompt

def generate_prompt(self, prompt: str):
Expand Down

0 comments on commit 85efae6

Please sign in to comment.