@xuda.io/ai_module 1.1.5403 → 1.1.5405

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 +19 -12
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4709,26 +4709,32 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4709
4709
  },
4710
4710
  tool_resources,
4711
4711
  modelSettings,
4712
- hooks: {
4713
- onToolStart(context, tool, details) {
4714
- console.log('onToolStart', context, tool, details);
4715
- // emitToDashboard('agent_tool_start', tool.name);
4716
- },
4717
- onToolEnd(context, tool, result, details) {
4718
- console.log('onToolEnd', context, tool, details);
4719
- // emitToDashboard('agent_tool_end', tool.name);
4720
- },
4721
- },
4712
+ // hooks: {
4713
+ // onToolStart(context, tool, details) {
4714
+ // console.log('onToolStart', context, tool, details);
4715
+ // // emitToDashboard('agent_tool_start', tool.name);
4716
+ // },
4717
+ // onToolEnd(context, tool, result, details) {
4718
+ // console.log('onToolEnd', context, tool, details);
4719
+ // // emitToDashboard('agent_tool_end', tool.name);
4720
+ // },
4721
+ // },
4722
4722
  });
4723
4723
 
4724
4724
  if (eligible_agent) {
4725
4725
  // allow read only agents if not ai_agent scope
4726
4726
  if (!prompt_suggestion_activated) {
4727
4727
  // init_agent_hooks(agent);
4728
- agent.on('agent_tool_start', (context, tool, details) => {
4728
+ agent.on('onToolStart', (context, tool, details) => {
4729
4729
  debugger;
4730
4730
  // emitToDashboard('agent_tool_start', tool.name);
4731
- emitToDashboard('stream_phase', `Starting ${tool.name} tool`);
4731
+ // emitToDashboard('stream_phase', `Starting ${tool.name} tool`);
4732
+ });
4733
+
4734
+ agent.on('onToolEnd', (context, tool, details) => {
4735
+ debugger;
4736
+ // emitToDashboard('agent_tool_start', tool.name);
4737
+ // emitToDashboard('stream_phase', `Starting ${tool.name} tool`);
4732
4738
  });
4733
4739
  }
4734
4740
  list.push(agent);
@@ -11089,6 +11095,7 @@ export const open_ai_alive_check = async function () {};
11089
11095
  // };
11090
11096
 
11091
11097
  export const get_chat_suggestions = async function (req) {
11098
+ debugger;
11092
11099
  //type = 'chat prompt'
11093
11100
  const { type = 'chat response', uid, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model, context } = req;
11094
11101
  let { ai_agents, exclude_agents = [] } = req;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5403",
3
+ "version": "1.1.5405",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",