@xuda.io/ai_module 1.1.4567 → 1.1.4568

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.
Files changed (2) hide show
  1. package/index.mjs +3 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4119,7 +4119,7 @@ export const create_conversation = async function (req, job_id, headers) {
4119
4119
  const conversation_obj = await client.conversations.create();
4120
4120
  const t = Date.now();
4121
4121
  let conversation_doc = {
4122
- _id: conversation_obj.id,
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
4125
  date_created_ts: t,
@@ -4134,6 +4134,7 @@ export const create_conversation = async function (req, job_id, headers) {
4134
4134
  initiator_uid: uid,
4135
4135
  email_direction,
4136
4136
  email_id,
4137
+ reference_conversation_id: conversation_obj.id,
4137
4138
 
4138
4139
  account_profiles: [account_profile_obj._id],
4139
4140
  };
@@ -4532,7 +4533,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4532
4533
 
4533
4534
  const obj = { id: output.state._lastTurnResponse.responseId, ts: Date.now(), ai_agent_id: output.state._currentAgent.name, attachments, conversation_type: 'ai_chat' };
4534
4535
  let out_conversation_item_obj = {
4535
- _id: obj.id,
4536
+ _id: await _common.xuda_get_uuid('chat_conversation_item'),
4536
4537
  stat: 1,
4537
4538
  docType: 'chat_conversation_item',
4538
4539
  uid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4567",
3
+ "version": "1.1.4568",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",