save changes
This commit is contained in:
@ -22,7 +22,7 @@ const emailCount = emailCountArg
|
|||||||
// LMStudio API settings
|
// LMStudio API settings
|
||||||
const lmStudioUrl = lmStudioUrlArg
|
const lmStudioUrl = lmStudioUrlArg
|
||||||
? lmStudioUrlArg.split('=')[1]
|
? lmStudioUrlArg.split('=')[1]
|
||||||
: 'http://localhost:3000/v1/chat/completions'; // Default LMStudio API endpoint
|
: 'http://localhost:1234/v1/chat/completions'; // Default LMStudio API endpoint
|
||||||
const model = modelArg
|
const model = modelArg
|
||||||
? modelArg.split('=')[1]
|
? modelArg.split('=')[1]
|
||||||
: 'local-model'; // Default model name
|
: 'local-model'; // Default model name
|
||||||
@ -51,9 +51,14 @@ async function generateEmailContent(
|
|||||||
// Create a prompt based on customer info and email count
|
// Create a prompt based on customer info and email count
|
||||||
let prompt = '';
|
let prompt = '';
|
||||||
if (emailCount === 0) {
|
if (emailCount === 0) {
|
||||||
prompt = `Generate a welcome email for a new customer named ${customer.name} from ${customer.url}.
|
prompt = `Generate a welcome email for a new customer named ${customer.name} from ${customer.city}.
|
||||||
This is the first contact with them. The email should be professional but friendly.
|
This is the first contact with them. The email should be professional but friendly.
|
||||||
Return ONLY a JSON object with 'subject' and 'body' fields. The body should be in HTML format.`;
|
Return ONLY a JSON object with 'subject' and 'body' fields. The body should be in HTML format.
|
||||||
|
|
||||||
|
instructions
|
||||||
|
1. This email is proposal for custom AI video generation.
|
||||||
|
2. Please includde your prposal for the simple video for the museum.
|
||||||
|
3. Please use the language of the city ${customer.city}`;
|
||||||
}/* else if (emailCount === 1) {
|
}/* else if (emailCount === 1) {
|
||||||
prompt = `Generate a follow-up email for customer ${customer.name} from ${customer.url}.
|
prompt = `Generate a follow-up email for customer ${customer.name} from ${customer.url}.
|
||||||
This is the second contact with them. The email should reference a previous welcome email and provide more value.
|
This is the second contact with them. The email should reference a previous welcome email and provide more value.
|
||||||
|
|||||||
Reference in New Issue
Block a user