@xuda.io/ai_module 1.1.5370 → 1.1.5372
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 +3 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4193,6 +4193,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4193
4193
|
emitToDashboard('stream_phase', 'Deep thinking...', { allow_skip: true });
|
|
4194
4194
|
return new Promise(async (resolve, reject) => {
|
|
4195
4195
|
let interval = setInterval(async function () {
|
|
4196
|
+
console.log(interval);
|
|
4196
4197
|
const job_info = await jobs_ms.get_job_info({ job_id });
|
|
4197
4198
|
|
|
4198
4199
|
if (job_info.code < 0 || job_info.data.stat === 4) {
|
|
@@ -4741,6 +4742,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4741
4742
|
let counter = 0;
|
|
4742
4743
|
emitToDashboard('suggestions', JSON.stringify(prompt_suggestions), { countdown: true });
|
|
4743
4744
|
let interval = setInterval(async function () {
|
|
4745
|
+
console.log(interval);
|
|
4744
4746
|
counter++;
|
|
4745
4747
|
const job_info = await jobs_ms.get_job_info({ job_id });
|
|
4746
4748
|
|
|
@@ -4963,6 +4965,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4963
4965
|
buffer += chunk;
|
|
4964
4966
|
}
|
|
4965
4967
|
// console.log('string_debug', string_debug);
|
|
4968
|
+
emitToDashboard('stream_end');
|
|
4966
4969
|
}
|
|
4967
4970
|
// else {
|
|
4968
4971
|
// await update_job('finalizing');
|
|
@@ -4982,10 +4985,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4982
4985
|
debugger;
|
|
4983
4986
|
|
|
4984
4987
|
conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
|
|
4985
|
-
|
|
4986
4988
|
conversation_doc.ts = Date.now();
|
|
4987
4989
|
conversation_doc.stat = 3;
|
|
4988
|
-
|
|
4989
4990
|
await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_doc);
|
|
4990
4991
|
|
|
4991
4992
|
if (typeof err === 'string') {
|