@xuda.io/ai_module 1.1.4800 → 1.1.4801
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 +40 -19
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3361,18 +3361,18 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
|
|
|
3361
3361
|
type: "string",
|
|
3362
3362
|
render: "eventId",
|
|
3363
3363
|
} ,
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
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
3376
|
alert_description: {
|
|
3377
3377
|
label: 'Alert Description',
|
|
3378
3378
|
type: 'string',
|
|
@@ -3382,13 +3382,13 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
|
|
|
3382
3382
|
},
|
|
3383
3383
|
|
|
3384
3384
|
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3385
|
+
docs: {
|
|
3386
|
+
label: 'Docs',
|
|
3387
|
+
type: 'string',
|
|
3388
|
+
tooltip: 'Supply array collection of docs to save',
|
|
3389
|
+
mandatory: true,
|
|
3390
|
+
render: 'file',
|
|
3391
|
+
},
|
|
3392
3392
|
|
|
3393
3393
|
};
|
|
3394
3394
|
|
|
@@ -3400,6 +3400,27 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
|
|
|
3400
3400
|
|
|
3401
3401
|
return ret.data;
|
|
3402
3402
|
};
|
|
3403
|
+
|
|
3404
|
+
const get_agent_user_guide_steps = async function (agent_user_guide_fields) {
|
|
3405
|
+
const ret = await submit_chat_gpt_prompt({
|
|
3406
|
+
uid,
|
|
3407
|
+
prompt: `
|
|
3408
|
+
## fields object:
|
|
3409
|
+
${agent_user_guide_fields}
|
|
3410
|
+
|
|
3411
|
+
create stepper array in logic order from the prompt:
|
|
3412
|
+
"${db_doc.agentConfig.agent_user_guide}"
|
|
3413
|
+
|
|
3414
|
+
|
|
3415
|
+
use the field keys from the above object
|
|
3416
|
+
`,
|
|
3417
|
+
model: 'gpt-5-nano',
|
|
3418
|
+
metadata: { agent_id: db_doc._id, func: 'get_agent_user_guide_fields' },
|
|
3419
|
+
account_profile_info,
|
|
3420
|
+
});
|
|
3421
|
+
|
|
3422
|
+
return ret.data;
|
|
3423
|
+
};
|
|
3403
3424
|
if (!db_doc.studio_meta.agent_assistant_name || fields_changed.name_changed || fields_changed.agent_instructions_changed || fields_changed.all) {
|
|
3404
3425
|
db_doc.studio_meta.agent_assistant_name = await get_agent_assistant_name();
|
|
3405
3426
|
}
|