@xuda.io/ai_module 1.1.3883 → 1.1.3885

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 +10 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3120,12 +3120,17 @@ export const update_ai_agent_properties = async function (doc, app_id, uid) {
3120
3120
  return ret.data;
3121
3121
  };
3122
3122
 
3123
- const get_agent_user_guide = async function () {
3123
+ const get_agent_user_guide_fields = async function () {
3124
3124
  const ret = await submit_chat_gpt_prompt({
3125
3125
  uid,
3126
- prompt: `Generate agent industry for the AI agent titled:
3127
- “${doc.properties.menuName}” choose only one from the list:
3128
- Artificial Intelligence,SaaS,Fintech,Healthtech,Edtech,Blockchain/Crypto,Cybersecurity,Gaming,Consulting,Marketing & Advertising,Human Resources,Legal Services,Real Estate,E-commerce,Retail,Fashion & Apparel,Consumer Goods,Healthcare,Medical,Pharmaceutical,Banking,Insurance,Investment,Manufacturing,Logistics & Supply Chain,Construction,Energy,Media,Entertainment,Sports,Education,Travel & Hospitality,Food & Beverage,Non-Profit,Government,Agriculture,Automotive,Telecommunications`,
3126
+ prompt: `
3127
+ create structured object like the example below for the the following prompt :
3128
+ ${db_doc.agentConfig.agent_user_guide}
3129
+ ----------
3130
+ {
3131
+ enableTime: { label: "Enable Time Picker", type: "boolean", render: "segment", tooltip: "Enable or disable time selection in the picker.", defaultValue: () => false, options: [ { label: "Yes", value: true }, { label: "No", value: false }, ], }, dateFormat: { label: "Date Format", type: "string", render: "input", tooltip: "Specify the format for the selected date.", defaultValue: () => "Y-m-d", }, altInput: { label: "Alternative Input", type: "boolean", render: "segment", tooltip: "Enable an alternative input field with custom formatting.", defaultValue: () => false, options: [ { label: "Yes", value: true }, { label: "No", value: false }, ], }, altFormat: { label: "Alternative Format", type: "string", render: "input", tooltip: "Define the format for the alternative input field.", defaultValue: () => "F j, Y", }, minDate: { label: "Minimum Date", type: "string", render: "input", tooltip: "Set the earliest selectable date.", defaultValue: () => "today", }, maxDate: { label: "Maximum Date", type: "string", render: "input", tooltip: "Set the latest selectable date.", defaultValue: () => "", }, mode: { label: "Selection Mode", type: "string", render: "select", tooltip: "Choose between single, multiple, or range selection modes.", defaultValue: () => "single", options: [ { label: "Single", value: "single" }, { label: "Multiple", value: "multiple" }, { label: "Range", value: "range" }, ], }, locale: { label: "Locale", type: "string", render: "select", tooltip: "Set the language for the picker.", defaultValue: () => "en", options: [ { label: "English", value: "en" }, { label: "Spanish", value: "es" }, { label: "French", value: "fr" }, ], }, inline: { label: "Inline Calendar", type: "boolean", render: "segment", tooltip: "Display the calendar inline rather than in a dropdown.", defaultValue: () => false, options: [ { label: "Yes", value: true }, { label: "No", value: false }, ], }, weekNumbers: { label: "Show Week Numbers", type: "boolean", render: "segment", tooltip: "Display week numbers in the calendar view.", defaultValue: () => false, options: [ { label: "Yes", value: true }, { label: "No", value: false }, ], }, disable: { label: "Disable Specific Dates", type: "array", tooltip: "Provide an array of dates to disable.", render: "chips", defaultValue: () => [], }, outputBindFormat: { label: "Output bind format", type: "string", render: "select", tooltip: "Choose between Date, or Value to set how the bind output will be set.", defaultValue: () => "date", options: [ { label: "Date object", value: "date" }, { label: "Date value", value: "value" }, ], }, };
3132
+
3133
+ `,
3129
3134
  model: 'gpt-5-nano',
3130
3135
  metadata: { agent_id: db_doc._id, func: 'get_agent_user_guide' },
3131
3136
  });
@@ -3146,7 +3151,7 @@ export const update_ai_agent_properties = async function (doc, app_id, uid) {
3146
3151
  }
3147
3152
 
3148
3153
  if (!db_doc.agentConfig.agent_user_guide_fields && db_doc.agentConfig.agent_user_guide) {
3149
- db_doc.agentConfig.agent_user_guide_fields = await get_agent_user_guide();
3154
+ db_doc.agentConfig.agent_user_guide_fields = await get_agent_user_guide_fields();
3150
3155
  db_doc.studio_meta.agent_user_guide_fields = db_doc.agentConfig.agent_user_guide_fields;
3151
3156
  }
3152
3157
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3883",
3
+ "version": "1.1.3885",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",