@xuda.io/ai_module 1.1.4714 → 1.1.4716
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 +29 -8
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5534,14 +5534,15 @@ setTimeout(async () => {
|
|
|
5534
5534
|
let ret;
|
|
5535
5535
|
// ret = await is_spam_email(uid, 'dsgr8-2994400420@gigs.craigslist.org', 'To: You, From: Us - 70% Off Stickers & Labels Today Only');
|
|
5536
5536
|
// ret = await is_spam_email(uid, 'noreply@tm.openai.com', 'Please update your Plus payment method', account_profile_info);
|
|
5537
|
-
ret = await is_business_contact(
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5537
|
+
ret = await is_business_contact(uid, 'Eden Avrahami', 'eden.ioshka@gmail.com', 'Re: Account Accesses - Donwell Garage Doors', 'Hey Yosi,We didn’t get an update, please wait for my updates- you will be the first to know Thanks,Eden', account_profile_info);
|
|
5538
|
+
// ret = await is_business_contact(
|
|
5539
|
+
// uid,
|
|
5540
|
+
// 'noreply@tm.openai.com',
|
|
5541
|
+
// 'OpenAI',
|
|
5542
|
+
// 'Please update your Plus payment method',
|
|
5543
|
+
// 'Summary: Your ChatGPT Plus payment failed, but your access remains active for now. Please update your payment method to continue enjoying Plus benefits, including extended limits on messaging, file uploads, and voice mode; more image and video generation; and extended access to deep research and reasoning models. If you have questions, contact support@openai.com. Best regards, The ChatGPT Team.',
|
|
5544
|
+
// account_profile_info,
|
|
5545
|
+
// );
|
|
5545
5546
|
// ret = await delete_depended_chats(uid);
|
|
5546
5547
|
// 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 });
|
|
5547
5548
|
// 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' });
|
|
@@ -6853,6 +6854,26 @@ export const is_business_contact = async function (uid, email, name, subject, bo
|
|
|
6853
6854
|
} catch (error) {}
|
|
6854
6855
|
};
|
|
6855
6856
|
|
|
6857
|
+
export const is_business_contact_has_person = async function (uid, email, name, subject, body, account_profile_info) {
|
|
6858
|
+
const has_person_ret = await submit_chat_gpt_prompt({
|
|
6859
|
+
uid,
|
|
6860
|
+
prompt: `detect if the email "${email}", subject "${subject}", name "${name}", or body "${body}" is has person. Return true if it is a has person , false otherwise.`,
|
|
6861
|
+
|
|
6862
|
+
model: 'gpt-5-nano',
|
|
6863
|
+
response_format: z.object({
|
|
6864
|
+
has_person: z.boolean().describe('true if the email has person, false otherwise'),
|
|
6865
|
+
}),
|
|
6866
|
+
metadata: { func: 'is_business_contact' },
|
|
6867
|
+
account_profile_info,
|
|
6868
|
+
});
|
|
6869
|
+
try {
|
|
6870
|
+
if (has_person_ret.code > -1) {
|
|
6871
|
+
const data = JSON.parse(has_person_ret.data);
|
|
6872
|
+
return data.has_person;
|
|
6873
|
+
}
|
|
6874
|
+
} catch (error) {}
|
|
6875
|
+
};
|
|
6876
|
+
|
|
6856
6877
|
function normalizeFilename(name) {
|
|
6857
6878
|
return name
|
|
6858
6879
|
.toLowerCase() // lowercase
|