fix(product-suite): allow braces in business prompts
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user