@xuda.io/ai_module 1.1.3990 → 1.1.3992

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 +5 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4627,6 +4627,10 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4627
4627
  let tools = [];
4628
4628
  let tool_resources = {};
4629
4629
 
4630
+ const register_tool = function (opt) {
4631
+ tools.push(tool(opt));
4632
+ };
4633
+
4630
4634
  for (const [key, val] of Object.entries(ai_agent_doc?.agentConfig?.agent_tools || [])) {
4631
4635
  const { name, description } = val;
4632
4636
  switch (val.type) {
@@ -4712,6 +4716,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4712
4716
  }
4713
4717
  }
4714
4718
  try {
4719
+ register_tool();
4715
4720
  tools.push(
4716
4721
  tool({
4717
4722
  name: method_name.replace(/_/g, ' ').replace(/\b(\w)/g, (_, char) => char.toUpperCase()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3990",
3
+ "version": "1.1.3992",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",