JeCabrera commited on
Commit
81df141
verified
1 Parent(s): f6297ed

Update prompts.py

Browse files
Files changed (1) hide show
  1. prompts.py +9 -31
prompts.py CHANGED
@@ -17,13 +17,13 @@ CRITICAL OUTPUT RULES:
17
  - Do not add any characters that could trigger text box formatting
18
  """
19
 
20
- def create_offer_instruction(target_audience=None, product_name=None, selected_formula_name=None, file_content=None, skills=None, sophistication_level=None):
21
  """
22
  Creates the instruction for generating an offer based on the selected formula.
23
 
24
  Args:
25
  target_audience: Description of the target audience
26
- product_name: Name of the product or service
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
@@ -35,7 +35,7 @@ def create_offer_instruction(target_audience=None, product_name=None, selected_f
35
  # Get the selected formula
36
  selected_formula = offer_formulas[selected_formula_name]
37
 
38
- # Get formula-specific instructions (empty string if not found)
39
  additional_instructions = selected_formula.get("instructions", "")
40
 
41
  # Create the base instruction
@@ -47,7 +47,7 @@ FORMULA TO USE:
47
  {additional_instructions}
48
 
49
  PRODUCT/SERVICE:
50
- {product_name}
51
 
52
  TARGET AUDIENCE:
53
  {target_audience}
@@ -64,38 +64,16 @@ Create a compelling offer following the formula structure exactly.
64
  instruction += f"\n\nGet inspired by these examples:\n{examples_text}"
65
 
66
  # Add sophistication level guidance
67
- sophistication_guidance = ""
68
  if sophistication_level:
69
  sophistication_guidance = f"""
70
- NIVEL DE SOFISTICACI脫N DEL MERCADO: {sophistication_level.get('description', '')}
71
-
72
- ESTRATEGIA A APLICAR: {sophistication_level.get('strategy', '')}
73
-
74
- EJEMPLO DE REFERENCIA: {sophistication_level.get('example', '')}
75
-
76
- Adapta la promesa y el tono seg煤n este nivel de sofisticaci贸n del mercado.
77
- """
78
-
79
- # Add the sophistication guidance to your instruction
80
- instruction = f"""{offer_system_prompt}
81
-
82
- FORMULA TO USE:
83
- {selected_formula["description"]}
84
 
85
- {additional_instructions}
86
 
87
- PRODUCT/SERVICE:
88
- {product_name}
89
 
90
- TARGET AUDIENCE:
91
- {target_audience}
92
-
93
- ADDITIONAL INFORMATION:
94
- {file_content}
95
-
96
- Create a compelling offer following the formula structure exactly.
97
  """
98
-
99
- {sophistication_guidance}
100
 
101
  return instruction
 
17
  - Do not add any characters that could trigger text box formatting
18
  """
19
 
20
+ def create_offer_instruction(target_audience=None, product_service=None, selected_formula_name=None, file_content=None, skills=None, sophistication_level=None):
21
  """
22
  Creates the instruction for generating an offer based on the selected formula.
23
 
24
  Args:
25
  target_audience: Description of the target audience
26
+ product_service: Product/service information
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
 
35
  # Get the selected formula
36
  selected_formula = offer_formulas[selected_formula_name]
37
 
38
+ # Get formula-specific instructions (fixed the get method usage)
39
  additional_instructions = selected_formula.get("instructions", "")
40
 
41
  # Create the base instruction
 
47
  {additional_instructions}
48
 
49
  PRODUCT/SERVICE:
50
+ {product_service}
51
 
52
  TARGET AUDIENCE:
53
  {target_audience}
 
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