@xuda.io/ai_module 1.1.5450 → 1.1.5451
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.
- package/index.mjs +3 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4390,14 +4390,14 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4390
4390
|
} catch (err) {
|
|
4391
4391
|
throw new Error(err.message);
|
|
4392
4392
|
}
|
|
4393
|
-
|
|
4393
|
+
|
|
4394
4394
|
if (prompt_suggestion_activated || chat_suggestion_activated || reference_type === 'ai_agents') {
|
|
4395
4395
|
if (ai_agent_doc?.agentConfig?.agent_ai_model) {
|
|
4396
4396
|
model = ai_agent_doc.agentConfig.agent_ai_model;
|
|
4397
4397
|
}
|
|
4398
4398
|
}
|
|
4399
4399
|
|
|
4400
|
-
if (ai_agent_doc.use_tools_only) {
|
|
4400
|
+
if (ai_agent_doc.use_tools_only || chat_suggestion_activated) {
|
|
4401
4401
|
modelSettings.toolChoice = 'required';
|
|
4402
4402
|
}
|
|
4403
4403
|
|
|
@@ -4902,6 +4902,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4902
4902
|
emitToDashboard('stream_phase', 'Submitting chat', { update: true });
|
|
4903
4903
|
init_agent_hooks(_agent);
|
|
4904
4904
|
// const output = await runner.run(_agent, prompt, opt);
|
|
4905
|
+
debugger;
|
|
4905
4906
|
const output = await run_agent(_agent, prompt, opt);
|
|
4906
4907
|
const done = async function (output) {
|
|
4907
4908
|
try {
|