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