@xuda.io/ai_module 1.1.5151 → 1.1.5153
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 +4 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4053,7 +4053,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4053
4053
|
const reference_type = conversation_doc.reference_type;
|
|
4054
4054
|
const reference_id = conversation_doc.reference_id;
|
|
4055
4055
|
|
|
4056
|
-
const activate_prompt_suggestions = (
|
|
4056
|
+
const activate_prompt_suggestions = _.isArray(ai_agents) && conversation_doc.reference_type !== 'ai_agents';
|
|
4057
4057
|
|
|
4058
4058
|
let model = ai_model;
|
|
4059
4059
|
if (!_conf.ai_models[model]) {
|
|
@@ -4164,9 +4164,9 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4164
4164
|
await update_job('initiating conversation');
|
|
4165
4165
|
let prompt_suggestions = [];
|
|
4166
4166
|
setTimeout(async () => {
|
|
4167
|
-
debugger;
|
|
4168
4167
|
if (!activate_prompt_suggestions) return;
|
|
4169
4168
|
const prompt_suggestions_ret = await get_chat_suggestions(uid, ai_agents, out_conversation_item_save_ret.data.id);
|
|
4169
|
+
debugger;
|
|
4170
4170
|
if (prompt_suggestions_ret.code > -1) prompt_suggestions = prompt_suggestions_ret.data;
|
|
4171
4171
|
}, 1);
|
|
4172
4172
|
// let conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_id);
|
|
@@ -4651,7 +4651,6 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4651
4651
|
}
|
|
4652
4652
|
};
|
|
4653
4653
|
|
|
4654
|
-
debugger;
|
|
4655
4654
|
// try {
|
|
4656
4655
|
const runner = new Runner();
|
|
4657
4656
|
let _agent = [];
|
|
@@ -4666,8 +4665,9 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4666
4665
|
}
|
|
4667
4666
|
////////////
|
|
4668
4667
|
if (activate_prompt_suggestions) {
|
|
4668
|
+
debugger;
|
|
4669
4669
|
if (!prompt_suggestions.length) {
|
|
4670
|
-
await _utils.delay(
|
|
4670
|
+
await _utils.delay(10000);
|
|
4671
4671
|
}
|
|
4672
4672
|
|
|
4673
4673
|
if (prompt_suggestions.length) {
|