@xuda.io/ai_module 1.1.4800 → 1.1.4802

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 +70 -19
  2. 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
- 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
- },
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
- 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,57 @@ 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 ## fields object
3416
+
3417
+ result example:
3418
+
3419
+ const loanStepper = [
3420
+ {
3421
+ step: 1,
3422
+ title: "Core Loan Details",
3423
+ description: "Enter the fundamental numbers for your loan.",
3424
+ fields: ["loan_amount", "down_payment", "loan_type"]
3425
+ },
3426
+ {
3427
+ step: 2,
3428
+ title: "Rates & Terms",
3429
+ description: "Define the interest and duration of the loan.",
3430
+ fields: ["interest_rate", "interest_type", "loan_term"]
3431
+ },
3432
+ {
3433
+ step: 3,
3434
+ title: "Payment Schedule",
3435
+ description: "How and when would you like to make payments?",
3436
+ fields: ["payment_frequency", "start_date"]
3437
+ },
3438
+ {
3439
+ step: 4,
3440
+ title: "Additional Options",
3441
+ description: "Finalize your calculation with extra payments or schedules.",
3442
+ fields: ["extra_payments", "amortization_schedule"]
3443
+ }
3444
+ ];
3445
+
3446
+ `,
3447
+ model: 'gpt-5-nano',
3448
+ metadata: { agent_id: db_doc._id, func: 'get_agent_user_guide_fields' },
3449
+ account_profile_info,
3450
+ });
3451
+
3452
+ return ret.data;
3453
+ };
3403
3454
  if (!db_doc.studio_meta.agent_assistant_name || fields_changed.name_changed || fields_changed.agent_instructions_changed || fields_changed.all) {
3404
3455
  db_doc.studio_meta.agent_assistant_name = await get_agent_assistant_name();
3405
3456
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4800",
3
+ "version": "1.1.4802",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",