JeCabrera commited on
Commit
bf7a8bf
·
verified ·
1 Parent(s): c838cf5

Update utils/story_generator.py

Browse files
Files changed (1) hide show
  1. utils/story_generator.py +7 -3
utils/story_generator.py CHANGED
@@ -36,9 +36,13 @@ class StoryGenerator:
36
  historia=params.get("historia", "")
37
  )
38
 
39
- # Add the example from STORY_FORMULAS
40
- example = STORY_FORMULAS[formula]["example"]
41
- prompt += f"\n\nEJEMPLO:\n{example}"
 
 
 
 
42
 
43
  # Add tone-specific instructions
44
  tone_instructions = ToneInstructions.get_tone_instructions(params.get("tone", "Profesional"))
 
36
  historia=params.get("historia", "")
37
  )
38
 
39
+ # Add examples from STORY_FORMULAS to inspire the story
40
+ examples = STORY_FORMULAS[formula]["examples"]
41
+ if examples:
42
+ prompt += "\n\nINSPIRACIÓN:\n"
43
+ # Limitar el número de ejemplos a 2 o 3 para inspirar la historia
44
+ for example in examples[:3]: # Cambia el número aquí si deseas más o menos ejemplos
45
+ prompt += f"- {example['story']}\n"
46
 
47
  # Add tone-specific instructions
48
  tone_instructions = ToneInstructions.get_tone_instructions(params.get("tone", "Profesional"))