@xuda.io/ai_module 1.1.4062 → 1.1.4063

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 +4 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -6507,12 +6507,12 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
6507
6507
  };
6508
6508
 
6509
6509
  export const is_spam_email = async function (uid, email, content) {
6510
- const mood_level = await submit_chat_gpt_prompt({
6511
- uid: sender_uid,
6512
- prompt: `analyze the mood of the following prompt: ${prompt}. return -2: very negative,-1: negative 0:natural 1:positive 2: very positive.`,
6510
+ const is_spam = await submit_chat_gpt_prompt({
6511
+ uid,
6512
+ prompt: `detect if the email: ${email} is spam. return true or false`,
6513
6513
  model: 'gpt-5-nano',
6514
6514
  response_format: z.object({
6515
- mood_level: z.number().describe('mood level of interaction: -2: very negative,-1: negative 0:natural 1:positive 2: very positive'),
6515
+ is_spam: z.boolean().describe('if spam return true otherwise false'),
6516
6516
  }),
6517
6517
  metadata: { conversation_id, func: 'update_conversation_mood_level' },
6518
6518
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4062",
3
+ "version": "1.1.4063",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",