fix: escape {field_N} braces in prompt templates to prevent .format() KeyError

$F{field_1} literal text in skeleton_generation/refine_layout/field_mapping
prompts was being parsed as Python .format() placeholder, causing KeyError
on every image-based initial_generation request. Escaped with double braces
so .format() outputs literal {field_1} for the LLM.
This commit is contained in:
2026-05-22 08:12:56 +08:00
parent 339d415322
commit 4dfc418fc5
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
关键规则:
- 只输出 JRXML 代码,不要解释,不要 markdown 标记。
- 使用 $F{field_1}, $F{field_2}, ... 作为占位字段名,并在 <field> 部分声明它们。
- 使用 $F{{field_1}}, $F{{field_2}}, ... 作为占位字段名,并在 <field> 部分声明它们。
- 报表结构必须正确(title, pageHeader, columnHeader, detail, pageFooter 等 band)。
- 元素位置使用近似值即可,后续会精确调整。
- 根元素为 <jasperReport>,包含正确的 xmlns 属性。