@xuda.io/ai_module 1.1.4610 → 1.1.4612
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 +2 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4097,7 +4097,7 @@ function getFirstNWords(text, n = 10) {
|
|
|
4097
4097
|
}
|
|
4098
4098
|
|
|
4099
4099
|
export const create_conversation = async function (req, job_id, headers) {
|
|
4100
|
-
const { profile_id, uid, prompt, perform_ai_execution = true, email_id, email_direction = 'out', from_mailbox } = req;
|
|
4100
|
+
const { profile_id, uid, prompt, perform_ai_execution = true, email_id, email_direction = 'out', from_mailbox, date_created } = req;
|
|
4101
4101
|
let { reference_type, reference_id = '', conversation_type } = req;
|
|
4102
4102
|
|
|
4103
4103
|
const account_profile_info = await account_module.get_active_account_profile_info(uid, profile_id);
|
|
@@ -4122,7 +4122,7 @@ export const create_conversation = async function (req, job_id, headers) {
|
|
|
4122
4122
|
_id: await _common.xuda_get_uuid('chat_conversation'),
|
|
4123
4123
|
docType: 'chat_conversation',
|
|
4124
4124
|
title: conversation_type !== 'email' ? getFirstNWords(prompt, 10) : prompt,
|
|
4125
|
-
date_created_ts:
|
|
4125
|
+
date_created_ts: new Date(date_created).getTime(),
|
|
4126
4126
|
ts: t,
|
|
4127
4127
|
stat: !conversation_type || conversation_type === 'ai' ? 1 : 3,
|
|
4128
4128
|
uid,
|