@xuda.io/ai_module 1.1.4069 → 1.1.4071
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 +3 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5126,7 +5126,7 @@ setTimeout(async () => {
|
|
|
5126
5126
|
|
|
5127
5127
|
// await init_studio_units();
|
|
5128
5128
|
let ret;
|
|
5129
|
-
ret = await is_spam_email(uid, 'dsgr8-2994400420@gigs.craigslist.org');
|
|
5129
|
+
ret = await is_spam_email(uid, 'dsgr8-2994400420@gigs.craigslist.org', 'To: You, From: Us - 70% Off Stickers & Labels Today Only');
|
|
5130
5130
|
// ret = await delete_depended_chats(uid);
|
|
5131
5131
|
// ret = await run_plugin(app_id, uid, '@xuda.io/xuda-library-plugin-studio-ai-app-builder', 'table_builder', { name: 'test2', prompt: 'build items table', save: true });
|
|
5132
5132
|
// ret = await run_plugin(app_id, uid, '@xuda.io/xuda-library-plugin-studio-ai-app-builder', 'folder_builder', { name: 'test', prompt: 'build boaz folder', save: true, parentId: 'programs' });
|
|
@@ -6507,10 +6507,10 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
|
|
|
6507
6507
|
return system_message_items;
|
|
6508
6508
|
};
|
|
6509
6509
|
|
|
6510
|
-
export const is_spam_email = async function (uid, email,
|
|
6510
|
+
export const is_spam_email = async function (uid, email, subject) {
|
|
6511
6511
|
const is_spam = await submit_chat_gpt_prompt({
|
|
6512
6512
|
uid,
|
|
6513
|
-
prompt: `detect if the email: ${email} is spam or promotional. return true or false`,
|
|
6513
|
+
prompt: `detect if the email: ${email} with a subject ${subject} 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 or promotional email return true otherwise false'),
|