@xuda.io/ai_module 1.1.4212 → 1.1.4214

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 +9 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1769,6 +1769,11 @@ export const get_ai_chats = async function (req, job_id, headers) {
1769
1769
  skip: skip || 0,
1770
1770
  sort: [{ ts: reference_id ? 'asc' : 'desc' }],
1771
1771
  };
1772
+ debugger;
1773
+ if (!account_profile_info.is_main) {
1774
+ opt.selector.account_profiles = 1;
1775
+ //"udfData.data.category": {"$in": ["electronics", "books"]},
1776
+ }
1772
1777
 
1773
1778
  switch (filter_type) {
1774
1779
  case 'archived': {
@@ -1822,7 +1827,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
1822
1827
  };
1823
1828
  }
1824
1829
 
1825
- const app_id = await account_module.get_account_default_project_id(uid);
1830
+ // const app_id = await account_module.get_account_default_project_id(uid);
1826
1831
 
1827
1832
  ////// FROM - IN
1828
1833
  let requests_from = { docs: [], total_docs: 0 };
@@ -3143,7 +3148,7 @@ export const create_ai_agent = async function (req, job_id, headers) {
3143
3148
  agent_doc.studio_meta.agent_tags = agentConfig.agent_tags;
3144
3149
  agent_doc.studio_meta.agent_user_guide = agentConfig.agent_user_guide;
3145
3150
  // agent_doc.studio_meta.account_profile_info = account_profile_info;
3146
- agent_doc.studio_meta.account_profiles[account_profile_obj];
3151
+ agent_doc.studio_meta.account_profiles[account_profile_obj._id];
3147
3152
 
3148
3153
  // const data = await db.insert(agent_doc);
3149
3154
 
@@ -4159,7 +4164,7 @@ export const create_conversation = async function (req, job_id, headers) {
4159
4164
  conversation_type,
4160
4165
  initiator_uid: uid,
4161
4166
 
4162
- account_profiles: [account_profile_obj],
4167
+ account_profiles: [account_profile_obj._id],
4163
4168
  };
4164
4169
  const save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, conversation_doc);
4165
4170
 
@@ -6354,7 +6359,7 @@ export const create_mini_app = async function (req, job_id, headers) {
6354
6359
  const param = { uid, properties: { menuName: prompt, menuTitle: prompt, menuType: 'component' }, checkedInUserName: account_info.first_name + ' ' + account_info.last_name, app_id, parentId: 'programs' };
6355
6360
  let component_doc = createDoc(param);
6356
6361
  component_doc.studio_meta.miniApp = true;
6357
- component_doc.studio_meta.account_profiles[account_profile_obj];
6362
+ component_doc.studio_meta.account_profiles[account_profile_obj._id];
6358
6363
  const name = await submit_chat_gpt_prompt({ uid, prompt: `create title for the prompt return 5 words result maximum text only without options : ${prompt}`, model: 'gpt-5-nano', metadata: { prog_id: component_doc._id, func: 'create_mini_app' } }, account_profile_info);
6359
6364
  component_doc.properties.menuName = name.data;
6360
6365
  component_doc.properties.menuTitle = name.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4212",
3
+ "version": "1.1.4214",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",