JeCabrera commited on
Commit
40b0916
·
verified ·
1 Parent(s): bb0493b

Update prompts.py

Browse files
Files changed (1) hide show
  1. prompts.py +3 -11
prompts.py CHANGED
@@ -20,22 +20,14 @@ CRITICAL OUTPUT RULES:
20
  def create_offer_instruction(avatar_description, product_name, selected_formula_name):
21
  """
22
  Creates instructions for generating an offer based on the selected formula.
23
-
24
- Args:
25
- avatar_description: Description of the target audience
26
- product_name: Name of the product or service
27
- selected_formula_name: Name of the formula to use
28
-
29
- Returns:
30
- str: Complete instruction for generating the offer
31
  """
32
  # Get the selected formula
33
  selected_formula = offer_formulas[selected_formula_name]
34
 
35
- # Get formula-specific instructions from the dictionary
36
  additional_instructions = selected_formula.get("instructions", "")
37
 
38
- # Create the instruction using the system prompt at the beginning
39
  instruction = f"""{offer_system_prompt}
40
 
41
  FORMULA TO USE:
@@ -54,7 +46,7 @@ Create a compelling offer following the formula structure exactly.
54
 
55
  # Add examples if available
56
  if selected_formula.get("examples") and len(selected_formula["examples"]) > 0:
57
- examples_text = "\n\n".join([f"Example {i+1}:\n{example}" for i, example in enumerate(selected_formula["examples"][:3])])
58
  instruction += f"\n\nGet inspired by these examples:\n{examples_text}"
59
 
60
  return instruction
 
20
  def create_offer_instruction(avatar_description, product_name, selected_formula_name):
21
  """
22
  Creates instructions for generating an offer based on the selected formula.
 
 
 
 
 
 
 
 
23
  """
24
  # Get the selected formula
25
  selected_formula = offer_formulas[selected_formula_name]
26
 
27
+ # Get formula-specific instructions (empty string if not found)
28
  additional_instructions = selected_formula.get("instructions", "")
29
 
30
+ # Create the base instruction
31
  instruction = f"""{offer_system_prompt}
32
 
33
  FORMULA TO USE:
 
46
 
47
  # Add examples if available
48
  if selected_formula.get("examples") and len(selected_formula["examples"]) > 0:
49
+ examples_text = "\n\n".join([f"Example {i+1}:\n{example}" for i, example in enumerate(selected_formula["examples"])])
50
  instruction += f"\n\nGet inspired by these examples:\n{examples_text}"
51
 
52
  return instruction