@xuda.io/ai_module 1.1.5192 → 1.1.5194
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 +7 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4072,8 +4072,11 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4072
4072
|
const prev_conversation_items = await client.conversations.items.list(conversation_doc.reference_conversation_id, { order: 'desc' });
|
|
4073
4073
|
const last_conversation_item = prev_conversation_items?.data?.[0]?.id;
|
|
4074
4074
|
|
|
4075
|
+
const prompt_conversation_item_id = await _common.xuda_get_uuid('chat_conversation_item');
|
|
4076
|
+
const response_conversation_item_id = await _common.xuda_get_uuid('chat_conversation_item');
|
|
4077
|
+
|
|
4075
4078
|
let out_conversation_item_obj = {
|
|
4076
|
-
_id:
|
|
4079
|
+
_id: prompt_conversation_item_id,
|
|
4077
4080
|
stat: 3, //1,
|
|
4078
4081
|
docType: 'chat_conversation_item',
|
|
4079
4082
|
uid,
|
|
@@ -4103,6 +4106,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4103
4106
|
conversation_id,
|
|
4104
4107
|
job_id,
|
|
4105
4108
|
delta: content,
|
|
4109
|
+
prompt_conversation_item_id,
|
|
4110
|
+
response_conversation_item_id,
|
|
4106
4111
|
},
|
|
4107
4112
|
});
|
|
4108
4113
|
};
|
|
@@ -4773,7 +4778,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4773
4778
|
await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_doc);
|
|
4774
4779
|
|
|
4775
4780
|
let in_conversation_item_obj = {
|
|
4776
|
-
_id:
|
|
4781
|
+
_id: response_conversation_item_id,
|
|
4777
4782
|
stat: 3,
|
|
4778
4783
|
docType: 'chat_conversation_item',
|
|
4779
4784
|
uid,
|