fabricatio_novel.capabilities.novel_mental_rag
Combined RAG + Mental state capability for novel composition.
Applies writing style RAG injection into chapter scripts, then generates chapters with mental state tracking (seed → inject → evolve per chapter).
Classes
Novel composition with both writing style RAG and mental state tracking. |
Module Contents
- class fabricatio_novel.capabilities.novel_mental_rag.NovelComposeMentalRAG(/, **data: Any)
Bases:
fabricatio_novel.capabilities.novel_mental.NovelComposeMental,fabricatio_novel.capabilities.novel_rag.NovelComposeRAG,abc.ABCNovel composition with both writing style RAG and mental state tracking.
create_chapters does RAG injection first (augments scripts with style docs), then delegates to NovelComposeMental.create_chapters for mental state generation (seed → inject → evolve).
compose_novel is inherited from NovelComposeMental — it seeds mental states and calls self.create_chapters, which resolves to the combined override.
- async create_chapters(draft: fabricatio_novel.models.draft.NovelDraft, chapter_plans: List[fabricatio_novel.models.plan.ChapterPlan], characters: List[fabricatio_character.models.character.CharacterCard], guidance: str | None = None, character_states: Dict[str, fabricatio_character.models.mental.MentalState] | None = None, **kwargs: Unpack[fabricatio_novel.models.kwargs_types.NovelRAGKwargs[str]]) List[str]
Generate chapters with RAG style injection + mental state tracking.
RAG: fetch writing style docs, inject into script/scene prompts.
Mental: seed/inject/evolve character mental states per chapter.