Strengthened writing.
This commit is contained in:
@@ -162,32 +162,36 @@ def project_setup_wizard():
|
||||
return redirect(url_for('index'))
|
||||
|
||||
prompt = f"""
|
||||
Analyze this story concept and suggest metadata for a book or series.
|
||||
ROLE: Publishing Analyst
|
||||
TASK: Suggest metadata for a story concept.
|
||||
|
||||
CONCEPT: {concept}
|
||||
|
||||
RETURN JSON with these keys:
|
||||
- title: Suggested book title
|
||||
- genre: Genre
|
||||
- target_audience: e.g. Adult, YA
|
||||
- tone: e.g. Dark, Whimsical
|
||||
- length_category: One of ["01", "1", "2", "2b", "3", "4", "5"] based on likely depth.
|
||||
- estimated_chapters: int (suggested chapter count)
|
||||
- estimated_word_count: string (e.g. "75,000")
|
||||
- include_prologue: boolean
|
||||
- include_epilogue: boolean
|
||||
- tropes: list of strings
|
||||
- pov_style: e.g. First Person
|
||||
- time_period: e.g. Modern
|
||||
- spice: e.g. Standard, Explicit
|
||||
- violence: e.g. None, Graphic
|
||||
- is_series: boolean
|
||||
- series_title: string (if series)
|
||||
- narrative_tense: e.g. Past, Present
|
||||
- language_style: e.g. Standard, Flowery
|
||||
- dialogue_style: e.g. Witty, Formal
|
||||
- page_orientation: Portrait, Landscape, or Square
|
||||
- formatting_rules: list of strings
|
||||
- author_bio: string (suggested persona bio)
|
||||
OUTPUT_FORMAT (JSON):
|
||||
{{
|
||||
"title": "String",
|
||||
"genre": "String",
|
||||
"target_audience": "String",
|
||||
"tone": "String",
|
||||
"length_category": "String (Select code: '01'=Chapter Book, '1'=Flash Fiction, '2'=Short Story, '2b'=Young Adult, '3'=Novella, '4'=Novel, '5'=Epic)",
|
||||
"estimated_chapters": Int,
|
||||
"estimated_word_count": "String (e.g. '75,000')",
|
||||
"include_prologue": Bool,
|
||||
"include_epilogue": Bool,
|
||||
"tropes": ["String"],
|
||||
"pov_style": "String",
|
||||
"time_period": "String",
|
||||
"spice": "String",
|
||||
"violence": "String",
|
||||
"is_series": Bool,
|
||||
"series_title": "String",
|
||||
"narrative_tense": "String",
|
||||
"language_style": "String",
|
||||
"dialogue_style": "String",
|
||||
"page_orientation": "Portrait|Landscape|Square",
|
||||
"formatting_rules": ["String (e.g. 'Chapter Headers: Number + Title')"],
|
||||
"author_bio": "String"
|
||||
}}
|
||||
"""
|
||||
|
||||
suggestions = {}
|
||||
@@ -227,12 +231,15 @@ def project_setup_refine():
|
||||
except: pass
|
||||
|
||||
prompt = f"""
|
||||
Update these project suggestions based on the user instruction.
|
||||
ORIGINAL CONCEPT: {concept}
|
||||
CURRENT TITLE: {current_state['title']}
|
||||
INSTRUCTION: {instruction}
|
||||
ROLE: Publishing Analyst
|
||||
TASK: Refine project metadata based on user instruction.
|
||||
|
||||
RETURN JSON with the same keys as a full analysis (title, genre, length_category, etc).
|
||||
INPUT_DATA:
|
||||
- ORIGINAL_CONCEPT: {concept}
|
||||
- CURRENT_TITLE: {current_state['title']}
|
||||
- INSTRUCTION: {instruction}
|
||||
|
||||
OUTPUT_FORMAT (JSON): Same structure as the initial analysis (title, genre, length_category, etc). Ensure length_category matches the word count.
|
||||
"""
|
||||
|
||||
suggestions = {}
|
||||
@@ -1393,19 +1400,20 @@ def analyze_persona():
|
||||
sample = data.get('sample_text', '')
|
||||
|
||||
prompt = f"""
|
||||
Act as a Literary Analyst. Create or analyze an Author Persona profile.
|
||||
ROLE: Literary Analyst
|
||||
TASK: Create or analyze an Author Persona profile.
|
||||
|
||||
INPUT DATA:
|
||||
Name: {data.get('name')}
|
||||
Age: {data.get('age')} | Gender: {data.get('gender')} | Nationality: {data.get('nationality')}
|
||||
Sample Text: {sample[:3000]}
|
||||
INPUT_DATA:
|
||||
- NAME: {data.get('name')}
|
||||
- DEMOGRAPHICS: Age: {data.get('age')} | Gender: {data.get('gender')} | Nationality: {data.get('nationality')}
|
||||
- SAMPLE_TEXT: {sample[:3000]}
|
||||
|
||||
TASK:
|
||||
1. 'bio': Write a 2-3 sentence description of the writing style. If sample is provided, analyze it. If not, invent a style that fits the demographics/name.
|
||||
2. 'voice_keywords': Comma-separated list of 3-5 adjectives describing the voice (e.g. Gritty, Whimsical, Sarcastic).
|
||||
3. 'style_inspirations': Comma-separated list of 1-3 famous authors or genres that this style resembles.
|
||||
INSTRUCTIONS:
|
||||
1. BIO: Write a 2-3 sentence description of the writing style. If sample is provided, analyze it. If not, invent a style that fits the demographics/name.
|
||||
2. KEYWORDS: Comma-separated list of 3-5 adjectives describing the voice (e.g. Gritty, Whimsical, Sarcastic).
|
||||
3. INSPIRATIONS: Comma-separated list of 1-3 famous authors or genres that this style resembles.
|
||||
|
||||
RETURN JSON: {{ "bio": "...", "voice_keywords": "...", "style_inspirations": "..." }}
|
||||
OUTPUT_FORMAT (JSON): {{ "bio": "String", "voice_keywords": "String", "style_inspirations": "String" }}
|
||||
"""
|
||||
try:
|
||||
response = ai.model_logic.generate_content(prompt)
|
||||
|
||||
Reference in New Issue
Block a user