fix(writer): 正文语言须与章节标题一致(模板日文则输出日文)
This commit is contained in:
@@ -54,6 +54,12 @@ def test_generate_chapter_success():
|
||||
assert content.blocks and content.blocks[0].type == "paragraph"
|
||||
|
||||
|
||||
def test_prompt_template_enforces_title_language():
|
||||
# 语言约束:正文需与章节标题语言一致(模板为日文时输出日文)
|
||||
assert "语言约束" in WRITER_PROMPT_TEMPLATE
|
||||
assert "{{title}}" in WRITER_PROMPT_TEMPLATE
|
||||
|
||||
|
||||
def test_generate_chapter_retries():
|
||||
class Boom(FakeEngine):
|
||||
def chat_structured(self, *, session_id, prompt, variables, schema, retry_count=2):
|
||||
|
||||
Reference in New Issue
Block a user