FunPack Lorebook Enhancer:
The FunPackLorebookEnhancer is a powerful tool designed to enrich your creative prompts by integrating context from SillyTavern-style lorebook JSON files. This node is particularly beneficial for AI artists and storytellers who wish to add depth and continuity to their narratives. By appending activated entries to the end of your prompts, it ensures that the lore is seamlessly incorporated into your creative process. The FunPackLorebookEnhancer supports multiple lorebooks, allowing for a diverse range of contextual information to be included. It also offers features such as constants, selective filtering, and probability settings, providing you with the flexibility to tailor the enhancement process to your specific needs. This node is essential for those looking to create rich, immersive stories with consistent thematic elements.
FunPack Lorebook Enhancer Input Parameters:
prompt
The prompt parameter is a string input that serves as the initial text or scenario you wish to enhance with additional context from the lorebooks. It supports multiline text, allowing you to input detailed scenarios or narratives. The default value is a sample prompt: "The brave explorer enters an ancient forest temple at twilight, discovering glowing runes on the walls." This parameter is crucial as it forms the base upon which the lorebook entries are appended, thereby enriching the narrative.
lorebook_1, lorebook_2, lorebook_3, lorebook_4
These parameters allow you to specify up to four different lorebook JSON files from which context can be drawn. Each lorebook can contain various entries that provide additional background, character details, or thematic elements. By using multiple lorebooks, you can diversify the sources of context and ensure a richer narrative. The impact of these parameters is significant as they determine the pool of contextual information available for enhancement.
context_history
The context_history parameter is a string input that allows you to provide additional background or previous narrative context that should be considered when enhancing the prompt. This can help maintain continuity and coherence in longer narratives or stories that span multiple prompts. It is particularly useful for ensuring that the enhancements align with the established storyline.
scan_depth
The scan_depth parameter determines how many lines of the combined context_history and prompt text are scanned for matching lorebook entries. A higher scan depth allows for more thorough integration of context but may also increase processing time. This parameter is important for controlling the balance between depth of context and performance.
entry_delimiter
The entry_delimiter parameter is a string that specifies how different entries from the lorebooks should be separated when appended to the prompt. This allows you to customize the formatting of the enhanced prompt, ensuring that it meets your stylistic preferences or requirements.
FunPack Lorebook Enhancer Output Parameters:
enhanced_prompt
The enhanced_prompt is the primary output of the FunPackLorebookEnhancer. It is a string that contains the original prompt with additional context appended from the activated lorebook entries. This output is crucial as it represents the enriched narrative that can be used for further creative processes or storytelling.
FunPack Lorebook Enhancer Usage Tips:
- To maximize the richness of your narrative, use multiple lorebooks that cover different aspects of your story, such as character backgrounds, world-building details, and thematic elements.
- Adjust the
scan_depthparameter based on the complexity of your narrative. For intricate stories with multiple layers of context, a higher scan depth may be beneficial. - Use the
entry_delimiterto format the enhanced prompt in a way that suits your storytelling style, ensuring clarity and coherence in the final output.
FunPack Lorebook Enhancer Common Errors and Solutions:
JSON decode error in <path>
- Explanation: This error occurs when there is an issue with parsing the JSON file specified in the lorebook parameters. It may be due to syntax errors or invalid JSON formatting.
- Solution: Check the JSON file for syntax errors or formatting issues. Ensure that the file is correctly structured and adheres to JSON standards.
Failed to process <path>: <error_type>: <error_message>
- Explanation: This error indicates a failure in processing the specified lorebook file, possibly due to file access issues or unexpected data formats.
- Solution: Verify that the file path is correct and that the file is accessible. Check for any data inconsistencies or unexpected formats within the file.
