@xuda.io/ai_module 1.1.5533 → 1.1.5535
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 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6635,12 +6635,12 @@ export const get_transcript = async function (uid, app_id, conversation_id, acco
|
|
|
6635
6635
|
return transcript;
|
|
6636
6636
|
};
|
|
6637
6637
|
|
|
6638
|
-
export const add_transcript_conversation_item = async function (
|
|
6638
|
+
export const add_transcript_conversation_item = async function (uid, profile_id, conversation_id, conversation_type, reference_id, filename, transcript) {
|
|
6639
6639
|
try {
|
|
6640
|
-
add_conversation_item(uid, profile_id, conversation_id, `File name: ${filename} with content: ${transcript?.data || transcript || ''}`,
|
|
6640
|
+
const conversation_item_reference_id = add_conversation_item(uid, profile_id, conversation_id, `File name: ${filename} with content: ${transcript?.data || transcript || ''}`, conversation_type, reference_id, {});
|
|
6641
6641
|
|
|
6642
6642
|
report_ai_status('conversations');
|
|
6643
|
-
return
|
|
6643
|
+
return conversation_item_reference_id;
|
|
6644
6644
|
} catch (err) {
|
|
6645
6645
|
report_ai_status('conversations', err);
|
|
6646
6646
|
throw err;
|
|
@@ -6670,7 +6670,7 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
|
|
|
6670
6670
|
}
|
|
6671
6671
|
let conversation_item_reference_id;
|
|
6672
6672
|
if (transcript) {
|
|
6673
|
-
conversation_item_reference_id = await add_transcript_conversation_item(uid, account_profile_info, conversation_id, 'attachment', file.filename, transcript);
|
|
6673
|
+
conversation_item_reference_id = await add_transcript_conversation_item(uid, account_profile_info.profile_id, conversation_id, 'attachment', conversation_doc.reference_id, file.filename, transcript);
|
|
6674
6674
|
// items = await add_transcript_conversation_item(conversation_doc.reference_conversation_id, file.filename, transcript);
|
|
6675
6675
|
}
|
|
6676
6676
|
let out_conversation_item_obj = {
|