@xuda.io/ai_module 1.1.5369 → 1.1.5371
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 +7 -0
- 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
|
|
|
@@ -4981,6 +4983,11 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4981
4983
|
} catch (err) {
|
|
4982
4984
|
debugger;
|
|
4983
4985
|
|
|
4986
|
+
conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
|
|
4987
|
+
conversation_doc.ts = Date.now();
|
|
4988
|
+
conversation_doc.stat = 3;
|
|
4989
|
+
await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_doc);
|
|
4990
|
+
|
|
4984
4991
|
if (typeof err === 'string') {
|
|
4985
4992
|
if (err === 'aborted') {
|
|
4986
4993
|
emitToDashboard('stream_delta', err);
|