@futdevpro/nts-dynamo 1.11.15 → 1.11.17
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/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts +1 -1
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts.map +1 -1
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js +31 -13
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js.map +1 -1
- package/build/_modules/discord-assistant/_services/dias-io.control-service.js +6 -2
- package/build/_modules/discord-assistant/_services/dias-io.control-service.js.map +1 -1
- package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.d.ts +1 -1
- package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.d.ts.map +1 -1
- package/build/_modules/discord-bot/_models/dibo-global-settings.interface.d.ts +88 -0
- package/build/_modules/discord-bot/_models/dibo-global-settings.interface.d.ts.map +1 -0
- package/build/_modules/discord-bot/_models/dibo-global-settings.interface.js +3 -0
- package/build/_modules/discord-bot/_models/dibo-global-settings.interface.js.map +1 -0
- package/build/_modules/discord-bot/_services/dibo-routines.control-service.d.ts +0 -1
- package/build/_modules/discord-bot/_services/dibo-routines.control-service.d.ts.map +1 -1
- package/build/_modules/discord-bot/_services/dibo-routines.control-service.js +0 -3
- package/build/_modules/discord-bot/_services/dibo-routines.control-service.js.map +1 -1
- package/build/_modules/discord-bot/index.d.ts +1 -1
- package/build/_modules/discord-bot/index.d.ts.map +1 -1
- package/build/_modules/discord-bot/index.js +1 -1
- package/build/_modules/discord-bot/index.js.map +1 -1
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts +284 -58
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts.map +1 -1
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.js +91 -104
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.js.map +1 -1
- package/build/_modules/open-ai/_services/oai-llm.service-base.d.ts +246 -53
- package/build/_modules/open-ai/_services/oai-llm.service-base.d.ts.map +1 -1
- package/build/_modules/open-ai/_services/oai-llm.service-base.js +86 -96
- package/build/_modules/open-ai/_services/oai-llm.service-base.js.map +1 -1
- package/package.json +3 -3
- package/src/_modules/discord-assistant/_services/dias-chunk.data-service.ts +26 -25
- package/src/_modules/discord-assistant/_services/dias-io.control-service.ts +6 -6
- package/src/_modules/discord-bot/_collections/dibo-global-settings.conts.ts +1 -1
- package/src/_modules/discord-bot/_services/dibo-routines.control-service.ts +2 -2
- package/src/_modules/discord-bot/index.ts +1 -1
- package/src/_modules/open-ai/_services/oai-llm-chat.service-base.ts +233 -249
- package/src/_modules/open-ai/_services/oai-llm.service-base.ts +189 -147
- /package/src/_modules/discord-bot/_models/{global-bot-log-settings.interface.ts → dibo-global-settings.interface.ts} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DyFM_failableSafeParseJSON = exports.DyFM_safeParseJSON = exports.DyFM_safeParseList = exports.DyNTS_OAI_LLM_ServiceBase = void 0;
|
|
4
|
-
/* import { DyFM_safeParseList } from '@futdevpro/fsm-dynamo'; */
|
|
5
4
|
const openai_1 = require("openai");
|
|
6
5
|
const open_ai_1 = require("@futdevpro/fsm-dynamo/open-ai");
|
|
7
6
|
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
@@ -54,11 +53,9 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
54
53
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.request} to ask the question,
|
|
55
54
|
* and the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.upperCaseYes} to check the answer
|
|
56
55
|
*/
|
|
57
|
-
async askYesNoQuestion(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
question += this.predefinedRequests.yesNo.request;
|
|
61
|
-
const answer = await this.askQuestion(question, issuer, settings, debugLog, replaceThisInLog);
|
|
56
|
+
async askYesNoQuestion(set) {
|
|
57
|
+
set.question += this.predefinedRequests.yesNo.request;
|
|
58
|
+
const answer = await this.askQuestion(set);
|
|
62
59
|
return answer.toUpperCase().includes(this.predefinedRequests.yesNo.upperCaseYes);
|
|
63
60
|
}
|
|
64
61
|
/** the exact same as {@link askYesNoQuestion} */
|
|
@@ -68,14 +65,12 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
68
65
|
*
|
|
69
66
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.percentageOnly} to ask the question
|
|
70
67
|
*/
|
|
71
|
-
async askPercentageQuestion(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
question += this.predefinedRequests.percentageOnly;
|
|
75
|
-
const answer = await this.askQuestion(question, issuer, settings, debugLog, replaceThisInLog);
|
|
68
|
+
async askPercentageQuestion(set) {
|
|
69
|
+
set.question += this.predefinedRequests.percentageOnly;
|
|
70
|
+
const answer = await this.askQuestion(set);
|
|
76
71
|
if (isNaN(+answer)) {
|
|
77
72
|
fsm_dynamo_1.DyFM_Log.error('GPT_ServiceBase', 'asykPercentageQuestion', 'Invalid answer', {
|
|
78
|
-
question,
|
|
73
|
+
question: set.question,
|
|
79
74
|
answer,
|
|
80
75
|
});
|
|
81
76
|
return null;
|
|
@@ -89,15 +84,13 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
89
84
|
*
|
|
90
85
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
|
|
91
86
|
*/
|
|
92
|
-
async askSelectQuestion(
|
|
93
|
-
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
94
|
-
replaceThisInLog) {
|
|
87
|
+
async askSelectQuestion(set) {
|
|
95
88
|
// replace the {{DyNTS_selectOptions}} with the list of options
|
|
96
|
-
const selectQuestionAddition = this.predefinedRequests.selectRequest.replace('{{DyNTS_selectOptions}}', this.getTextListAsText(selectFrom));
|
|
97
|
-
question += selectQuestionAddition;
|
|
98
|
-
let answer = await this.askQuestion(
|
|
89
|
+
const selectQuestionAddition = this.predefinedRequests.selectRequest.replace('{{DyNTS_selectOptions}}', this.getTextListAsText(set.selectFrom));
|
|
90
|
+
set.question += selectQuestionAddition;
|
|
91
|
+
let answer = await this.askQuestion(set);
|
|
99
92
|
answer = answer.toLocaleUpperCase();
|
|
100
|
-
for (const item of selectFrom) {
|
|
93
|
+
for (const item of set.selectFrom) {
|
|
101
94
|
if (answer.includes(item.toLocaleUpperCase()))
|
|
102
95
|
return item;
|
|
103
96
|
}
|
|
@@ -112,12 +105,10 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
112
105
|
*
|
|
113
106
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
|
|
114
107
|
*/
|
|
115
|
-
async requestSelect(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
question += selectQuestionAddition;
|
|
120
|
-
const answer = await this.askQuestion(question, issuer, settings, debugLog, replaceThisInLog);
|
|
108
|
+
async requestSelect(set) {
|
|
109
|
+
const selectQuestionAddition = this.predefinedRequests.selectRequest.replace('{{DyNTS_selectOptions}}', this.getTextListAsText(set.selectFrom.map(item => `"${JSON.stringify(item)}"`)));
|
|
110
|
+
set.question += selectQuestionAddition;
|
|
111
|
+
const answer = await this.askQuestion(set);
|
|
121
112
|
return DyFM_safeParseJSON(answer);
|
|
122
113
|
}
|
|
123
114
|
/** the exact same as {@link requestSelect} */
|
|
@@ -127,15 +118,13 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
127
118
|
*
|
|
128
119
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
|
|
129
120
|
*/
|
|
130
|
-
async askMultipleSelectQuestionWithOptions(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
question += selectQuestionAddition;
|
|
135
|
-
let answer = await this.askQuestion(question, issuer, settings, debugLog, replaceThisInLog);
|
|
121
|
+
async askMultipleSelectQuestionWithOptions(set) {
|
|
122
|
+
const selectQuestionAddition = this.predefinedRequests.multiselect.replace('{{DyNTS_selectOptions}}', this.getTextListAsText(set.options));
|
|
123
|
+
set.question += selectQuestionAddition;
|
|
124
|
+
let answer = await this.askQuestion(set);
|
|
136
125
|
answer = answer.toLocaleUpperCase();
|
|
137
126
|
const result = [];
|
|
138
|
-
for (const item of options) {
|
|
127
|
+
for (const item of set.options) {
|
|
139
128
|
if (answer.includes(item.toLocaleUpperCase())) {
|
|
140
129
|
result.push(item);
|
|
141
130
|
}
|
|
@@ -151,12 +140,10 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
151
140
|
*
|
|
152
141
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
|
|
153
142
|
*/
|
|
154
|
-
async requestMultipleSelect(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
question += selectQuestionAddition;
|
|
159
|
-
const answer = await this.askQuestion(question, issuer, settings, debugLog, replaceThisInLog);
|
|
143
|
+
async requestMultipleSelect(set) {
|
|
144
|
+
const selectQuestionAddition = this.predefinedRequests.multiselect.replace('{{DyNTS_selectOptions}}', this.getTextListAsText(set.options.map(item => `"${JSON.stringify(item)}"`)));
|
|
145
|
+
set.question += selectQuestionAddition;
|
|
146
|
+
const answer = await this.askQuestion(set);
|
|
160
147
|
return DyFM_safeParseList(answer);
|
|
161
148
|
}
|
|
162
149
|
/** the exact same as {@link requestMultipleSelect} */
|
|
@@ -170,11 +157,9 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
170
157
|
*
|
|
171
158
|
* (uses {@link DyFM_safeParseJSON})
|
|
172
159
|
*/
|
|
173
|
-
async askJSONQuestion(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
question += this.predefinedRequests.jsonRequest;
|
|
177
|
-
const answer = await this.askQuestion(question, issuer, settings, debugLog, replaceThisInLog);
|
|
160
|
+
async askJSONQuestion(set) {
|
|
161
|
+
set.question += this.predefinedRequests.jsonRequest;
|
|
162
|
+
const answer = await this.askQuestion(set);
|
|
178
163
|
return DyFM_safeParseJSON(answer);
|
|
179
164
|
}
|
|
180
165
|
/** the exact same as {@link askJSONQuestion} */
|
|
@@ -188,12 +173,10 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
188
173
|
*
|
|
189
174
|
* (uses {@link DyFM_safeParseJSON})
|
|
190
175
|
*/
|
|
191
|
-
async askJSONQuestionWithKeysDescription(
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
const
|
|
195
|
-
question += jsonRequestWithKeysDescription;
|
|
196
|
-
const answer = await this.askQuestion(question, issuer, settings, debugLog, replaceThisInLog);
|
|
176
|
+
async askJSONQuestionWithKeysDescription(set) {
|
|
177
|
+
const jsonRequestWithKeysDescription = this.predefinedRequests.jsonRequestWithKeysDescription.replace('{{DyNTS_jsonKeysDescription}}', set.keysDescription);
|
|
178
|
+
set.question += jsonRequestWithKeysDescription;
|
|
179
|
+
const answer = await this.askQuestion(set);
|
|
197
180
|
return DyFM_safeParseJSON(answer);
|
|
198
181
|
}
|
|
199
182
|
/** the exact same as {@link askJSONQuestionWithKeysDescription} */
|
|
@@ -207,12 +190,10 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
207
190
|
*
|
|
208
191
|
* (uses {@link DyFM_safeParseJSON})
|
|
209
192
|
*/
|
|
210
|
-
async askJSONQuestionWithExactKeys(
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
question += jsonRequestWithExactKeys;
|
|
215
|
-
const answer = await this.askQuestion(question, issuer, settings, debugLog, replaceThisInLog);
|
|
193
|
+
async askJSONQuestionWithExactKeys(set) {
|
|
194
|
+
const jsonRequestWithExactKeys = this.predefinedRequests.jsonRequestWithExactKeys.replace('{{DyNTS_jsonKeys}}', this.getTextListAsText(set.keys));
|
|
195
|
+
set.question += jsonRequestWithExactKeys;
|
|
196
|
+
const answer = await this.askQuestion(set);
|
|
216
197
|
return DyFM_safeParseJSON(answer);
|
|
217
198
|
}
|
|
218
199
|
/** the exact same as {@link askJSONQuestionWithExactKeys} */
|
|
@@ -226,11 +207,9 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
226
207
|
*
|
|
227
208
|
* (uses {@link DyFM_safeParseList})
|
|
228
209
|
*/
|
|
229
|
-
async askListQuestion(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
question += this.predefinedRequests.listRequest;
|
|
233
|
-
const answer = await this.askQuestion(question, issuer, settings, debugLog, replaceThisInLog);
|
|
210
|
+
async askListQuestion(set) {
|
|
211
|
+
set.question += this.predefinedRequests.listRequest;
|
|
212
|
+
const answer = await this.askQuestion(set);
|
|
234
213
|
return DyFM_safeParseList(answer);
|
|
235
214
|
}
|
|
236
215
|
/** the exact same as {@link askListQuestion} */
|
|
@@ -242,11 +221,13 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
242
221
|
*
|
|
243
222
|
* Uses the {@link resolveSimpleUserMessage}
|
|
244
223
|
*/
|
|
245
|
-
async askQuestion(
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
224
|
+
async askQuestion(set) {
|
|
225
|
+
this.logQuestion(set);
|
|
226
|
+
const answer = await this.resolveSimpleUserMessage({
|
|
227
|
+
message: set.question,
|
|
228
|
+
issuer: set.issuer,
|
|
229
|
+
settings: set.settings,
|
|
230
|
+
});
|
|
250
231
|
if (this.debugLog) {
|
|
251
232
|
console.log(' - ', answer);
|
|
252
233
|
}
|
|
@@ -279,8 +260,13 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
279
260
|
*
|
|
280
261
|
* Uses the {@link resolveMessage}
|
|
281
262
|
*/
|
|
282
|
-
async resolveSimpleUserMessage(
|
|
283
|
-
return this.resolveMessage(
|
|
263
|
+
async resolveSimpleUserMessage(set) {
|
|
264
|
+
return this.resolveMessage({
|
|
265
|
+
conversation: [{ role: oai_gpt_message_role_enum_1.DyNTS_OAI_GPT_Message_Role.user, content: set.message }],
|
|
266
|
+
issuer: set.issuer,
|
|
267
|
+
settings: set.settings,
|
|
268
|
+
getFullResponse: false,
|
|
269
|
+
});
|
|
284
270
|
}
|
|
285
271
|
/** the exact same as {@link resolveSimpleUserMessage} */
|
|
286
272
|
simpleUserMessage = this.resolveSimpleUserMessage;
|
|
@@ -290,18 +276,18 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
290
276
|
*
|
|
291
277
|
* Uses the {@link getMessageCreateInput}
|
|
292
278
|
*/
|
|
293
|
-
async resolveMessage(
|
|
279
|
+
async resolveMessage(set) {
|
|
294
280
|
try {
|
|
295
|
-
conversation.unshift(this.getDefaultSystemMessage(settings));
|
|
296
|
-
const result = await this.openai.chat.completions.create(this.getMessageCreateInput(
|
|
297
|
-
if (getFullResponse) {
|
|
281
|
+
set.conversation.unshift(this.getDefaultSystemMessage(set.settings));
|
|
282
|
+
const result = await this.openai.chat.completions.create(this.getMessageCreateInput(set));
|
|
283
|
+
if (set.getFullResponse) {
|
|
298
284
|
return result;
|
|
299
285
|
}
|
|
300
286
|
return result.choices[0].message.content;
|
|
301
287
|
}
|
|
302
288
|
catch (error) {
|
|
303
289
|
throw new fsm_dynamo_1.DyFM_Error({
|
|
304
|
-
...this.getDefaultErrorSettings('resolveConversation', error, issuer),
|
|
290
|
+
...this.getDefaultErrorSettings('resolveConversation', error, set.issuer),
|
|
305
291
|
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-OAB-RC0`,
|
|
306
292
|
});
|
|
307
293
|
}
|
|
@@ -310,12 +296,12 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
310
296
|
/**
|
|
311
297
|
* Logs the question if the debugLog is true
|
|
312
298
|
*/
|
|
313
|
-
logQuestion(
|
|
314
|
-
if (debugLog ?? this.debugLog) {
|
|
315
|
-
if (replaceThisInLog) {
|
|
316
|
-
question = question.replace(replaceThisInLog, this.defaultLogReplacer);
|
|
299
|
+
logQuestion(set) {
|
|
300
|
+
if (set.debugLog ?? this.debugLog) {
|
|
301
|
+
if (set.replaceThisInLog) {
|
|
302
|
+
set.question = set.question.replace(set.replaceThisInLog, this.defaultLogReplacer);
|
|
317
303
|
}
|
|
318
|
-
console.log('\n - ', question);
|
|
304
|
+
console.log('\n - ', set.question);
|
|
319
305
|
}
|
|
320
306
|
}
|
|
321
307
|
/**
|
|
@@ -333,32 +319,36 @@ class DyNTS_OAI_LLM_ServiceBase {
|
|
|
333
319
|
*
|
|
334
320
|
* Uses the {@link getDefaultSystemMessage}
|
|
335
321
|
*/
|
|
336
|
-
getMessageCreateInput(
|
|
322
|
+
getMessageCreateInput(set) {
|
|
337
323
|
try {
|
|
324
|
+
const settings = set.settings ?? this.defaultSettings;
|
|
338
325
|
const result = {
|
|
339
|
-
model: settings
|
|
340
|
-
messages:
|
|
326
|
+
model: settings?.useModel ?? this.defaultModel,
|
|
327
|
+
messages: set.conversation,
|
|
341
328
|
};
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
329
|
+
result.temperature = (0, fsm_dynamo_1.DyFM_notNull)(settings?.temperature) ?
|
|
330
|
+
settings.temperature :
|
|
331
|
+
this.defaultSettings.temperature;
|
|
332
|
+
/* result.max_tokens = DyFM_notNull(settings?.maxTokens) ?
|
|
333
|
+
settings.maxTokens :
|
|
334
|
+
this.defaultSettings.maxTokens; */
|
|
335
|
+
result.max_completion_tokens = (0, fsm_dynamo_1.DyFM_notNull)(settings?.maxTokens) ?
|
|
336
|
+
settings.maxTokens :
|
|
337
|
+
this.defaultSettings.maxTokens;
|
|
338
|
+
result.top_p = (0, fsm_dynamo_1.DyFM_notNull)(settings?.topP) ?
|
|
339
|
+
settings.topP :
|
|
340
|
+
this.defaultSettings.topP;
|
|
341
|
+
result.frequency_penalty = (0, fsm_dynamo_1.DyFM_notNull)(settings?.frequencyPenalty) ?
|
|
342
|
+
settings.frequencyPenalty :
|
|
343
|
+
this.defaultSettings.frequencyPenalty;
|
|
344
|
+
result.presence_penalty = (0, fsm_dynamo_1.DyFM_notNull)(settings?.presencePenalty) ?
|
|
345
|
+
settings.presencePenalty :
|
|
346
|
+
this.defaultSettings.presencePenalty;
|
|
357
347
|
return result;
|
|
358
348
|
}
|
|
359
349
|
catch (error) {
|
|
360
350
|
throw new fsm_dynamo_1.DyFM_Error({
|
|
361
|
-
...this.getDefaultErrorSettings('getMessageCreateSettings', error, issuer),
|
|
351
|
+
...this.getDefaultErrorSettings('getMessageCreateSettings', error, set.issuer),
|
|
362
352
|
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-OAB-RC0`,
|
|
363
353
|
});
|
|
364
354
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oai-llm.service-base.js","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_services/oai-llm.service-base.ts"],"names":[],"mappings":";;;AAAA,iEAAiE;AACjE,mCAAgC;AAEhC,2DAA8G;AAC9G,sDAA+G;AAE/G,uFAAoF;AAIpF,mFAAiF;AAEjF,yFAAsF;AACtF,yGAA4G;AAG5G;;;;;;GAMG;AAEH,kCAAkC;AAElC,MAAa,yBAAyB;IAE3B,mBAAmB,GAC1B,qDAAqD;QACrD,oDAAoD,CAAC;IAE9C,MAAM,CAAS;IAExB;wDACoD;IAC3C,eAAe,CAAwB;IAEhD,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC;IACvC,CAAC;IAED,IAAI,mBAAmB;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC;IAC3C,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC;IACvC,CAAC;IAED,kBAAkB,GAChB,2EAA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M,IAAI,KAAK,CAAC,uCAAuC,UAAU,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAClD,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAE7C,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACnD,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC,KAAK,CACf,UAAU,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAC3D,CAAC;IACJ,CAAC;AACH,CAAC;AAfD,gEAeC"}
|
|
1
|
+
{"version":3,"file":"oai-llm.service-base.js","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_services/oai-llm.service-base.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAEhC,2DAA8G;AAC9G,sDAA+G;AAE/G,uFAAoF;AAIpF,mFAAiF;AAEjF,yFAAsF;AACtF,yGAA4G;AAG5G;;;;;;GAMG;AAEH,kCAAkC;AAElC,MAAa,yBAAyB;IAE3B,mBAAmB,GAC1B,qDAAqD;QACrD,oDAAoD,CAAC;IAE9C,MAAM,CAAS;IAExB;wDACoD;IAC3C,eAAe,CAAwB;IAEhD,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC;IACvC,CAAC;IAED,IAAI,mBAAmB;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC;IAC3C,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC;IACvC,CAAC;IAED,kBAAkB,GAChB,2EAAuC,CAAC;IAE1C,YACE,GAA0B;QAE1B,6CAAqB,CA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H,OAAO,0BAA0B,CAAC,UAAU,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,qBAAQ,CAAC,KAAK,CACZ,8BAA8B,EAC9B;gBACE,YAAY,EAAE,UAAU;gBACxB,KAAK,EAAE,KAAK;aACb,CACF,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC;IAC1C,CAAC;AACH,CAAC;AAnBD,gDAmBC;AAED;;;;GAIG;AACH,SAAgB,0BAA0B,CAAU,UAAkB;IACpE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,uCAAuC,UAAU,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAClD,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAE7C,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACnD,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC,KAAK,CACf,UAAU,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAC3D,CAAC;IACJ,CAAC;AACH,CAAC;AAfD,gEAeC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futdevpro/nts-dynamo",
|
|
3
|
-
"version": "01.11.
|
|
3
|
+
"version": "01.11.17",
|
|
4
4
|
"description": "Dynamic NodeTS (NodeJS-Typescript), MongoDB Backend System Framework by Future Development Program Ltd.",
|
|
5
5
|
"DyBu_settings": {
|
|
6
6
|
"packageType": "server-package",
|
|
@@ -164,12 +164,12 @@
|
|
|
164
164
|
},
|
|
165
165
|
"homepage": "https:/futdevpro.hu/projects/dynamo",
|
|
166
166
|
"DISABLED": {
|
|
167
|
-
"@futdevpro/fsm-dynamo": "file:../tgz-collection/dynamo-fsm/futdevpro-fsm-dynamo-01.11.
|
|
167
|
+
"@futdevpro/fsm-dynamo": "file:../tgz-collection/dynamo-fsm/futdevpro-fsm-dynamo-01.11.18.tgz",
|
|
168
168
|
|
|
169
169
|
"empty": ""
|
|
170
170
|
},
|
|
171
171
|
"peerDependencies": {
|
|
172
|
-
"@futdevpro/fsm-dynamo": "1.11.
|
|
172
|
+
"@futdevpro/fsm-dynamo": "1.11.18",
|
|
173
173
|
|
|
174
174
|
"@types/express": "4.17.21",
|
|
175
175
|
"@types/geoip-lite": "~1.4.1",
|
|
@@ -48,31 +48,32 @@ export abstract class DyNTS_DiAs_Chunk_DataService<
|
|
|
48
48
|
|
|
49
49
|
async resolveConversation(
|
|
50
50
|
conversation: DyNTS_OAI_GPT_Message[],
|
|
51
|
+
limit: number = 10,
|
|
52
|
+
numberOfCandidates: number = 200,
|
|
51
53
|
): Promise<string> {
|
|
52
54
|
try {
|
|
53
55
|
DyFM_Log.info('🔍 Document message received:', conversation[conversation.length - 1].content);
|
|
54
56
|
|
|
55
|
-
const vectorSearchNeeded: boolean = await this.llmChat_CS.yesNoQuestionInConversation(
|
|
56
|
-
conversation,
|
|
57
|
-
DyNTS_OAI_LLMDefaultPredefined_Requests.vectorSearch.doWeNeedVectorSearch,
|
|
58
|
-
this.issuer,
|
|
59
|
-
|
|
60
|
-
{
|
|
57
|
+
const vectorSearchNeeded: boolean = await this.llmChat_CS.yesNoQuestionInConversation({
|
|
58
|
+
conversation: conversation,
|
|
59
|
+
question: DyNTS_OAI_LLMDefaultPredefined_Requests.vectorSearch.doWeNeedVectorSearch,
|
|
60
|
+
issuer: this.issuer,
|
|
61
|
+
settings: {
|
|
61
62
|
systemPrompt: DyNTS_OAI_LLMDefaultPredefined_Requests.defaultSystemPrompt,
|
|
62
63
|
},
|
|
63
|
-
);
|
|
64
|
+
});
|
|
64
65
|
|
|
65
66
|
let result: string;
|
|
66
67
|
if (vectorSearchNeeded) {
|
|
67
|
-
result = await this.vectorSearchAndResolveConversation(conversation,
|
|
68
|
+
result = await this.vectorSearchAndResolveConversation(conversation, limit, numberOfCandidates);
|
|
68
69
|
} else {
|
|
69
|
-
result = await this.llmChat_CS.
|
|
70
|
-
conversation,
|
|
71
|
-
this.issuer,
|
|
72
|
-
{
|
|
70
|
+
result = await this.llmChat_CS.resolveConversationMessage({
|
|
71
|
+
conversation: conversation,
|
|
72
|
+
issuer: this.issuer,
|
|
73
|
+
settings: {
|
|
73
74
|
systemPrompt: DyNTS_OAI_LLMDefaultPredefined_Requests.defaultSystemPrompt,
|
|
74
75
|
},
|
|
75
|
-
)
|
|
76
|
+
});
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
return result;
|
|
@@ -109,16 +110,16 @@ export abstract class DyNTS_DiAs_Chunk_DataService<
|
|
|
109
110
|
|
|
110
111
|
DyFM_Log.H_success(`✅ Document search results:`, parsedSearchResults);
|
|
111
112
|
|
|
112
|
-
const result: string = await this.llmChat_CS.
|
|
113
|
-
conversation,
|
|
114
|
-
this.issuer,
|
|
115
|
-
{
|
|
113
|
+
const result: string = await this.llmChat_CS.resolveConversationMessage({
|
|
114
|
+
conversation: conversation,
|
|
115
|
+
issuer: this.issuer,
|
|
116
|
+
settings: {
|
|
116
117
|
systemPrompt:
|
|
117
118
|
DyNTS_OAI_LLMDefaultPredefined_Requests.defaultSystemPrompt +
|
|
118
119
|
DyNTS_OAI_LLMDefaultPredefined_Requests.vectorSearch.resolveSearchResults +
|
|
119
120
|
parsedSearchResults,
|
|
120
|
-
}
|
|
121
|
-
)
|
|
121
|
+
},
|
|
122
|
+
});
|
|
122
123
|
|
|
123
124
|
return result;
|
|
124
125
|
} catch (error) {
|
|
@@ -138,16 +139,16 @@ export abstract class DyNTS_DiAs_Chunk_DataService<
|
|
|
138
139
|
try {
|
|
139
140
|
const lastMessage: DyNTS_OAI_GPT_Message = conversation[conversation.length - 1];
|
|
140
141
|
|
|
141
|
-
const searchQuestion: string = await this.llmChat_CS.getAnswerInConversation(
|
|
142
|
-
conversation,
|
|
143
|
-
DyNTS_OAI_LLMDefaultPredefined_Requests.vectorSearch.getSearchQuestion,
|
|
144
|
-
this.issuer,
|
|
145
|
-
{
|
|
142
|
+
const searchQuestion: string = await this.llmChat_CS.getAnswerInConversation({
|
|
143
|
+
conversation: conversation,
|
|
144
|
+
newMessage: DyNTS_OAI_LLMDefaultPredefined_Requests.vectorSearch.getSearchQuestion,
|
|
145
|
+
issuer: this.issuer,
|
|
146
|
+
settings: {
|
|
146
147
|
systemPrompt:
|
|
147
148
|
DyNTS_OAI_LLMDefaultPredefined_Requests.defaultSystemPrompt +
|
|
148
149
|
DyNTS_OAI_LLMDefaultPredefined_Requests.vectorSearch.systemPrompt,
|
|
149
150
|
},
|
|
150
|
-
);
|
|
151
|
+
});
|
|
151
152
|
|
|
152
153
|
DyFM_Log.testInfo('🔍 Document search question:', searchQuestion);
|
|
153
154
|
|
|
@@ -34,13 +34,13 @@ export abstract class DyNTS_DiAs_IO_ControlService extends DyNTS_DiBo_IO_Control
|
|
|
34
34
|
this.mainDiscordBot_CS.botDisplayName,
|
|
35
35
|
);
|
|
36
36
|
|
|
37
|
-
const gptResult: string = await this.llmChat_CS.
|
|
38
|
-
oaiMessages,
|
|
39
|
-
issuer,
|
|
40
|
-
{
|
|
37
|
+
const gptResult: string = await this.llmChat_CS.resolveConversationMessage({
|
|
38
|
+
conversation: oaiMessages,
|
|
39
|
+
issuer: issuer,
|
|
40
|
+
settings: {
|
|
41
41
|
systemPrompt: this.mainDiscordBot_CS.defaultSystemPrompt,
|
|
42
|
-
}
|
|
43
|
-
)
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
44
|
|
|
45
45
|
await message.reply(gptResult);
|
|
46
46
|
} catch (error) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GatewayIntentBits, Partials } from 'discord.js';
|
|
2
|
-
import { DyNTS_DiBo_Global_Settings } from '../_models/global-
|
|
2
|
+
import { DyNTS_DiBo_Global_Settings } from '../_models/dibo-global-settings.interface';
|
|
3
3
|
import { minute, week } from '@futdevpro/fsm-dynamo';
|
|
4
4
|
import { DyNTS_DiBo_defaultCommands } from './dibo-default-commands.const';
|
|
5
5
|
|
|
@@ -9,9 +9,9 @@ import { DyNTS_global_settings } from '../../../_collections/global-settings.con
|
|
|
9
9
|
|
|
10
10
|
export abstract class DyNTS_DiBo_Routines_ControlService extends DyNTS_SingletonService {
|
|
11
11
|
|
|
12
|
-
static getInstance(): DyNTS_DiBo_Routines_ControlService {
|
|
12
|
+
/* static getInstance(): DyNTS_DiBo_Routines_ControlService {
|
|
13
13
|
return DyNTS_DiBo_Routines_ControlService.getSingletonInstance();
|
|
14
|
-
}
|
|
14
|
+
} */
|
|
15
15
|
|
|
16
16
|
protected abstract getMainDiscordBotControlService(): DyNTS_DiBo_Main_ControlService;
|
|
17
17
|
|
|
@@ -27,7 +27,7 @@ export * from './_collections/dibo-operations.util';
|
|
|
27
27
|
export * from './_models/dibo-command.interface';
|
|
28
28
|
export * from './_models/dibo-last-mention-date.inteface';
|
|
29
29
|
export * from './_models/dibo-last-message-date.interface';
|
|
30
|
-
export * from './_models/global-
|
|
30
|
+
export * from './_models/dibo-global-settings.interface';
|
|
31
31
|
|
|
32
32
|
// SERVICES
|
|
33
33
|
export * from './_services/dibo-commands.control-service';
|