From d36ec79f026239f0bbeea28abbbfe606e71c2ebb Mon Sep 17 00:00:00 2001 From: Ken Yasue Date: Tue, 1 Apr 2025 18:05:54 +0200 Subject: [PATCH] save changes --- src/scripts/send-emails-to-customers.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/scripts/send-emails-to-customers.ts b/src/scripts/send-emails-to-customers.ts index de9732e..4e1d5c7 100644 --- a/src/scripts/send-emails-to-customers.ts +++ b/src/scripts/send-emails-to-customers.ts @@ -22,7 +22,7 @@ const emailCount = emailCountArg // LMStudio API settings const lmStudioUrl = lmStudioUrlArg ? 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 ? modelArg.split('=')[1] : 'local-model'; // Default model name @@ -51,9 +51,14 @@ async function generateEmailContent( // Create a prompt based on customer info and email count let prompt = ''; 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. - 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) { 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.