@xuda.io/ai_module 1.1.4739 → 1.1.4741
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +7 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6840,9 +6840,15 @@ export const is_spam_email = async function (uid, email, subject, account_profil
|
|
|
6840
6840
|
};
|
|
6841
6841
|
|
|
6842
6842
|
export const is_business_contact = async function (uid, email, name, subject, body, account_profile_info) {
|
|
6843
|
+
let prompt = `detect if the email "${email}", subject "${subject}", name "${name}", or body "${body}" is business or personal. Return true if it is a business , false otherwise.`;
|
|
6844
|
+
debugger;
|
|
6845
|
+
if (!subject) {
|
|
6846
|
+
prompt = `detect if the email "${email}" and name "${name}" is business or personal. Return true if it is a business , false otherwise.`;
|
|
6847
|
+
}
|
|
6848
|
+
|
|
6843
6849
|
const is_business_ret = await submit_chat_gpt_prompt({
|
|
6844
6850
|
uid,
|
|
6845
|
-
prompt
|
|
6851
|
+
prompt,
|
|
6846
6852
|
// prompt: `Determine if the contact with email "${email}", subject "${subject}", name "${name}", or body "${body}" belongs to a business account. Return true if it is a business contact, false otherwise.`,
|
|
6847
6853
|
model: 'gpt-5-nano',
|
|
6848
6854
|
response_format: z.object({
|