fix: expand short sections (<100 chars) with LLM even if not bullet-only
This commit is contained in:
+2
-2
@@ -146,8 +146,8 @@ class Writer:
|
||||
|
||||
def _expand_section(self, section: Dict) -> str:
|
||||
content = section.get('content', '').strip()
|
||||
# 大纲要点格式(>40% 行以 -/*/** 开头)应始终由 LLM 展开为连贯段落
|
||||
if HAVE_LLM and self._is_bullet_only(content):
|
||||
# 大纲要点格式(>40% 行以 -/*/** 开头)或内容过短(<100字)应由 LLM 展开为连贯段落
|
||||
if HAVE_LLM and (self._is_bullet_only(content) or (content and len(content) < 100)):
|
||||
logger.info(f"使用 LLM 扩写章节(要点→段落): {section['title']}")
|
||||
prompt = get_prompt("section_expansion",
|
||||
topic_title=self.topic['title'],
|
||||
|
||||
Reference in New Issue
Block a user