@xuda.io/ai_module 1.1.4151 → 1.1.4153
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 +5 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4365,7 +4365,7 @@ const contact_chat_conversation = async function (req, job_id, headers) {
|
|
|
4365
4365
|
let { prompt, conversation_doc, attachments = [], ai_agents } = req;
|
|
4366
4366
|
|
|
4367
4367
|
const conversation_id = conversation_doc._id;
|
|
4368
|
-
|
|
4368
|
+
|
|
4369
4369
|
const receiver_contact_doc = await account_module.get_contact_info(uid, null, conversation_doc.reference_id);
|
|
4370
4370
|
const receiver_app_id = await account_module.get_account_default_project_id(receiver_contact_doc.contact_uid);
|
|
4371
4371
|
let receiver_conversation_doc = await db_module.get_app_couch_doc_native(receiver_app_id, conversation_id);
|
|
@@ -4399,7 +4399,7 @@ const contact_chat_conversation = async function (req, job_id, headers) {
|
|
|
4399
4399
|
const chat_note = async function (req, job_id, headers) {
|
|
4400
4400
|
const { uid } = req;
|
|
4401
4401
|
let { prompt, conversation_doc, attachments = [], ai_agents } = req;
|
|
4402
|
-
|
|
4402
|
+
const { account_profile_info } = conversation_doc;
|
|
4403
4403
|
const conversation_id = conversation_doc._id;
|
|
4404
4404
|
|
|
4405
4405
|
// const receiver_contact_doc = await account_module.get_contact_info(uid, null, conversation_doc.reference_id);
|
|
@@ -4441,7 +4441,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4441
4441
|
let { prompt, conversation_doc, attachments = [], ai_agents, output_format = 'md', stream = true, with_context = true } = req;
|
|
4442
4442
|
await _utils.delay(1000);
|
|
4443
4443
|
const conversation_id = conversation_doc._id;
|
|
4444
|
-
|
|
4444
|
+
const { account_profile_info } = conversation_doc;
|
|
4445
4445
|
const emitToDashboard = (type, content) => {
|
|
4446
4446
|
// console.log(type, content);
|
|
4447
4447
|
global[`_ai_module_ch`].sendToQueue(
|
|
@@ -5614,6 +5614,7 @@ export const create_profile_avatar = async function (req, job_id, headers) {
|
|
|
5614
5614
|
is_real_person_in_picture: z.boolean().describe('if a postrate of real person in the picture return true otherwise return false'),
|
|
5615
5615
|
}),
|
|
5616
5616
|
metadata: { account_id: account_obj._id, func: 'detect_real_person_in_image' },
|
|
5617
|
+
account_profile_info,
|
|
5617
5618
|
});
|
|
5618
5619
|
|
|
5619
5620
|
const res = JSON5.parse(ret.data);
|
|
@@ -5621,7 +5622,7 @@ export const create_profile_avatar = async function (req, job_id, headers) {
|
|
|
5621
5622
|
};
|
|
5622
5623
|
|
|
5623
5624
|
// const drive_module = await import(`${module_path}/drive_module/index.mjs`);
|
|
5624
|
-
const { url, uid, account_obj, prompt, is_profile_avatar } = req;
|
|
5625
|
+
const { url, uid, account_obj, prompt, is_profile_avatar, account_profile_info } = req;
|
|
5625
5626
|
if (!is_profile_avatar) {
|
|
5626
5627
|
await update_profile_avatar_status(account_obj._id, 2);
|
|
5627
5628
|
}
|