@xuda.io/ai_module 1.1.5292 → 1.1.5293
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 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4059,6 +4059,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4059
4059
|
const account_profile_info = await get_active_account_profile_info(uid, profile_id);
|
|
4060
4060
|
let { prompt, conversation_doc, attachments = [], ai_agents, output_format = 'md', stream = true, with_context = true, ai_model = _conf.default_ai_model } = req;
|
|
4061
4061
|
|
|
4062
|
+
let local_ai_agents = _.cloneDeep(ai_agents);
|
|
4063
|
+
|
|
4062
4064
|
const reference_type = conversation_doc.reference_type;
|
|
4063
4065
|
const reference_id = conversation_doc.reference_id;
|
|
4064
4066
|
|
|
@@ -4731,7 +4733,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4731
4733
|
counter++;
|
|
4732
4734
|
const job_info = await jobs_ms.get_job_info({ job_id });
|
|
4733
4735
|
|
|
4734
|
-
if (counter >
|
|
4736
|
+
if (counter > 50) {
|
|
4735
4737
|
resolve(null);
|
|
4736
4738
|
} else {
|
|
4737
4739
|
if (job_info.code < 0 || job_info.data.stat === 4) {
|
|
@@ -4922,7 +4924,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4922
4924
|
let string_debug = '';
|
|
4923
4925
|
let chunks = 0;
|
|
4924
4926
|
for await (const chunk of output_stream) {
|
|
4925
|
-
console.log(chunks);
|
|
4927
|
+
// console.log(chunks);
|
|
4926
4928
|
if (chunks % 10 === 0) {
|
|
4927
4929
|
const job_info = await jobs_ms.get_job_info({ job_id });
|
|
4928
4930
|
if (job_info.code < 0 || job_info.data.stat === 4) {
|