@xuda.io/ai_module 1.1.4928 → 1.1.4930

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 (3) hide show
  1. package/index.mjs +1 -1
  2. package/index_ms.mjs +55 -55
  3. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1806,7 +1806,7 @@ export const get_ai_agent_info = async function (uid, job_id, headers, doc, from
1806
1806
  if (!from_marketplace) {
1807
1807
  doc.interactions = 0;
1808
1808
  doc.chats = 0;
1809
- const chats_ret = await get_ai_chats({ uid, reference_id: doc._id }, job_id, headers);
1809
+ const chats_ret = []; // = await get_ai_chats({ uid, reference_id: doc._id }, job_id, headers);
1810
1810
 
1811
1811
  for (let chat of chats_ret?.data?.docs || []) {
1812
1812
  doc.chats++;
package/index_ms.mjs CHANGED
@@ -3,200 +3,200 @@
3
3
  // Queue target : ai_module
4
4
  // =====================================================
5
5
 
6
- import path from 'node:path';
7
6
 
8
- //const _ms_broker = await import(path.join(process.env.XUDA_HOME, 'common', 'ms_broker.mjs'));
9
- const { MessageBroker } = await import(path.join(process.env.XUDA_HOME, 'common', 'ms_broker.mjs'));
7
+ import path from 'node:path';
10
8
 
11
- const broker = new MessageBroker();
9
+ const { MessageBroker } = await import(path.join(process.env.XUDA_HOME, 'common', 'ms_broker.mjs'));
12
10
 
13
- await broker.init({
14
- queueName: 'ai_module',
15
- module_in: global.module_in,
16
- });
11
+ const broker = new MessageBroker();
12
+
13
+ await broker.init({
14
+ queueName: 'ai_module',
15
+ module_in: global.module_in
16
+ });
17
17
 
18
- //_ms_broker.init({queueName:'ai_module'})
18
+
19
19
 
20
20
  export const get_chat_conversation = async function (...args) {
21
- return await broker.send_to_queue('get_chat_conversation', ...args);
21
+ return await broker.send_to_queue("get_chat_conversation", ...args);
22
22
  };
23
23
 
24
24
  export const get_ai_chats = async function (...args) {
25
- return await broker.send_to_queue('get_ai_chats', ...args);
25
+ return await broker.send_to_queue("get_ai_chats", ...args);
26
26
  };
27
27
 
28
28
  export const delete_ai_chat = async function (...args) {
29
- return await broker.send_to_queue('delete_ai_chat', ...args);
29
+ return await broker.send_to_queue("delete_ai_chat", ...args);
30
30
  };
31
31
 
32
32
  export const archive_ai_chat = async function (...args) {
33
- return await broker.send_to_queue('archive_ai_chat', ...args);
33
+ return await broker.send_to_queue("archive_ai_chat", ...args);
34
34
  };
35
35
 
36
36
  export const unarchive_ai_chat = async function (...args) {
37
- return await broker.send_to_queue('unarchive_ai_chat', ...args);
37
+ return await broker.send_to_queue("unarchive_ai_chat", ...args);
38
38
  };
39
39
 
40
40
  export const get_ai_agent_info = async function (...args) {
41
- return await broker.send_to_queue('get_ai_agent_info', ...args);
41
+ return await broker.send_to_queue("get_ai_agent_info", ...args);
42
42
  };
43
43
 
44
44
  export const get_ai_agents = async function (...args) {
45
- return await broker.send_to_queue('get_ai_agents', ...args);
45
+ return await broker.send_to_queue("get_ai_agents", ...args);
46
46
  };
47
47
 
48
48
  export const delete_ai_agent = async function (...args) {
49
- return await broker.send_to_queue('delete_ai_agent', ...args);
49
+ return await broker.send_to_queue("delete_ai_agent", ...args);
50
50
  };
51
51
 
52
52
  export const uninstall_ai_agent = async function (...args) {
53
- return await broker.send_to_queue('uninstall_ai_agent', ...args);
53
+ return await broker.send_to_queue("uninstall_ai_agent", ...args);
54
54
  };
55
55
 
56
56
  export const unarchive_ai_agent = async function (...args) {
57
- return await broker.send_to_queue('unarchive_ai_agent', ...args);
57
+ return await broker.send_to_queue("unarchive_ai_agent", ...args);
58
58
  };
59
59
 
60
60
  export const archive_ai_agent = async function (...args) {
61
- return await broker.send_to_queue('archive_ai_agent', ...args);
61
+ return await broker.send_to_queue("archive_ai_agent", ...args);
62
62
  };
63
63
 
64
64
  export const archive_mini_app = async function (...args) {
65
- return await broker.send_to_queue('archive_mini_app', ...args);
65
+ return await broker.send_to_queue("archive_mini_app", ...args);
66
66
  };
67
67
 
68
68
  export const unarchive_mini_app = async function (...args) {
69
- return await broker.send_to_queue('unarchive_mini_app', ...args);
69
+ return await broker.send_to_queue("unarchive_mini_app", ...args);
70
70
  };
71
71
 
72
72
  export const delete_mini_app = async function (...args) {
73
- return await broker.send_to_queue('delete_mini_app', ...args);
73
+ return await broker.send_to_queue("delete_mini_app", ...args);
74
74
  };
75
75
 
76
76
  export const update_ai_agent = async function (...args) {
77
- return await broker.send_to_queue('update_ai_agent', ...args);
77
+ return await broker.send_to_queue("update_ai_agent", ...args);
78
78
  };
79
79
 
80
80
  export const get_apps = async function (...args) {
81
- return await broker.send_to_queue('get_apps', ...args);
81
+ return await broker.send_to_queue("get_apps", ...args);
82
82
  };
83
83
 
84
84
  export const create_ai_agent = async function (...args) {
85
- return await broker.send_to_queue('create_ai_agent', ...args);
85
+ return await broker.send_to_queue("create_ai_agent", ...args);
86
86
  };
87
87
 
88
88
  export const update_ai_agent_properties = async function (...args) {
89
- return await broker.send_to_queue('update_ai_agent_properties', ...args);
89
+ return await broker.send_to_queue("update_ai_agent_properties", ...args);
90
90
  };
91
91
 
92
92
  export const update_thumbnail = async function (...args) {
93
- return await broker.send_to_queue('update_thumbnail', ...args);
93
+ return await broker.send_to_queue("update_thumbnail", ...args);
94
94
  };
95
95
 
96
96
  export const upload_prompt_attachment = async function (...args) {
97
- return await broker.send_to_queue('upload_prompt_attachment', ...args);
97
+ return await broker.send_to_queue("upload_prompt_attachment", ...args);
98
98
  };
99
99
 
100
100
  export const delete_prompt_attachment = async function (...args) {
101
- return await broker.send_to_queue('delete_prompt_attachment', ...args);
101
+ return await broker.send_to_queue("delete_prompt_attachment", ...args);
102
102
  };
103
103
 
104
104
  export const submit_chat_gpt_prompt = async function (...args) {
105
- return await broker.send_to_queue('submit_chat_gpt_prompt', ...args);
105
+ return await broker.send_to_queue("submit_chat_gpt_prompt", ...args);
106
106
  };
107
107
 
108
108
  export const create_conversation = async function (...args) {
109
- return await broker.send_to_queue('create_conversation', ...args);
109
+ return await broker.send_to_queue("create_conversation", ...args);
110
110
  };
111
111
 
112
112
  export const submit_chat_conversation = async function (...args) {
113
- return await broker.send_to_queue('submit_chat_conversation', ...args);
113
+ return await broker.send_to_queue("submit_chat_conversation", ...args);
114
114
  };
115
115
 
116
116
  export const create_avatar = async function (...args) {
117
- return await broker.send_to_queue('create_avatar', ...args);
117
+ return await broker.send_to_queue("create_avatar", ...args);
118
118
  };
119
119
 
120
120
  export const get_profile_avatar = async function (...args) {
121
- return await broker.send_to_queue('get_profile_avatar', ...args);
121
+ return await broker.send_to_queue("get_profile_avatar", ...args);
122
122
  };
123
123
 
124
124
  export const get_profile_picture = async function (...args) {
125
- return await broker.send_to_queue('get_profile_picture', ...args);
125
+ return await broker.send_to_queue("get_profile_picture", ...args);
126
126
  };
127
127
 
128
128
  export const conversation_actions = async function (...args) {
129
- return await broker.send_to_queue('conversation_actions', ...args);
129
+ return await broker.send_to_queue("conversation_actions", ...args);
130
130
  };
131
131
 
132
132
  export const modify_profile_avatar = async function (...args) {
133
- return await broker.send_to_queue('modify_profile_avatar', ...args);
133
+ return await broker.send_to_queue("modify_profile_avatar", ...args);
134
134
  };
135
135
 
136
136
  export const get_ai_workspace_pending_counts = async function (...args) {
137
- return await broker.send_to_queue('get_ai_workspace_pending_counts', ...args);
137
+ return await broker.send_to_queue("get_ai_workspace_pending_counts", ...args);
138
138
  };
139
139
 
140
140
  export const create_mini_app = async function (...args) {
141
- return await broker.send_to_queue('create_mini_app', ...args);
141
+ return await broker.send_to_queue("create_mini_app", ...args);
142
142
  };
143
143
 
144
144
  export const pin_ai_agent = async function (...args) {
145
- return await broker.send_to_queue('pin_ai_agent', ...args);
145
+ return await broker.send_to_queue("pin_ai_agent", ...args);
146
146
  };
147
147
 
148
148
  export const unpin_ai_agent = async function (...args) {
149
- return await broker.send_to_queue('unpin_ai_agent', ...args);
149
+ return await broker.send_to_queue("unpin_ai_agent", ...args);
150
150
  };
151
151
 
152
152
  export const get_transcript = async function (...args) {
153
- return await broker.send_to_queue('get_transcript', ...args);
153
+ return await broker.send_to_queue("get_transcript", ...args);
154
154
  };
155
155
 
156
156
  export const add_transcript_conversation_item = async function (...args) {
157
- return await broker.send_to_queue('add_transcript_conversation_item', ...args);
157
+ return await broker.send_to_queue("add_transcript_conversation_item", ...args);
158
158
  };
159
159
 
160
160
  export const is_spam_email = async function (...args) {
161
- return await broker.send_to_queue('is_spam_email', ...args);
161
+ return await broker.send_to_queue("is_spam_email", ...args);
162
162
  };
163
163
 
164
164
  export const is_business_contact = async function (...args) {
165
- return await broker.send_to_queue('is_business_contact', ...args);
165
+ return await broker.send_to_queue("is_business_contact", ...args);
166
166
  };
167
167
 
168
168
  export const is_business_contact_has_person = async function (...args) {
169
- return await broker.send_to_queue('is_business_contact_has_person', ...args);
169
+ return await broker.send_to_queue("is_business_contact_has_person", ...args);
170
170
  };
171
171
 
172
172
  export const get_name_from_email_addr = async function (...args) {
173
- return await broker.send_to_queue('get_name_from_email_addr', ...args);
173
+ return await broker.send_to_queue("get_name_from_email_addr", ...args);
174
174
  };
175
175
 
176
176
  export const categorize_email_subject = async function (...args) {
177
- return await broker.send_to_queue('categorize_email_subject', ...args);
177
+ return await broker.send_to_queue("categorize_email_subject", ...args);
178
178
  };
179
179
 
180
180
  export const categorize_ai_prompt = async function (...args) {
181
- return await broker.send_to_queue('categorize_ai_prompt', ...args);
181
+ return await broker.send_to_queue("categorize_ai_prompt", ...args);
182
182
  };
183
183
 
184
184
  export const categorize_text_message = async function (...args) {
185
- return await broker.send_to_queue('categorize_text_message', ...args);
185
+ return await broker.send_to_queue("categorize_text_message", ...args);
186
186
  };
187
187
 
188
188
  export const categorize_contact_note = async function (...args) {
189
- return await broker.send_to_queue('categorize_contact_note', ...args);
189
+ return await broker.send_to_queue("categorize_contact_note", ...args);
190
190
  };
191
191
 
192
192
  export const get_business_info = async function (...args) {
193
- return await broker.send_to_queue('get_business_info', ...args);
193
+ return await broker.send_to_queue("get_business_info", ...args);
194
194
  };
195
195
 
196
196
  export const get_person_info = async function (...args) {
197
- return await broker.send_to_queue('get_person_info', ...args);
197
+ return await broker.send_to_queue("get_person_info", ...args);
198
198
  };
199
199
 
200
200
  export const open_ai_alive_check = async function (...args) {
201
- return await broker.send_to_queue('open_ai_alive_check', ...args);
201
+ return await broker.send_to_queue("open_ai_alive_check", ...args);
202
202
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4928",
3
+ "version": "1.1.4930",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",