novelai_api.StoryHandler¶
- class NovelAIStory[source]¶
Bases:
object
- TEXT_GENERATION_SETTINGS_VERSION = 2¶
- DEFAULT_MODEL = 'euterpe-v2'¶
- keystore: novelai_api.Keystore.Keystore¶
- banlists: List[novelai_api.BanList.BanList]¶
- biases: List[novelai_api.BiasGroup.BiasGroup]¶
- model: novelai_api.Preset.Model¶
- preset: novelai_api.Preset.Preset¶
- prefix: str¶
- __init__(api: novelai_api.NovelAI_API.NovelAIAPI, keystore: novelai_api.Keystore.Keystore, meta: str, global_settings: novelai_api.GlobalSettings.GlobalSettings, story: Dict[str, Any], storycontent: Dict[str, Any])[source]¶
- key: bytes¶
- story: Dict[str, Any]¶
- storycontent: Dict[str, Any]¶
- tree: List[int]¶
- global_settings: novelai_api.GlobalSettings.GlobalSettings¶
- context_size: int¶
- class NovelAIStoryStorage[source]¶
Bases:
object
General storage for the NovelAIStory objects. Instances of this class should be loaded or created from here.
- __init__(api: novelai_api.NovelAI_API.NovelAIAPI, keystore: novelai_api.Keystore.Keystore, global_settings: novelai_api.GlobalSettings.GlobalSettings | None = None)[source]¶
- keystore: novelai_api.Keystore.Keystore¶
- idstore: novelai_api.Idstore.Idstore¶
- global_settings: novelai_api.GlobalSettings.GlobalSettings¶
- load(story: Dict[str, Any], storycontent: Dict[str, Any]) novelai_api.StoryHandler.NovelAIStory [source]¶
Load a story proxy from a story and storycontent object
- loads(stories: Dict[str, Dict[str, Any]], storycontents: Dict[str, Dict[str, Any]]) List[novelai_api.StoryHandler.NovelAIStory] [source]¶
- async load_from_remote() List[novelai_api.StoryHandler.NovelAIStory] [source]¶
- select(story_id: str) novelai_api.StoryHandler.NovelAIStory | None [source]¶
Select a story proxy from the previously created/loaded ones
- Parameters:
story_id – Id of the selected story
- Returns:
Story or None if the story does’t exist in the handler