@xuda.io/ai_module 1.1.5148 → 1.1.5150
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 +6 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4050,6 +4050,9 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4050
4050
|
const account_profile_info = await get_active_account_profile_info(uid, profile_id);
|
|
4051
4051
|
let { prompt, conversation_doc, attachments = [], ai_agents, output_format = 'md', stream = true, with_context = true, ai_model = _conf.default_ai_model } = req;
|
|
4052
4052
|
|
|
4053
|
+
const reference_type = conversation_doc.reference_type;
|
|
4054
|
+
const reference_id = conversation_doc.reference_id;
|
|
4055
|
+
|
|
4053
4056
|
const activate_prompt_suggestions = (typeof ai_agents === 'undefined' || ai_agents.length > 0) && conversation_doc.reference_type !== 'ai_agents';
|
|
4054
4057
|
|
|
4055
4058
|
let model = ai_model;
|
|
@@ -4167,8 +4170,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4167
4170
|
if (prompt_suggestions_ret.code > -1) prompt_suggestions = prompt_suggestions_ret.data;
|
|
4168
4171
|
}, 1);
|
|
4169
4172
|
// let conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_id);
|
|
4170
|
-
const reference_type = conversation_doc.reference_type;
|
|
4171
|
-
const reference_id = conversation_doc.reference_id;
|
|
4173
|
+
// const reference_type = conversation_doc.reference_type;
|
|
4174
|
+
// const reference_id = conversation_doc.reference_id;
|
|
4172
4175
|
|
|
4173
4176
|
conversation_doc.stat = 2;
|
|
4174
4177
|
conversation_doc.ts = Date.now();
|
|
@@ -4794,6 +4797,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4794
4797
|
}
|
|
4795
4798
|
// else {
|
|
4796
4799
|
await update_job('finalizing');
|
|
4800
|
+
debugger;
|
|
4797
4801
|
const save_ret = await done(output);
|
|
4798
4802
|
return {
|
|
4799
4803
|
code: 4,
|