fix(product-suite): allow braces in business prompts

This commit is contained in:
chengma
2026-07-22 17:23:20 +08:00
parent a887186280
commit 2f05974a61
7 changed files with 108 additions and 19 deletions
+1 -2
View File
@@ -338,8 +338,7 @@ def render_product_suite_prompt(template_text, context):
lambda match: values[match.group(1)],
str(template_text),
)
if "{" in rendered or "}" in rendered:
raise ProductSuitePromptError("提示词渲染后仍有未替换变量")
# 模板已在替换前校验完成;业务文本中的花括号不是模板变量。
return rendered.strip()