@xuda.io/ai_module 1.1.4799 → 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.
Files changed (2) hide show
  1. package/index.mjs +65 -44
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3342,53 +3342,53 @@ 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
- docs: {
3386
- label: 'Docs',
3387
- type: 'string',
3388
- tooltip: 'Supply array collection of docs to save',
3389
- mandatory: true,
3390
- render: 'file',
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4799",
3
+ "version": "1.1.4801",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",