@xuda.io/ai_module 1.1.5450 → 1.1.5452

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 +3 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4351,7 +4351,6 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4351
4351
  return is_agent ? identity : triage_assistant + identity;
4352
4352
  };
4353
4353
  const get_agents = async function () {
4354
- debugger;
4355
4354
  if (reference_type === 'ai_agents') {
4356
4355
  local_ai_agents = [reference_id];
4357
4356
  } else {
@@ -4390,14 +4389,14 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4390
4389
  } catch (err) {
4391
4390
  throw new Error(err.message);
4392
4391
  }
4393
- debugger;
4392
+
4394
4393
  if (prompt_suggestion_activated || chat_suggestion_activated || reference_type === 'ai_agents') {
4395
4394
  if (ai_agent_doc?.agentConfig?.agent_ai_model) {
4396
4395
  model = ai_agent_doc.agentConfig.agent_ai_model;
4397
4396
  }
4398
4397
  }
4399
4398
 
4400
- if (ai_agent_doc.use_tools_only) {
4399
+ if (ai_agent_doc.use_tools_only || chat_suggestion_activated) {
4401
4400
  modelSettings.toolChoice = 'required';
4402
4401
  }
4403
4402
 
@@ -4902,6 +4901,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4902
4901
  emitToDashboard('stream_phase', 'Submitting chat', { update: true });
4903
4902
  init_agent_hooks(_agent);
4904
4903
  // const output = await runner.run(_agent, prompt, opt);
4904
+ debugger;
4905
4905
  const output = await run_agent(_agent, prompt, opt);
4906
4906
  const done = async function (output) {
4907
4907
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5450",
3
+ "version": "1.1.5452",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",