@xuda.io/ai_module 1.1.3883 → 1.1.3884
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 +8 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3120,12 +3120,15 @@ export const update_ai_agent_properties = async function (doc, app_id, uid) {
|
|
|
3120
3120
|
return ret.data;
|
|
3121
3121
|
};
|
|
3122
3122
|
|
|
3123
|
-
const
|
|
3123
|
+
const get_agent_user_guide_fields = async function () {
|
|
3124
3124
|
const ret = await submit_chat_gpt_prompt({
|
|
3125
3125
|
uid,
|
|
3126
|
-
prompt: `
|
|
3127
|
-
|
|
3128
|
-
|
|
3126
|
+
prompt: `
|
|
3127
|
+
|
|
3128
|
+
create structured object like the example below for the the following prompt : Required Information: Principal Amount (P) - The initial money you invest or borrow Example: $1,000, ₹50,000, €5,000 Annual Interest Rate (R) - The yearly interest percentage Example: 5% (enter as 5, not 0.05) Time Period (T) - How long the money is invested/borrowed In Years: Example: 3 years In Months: Example: 18 months Select the appropriate time unit from the dropdown ---------- const properties = { 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" }, ], }, };
|
|
3129
|
+
|
|
3130
|
+
|
|
3131
|
+
`,
|
|
3129
3132
|
model: 'gpt-5-nano',
|
|
3130
3133
|
metadata: { agent_id: db_doc._id, func: 'get_agent_user_guide' },
|
|
3131
3134
|
});
|
|
@@ -3146,7 +3149,7 @@ export const update_ai_agent_properties = async function (doc, app_id, uid) {
|
|
|
3146
3149
|
}
|
|
3147
3150
|
|
|
3148
3151
|
if (!db_doc.agentConfig.agent_user_guide_fields && db_doc.agentConfig.agent_user_guide) {
|
|
3149
|
-
db_doc.agentConfig.agent_user_guide_fields = await
|
|
3152
|
+
db_doc.agentConfig.agent_user_guide_fields = await get_agent_user_guide_fields();
|
|
3150
3153
|
db_doc.studio_meta.agent_user_guide_fields = db_doc.agentConfig.agent_user_guide_fields;
|
|
3151
3154
|
}
|
|
3152
3155
|
|