fix(memoir): 改善 story 合并决策,少生碎片篇

以前模型只看到很短预览,还容易被引导成新建 story。现在优先用已有摘要、
按需带正文片段,并区分「像续写同一主题」和「像换了一件事」;
beliefs/summary 更鼓励接着写, career/童年等仍可按新事件新开。
This commit is contained in:
Kevin
2026-04-03 11:02:05 +08:00
parent 545d5a4ae0
commit b853b986dd
7 changed files with 715 additions and 49 deletions

View File

@@ -217,6 +217,15 @@ class Settings(BaseSettings):
# Append 硬上限canonical 字符数、版本数(超限强制 new_story
story_append_max_canonical_chars: int = Field(default=12000, ge=1000, le=500_000)
story_append_max_versions: int = Field(default=20, ge=1, le=500)
# StoryRouteAgent候选 JSON 预算(保守默认,可调大)
story_route_candidate_body_max_chars: int = Field(default=1600, ge=200, le=8000)
story_route_candidate_total_max_chars: int = Field(
default=16_000, ge=2000, le=100_000
)
story_route_long_body_head_chars: int = Field(default=700, ge=100, le=4000)
story_route_long_body_tail_chars: int = Field(default=700, ge=100, le=4000)
story_route_summary_min_chars: int = Field(default=30, ge=0, le=500)
story_route_index_preview_chars: int = Field(default=80, ge=20, le=500)
# Evidence 检索 top_k大批次 unit 时降低检索量
evidence_top_k_default: int = Field(default=10, ge=1, le=50)
evidence_top_k_large_batch: int = Field(default=5, ge=1, le=50)