@xuda.io/ai_module 1.1.5349 → 1.1.5351
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 +21 -21
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4160,24 +4160,24 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4160
4160
|
|
|
4161
4161
|
//////////////////////
|
|
4162
4162
|
|
|
4163
|
-
let emitToDashboard_interval;
|
|
4164
|
-
const update_job = async function (current_step_name) {
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
};
|
|
4163
|
+
// let emitToDashboard_interval;
|
|
4164
|
+
// const update_job = async function (current_step_name) {
|
|
4165
|
+
// if (emitToDashboard_interval) {
|
|
4166
|
+
// clearInterval(emitToDashboard_interval);
|
|
4167
|
+
// emitToDashboard('stream_delta', '<br><br>');
|
|
4168
|
+
// }
|
|
4169
|
+
// emitToDashboard('stream_delta', _.capitalize(current_step_name) + ' ... ');
|
|
4170
|
+
// // emitToDashboard_interval = setInterval(() => {
|
|
4171
|
+
// // emitToDashboard('stream_delta', '.');
|
|
4172
|
+
// // }, 500);
|
|
4173
|
+
// await jobs_ms.update_job(
|
|
4174
|
+
// {
|
|
4175
|
+
// job_id,
|
|
4176
|
+
// current_step_name: current_step_name,
|
|
4177
|
+
// },
|
|
4178
|
+
// // global[`_ai_module_ch`],
|
|
4179
|
+
// );
|
|
4180
|
+
// };
|
|
4181
4181
|
|
|
4182
4182
|
//////////////////////
|
|
4183
4183
|
|
|
@@ -4188,7 +4188,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4188
4188
|
let prompt_selected_suggestion;
|
|
4189
4189
|
|
|
4190
4190
|
const get_prompt_suggestions = async function () {
|
|
4191
|
-
emitToDashboard('
|
|
4191
|
+
emitToDashboard('stream_phase', 'Deep thinking...');
|
|
4192
4192
|
return new Promise(async (resolve, reject) => {
|
|
4193
4193
|
let interval = setInterval(async function () {
|
|
4194
4194
|
const job_info = await jobs_ms.get_job_info({ job_id });
|
|
@@ -4739,7 +4739,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4739
4739
|
counter++;
|
|
4740
4740
|
const job_info = await jobs_ms.get_job_info({ job_id });
|
|
4741
4741
|
|
|
4742
|
-
if (counter >
|
|
4742
|
+
if (counter > 40) {
|
|
4743
4743
|
resolve(null);
|
|
4744
4744
|
} else {
|
|
4745
4745
|
if (job_info.code < 0 || job_info.data.stat === 4) {
|
|
@@ -4797,7 +4797,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4797
4797
|
|
|
4798
4798
|
if (activate_prompt_suggestions) {
|
|
4799
4799
|
// 2. Now wait for it specifically
|
|
4800
|
-
emitToDashboard('stream_phase', 'Analyzing suggestions');
|
|
4800
|
+
// emitToDashboard('stream_phase', 'Analyzing suggestions');
|
|
4801
4801
|
const prompt_suggestions_ret = await get_prompt_suggestions(); // suggestionsPromise;
|
|
4802
4802
|
|
|
4803
4803
|
if (prompt_suggestions_ret && prompt_suggestions_ret.code > -1) {
|