JeCabrera commited on
Commit
520c50f
verified
1 Parent(s): 43fb5c2

Update prompts.py

Browse files
Files changed (1) hide show
  1. prompts.py +4 -11
prompts.py CHANGED
@@ -1,4 +1,5 @@
1
  from formulas import offer_formulas
 
2
 
3
  offer_system_prompt = """You are a world-class expert copywriter, experienced in creating compelling offers that connect emotionally with the target audience.
4
 
@@ -27,7 +28,7 @@ def create_offer_instruction(target_audience=None, product_service=None, selecte
27
  selected_formula_name: Name of the selected formula
28
  file_content: Content from uploaded files (if any)
29
  skills: User's skills and expertise
30
- sophistication_level: Dictionary containing market sophistication level info
31
 
32
  Returns:
33
  str: The complete instruction for generating the offer
@@ -63,17 +64,9 @@ Create a compelling offer following the formula structure exactly.
63
  examples_text = "\n\n".join([f"Example {i+1}:\n{example}" for i, example in enumerate(selected_formula["examples"])])
64
  instruction += f"\n\nGet inspired by these examples:\n{examples_text}"
65
 
66
- # Add sophistication level guidance
67
  if sophistication_level:
68
- sophistication_guidance = f"""
69
- NIVEL DE SOFISTICACI脫N DEL MERCADO: {sophistication_level.get('description', '')}
70
-
71
- ESTRATEGIA A APLICAR: {sophistication_level.get('strategy', '')}
72
-
73
- EJEMPLO DE REFERENCIA: {sophistication_level.get('example', '')}
74
-
75
- Adapta la promesa y el tono seg煤n este nivel de sofisticaci贸n del mercado.
76
- """
77
  instruction += f"\n\n{sophistication_guidance}"
78
 
79
  return instruction
 
1
  from formulas import offer_formulas
2
+ from sophistication.generator import create_sophistication_instruction
3
 
4
  offer_system_prompt = """You are a world-class expert copywriter, experienced in creating compelling offers that connect emotionally with the target audience.
5
 
 
28
  selected_formula_name: Name of the selected formula
29
  file_content: Content from uploaded files (if any)
30
  skills: User's skills and expertise
31
+ sophistication_level: String key for the market sophistication level
32
 
33
  Returns:
34
  str: The complete instruction for generating the offer
 
64
  examples_text = "\n\n".join([f"Example {i+1}:\n{example}" for i, example in enumerate(selected_formula["examples"])])
65
  instruction += f"\n\nGet inspired by these examples:\n{examples_text}"
66
 
67
+ # Add sophistication level guidance using the dedicated function
68
  if sophistication_level:
69
+ sophistication_guidance = create_sophistication_instruction(sophistication_level)
 
 
 
 
 
 
 
 
70
  instruction += f"\n\n{sophistication_guidance}"
71
 
72
  return instruction