fabricatio_novel.models.scripting
This module defines the core data structures for narrative scenes and scripts.
Together, these classes form a foundation for creating structured yet flexible narrative content.
Classes
The most basic narrative unit. |
|
A sequence of scenes forming a cohesive narrative unit especially for a novel chapter. |
|
Structured summary of a generated chapter for cross-chapter context tracking. |
Module Contents
- class fabricatio_novel.models.scripting.Scene(/, **data: Any)
Bases:
fabricatio_capabilities.models.generic.PersistentAble,fabricatio_core.models.generic.SketchedAble,fabricatio_core.models.generic.DescribedThe most basic narrative unit.
- location: str = ''
Physical or virtual setting where this scene takes place (e.g. ‘the inner side of classroom close to the window’).
- when: str = ''
Temporal setting of the scene (e.g. ‘the next morning’, ‘midnight’, ‘three days later’).
- characters_present: Dict[str, str] = None
Character names mapped to their detailed acting scripts in this scene (name → what they do/how they appear).
- bulk_append(prompts: List[str]) Self
Append multiple prompts to the scene in a single call, joined by newlines.
- class fabricatio_novel.models.scripting.Script(/, **data: Any)
Bases:
fabricatio_core.models.generic.SketchedAble,fabricatio_capabilities.models.generic.PersistentAble,fabricatio_capabilities.models.generic.AsPromptA sequence of scenes forming a cohesive narrative unit especially for a novel chapter.
- scenes: List[Scene]
Ordered list of scenes. Must contain at least one scene. Sequence implies narrative flow.
- class fabricatio_novel.models.scripting.ChapterSummary(/, **data: Any)
Bases:
fabricatio_core.models.generic.SketchedAble,fabricatio_capabilities.models.generic.AsPromptStructured summary of a generated chapter for cross-chapter context tracking.
- character_states: Dict[str, str] = None
Map of character name to their emotional/physical state at chapter end.
- character_knowledge: Dict[str, List[str]] = None
Map of character name to list of facts/events they know or experienced up to this chapter.