@xuda.io/ai_module 1.1.5190 → 1.1.5192
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 +5 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4655,7 +4655,9 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4655
4655
|
});
|
|
4656
4656
|
if (eligible_agent) {
|
|
4657
4657
|
// allow read only agents if not ai_agent scope
|
|
4658
|
-
|
|
4658
|
+
if (!prompt_suggestion_activated) {
|
|
4659
|
+
init_agent_hooks(agent);
|
|
4660
|
+
}
|
|
4659
4661
|
list.push(agent);
|
|
4660
4662
|
}
|
|
4661
4663
|
} catch (err) {
|
|
@@ -4711,7 +4713,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4711
4713
|
await render_suggestions();
|
|
4712
4714
|
await _utils.delay(10000);
|
|
4713
4715
|
const job_info = await jobs_ms.get_job_info({ job_id });
|
|
4714
|
-
|
|
4716
|
+
|
|
4715
4717
|
if (job_info.code < 0 || job_info.data.stat === 4) {
|
|
4716
4718
|
return { code: 5, data: 'aborted' };
|
|
4717
4719
|
}
|
|
@@ -10926,7 +10928,7 @@ export const open_ai_alive_check = async function () {};
|
|
|
10926
10928
|
export const get_chat_suggestions = async function (req) {
|
|
10927
10929
|
const { uid, conversation_item_id, no_of_suggestions = 3, ai_model = _conf.default_ai_model } = req;
|
|
10928
10930
|
let { ai_agents } = req;
|
|
10929
|
-
|
|
10931
|
+
|
|
10930
10932
|
try {
|
|
10931
10933
|
const account_profile_info = await get_active_account_profile_info(uid);
|
|
10932
10934
|
const account_doc = await db_module.get_couch_doc_native('xuda_accounts', uid);
|