Home
Name Modified Size InfoDownloads / Week
Source.7z.003 2025-01-25 13.9 MB
Source.7z.002 2025-01-25 262.1 MB
Source.7z.001 2025-01-25 262.1 MB
GenBookInstaller-6.bin 2025-01-25 436.0 MB
GenBookInstaller-7.bin 2025-01-25 295.8 MB
README.txt 2025-01-25 11.9 kB
GenBookInstaller-4.bin 2025-01-25 436.0 MB
GenBookInstaller-5.bin 2025-01-25 436.0 MB
GenBookInstaller-3.bin 2025-01-25 436.0 MB
GenBookInstaller-2.bin 2025-01-25 436.0 MB
GenBookInstaller-1.bin 2025-01-25 433.9 MB
GenBookInstaller.exe 2025-01-25 2.1 MB
Totals: 12 Items   3.5 GB 0
GenBook - README 
Description of the Application
GenBook is an advanced application designed to assist users in generating literary or creative content using a Local Language Model (LLM). The application facilitates interaction with a specialized AI server, processing user inputs and generating text based on the provided context. Ideal for writers, students, content creators, and researchers, GenBook leverages the power of AI to enhance creative writing and automation tasks.
GenBook ensures optimal performance and data privacy by operating entirely on your local machine, eliminating the need for external servers.

Key Features
Creative Text Generation: Input descriptions or ideas and receive chapters, summaries, or full text segments.
Support for Multiple Chapters and Subchapters: Generate chapter indices and organize content with detailed subchapters.
Interactive Interface: Enables users to send commands to guide the writing flow.
Local Optimization: The model operates entirely on your machine, ensuring privacy and speed.
CUDA and Non-CUDA Support: Can run optimized servers for machines with or without GPU support.
Save and Load Game State: Save your progress and load previous sessions to continue your story without losing context.
Multi-language Support: Switch between English and Spanish seamlessly to cater to a diverse user base.
Customizable Settings: Adjust parameters like temperature, max tokens, repetition penalty, and more to fine-tune the AI's output.
Detailed Interaction History: View a comprehensive history of your interactions and generated content.
User-Friendly Menu and Sidebar: Access all functionalities through an intuitive menu and sidebar with clearly labeled buttons.
About Section Customization: Personalize the "About" section to reflect your project's details.

System Requirements
To use GenBook, you'll need:
Operating System: Windows 10/11 (64-bit)
RAM: Minimum 8 GB (16 GB recommended for large text volumes)
GPU (optional): CUDA-compatible for enhanced performance
Disk Space: At least 10 GB free (for model files and other resources)

File Structure
The application is distributed with the following folder structure:
GenBook/
│   main.exe                 # Main executable file
│
├───llama.cpp                # Resources to run the AI server
│       server.exe           # CUDA server
│       servernocuda.exe     # Non-CUDA server
│       7z.exe               # Tool to decompress models
│
├───models                   
│       Hermes-3-Llama-3.2-3B.Q5_K_M.7z.gguf
│       ...
│
├───resources                # Additional resources
│       back.png             # Background image
│
├───translations             # Localization files
│       en.json              # English translations
│       es.json              # Spanish translations
│
├───utils.py                 # Helper functions and utilities
├───server_manager.py        # Server management script
└───README.md                # This README file


Installation
Download the Installer and Model Files:


Obtain the GenBookInstaller.exe and all GenBookInstaller-*.bin files.
Ensure all files are placed in the same folder before proceeding.
Run the Installer:


Execute the GenBookInstaller.exe file to begin installation.
The installer will automatically decompress the model files into the models folder.
Verify the Installation:


Ensure the llama.cpp folder contains the server files (server.exe and servernocuda.exe) and 7z.exe.
Confirm that the model files are correctly decompressed in the models folder.
Launch the Application:


Navigate to the installation directory and run the main.exe file to start GenBook.

Using the Application
Available Commands
/start: Start a new session and set the initial context.
/chapter [number]: Select a specific chapter from the generated index.
/subchapter [number]: Choose a subchapter within the selected chapter.
/more: Generate additional chapters based on the current index.
/more_subchapters: Expand subchapters within a chapter.
/recap: Provide a summary of the content generated so far.
/finalizar: Save all generated content to a text file and exit the application.
/save_story: Save the story history to a .txt file.
/save_game: Save the entire game state to a .json file.
/load_game: Load a previously saved game state from a .json file.
/help: Display available commands.

Suggested Workflow
Set the Initial Context:


Upon launching GenBook, if starting a new session, input a general description or idea of your project using the /start command.
Generate the Chapter Index:


Use the /more command to expand the chapter list as needed.
Explore Chapters and Subchapters:


Navigate through the content using /chapter and /subchapter.
Generate Additional Content:


Request more text using /more or /more_subchapters.
Save Your Progress:


Periodically save your story history using /save_story.
Save the entire game state using /save_game to allow resuming later.
Load a Previous Session:


Use /load_game to load a saved game state and continue your story without losing context.
Finalize and Save Your Story:


When you’re done, use /finalizar to save all generated content to a text file and exit the application.

Save and Load Game State
Saving Your Story
Save Story History:


Click the "Save Story" button in the sidebar or use the /save_story command.
Choose a location and filename to save your story history as a .txt file.
This file contains all interactions and generated content, allowing you to review or export your story.
Save Entire Game State:


Click the "Save Game" button in the sidebar or use the /save_game command.
Choose a location and filename to save your game state as a .json file.
This file includes all variables and history, enabling you to resume your session seamlessly.
Loading a Previous Session
Load Game State:
Click the "Load Game" button in the sidebar or use the /load_game command.
Select a previously saved .json game state file.
GenBook will restore your entire session, including story history and current state, allowing you to continue generating content without re-entering the initial description.
Note: When loading a game state, the AI retains all previous context, eliminating the need for an initial prompt. You can directly proceed with selecting chapters and subchapters.

Menu and Sidebar
Sidebar Buttons
Finish and Save: Save your progress and exit the application.
Run Server (CUDA): Start the AI server optimized for CUDA-compatible GPUs.
Run Server (Non-CUDA): Start the AI server for systems without CUDA support.
Settings: Adjust AI parameters such as temperature, max tokens, repetition penalty, and more.
View Model Path: Display the file path of the currently used AI model.
Save Story: Save the story history to a .txt file.
Save Game: Save the entire game state to a .json file.
Load Game: Load a previously saved game state from a .json file.
Exit: Close the application.
Application Menu
File:
Save and Exit: Save all generated content and exit the application.
Exit: Exit the application without saving.
Help:
Help: Display available commands and usage instructions.
About: Show information about the application and its creators.
Language:
English: Switch the interface to English.
Español: Switch the interface to Spanish.

Settings
Adjust AI parameters to fine-tune the text generation process:
Temperature: Controls the randomness of the AI's output. Higher values yield more creative results.
Max Tokens: Sets the maximum number of tokens (words or word pieces) the AI can generate.
Model Name: Select the AI model to use for text generation.
Top-p: Implements nucleus sampling, controlling the diversity of the output.
Top-k: Limits the AI to consider only the top-k probable next tokens.
Repetition Penalty: Penalizes the model for repeating the same text, enhancing output variety.
Repetition Penalty Range: Defines the range within which repetition penalties are applied.
Stop Sequence: Specifies sequences where the AI should stop generating further text.
To access settings:
Click the "Settings" button in the sidebar.
Adjust the desired parameters.
Click "Save" to apply changes or "Cancel" to discard.

Multi-language Support
GenBook supports multiple languages to cater to a diverse user base. Currently, English and Spanish are available.
Changing the Language
Open the application.
Navigate to the "Language" menu in the application menu bar.
Select your preferred language (English or Español).
The interface will update to reflect the chosen language.


Troubleshooting
Common Issues
The server doesn't start:


Verify that the server.exe or servernocuda.exe files are in the llama.cpp folder.
Ensure your GPU is compatible if using the CUDA server.
Model files not found:


Confirm that the model files are correctly decompressed in the models folder.
The application is unresponsive:


Ensure sufficient available RAM.
Close other applications to free up resources.
Language not changing:


Ensure that translation files are present in the translations folder.
Restart the application after changing the language.
Error loading game state:


Ensure the .json file is not corrupted and contains all required keys.
Use only .json files generated by GenBook for loading.
Additional Support
If you encounter issues not listed here, consider reaching out through the application's support channels or consult the GenBook GitHub Repository for more information.

Development Workflow
Setting Up the Environment
To run GenBook in development mode, ensure you have the following installed:
Python 3.8+
Required Python packages: Install dependencies using the requirements.txt file:
 pip install -r requirements.txt


A CUDA-compatible GPU (optional for better performance).
Running the Application in Development Mode
Extract the Models:


Decompress the model files into the models folder using 7z.exe:
 7z.exe x Hermes-3-Llama-3.2-3B.Q5_K_M.7z.001 -omodels


Launch the Application:


Run the main script:
 python main.py


Pre-compiled Files
Key Files:
main.py:


Entry point of the application.
Initializes the user interface, manages user input, and handles server communication and text generation.
server_manager.py:


Responsible for starting and stopping the AI server (server.exe or servernocuda.exe).
Ensures the appropriate server version is launched based on the user's system capabilities.
utils.py:


Contains helper functions for handling resources, file paths, and localization.
Manages the logic for locating model files and server binaries.

How It Works
Initialization:


Upon launching, GenBook reads the system configuration (GPU vs. CPU) and prepares the required server binaries.
The user interface is built using Tkinter, featuring a sidebar and main content area with tabs for generation and history.
Server Communication:


The server_manager.py script starts the AI server in the background.
Commands and prompts are sent from main.py to the server using a socket-based communication protocol.
Model Handling:


Models are compressed into .7z files to save space.
During installation, the compressed models are decompressed into the models folder using 7z.exe.
Text Generation:


Users input descriptions or commands (e.g., /start, /chapter, /more).
The AI server processes the input and returns generated text.
The generated text is displayed in the application's UI, with options to save or continue.
Saving and Loading Progress:


Users can save their story history and game state at any point.
Saved states can be loaded to resume previous sessions without losing context.


Source: README.txt, updated 2025-01-25