@xuda.io/ai_module 1.1.3786 → 1.1.3788

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 +8 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4747,7 +4747,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4747
4747
  opt.selector._id = val.ai_agent_id;
4748
4748
  }
4749
4749
 
4750
- const user_agents = await db_module.find_app_couch_query(ai_agent_doc?.studio_meta?.shared_from_app_id || ai_agent_doc?.studio_meta?.installed_from_app_id || app_id, opt);
4750
+ const user_agents = await db_module.find_app_couch_query(ai_agent_doc?.reference_doc?.studio_meta?.shared_from_app_id || ai_agent_doc?.reference_doc?.studio_meta?.installed_from_app_id || app_id, opt);
4751
4751
  for (const agent_doc of user_agents.docs) {
4752
4752
  const agent = new Agent({
4753
4753
  name: agent_doc.agent_name,
@@ -4788,7 +4788,13 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4788
4788
  throw new Error('undefined method');
4789
4789
  }
4790
4790
  // const tool = await get_plugin_tool(app_id, uid, val.plugin_id, val.method, {});
4791
- const tool = await get_plugin_tool(ai_agent_doc?.studio_meta?.shared_from_app_id || ai_agent_doc?.studio_meta?.installed_from_app_id || app_id, ai_agent_doc?.studio_meta?.shared_from_uid || ai_agent_doc?.studio_meta?.installed_from_uid || uid, val.plugin_id, val.method, {});
4791
+ const tool = await get_plugin_tool(
4792
+ ai_agent_doc?.reference_doc?.studio_meta?.shared_from_app_id || ai_agent_doc?.reference_doc?.studio_meta?.installed_from_app_id || app_id,
4793
+ ai_agent_doc?.reference_doc?.studio_meta?.shared_from_uid || ai_agent_doc?.reference_doc?.studio_meta?.installed_from_uid || uid,
4794
+ val.plugin_id,
4795
+ val.method,
4796
+ {},
4797
+ );
4792
4798
  tools.push(tool);
4793
4799
  break;
4794
4800
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3786",
3
+ "version": "1.1.3788",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",