@xuda.io/ai_module 1.1.4066 → 1.1.4068

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.
Files changed (2) hide show
  1. package/index.mjs +2 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6510,11 +6510,12 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
6510
6510
  export const is_spam_email = async function (uid, email, content) {
6511
6511
  const is_spam = await submit_chat_gpt_prompt({
6512
6512
  uid,
6513
- prompt: `detect if the email: ${email} is spam. return true or false`,
6513
+ prompt: `detect if the email: ${email} is spam or promotional. return true or false`,
6514
6514
  model: 'gpt-5-nano',
6515
6515
  response_format: z.object({
6516
6516
  is_spam: z.boolean().describe('if spam email return true otherwise false'),
6517
6517
  }),
6518
6518
  metadata: { func: 'is_spam_email' },
6519
6519
  });
6520
+ return is_spam;
6520
6521
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4066",
3
+ "version": "1.1.4068",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",