Skip to content

A modular framework for automated script generation using LLMs

Notifications You must be signed in to change notification settings

emms204/ScriptGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScriptGen System

A powerful script generation system that uses LLMs to create script scenes from log lines, manages character/plot/setting bibles, and provides a foundation for advanced story development.

Project Structure

The project is organized into modules focusing on specific aspects of script generation:

src/TextGen/ScriptGen/
├── bibles/                    # Bible storage and management
├── core/                      # Core components and models
├── generators/                # Script generation engines
├── llm/                       # LLM API wrappers
├── tests/                     # Unit and integration tests
└── utils/                     # Utility functions and helpers

See src/TextGen/ScriptGen/STRUCTURE.md for detailed information about the project organization and future development phases.

Setup

  1. Clone the repository
  2. Install the required dependencies:
pip install sqlalchemy openai requests
  1. Configure the LLM API keys:

Create a configuration file at src/TextGen/ScriptGen/config/models.json with the following structure:

{
  "default_model": "gpt-3.5-turbo",
  "models": {
    "openai": {
      "api_key": "your-openai-api-key",
      "available_models": ["gpt-3.5-turbo", "gpt-4"]
    }
  }
}

Alternatively, set the OPENAI_API_KEY environment variable.

Usage

Basic Script Generation

from TextGen.ScriptGen.generators import create_script_generator

# Create a script generator
generator = create_script_generator()

# Generate a script from a log line
script = generator.generate_script_from_logline(
    "A detective with amnesia must solve a murder that he might have committed."
)

# Print the generated script
print(script['full_script'])

Using the Example Script

Run the example script to generate a sample script:

cd src
python -m TextGen.ScriptGen.examples.example "A detective with amnesia must solve a murder that he might have committed."

Documentation

For detailed documentation on each module, see:

  • src/TextGen/ScriptGen/IMPLEMENTATION_SUMMARY.md - Summary of implemented features
  • src/TextGen/ScriptGen/STRUCTURE.md - Project structure and future development

Testing

Run the tests:

cd src
python -m unittest discover -s TextGen/ScriptGen/tests

About

A modular framework for automated script generation using LLMs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors