@xuda.io/ai_module 1.1.3782 → 1.1.3783

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 +18 -6
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4743,12 +4743,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4743
4743
  opt.selector._id = val.ai_agent_id;
4744
4744
  }
4745
4745
 
4746
- 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);
4747
-
4748
- const agent_ret = await get_ai_agents(opt);
4749
- if (agent_ret.code > -1) {
4750
- const agent_doc = agent_ret.data;
4751
-
4746
+ 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);
4747
+ for (const agent_doc of user_agents.docs) {
4752
4748
  const agent = new Agent({
4753
4749
  name: agent_doc.agent_name,
4754
4750
  instructions: agent_doc.agent_instructions,
@@ -4761,6 +4757,22 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4761
4757
  }),
4762
4758
  );
4763
4759
  }
4760
+ // const agent_ret = await get_ai_agents(opt);
4761
+ // if (agent_ret.code > -1) {
4762
+ // const agent_doc = agent_ret.data;
4763
+
4764
+ // const agent = new Agent({
4765
+ // name: agent_doc.agent_name,
4766
+ // instructions: agent_doc.agent_instructions,
4767
+ // });
4768
+
4769
+ // tools.push(
4770
+ // agent.asTool({
4771
+ // toolName: agent_doc.agent_name,
4772
+ // toolDescription: agent_doc.agent_instructions,
4773
+ // }),
4774
+ // );
4775
+ // }
4764
4776
  // }
4765
4777
  break;
4766
4778
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3782",
3
+ "version": "1.1.3783",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",