fix: Internationalization global variables cannot be retrieved (#2148)

This commit is contained in:
shaohuzhang1 2025-02-07 14:35:28 +08:00 committed by GitHub
parent b4d3939d95
commit b52b01c7e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -745,7 +745,7 @@ class WorkflowManage:
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).replace(globeLabelNew, globeLabel)
prompt = prompt.replace(globeLabel, globeValue).replace(globeLabelNew, globeValue)
return prompt
def generate_prompt(self, prompt: str):