Seth commited on
Commit Β·
efc3d9b
1
Parent(s): 8bc8877
update
Browse files
backend/app/gpt_service.py
CHANGED
|
@@ -78,15 +78,24 @@ Contact Information:
|
|
| 78 |
- Company Size: {company_size if company_size else 'Not specified'}
|
| 79 |
|
| 80 |
Generate all {num_emails} emails in the sequence following all the rules in the prompt.
|
|
|
|
| 81 |
Output format (exactly as specified in the prompt):
|
| 82 |
Contact: {first_name} {last_name} β {company}
|
| 83 |
Email 1
|
| 84 |
Subject: [subject line]
|
| 85 |
-
Body:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
Email 2
|
| 87 |
Subject: [subject line]
|
| 88 |
-
Body:
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
| 91 |
Remember: Use only the information provided above. Do not reference anything not explicitly mentioned."""
|
| 92 |
else:
|
|
|
|
| 78 |
- Company Size: {company_size if company_size else 'Not specified'}
|
| 79 |
|
| 80 |
Generate all {num_emails} emails in the sequence following all the rules in the prompt.
|
| 81 |
+
CRITICAL: Every email body MUST start with "Hi {first_name}," (use the actual first name, not a placeholder).
|
| 82 |
Output format (exactly as specified in the prompt):
|
| 83 |
Contact: {first_name} {last_name} β {company}
|
| 84 |
Email 1
|
| 85 |
Subject: [subject line]
|
| 86 |
+
Body: Hi {first_name},
|
| 87 |
+
|
| 88 |
+
[email body content]
|
| 89 |
+
|
| 90 |
+
Anna
|
| 91 |
Email 2
|
| 92 |
Subject: [subject line]
|
| 93 |
+
Body: Hi {first_name},
|
| 94 |
+
|
| 95 |
+
[email body content]
|
| 96 |
+
|
| 97 |
+
Anna
|
| 98 |
+
... (continue for all {num_emails} emails, each starting with "Hi {first_name},")
|
| 99 |
|
| 100 |
Remember: Use only the information provided above. Do not reference anything not explicitly mentioned."""
|
| 101 |
else:
|
backend/app/main.py
CHANGED
|
@@ -436,13 +436,12 @@ async def push_to_smartlead(request: SmartleadPushRequest, db: Session = Depends
|
|
| 436 |
if body_str:
|
| 437 |
custom_variables[f'body_{i}'] = body_str
|
| 438 |
|
| 439 |
-
# Smartlead API doesn't allow "company"
|
| 440 |
-
# Company info can be included in custom_variables if needed
|
| 441 |
lead = {
|
| 442 |
"email": email,
|
| 443 |
"first_name": first_name,
|
| 444 |
"last_name": last_name,
|
| 445 |
-
"title": title,
|
| 446 |
"custom_variables": custom_variables
|
| 447 |
}
|
| 448 |
leads.append(lead)
|
|
|
|
| 436 |
if body_str:
|
| 437 |
custom_variables[f'body_{i}'] = body_str
|
| 438 |
|
| 439 |
+
# Smartlead API doesn't allow "company" or "title" fields - remove them
|
| 440 |
+
# Company and title info can be included in custom_variables if needed
|
| 441 |
lead = {
|
| 442 |
"email": email,
|
| 443 |
"first_name": first_name,
|
| 444 |
"last_name": last_name,
|
|
|
|
| 445 |
"custom_variables": custom_variables
|
| 446 |
}
|
| 447 |
leads.append(lead)
|
frontend/src/components/prompts/PromptEditor.jsx
CHANGED
|
@@ -182,20 +182,38 @@ For each contact, output exactly:
|
|
| 182 |
Contact: <First Name> <Last Name> β <Company>
|
| 183 |
|
| 184 |
Email 1
|
| 185 |
-
Subject:
|
| 186 |
-
Body:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
|
| 188 |
Email 2
|
| 189 |
-
Subject:
|
| 190 |
-
Body:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
|
| 192 |
Email 3
|
| 193 |
-
Subject:
|
| 194 |
-
Body:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
Email 4
|
| 197 |
-
Subject:
|
| 198 |
-
Body:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
π FINAL VALIDATION CHECK (MANDATORY)
|
| 201 |
|
|
|
|
| 182 |
Contact: <First Name> <Last Name> β <Company>
|
| 183 |
|
| 184 |
Email 1
|
| 185 |
+
Subject: <subject line>
|
| 186 |
+
Body: Hi <First Name>,
|
| 187 |
+
|
| 188 |
+
<email body content>
|
| 189 |
+
|
| 190 |
+
Anna
|
| 191 |
|
| 192 |
Email 2
|
| 193 |
+
Subject: <subject line>
|
| 194 |
+
Body: Hi <First Name>,
|
| 195 |
+
|
| 196 |
+
<email body content>
|
| 197 |
+
|
| 198 |
+
Anna
|
| 199 |
|
| 200 |
Email 3
|
| 201 |
+
Subject: <subject line>
|
| 202 |
+
Body: Hi <First Name>,
|
| 203 |
+
|
| 204 |
+
<email body content>
|
| 205 |
+
|
| 206 |
+
Anna
|
| 207 |
|
| 208 |
Email 4
|
| 209 |
+
Subject: <subject line>
|
| 210 |
+
Body: Hi <First Name>,
|
| 211 |
+
|
| 212 |
+
<email body content>
|
| 213 |
+
|
| 214 |
+
Anna
|
| 215 |
+
|
| 216 |
+
CRITICAL: Every email body MUST start with "Hi <First Name>," where <First Name> is the contact's actual first name from the input. Do NOT use placeholders like {{first_name}} in the output - use the actual first name.
|
| 217 |
|
| 218 |
π FINAL VALIDATION CHECK (MANDATORY)
|
| 219 |
|