Got it! Based on your example, here’s a structured prompt generation system that uses a conditional programming style. This simplified structure facilitates random input and conditions for generating text prompts.
INPUT genre(rand)
INPUT setting(rand)
INPUT main_char(rand)
INPUT stock_film_emulation(rand)
IF genre IN ["rand"] THEN
IF genre == "Adventure":
prompt = "OUTPUT=1: An adventurous tale set in {setting} featuring {main_char}."
ELSE IF genre == "Science Fiction":
prompt = "OUTPUT=2: A Science Fiction story set in {setting} with {main_char} exploring unknown realms."
ELSE IF genre == "Mystery":
prompt = "OUTPUT=3: Generate a mystery story set in {setting} featuring {main_char}."
ELSE IF genre == "Fantasy":
prompt = "OUTPUT=4: A fantasy narrative unfolding in {setting} with {main_char} facing magical challenges."
ELSE IF genre == "Romance":
prompt = "OUTPUT=5: A romantic story taking place in {setting} featuring {main_char}."
ELSE
prompt = "OUTPUT=6: Please select a valid genre."
# Example randomizations
INPUT genre = random.choice(["Adventure", "Science Fiction", "Mystery", "Fantasy", "Romance"])
INPUT setting = random.choice(["a bustling city", "an enchanted forest", "a distant planet", "a cozy coffee shop", "an ancient castle"])
INPUT main_char = random.choice(["a daring explorer", "a brilliant scientist", "a clever detective", "a young wizard", "a hopeless romantic"])
INPUT stock_film_emulation = random.choice(["Kodak Portra", "Fujifilm Velvia", "Ilford HP5", "Agfa Vista"])
Breakdown of the Structure:
-
Inputs:
genre: Randomly selected genre (e.g., Adventure, Science Fiction, etc.)
setting: Randomly selected setting for the prompt.
main_char: Randomly selected main character archetype.
stock_film_emulation: Randomly selected stock film emulation style (not used in conditions but can be added later).
-
Conditions:
- The system checks the genre selected and generates an appropriate prompt based on the genre.
-
Outputs:
- Each conditional generates a formatted output that includes selected elements (
setting and main_char).
Example of Execution:
Suppose the random selections are as follows:
genre: "Science Fiction"
setting: "a distant planet"
main_char: "a brilliant scientist"
Then, the output generated would be:
OUTPUT=2: A Science Fiction story set in a distant planet with a brilliant scientist exploring unknown realms.
This setup can easily be expanded to include more genres, settings, main characters, or any additional conditions you desire. It maintains a clear structure and flow, ensuring easy modifications and testing.