Spaces:
Sleeping
Sleeping
File size: 1,690 Bytes
b8af44f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# storyverse_weaver/prompts/narrative_prompts.py
NARRATIVE_SYSTEM_PROMPT_DEFAULT = (
"You are a master storyteller and descriptive writer. Your task is to take a user's scene idea "
"and expand it into a vivid and engaging narrative segment. Focus on imagery, atmosphere, and character actions "
"or emotions if mentioned. Keep the tone consistent with the user's prompt. Aim for about 1-3 paragraphs."
)
NARRATIVE_SYSTEM_PROMPT_COMIC = (
"You are a concise and impactful comic book writer. Given a scene description, write a brief but evocative narrative "
"caption or description suitable for a comic panel. Focus on key actions, settings, and dialogue cues. "
"Be punchy and visually oriented. Output 1-2 short paragraphs or a few descriptive sentences."
)
def get_narrative_system_prompt(story_type: str = "default") -> str:
if story_type == "comic":
return NARRATIVE_SYSTEM_PROMPT_COMIC
return NARRATIVE_SYSTEM_PROMPT_DEFAULT
def format_narrative_user_prompt(scene_idea: str, previous_narrative: str = None, character_context: str = None) -> str:
prompt = f"The user wants to create a scene based on this idea: \"{scene_idea}\"\n\n"
if previous_narrative:
prompt += f"For context, the previous scene's narrative ended with:\n\"\"\"\n{previous_narrative[:500]}...\n\"\"\"\n\n" # Limit context
if character_context:
prompt += f"Relevant character context to consider: \"{character_context}\"\n\n"
prompt += "Please write the narrative for the current scene based on the user's idea and any provided context."
return prompt
print("DEBUG: prompts.narrative_prompts (for StoryVerseWeaver) - Module defined.") |