@xuda.io/ai_module 1.1.4798 → 1.1.4800
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 +42 -38
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3342,44 +3342,44 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
|
|
|
3342
3342
|
"center": "title",
|
|
3343
3343
|
"right": "dayGridMonth,timeGridWeek,timeGridDay"
|
|
3344
3344
|
}",
|
|
3345
|
-
},
|
|
3346
|
-
events: {
|
|
3347
|
-
label: "Events",
|
|
3348
|
-
type: "string",
|
|
3349
|
-
render: "events",
|
|
3350
|
-
tooltip: "Listen to any event",
|
|
3351
|
-
options: [
|
|
3352
|
-
{
|
|
3353
|
-
label: "After update",
|
|
3354
|
-
value: "onAfterUpdate",
|
|
3355
|
-
tooltip: "Invoked after the tippy has been updated.",
|
|
3356
|
-
}
|
|
3357
|
-
],
|
|
3358
|
-
},
|
|
3359
|
-
event_name_for_successful_callback: {
|
|
3360
|
-
label: "Successful Callback",
|
|
3361
|
-
type: "string",
|
|
3362
|
-
render: "eventId",
|
|
3363
|
-
},
|
|
3364
|
-
customThresholds: {
|
|
3365
|
-
label: "Custom Thresholds",
|
|
3366
|
-
type: "boolean",
|
|
3367
|
-
render: "checkbox",
|
|
3368
|
-
tooltip: "Enable if you want to provide custom thresholds for formatting.",
|
|
3369
|
-
defaultValue: () => false,
|
|
3370
|
-
},
|
|
3371
|
-
field_id_to_return_result: {
|
|
3372
|
-
label: "Field Id Callback",
|
|
3373
|
-
type: "string",
|
|
3374
|
-
render: "field",
|
|
3375
|
-
},
|
|
3376
|
-
alert_description: {
|
|
3377
|
-
label: 'Alert Description',
|
|
3378
|
-
type: 'string',
|
|
3379
|
-
render: 'textarea',
|
|
3380
|
-
tooltip: 'Detailed description or message content of the alert.',
|
|
3381
|
-
mandatory: false,
|
|
3382
3345
|
},
|
|
3346
|
+
events: {
|
|
3347
|
+
label: "Events",
|
|
3348
|
+
type: "string",
|
|
3349
|
+
render: "events",
|
|
3350
|
+
tooltip: "Listen to any event",
|
|
3351
|
+
options: [
|
|
3352
|
+
{
|
|
3353
|
+
label: "After update",
|
|
3354
|
+
value: "onAfterUpdate",
|
|
3355
|
+
tooltip: "Invoked after the tippy has been updated.",
|
|
3356
|
+
}
|
|
3357
|
+
],
|
|
3358
|
+
},
|
|
3359
|
+
event_name_for_successful_callback: {
|
|
3360
|
+
label: "Successful Callback",
|
|
3361
|
+
type: "string",
|
|
3362
|
+
render: "eventId",
|
|
3363
|
+
} ,
|
|
3364
|
+
customThresholds: {
|
|
3365
|
+
label: "Custom Thresholds",
|
|
3366
|
+
type: "boolean",
|
|
3367
|
+
render: "checkbox",
|
|
3368
|
+
tooltip: "Enable if you want to provide custom thresholds for formatting.",
|
|
3369
|
+
defaultValue: () => false,
|
|
3370
|
+
},
|
|
3371
|
+
field_id_to_return_result: {
|
|
3372
|
+
label: "Field Id Callback",
|
|
3373
|
+
type: "string",
|
|
3374
|
+
render: "field",
|
|
3375
|
+
},
|
|
3376
|
+
alert_description: {
|
|
3377
|
+
label: 'Alert Description',
|
|
3378
|
+
type: 'string',
|
|
3379
|
+
render: 'textarea',
|
|
3380
|
+
tooltip: 'Detailed description or message content of the alert.',
|
|
3381
|
+
mandatory: false,
|
|
3382
|
+
},
|
|
3383
3383
|
|
|
3384
3384
|
|
|
3385
3385
|
docs: {
|
|
@@ -6717,13 +6717,16 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
|
|
|
6717
6717
|
};
|
|
6718
6718
|
|
|
6719
6719
|
// let file_names = [];
|
|
6720
|
+
let process_stat = 'full';
|
|
6720
6721
|
let system_message_items = [];
|
|
6721
6722
|
for (const file of attachments) {
|
|
6722
6723
|
// file_names.push(file.filename);
|
|
6723
6724
|
let transcript;
|
|
6724
6725
|
try {
|
|
6725
6726
|
transcript = await get_transcript(file.filename);
|
|
6726
|
-
} catch (error) {
|
|
6727
|
+
} catch (error) {
|
|
6728
|
+
process_stat = 'partial';
|
|
6729
|
+
}
|
|
6727
6730
|
|
|
6728
6731
|
const items = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
|
|
6729
6732
|
items: [
|
|
@@ -6752,6 +6755,7 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
|
|
|
6752
6755
|
conversation_item_reference_id: items.last_id,
|
|
6753
6756
|
file,
|
|
6754
6757
|
read: { [uid]: Date.now() },
|
|
6758
|
+
process_stat,
|
|
6755
6759
|
};
|
|
6756
6760
|
await db_module.save_app_couch_doc_native(account_profile_info.app_id, out_conversation_item_obj);
|
|
6757
6761
|
system_message_items.push(out_conversation_item_obj);
|