@xuda.io/ai_module 1.1.4283 → 1.1.4284
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 +15 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6690,10 +6690,24 @@ export const is_spam_email = async function (uid, email, subject, account_profil
|
|
|
6690
6690
|
prompt: `detect if the email: ${email} with a subject ${subject} is spam or promotional. return true or false`,
|
|
6691
6691
|
model: 'gpt-5-nano',
|
|
6692
6692
|
response_format: z.object({
|
|
6693
|
-
is_spam: z.boolean().describe('if
|
|
6693
|
+
is_spam: z.boolean().describe('if business account or promotional email return true otherwise false'),
|
|
6694
6694
|
}),
|
|
6695
6695
|
metadata: { func: 'is_spam_email' },
|
|
6696
6696
|
account_profile_info,
|
|
6697
6697
|
});
|
|
6698
6698
|
return is_spam;
|
|
6699
6699
|
};
|
|
6700
|
+
|
|
6701
|
+
export const is_business_contact = async function (uid, email, subject, body, account_profile_info) {
|
|
6702
|
+
const is_spam = await submit_chat_gpt_prompt({
|
|
6703
|
+
uid,
|
|
6704
|
+
prompt: `detect if the account with email: ${email} , subject ${subject}, body ${body} is business. return true or false`,
|
|
6705
|
+
model: 'gpt-5-nano',
|
|
6706
|
+
response_format: z.object({
|
|
6707
|
+
is_spam: z.boolean().describe('if business account return true otherwise false'),
|
|
6708
|
+
}),
|
|
6709
|
+
metadata: { func: 'is_business_contact' },
|
|
6710
|
+
account_profile_info,
|
|
6711
|
+
});
|
|
6712
|
+
return is_spam;
|
|
6713
|
+
};
|