Skip to content

Commit

Permalink
fix: minor promopt fixes and import on to pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
Estrada Irribarra, Rodrigo Andres committed Oct 19, 2024
1 parent 3e74e7a commit ee06d24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions storycraftr/prompts/chapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,43 @@
CHAPTER_PROMPT_NEW = """
Write a detailed and engaging chapter for the following book premise: {prompt}.
Ensure the chapter contributes meaningfully to the plot, character development, and overall progression of the story.
Generate content for a single chapter only, not an overarching story arc. The chapter should include a title and typical chapter structure, without subtitling or segmenting the content.
"""


CHAPTER_PROMPT_REFINE = """
Refine and evolve the content based on this prompt: {prompt}.
Improve the narrative flow, character development, and pacing.
Generate content for a single chapter only, not an overarching story arc. The chapter should include a title and typical chapter structure, without subtitling or segmenting the content.
"""


COVER_PROMPT = """
Create a professional book cover in markdown format for the book titled '{title}'.
Include only the title and author ('{author}').
Strictly return only the cover content in markdown format, ready for direct use in the book.
Use the following as additional context: {prompt}.
"""


BACK_COVER_PROMPT = """
Generate a detailed and engaging synopsis for the back cover of the book titled '{title}', written by '{author}'.
Include the genre ('{genre}') and any alternate languages ('{alternate_languages}') where the book is available.
Also, include the license type '{license}', along with a professional description of the license.
Include ALWAYS the license type '{license}', along with a professional description of the license.
Use the following as additional context: {prompt}.
"""


EPILOGUE_PROMPT_NEW = """
Generate a complete and compelling epilogue for the book based on the following context: {prompt}.
The epilogue should tie up loose ends and provide closure in a way that complements the main storyline.
Generate content for a single chapter only, not an overarching story arc. The chapter should include a title and typical chapter structure, without subtitling or segmenting the content.
"""


EPILOGUE_PROMPT_REFINE = """
Refine and evolve the content based on this prompt: {prompt}.
Improve its narrative flow, tie up remaining plot points, and evolve the content.
Ensure that the refined epilogue maintains the tone and themes of the story.
Generate content for a single chapter only, not an overarching story arc. The chapter should include a title and typical chapter structure, without subtitling or segmenting the content.
"""
1 change: 1 addition & 0 deletions storycraftr/prompts/core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FORMAT_OUTPUT = """
Write the book on lang "{language}".
Return in markdown format, without using code block syntax (no triple backticks or code fences).
Do not add your comments ath thend.
You are {reference_author} writing a new engaging book.
"""
1 change: 1 addition & 0 deletions storycraftr/utils/markdown.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import re
import shutil
from storycraftr.agent.agents import create_or_get_assistant, get_thread, create_message
from rich.console import Console
Expand Down

0 comments on commit ee06d24

Please sign in to comment.