@xuda.io/account_module 1.2.1967 → 1.2.1968

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 +25 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2927,9 +2927,31 @@ 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
+ const transcript = ai_module.get_transcript(conversation_item.uid, conversation_item.app_id, conversation_item.conversation_id, account_profile_info, conversation_item.file.filename);
2933
+ if (transcript) {
2934
+ try {
2935
+ items = await client.conversations.items.create(conversation_doc.reference_conversation_id, {
2936
+ items: [
2937
+ {
2938
+ type: 'message',
2939
+ role: 'system',
2940
+ content: [{ type: 'input_text', text: `the user attached file name: ${file.filename} with content: ${transcript?.data || transcript || ''}` }],
2941
+ },
2942
+ ],
2943
+ });
2944
+ report_ai_status('conversations');
2945
+ } catch (err) {
2946
+ report_ai_status('conversations', err);
2947
+ throw err;
2948
+ }
2949
+ }
2950
+
2951
+ debugger;
2952
+ } catch (err) {
2953
+ debugger;
2954
+ }
2933
2955
  }
2934
2956
 
2935
2957
  // 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.1968",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {