@xuda.io/account_module 1.2.1966 → 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 +26 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2925,10 +2925,33 @@ export const set_deep_research_contact = async function (req, job_id, headers) {
2925
2925
  process_stat: 'partial',
2926
2926
  },
2927
2927
  });
2928
- debugger;
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);
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
+ }
2932
2955
  }
2933
2956
 
2934
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.1966",
3
+ "version": "1.2.1968",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {