21 lines
707 B
Python
21 lines
707 B
Python
"""世谱(Lorebook / World Info)—— 关键词触发的世界设定注入。
|
|
|
|
纯逻辑模块(禁 IO):匹配 / 预算裁剪 / 注入分组。
|
|
IO(查条目、扫对话历史)由集成层(send_message)负责,结果以值传入。
|
|
设计见 docs/contracts/contract-glossary.md §7。
|
|
"""
|
|
|
|
from app.modules.lorebook.budget import TokenCounter, build_injections, select_within_budget
|
|
from app.modules.lorebook.matching import match_entries
|
|
from app.modules.lorebook.types import LorebookBook, LorebookEntry, MatchedEntry
|
|
|
|
__all__ = [
|
|
"LorebookBook",
|
|
"LorebookEntry",
|
|
"MatchedEntry",
|
|
"TokenCounter",
|
|
"build_injections",
|
|
"match_entries",
|
|
"select_within_budget",
|
|
]
|