@xuda.io/ai_module 1.1.4801 → 1.1.4803

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 +34 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3412,10 +3412,40 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
3412
3412
  "${db_doc.agentConfig.agent_user_guide}"
3413
3413
 
3414
3414
 
3415
- use the field keys from the above object
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
+
3416
3446
  `,
3417
3447
  model: 'gpt-5-nano',
3418
- metadata: { agent_id: db_doc._id, func: 'get_agent_user_guide_fields' },
3448
+ metadata: { agent_id: db_doc._id, func: 'get_agent_user_guide_steps' },
3419
3449
  account_profile_info,
3420
3450
  });
3421
3451
 
@@ -3437,6 +3467,8 @@ use the field keys from the above object
3437
3467
  if (db_doc.agentConfig.agent_user_guide && (fields_changed.agent_user_guide_changed || fields_changed.all)) {
3438
3468
  db_doc.agentConfig.agent_user_guide_fields = await get_agent_user_guide_fields();
3439
3469
  db_doc.studio_meta.agent_user_guide_fields = db_doc.agentConfig.agent_user_guide_fields;
3470
+ db_doc.agentConfig.agent_user_guide_steps = await get_agent_user_guide_steps(db_doc.studio_meta.agent_user_guide_fields);
3471
+ db_doc.studio_meta.agent_user_guide_steps = db_doc.agentConfig.agent_user_guide_steps;
3440
3472
  }
3441
3473
 
3442
3474
  const save_ret = await db_module.save_app_couch_doc_native(app_id, db_doc);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4801",
3
+ "version": "1.1.4803",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",