@xuda.io/ai_module 1.1.5395 → 1.1.5396
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 +11 -11
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4320,19 +4320,19 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4320
4320
|
return is_agent ? identity : triage_assistant + identity;
|
|
4321
4321
|
};
|
|
4322
4322
|
const get_agents = async function () {
|
|
4323
|
-
if (typeof local_ai_agents === 'undefined') {
|
|
4324
|
-
// no agents
|
|
4325
|
-
local_ai_agents = [];
|
|
4326
|
-
} else if (!local_ai_agents.length) {
|
|
4327
|
-
// auto agent mode
|
|
4328
|
-
const ai_agents_ret = await get_user_ai_agents(uid);
|
|
4329
|
-
for (const doc of ai_agents_ret.docs) {
|
|
4330
|
-
local_ai_agents.push(doc._id);
|
|
4331
|
-
}
|
|
4332
|
-
}
|
|
4333
|
-
|
|
4334
4323
|
if (reference_type === 'ai_agents') {
|
|
4335
4324
|
local_ai_agents.push(reference_id);
|
|
4325
|
+
} else {
|
|
4326
|
+
if (typeof local_ai_agents === 'undefined') {
|
|
4327
|
+
// no agents
|
|
4328
|
+
local_ai_agents = [];
|
|
4329
|
+
} else if (!local_ai_agents.length) {
|
|
4330
|
+
// auto agent mode
|
|
4331
|
+
const ai_agents_ret = await get_user_ai_agents(uid);
|
|
4332
|
+
for (const doc of ai_agents_ret.docs) {
|
|
4333
|
+
local_ai_agents.push(doc._id);
|
|
4334
|
+
}
|
|
4335
|
+
}
|
|
4336
4336
|
}
|
|
4337
4337
|
const list = [];
|
|
4338
4338
|
|