@xuda.io/ai_module 1.1.5205 → 1.1.5207
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 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4061,7 +4061,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4061
4061
|
|
|
4062
4062
|
const reference_type = conversation_doc.reference_type;
|
|
4063
4063
|
const reference_id = conversation_doc.reference_id;
|
|
4064
|
-
|
|
4064
|
+
|
|
4065
4065
|
const activate_prompt_suggestions = _.isArray(ai_agents) && conversation_doc.reference_type !== 'ai_agents' && !conversation_item_id;
|
|
4066
4066
|
let prompt_suggestion_activated;
|
|
4067
4067
|
let model = ai_model;
|
|
@@ -4184,6 +4184,10 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4184
4184
|
|
|
4185
4185
|
const get_prompt_suggestions = function () {
|
|
4186
4186
|
return new Promise(async (resolve, reject) => {
|
|
4187
|
+
let interval = setInterval(async function () {
|
|
4188
|
+
const job_info = await jobs_ms.get_job_info({ job_id });
|
|
4189
|
+
resolve({ code: -1, data: 'aborted' });
|
|
4190
|
+
}, 1000);
|
|
4187
4191
|
const ret = await get_chat_suggestions({ uid, ai_agents, conversation_item_id: out_conversation_item_save_ret.data.id, context: prompt });
|
|
4188
4192
|
resolve(ret);
|
|
4189
4193
|
});
|