@xuda.io/ai_module 1.1.4855 → 1.1.4857

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 +27 -31
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2706,14 +2706,30 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
2706
2706
  const ret = await submit_chat_gpt_prompt({
2707
2707
  uid,
2708
2708
  prompt: `
2709
- create structured object like the example below for the the following prompt :
2710
- ${db_doc.agentConfig.agent_user_guide}
2709
+ create structured object like the ## example below for the the following prompt :
2710
+ "${db_doc.agentConfig.agent_user_guide}"
2711
+
2712
+ only use render options:
2713
+ list
2714
+ editor
2715
+ toggle
2716
+ chips
2717
+ select
2718
+ autocomplete
2719
+ select_chip
2720
+ segment
2721
+ date
2722
+ file
2723
+ checkbox
2724
+ textarea
2725
+ input
2726
+
2711
2727
  ----------
2712
- Example:
2728
+ ## example:
2713
2729
  {
2714
2730
  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 }, ], },
2715
- dateFormat: { label: "Date Format", type: "string", render: "input", tooltip: "Specify the format for the selected date.", defaultValue: () => "Y-m-d", },
2716
- 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" }, ], },
2731
+ dateFormat: { label: "Date Format", type: "text", render: "input", tooltip: "Specify the format for the selected date.", defaultValue: () => "Y-m-d", },
2732
+ mode: { label: "Selection Mode", type: "text", 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" }, ], },
2717
2733
  disable: { label: "Disable Specific Dates", type: "array", tooltip: "Provide an array of dates to disable.", render: "chips", defaultValue: () => [], },
2718
2734
  fullcalendar_header: {
2719
2735
  label: "Header Toolbar",
@@ -2728,24 +2744,8 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
2728
2744
  "right": "dayGridMonth,timeGridWeek,timeGridDay"
2729
2745
  }",
2730
2746
  },
2731
- events: {
2732
- label: "Events",
2733
- type: "string",
2734
- render: "events",
2735
- tooltip: "Listen to any event",
2736
- options: [
2737
- {
2738
- label: "After update",
2739
- value: "onAfterUpdate",
2740
- tooltip: "Invoked after the tippy has been updated.",
2741
- }
2742
- ],
2743
- },
2744
- event_name_for_successful_callback: {
2745
- label: "Successful Callback",
2746
- type: "string",
2747
- render: "eventId",
2748
- } ,
2747
+
2748
+
2749
2749
  customThresholds: {
2750
2750
  label: "Custom Thresholds",
2751
2751
  type: "boolean",
@@ -2753,11 +2753,7 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
2753
2753
  tooltip: "Enable if you want to provide custom thresholds for formatting.",
2754
2754
  defaultValue: () => false,
2755
2755
  },
2756
- field_id_to_return_result: {
2757
- label: "Field Id Callback",
2758
- type: "string",
2759
- render: "field",
2760
- },
2756
+
2761
2757
  alert_description: {
2762
2758
  label: 'Alert Description',
2763
2759
  type: 'string',
@@ -2797,7 +2793,7 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
2797
2793
  "${db_doc.agentConfig.agent_user_guide}"
2798
2794
 
2799
2795
 
2800
- use the field keys from the above ## fields object
2796
+ use ONLY the field keys from the above ## fields object
2801
2797
  and create validations for each step
2802
2798
 
2803
2799
  result example:
@@ -3522,7 +3518,7 @@ export const create_conversation = async function (req, job_id, headers) {
3522
3518
  }
3523
3519
  };
3524
3520
 
3525
- const process_conversation = async function (uid, conversation_id, account_profile_info, job_id, headers) {
3521
+ export const process_conversation = async function (uid, conversation_id, account_profile_info, job_id, headers) {
3526
3522
  let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
3527
3523
  const { conversation_type, prompt, reference_id } = conversation_doc;
3528
3524
 
@@ -3657,7 +3653,7 @@ export const submit_chat_conversation = async function (req, job_id, headers) {
3657
3653
  }
3658
3654
  };
3659
3655
 
3660
- const update_conversation_mood_level = async function (uid, target_contacts = [], conversation_id, prompt, sender_uid, receiver_uid, update_contact, account_profile_info) {
3656
+ export const update_conversation_mood_level = async function (uid, target_contacts = [], conversation_id, prompt, sender_uid, receiver_uid, update_contact, account_profile_info) {
3661
3657
  try {
3662
3658
  // analyze the mood of the conversation
3663
3659
  const mood_level = await submit_chat_gpt_prompt({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4855",
3
+ "version": "1.1.4857",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",