@xuda.io/account_module 1.2.1967 → 1.2.1969

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 +27 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2927,9 +2927,33 @@ export const set_deep_research_contact = async function (req, job_id, headers) {
2927
2927
  });
2928
2928
 
2929
2929
  for await (let conversation_item of conversation_items.docs) {
2930
- const account_profile_info = await get_active_account_profile_info(conversation_item.uid);
2931
- const get_transcript = ai_module.get_transcript(conversation_item.uid, conversation_item.app_id, conversation_item.conversation_id, account_profile_info, conversation_item.file.filename);
2932
- debugger;
2930
+ try {
2931
+ const account_profile_info = await get_active_account_profile_info(conversation_item.uid);
2932
+ let conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_item.conversation_id);
2933
+
2934
+ const transcript = ai_module.get_transcript(conversation_item.uid, conversation_item.app_id, conversation_item.conversation_id, account_profile_info, conversation_item.file.filename);
2935
+ if (transcript) {
2936
+ try {
2937
+ items = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
2938
+ items: [
2939
+ {
2940
+ type: 'message',
2941
+ role: 'system',
2942
+ content: [{ type: 'input_text', text: `the user attached file name: ${conversation_item.file.filename} with content: ${transcript?.data || transcript || ''}` }],
2943
+ },
2944
+ ],
2945
+ });
2946
+ report_ai_status('conversations');
2947
+ } catch (err) {
2948
+ report_ai_status('conversations', err);
2949
+ throw err;
2950
+ }
2951
+ }
2952
+
2953
+ debugger;
2954
+ } catch (err) {
2955
+ debugger;
2956
+ }
2933
2957
  }
2934
2958
 
2935
2959
  // set_contact_profile_picture(uid, contact_doc._id, {}, job_id, headers, account_profile_info, false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1967",
3
+ "version": "1.2.1969",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {