@futdevpro/nts-dynamo 1.11.36 → 1.11.38
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/.github/workflows/main.yml +22 -20
- package/build/_modules/discord-assistant-voiced/index.js +15 -12
- package/build/_modules/discord-assistant-voiced/index.js.map +1 -1
- package/build/_modules/discord-bot/index.js +7 -6
- package/build/_modules/discord-bot/index.js.map +1 -1
- package/build/_modules/oauth2/index.js +7 -6
- package/build/_modules/oauth2/index.js.map +1 -1
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts +0 -15
- 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 +32 -17
- 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 +0 -139
- 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 +16 -16
- package/build/_modules/open-ai/_services/oai-llm.service-base.js.map +1 -1
- package/build/_modules/open-ai/_services/oai-vector-data.service.d.ts +2 -2
- package/build/_modules/open-ai/_services/oai-vector-data.service.d.ts.map +1 -1
- package/build/_modules/open-ai/_services/oai-vector-data.service.js.map +1 -1
- package/build/_modules/open-ai/index.js +7 -6
- package/build/_modules/open-ai/index.js.map +1 -1
- package/build/_modules/socket/index.js +15 -12
- package/build/_modules/socket/index.js.map +1 -1
- package/build/_services/base/data.service.d.ts +5 -3
- package/build/_services/base/data.service.d.ts.map +1 -1
- package/build/_services/base/data.service.js +162 -30
- package/build/_services/base/data.service.js.map +1 -1
- package/build/_services/base/db.service.d.ts.map +1 -1
- package/build/_services/base/db.service.js +68 -21
- package/build/_services/base/db.service.js.map +1 -1
- package/build/_services/route/routing-module.service.d.ts.map +1 -1
- package/build/_services/route/routing-module.service.js +2 -1
- package/build/_services/route/routing-module.service.js.map +1 -1
- package/build/_services/server/app.server.d.ts.map +1 -1
- package/build/_services/server/app.server.js +25 -15
- package/build/_services/server/app.server.js.map +1 -1
- package/package.json +3 -3
- package/src/_modules/discord-assistant-voiced/index.ts +2 -2
- package/src/_modules/discord-bot/index.ts +2 -2
- package/src/_modules/oauth2/index.ts +2 -2
- package/src/_modules/open-ai/_services/oai-llm-chat.service-base.ts +31 -17
- package/src/_modules/open-ai/_services/oai-llm.service-base.ts +16 -16
- package/src/_modules/open-ai/_services/oai-vector-data.service.ts +13 -13
- package/src/_modules/open-ai/index.ts +2 -2
- package/src/_modules/socket/index.ts +2 -2
- package/src/_services/base/data.service.ts +265 -70
- package/src/_services/base/db.service.ts +74 -16
- package/src/_services/route/routing-module.service.ts +2 -1
- package/src/_services/server/app.server.ts +6 -4
|
@@ -53,7 +53,7 @@ jobs:
|
|
|
53
53
|
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
|
54
54
|
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
|
55
55
|
message: |
|
|
56
|
-
💽❌ Failed to send Discord start notification! [🔗](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
|
|
56
|
+
💽❌ Failed to send Discord start notification for ${{ github.repository }}! [🔗](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
|
|
57
57
|
|
|
58
58
|
check_secrets:
|
|
59
59
|
name: Check Required Secrets and Variables
|
|
@@ -68,28 +68,28 @@ jobs:
|
|
|
68
68
|
ITEMS_TO_CHECK: |
|
|
69
69
|
[
|
|
70
70
|
{
|
|
71
|
-
"
|
|
71
|
+
"valueName": "NPM_TOKEN",
|
|
72
72
|
"value": "${{ secrets.NPM_TOKEN }}",
|
|
73
73
|
"type": "SECRET"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
|
-
"
|
|
76
|
+
"valueName": "DISCORD_WEBHOOK_ID",
|
|
77
77
|
"value": "${{ secrets.DISCORD_WEBHOOK_ID }}",
|
|
78
78
|
"type": "SECRET"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
|
-
"
|
|
81
|
+
"valueName": "DISCORD_WEBHOOK_TOKEN",
|
|
82
82
|
"value": "${{ secrets.DISCORD_WEBHOOK_TOKEN }}",
|
|
83
83
|
"type": "SECRET"
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
|
-
"
|
|
86
|
+
"valueName": "OVERSEER_SECRET_KEY",
|
|
87
87
|
"value": "${{ secrets.OVERSEER_SECRET_KEY }}",
|
|
88
88
|
"type": "SECRET"
|
|
89
89
|
},
|
|
90
90
|
|
|
91
91
|
{
|
|
92
|
-
"
|
|
92
|
+
"valueName": "OVERSEER_URL",
|
|
93
93
|
"value": "${{ vars.OVERSEER_URL }}",
|
|
94
94
|
"type": "VARIABLE"
|
|
95
95
|
}
|
|
@@ -279,33 +279,35 @@ jobs:
|
|
|
279
279
|
SETTINGS: |
|
|
280
280
|
{
|
|
281
281
|
"overseerUrl": "${{ vars.OVERSEER_URL }}",
|
|
282
|
-
"
|
|
283
|
-
"
|
|
282
|
+
"overseerSecret": "${{ secrets.OVERSEER_SECRET_KEY }}",
|
|
283
|
+
"branchName": "${{ github.ref_name }}",
|
|
284
|
+
"repository": "${{ github.repository }}",
|
|
285
|
+
"runId": "${{ github.run_id }}",
|
|
284
286
|
"linkToAction": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
|
|
285
|
-
"
|
|
287
|
+
"eventDateTime": "${{ needs.notification0.outputs.start }}",
|
|
286
288
|
"projects": [
|
|
287
289
|
{
|
|
288
290
|
"environment": "prod",
|
|
289
291
|
"jobResults": [
|
|
290
292
|
{
|
|
291
|
-
"
|
|
293
|
+
"stepName": "checkDevLeftovers",
|
|
292
294
|
"result": "${{ needs.check_dev_leftovers.result }}",
|
|
293
295
|
"requirement": "optional"
|
|
294
296
|
},
|
|
295
297
|
{
|
|
296
|
-
"
|
|
298
|
+
"stepName": "tests",
|
|
297
299
|
"result": "${{ needs.test.result }}",
|
|
298
300
|
"requirement": "required"
|
|
299
301
|
},
|
|
300
302
|
{
|
|
301
|
-
"
|
|
303
|
+
"stepName": "checkVersion",
|
|
302
304
|
"result": "${{ needs.check_version.result }}",
|
|
303
305
|
"requirement": "required"
|
|
304
306
|
},
|
|
305
307
|
{
|
|
306
|
-
"
|
|
308
|
+
"stepName": "deploy",
|
|
307
309
|
"result": "${{ needs.deploy.result }}",
|
|
308
|
-
"requirement": "
|
|
310
|
+
"requirement": "optional"
|
|
309
311
|
}
|
|
310
312
|
]
|
|
311
313
|
}
|
|
@@ -345,33 +347,33 @@ jobs:
|
|
|
345
347
|
STEPS_CONFIG: |
|
|
346
348
|
[
|
|
347
349
|
{
|
|
348
|
-
"
|
|
350
|
+
"stepName": "Secrets Check",
|
|
349
351
|
"emoji": "🔑",
|
|
350
352
|
"result": "${{ needs.check_secrets.result }}"
|
|
351
353
|
},
|
|
352
354
|
{
|
|
353
|
-
"
|
|
355
|
+
"stepName": "Dev Leftovers Check",
|
|
354
356
|
"emoji": "🔍",
|
|
355
357
|
"result": "${{ needs.check_dev_leftovers.result }}"
|
|
356
358
|
},
|
|
357
359
|
{
|
|
358
|
-
"
|
|
360
|
+
"stepName": "Test Build",
|
|
359
361
|
"emoji": "🧪",
|
|
360
362
|
"result": "${{ needs.test.result }}"
|
|
361
363
|
},
|
|
362
364
|
{
|
|
363
|
-
"
|
|
365
|
+
"stepName": "Check Version",
|
|
364
366
|
"emoji": "🔍",
|
|
365
367
|
"result": "${{ needs.check_version.result }}"
|
|
366
368
|
},
|
|
367
369
|
{
|
|
368
|
-
"
|
|
370
|
+
"stepName": "Deploy",
|
|
369
371
|
"emoji": "📦",
|
|
370
372
|
"result": "${{ needs.deploy.result }}",
|
|
371
373
|
"specialSuccessEmoji": "🚀🚀🚀"
|
|
372
374
|
},
|
|
373
375
|
{
|
|
374
|
-
"
|
|
376
|
+
"stepName": "Build Report",
|
|
375
377
|
"emoji": "📊",
|
|
376
378
|
"result": "${{ needs.build_report.result }}"
|
|
377
379
|
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
console.log('❌ @discordjs/opus package not found, please install it with: pnpm add @discordjs/opus');
|
|
2
|
+
/* try {
|
|
3
|
+
require.resolve('@discordjs/opus');
|
|
4
|
+
} catch (error) {
|
|
5
|
+
console.log(
|
|
6
|
+
'❌ @discordjs/opus package not found, please install it with: pnpm add @discordjs/opus'
|
|
7
|
+
);
|
|
9
8
|
}
|
|
9
|
+
|
|
10
10
|
try {
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
require.resolve('@discordjs/voice');
|
|
12
|
+
} catch (error) {
|
|
13
|
+
console.log(
|
|
14
|
+
'❌ @discordjs/voice package not found, please install it with: pnpm add @discordjs/voice'
|
|
15
|
+
);
|
|
16
|
+
} */
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const tslib_1 = require("tslib");
|
|
16
19
|
//
|
|
17
20
|
// Discord Assistant Voiced module
|
|
18
21
|
//
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/discord-assistant-voiced/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/discord-assistant-voiced/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;IAcI;;;AAGJ,EAAE;AACF,kCAAkC;AAClC,EAAE;AACF,2EAA2E;AAC3E,+DAA+D;AAC/D,EAAE;AAEF,eAAe;AACf,+DAAqC;AAGrC,WAAW;AACX,uFAA6D"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* try {
|
|
3
|
+
require.resolve('discord.js');
|
|
4
|
+
} catch (error) {
|
|
5
|
+
console.log(
|
|
6
|
+
'❌ Discord.js package not found, please install it with: pnpm add discord.js'
|
|
7
|
+
);
|
|
8
|
+
} */
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
10
|
const tslib_1 = require("tslib");
|
|
4
|
-
try {
|
|
5
|
-
require.resolve('discord.js');
|
|
6
|
-
}
|
|
7
|
-
catch (error) {
|
|
8
|
-
console.log('❌ Discord.js package not found, please install it with: pnpm add discord.js');
|
|
9
|
-
}
|
|
10
11
|
//
|
|
11
12
|
// Discord Bot module
|
|
12
13
|
//
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/discord-bot/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/discord-bot/index.ts"],"names":[],"mappings":";AAIA;;;;;;IAMI;;;AAEJ,EAAE;AACF,qBAAqB;AACrB,EAAE;AACF,8DAA8D;AAC9D,+DAA+D;AAC/D,EAAE;AAGF,cAAc;AACd,qFAA2D;AAC3D,oFAA0D;AAC1D,8EAAoD;AAEpD,SAAS;AACT,2EAAiD;AACjD,oFAA0D;AAC1D,qFAA2D;AAC3D,mFAAyD;AAEzD,WAAW;AACX,oFAA0D;AAC1D,8EAAoD;AACpD,gFAAsD;AACtD,oFAA0D"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* try {
|
|
3
|
+
require.resolve('crypto-js');
|
|
4
|
+
} catch (error) {
|
|
5
|
+
console.log(
|
|
6
|
+
'❌ CryptoJS package not found, please install it with: pnpm add crypto-js'
|
|
7
|
+
);
|
|
8
|
+
} */
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
10
|
const tslib_1 = require("tslib");
|
|
4
|
-
try {
|
|
5
|
-
require.resolve('crypto-js');
|
|
6
|
-
}
|
|
7
|
-
catch (error) {
|
|
8
|
-
console.log('❌ CryptoJS package not found, please install it with: pnpm add crypto-js');
|
|
9
|
-
}
|
|
10
11
|
// This module is implementing solutions for OAuth2.0 protocol for the server.
|
|
11
12
|
tslib_1.__exportStar(require("./_routes/oauth2.controller"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./_services/oauth2.auth-service"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/oauth2/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/oauth2/index.ts"],"names":[],"mappings":";AAAA;;;;;;IAMI;;;AAEJ,8EAA8E;AAG9E,sEAA4C;AAE5C,0EAAgD;AAChD,6EAAmD"}
|
|
@@ -25,7 +25,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
25
25
|
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
26
26
|
replaceThisInLog?: string;
|
|
27
27
|
}): Promise<boolean>;
|
|
28
|
-
askYesNoQuestionInConversation: typeof this.yesNoQuestionInConversation;
|
|
29
28
|
/**
|
|
30
29
|
* Asks the AI to answer a simple question
|
|
31
30
|
*
|
|
@@ -40,7 +39,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
40
39
|
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
41
40
|
replaceThisInLog?: string;
|
|
42
41
|
}): Promise<string>;
|
|
43
|
-
askSimpleQuestionInConversation: typeof this.simpleQuestionInConversation;
|
|
44
42
|
/**
|
|
45
43
|
* Asks the AI to answer a percentage question
|
|
46
44
|
*
|
|
@@ -55,7 +53,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
55
53
|
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
56
54
|
replaceThisInLog?: string;
|
|
57
55
|
}): Promise<number>;
|
|
58
|
-
askPercentageQuestionInConversation: typeof this.percentageQuestionInConversation;
|
|
59
56
|
/**
|
|
60
57
|
* Asks the AI to select one of the options from the list
|
|
61
58
|
*
|
|
@@ -71,7 +68,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
71
68
|
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
72
69
|
replaceThisInLog?: string;
|
|
73
70
|
}): Promise<string>;
|
|
74
|
-
askSelectQuestionInConversation: typeof this.selectQuestionInConversation;
|
|
75
71
|
/**
|
|
76
72
|
* Asks the AI to select one of the options from the list
|
|
77
73
|
* Similar to {@link askSelectQuestion},
|
|
@@ -91,7 +87,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
91
87
|
}): Promise<T | {
|
|
92
88
|
unparsableResult: string;
|
|
93
89
|
}>;
|
|
94
|
-
askRequestSelectInConversation: typeof this.requestSelectInConversation;
|
|
95
90
|
/**
|
|
96
91
|
* Asks the AI to select one or more of the options from the list
|
|
97
92
|
*
|
|
@@ -107,7 +102,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
107
102
|
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
108
103
|
replaceThisInLog?: string;
|
|
109
104
|
}): Promise<string[]>;
|
|
110
|
-
askMultipleSelectQuestionWithOptionsInConversation: typeof this.multipleSelectQuestionWithOptionsInConversation;
|
|
111
105
|
/**
|
|
112
106
|
* Asks the AI to select one or more of the options from the list
|
|
113
107
|
* Similar to {@link askMultipleSelectQuestionWithOptions},
|
|
@@ -125,7 +119,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
125
119
|
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
126
120
|
replaceThisInLog?: string;
|
|
127
121
|
}): Promise<T[]>;
|
|
128
|
-
askRequestMultipleSelectInConversation: typeof this.requestMultipleSelectInConversation;
|
|
129
122
|
/**
|
|
130
123
|
* Asks the AI to answer a question that must result a JSON object
|
|
131
124
|
*
|
|
@@ -146,7 +139,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
146
139
|
}): Promise<T | {
|
|
147
140
|
unparsableResult: string;
|
|
148
141
|
}>;
|
|
149
|
-
askJsonQuestionInConversation: typeof this.jsonQuestionInConversation;
|
|
150
142
|
/**
|
|
151
143
|
* Asks the AI to answer a question that must result a JSON object with specific key descriptions
|
|
152
144
|
*
|
|
@@ -168,7 +160,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
168
160
|
}): Promise<T | {
|
|
169
161
|
unparsableResult: string;
|
|
170
162
|
}>;
|
|
171
|
-
askJsonQuestionWithKeysDescriptionInConversation: typeof this.jsonQuestionWithKeysDescriptionInConversation;
|
|
172
163
|
/**
|
|
173
164
|
* Asks the AI to answer a question that must result a JSON object with specific keys
|
|
174
165
|
*
|
|
@@ -190,7 +181,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
190
181
|
}): Promise<T | {
|
|
191
182
|
unparsableResult: string;
|
|
192
183
|
}>;
|
|
193
|
-
askJsonQuestionWithExactKeysInConversation: typeof this.jsonQuestionWithExactKeysInConversation;
|
|
194
184
|
/**
|
|
195
185
|
* Asks the AI to answer a question that must result a list of strings
|
|
196
186
|
*
|
|
@@ -209,7 +199,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
209
199
|
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
210
200
|
replaceThisInLog?: string;
|
|
211
201
|
}): Promise<string[]>;
|
|
212
|
-
askListQuestionInConversation: typeof this.listQuestionInConversation;
|
|
213
202
|
/**
|
|
214
203
|
* Asks the AI to answer a question
|
|
215
204
|
*
|
|
@@ -224,9 +213,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
224
213
|
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
225
214
|
replaceThisInLog?: string;
|
|
226
215
|
}): Promise<string>;
|
|
227
|
-
getQuestionInConversation: typeof this.getQuestionAnswerInConversation;
|
|
228
|
-
askQuestionInConversation: typeof this.getQuestionAnswerInConversation;
|
|
229
|
-
getConversationAnswer: typeof this.getAnswerInConversation;
|
|
230
216
|
/**
|
|
231
217
|
* Asks the AI to answer a question using the whole conversation
|
|
232
218
|
* (If you want to use only the conversation, without adding a new message,
|
|
@@ -266,7 +252,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
266
252
|
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
267
253
|
replaceThisInLog?: string;
|
|
268
254
|
}): Promise<string | ChatCompletion>;
|
|
269
|
-
resolveSimpleUserMessageInConversation: typeof this.resolveConversation;
|
|
270
255
|
protected shortenConversation(set: {
|
|
271
256
|
conversation: DyNTS_OAI_GPT_Message[];
|
|
272
257
|
issuer: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oai-llm-chat.service-base.d.ts","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_services/oai-llm-chat.service-base.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0C,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAI9G,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAInE;;;;;;GAMG;AAIH,qBAAa,6BAA8B,SAAQ,yBAAyB;IAE1E;;;;;OAKG;IACG,2BAA2B,CAC/B,GAAG,EAAE;QACH,YAAY,EAAE,qBAAqB,EAAE,CAAC;QACtC,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,qBAAqB,CAAC;QACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,6EAA6E;QAC7E,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,GACA,OAAO,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"oai-llm-chat.service-base.d.ts","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_services/oai-llm-chat.service-base.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0C,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAI9G,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAInE;;;;;;GAMG;AAIH,qBAAa,6BAA8B,SAAQ,yBAAyB;IAE1E;;;;;OAKG;IACG,2BAA2B,CAC/B,GAAG,EAAE;QACH,YAAY,EAAE,qBAAqB,EAAE,CAAC;QACtC,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,qBAAqB,CAAC;QACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,6EAA6E;QAC7E,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,GACA,OAAO,CAAC,OAAO,CAAC;IAWnB;;;;OAIG;IACG,4BAA4B,CAChC,GAAG,EAAE;QACH,YAAY,EAAE,qBAAqB,EAAE,CAAC;QACtC,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,qBAAqB,CAAC;QACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,6EAA6E;QAC7E,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,GACA,OAAO,CAAC,MAAM,CAAC;IAOlB;;;;OAIG;IACG,gCAAgC,CACpC,GAAG,EAAE;QACH,YAAY,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}
|
|
@@ -27,7 +27,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
27
27
|
const answer = await this.getQuestionAnswerInConversation(set);
|
|
28
28
|
return answer.toUpperCase().includes(this.predefinedRequests.yesNo.upperCaseYes);
|
|
29
29
|
}
|
|
30
|
-
askYesNoQuestionInConversation = this.yesNoQuestionInConversation;
|
|
30
|
+
//askYesNoQuestionInConversation: typeof this.yesNoQuestionInConversation = this.yesNoQuestionInConversation;
|
|
31
31
|
/**
|
|
32
32
|
* Asks the AI to answer a simple question
|
|
33
33
|
*
|
|
@@ -37,7 +37,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
37
37
|
this.logQuestion(set);
|
|
38
38
|
return await this.getQuestionAnswerInConversation(set);
|
|
39
39
|
}
|
|
40
|
-
askSimpleQuestionInConversation = this.simpleQuestionInConversation;
|
|
40
|
+
//askSimpleQuestionInConversation: typeof this.simpleQuestionInConversation = this.simpleQuestionInConversation;
|
|
41
41
|
/**
|
|
42
42
|
* Asks the AI to answer a percentage question
|
|
43
43
|
*
|
|
@@ -56,7 +56,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
56
56
|
}
|
|
57
57
|
return +answer;
|
|
58
58
|
}
|
|
59
|
-
askPercentageQuestionInConversation = this.percentageQuestionInConversation;
|
|
59
|
+
//askPercentageQuestionInConversation: typeof this.percentageQuestionInConversation = this.percentageQuestionInConversation;
|
|
60
60
|
/**
|
|
61
61
|
* Asks the AI to select one of the options from the list
|
|
62
62
|
*
|
|
@@ -75,7 +75,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
75
75
|
}
|
|
76
76
|
return null;
|
|
77
77
|
}
|
|
78
|
-
askSelectQuestionInConversation = this.selectQuestionInConversation;
|
|
78
|
+
//askSelectQuestionInConversation: typeof this.selectQuestionInConversation = this.selectQuestionInConversation;
|
|
79
79
|
/**
|
|
80
80
|
* Asks the AI to select one of the options from the list
|
|
81
81
|
* Similar to {@link askSelectQuestion},
|
|
@@ -90,7 +90,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
90
90
|
const answer = await this.getQuestionAnswerInConversation(set);
|
|
91
91
|
return fsm_dynamo_1.DyFM_Object.safeParseJSON(answer);
|
|
92
92
|
}
|
|
93
|
-
askRequestSelectInConversation = this.requestSelectInConversation;
|
|
93
|
+
//askRequestSelectInConversation: typeof this.requestSelectInConversation = this.requestSelectInConversation;
|
|
94
94
|
/**
|
|
95
95
|
* Asks the AI to select one or more of the options from the list
|
|
96
96
|
*
|
|
@@ -109,7 +109,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
109
109
|
}
|
|
110
110
|
return result;
|
|
111
111
|
}
|
|
112
|
-
askMultipleSelectQuestionWithOptionsInConversation = this.multipleSelectQuestionWithOptionsInConversation;
|
|
112
|
+
//askMultipleSelectQuestionWithOptionsInConversation: typeof this.multipleSelectQuestionWithOptionsInConversation = this.multipleSelectQuestionWithOptionsInConversation;
|
|
113
113
|
/**
|
|
114
114
|
* Asks the AI to select one or more of the options from the list
|
|
115
115
|
* Similar to {@link askMultipleSelectQuestionWithOptions},
|
|
@@ -124,7 +124,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
124
124
|
const answer = await this.getQuestionAnswerInConversation(set);
|
|
125
125
|
return fsm_dynamo_1.DyFM_Object.safeParseList(answer);
|
|
126
126
|
}
|
|
127
|
-
askRequestMultipleSelectInConversation = this.requestMultipleSelectInConversation;
|
|
127
|
+
//askRequestMultipleSelectInConversation: typeof this.requestMultipleSelectInConversation = this.requestMultipleSelectInConversation;
|
|
128
128
|
/**
|
|
129
129
|
* Asks the AI to answer a question that must result a JSON object
|
|
130
130
|
*
|
|
@@ -140,7 +140,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
140
140
|
const answer = await this.getQuestionAnswerInConversation(set);
|
|
141
141
|
return fsm_dynamo_1.DyFM_Object.safeParseJSON(answer);
|
|
142
142
|
}
|
|
143
|
-
askJsonQuestionInConversation = this.jsonQuestionInConversation;
|
|
143
|
+
//askJsonQuestionInConversation: typeof this.jsonQuestionInConversation = this.jsonQuestionInConversation;
|
|
144
144
|
/**
|
|
145
145
|
* Asks the AI to answer a question that must result a JSON object with specific key descriptions
|
|
146
146
|
*
|
|
@@ -157,7 +157,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
157
157
|
const answer = await this.getQuestionAnswerInConversation(set);
|
|
158
158
|
return fsm_dynamo_1.DyFM_Object.safeParseJSON(answer);
|
|
159
159
|
}
|
|
160
|
-
askJsonQuestionWithKeysDescriptionInConversation = this.jsonQuestionWithKeysDescriptionInConversation;
|
|
160
|
+
//askJsonQuestionWithKeysDescriptionInConversation: typeof this.jsonQuestionWithKeysDescriptionInConversation = this.jsonQuestionWithKeysDescriptionInConversation;
|
|
161
161
|
/**
|
|
162
162
|
* Asks the AI to answer a question that must result a JSON object with specific keys
|
|
163
163
|
*
|
|
@@ -174,7 +174,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
174
174
|
const answer = await this.getQuestionAnswerInConversation(set);
|
|
175
175
|
return fsm_dynamo_1.DyFM_Object.safeParseJSON(answer);
|
|
176
176
|
}
|
|
177
|
-
askJsonQuestionWithExactKeysInConversation = this.jsonQuestionWithExactKeysInConversation;
|
|
177
|
+
//askJsonQuestionWithExactKeysInConversation: typeof this.jsonQuestionWithExactKeysInConversation = this.jsonQuestionWithExactKeysInConversation;
|
|
178
178
|
/**
|
|
179
179
|
* Asks the AI to answer a question that must result a list of strings
|
|
180
180
|
*
|
|
@@ -190,7 +190,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
190
190
|
const answer = await this.getQuestionAnswerInConversation(set);
|
|
191
191
|
return fsm_dynamo_1.DyFM_Object.safeParseList(answer);
|
|
192
192
|
}
|
|
193
|
-
askListQuestionInConversation = this.listQuestionInConversation;
|
|
193
|
+
//askListQuestionInConversation: typeof this.listQuestionInConversation = this.listQuestionInConversation;
|
|
194
194
|
/**
|
|
195
195
|
* Asks the AI to answer a question
|
|
196
196
|
*
|
|
@@ -223,9 +223,9 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
225
|
/* getQuestionAnswerInConversation = this.getAnswerInConversation; */
|
|
226
|
-
getQuestionInConversation = this.getQuestionAnswerInConversation;
|
|
227
|
-
askQuestionInConversation = this.getQuestionAnswerInConversation;
|
|
228
|
-
getConversationAnswer = this.getAnswerInConversation;
|
|
226
|
+
//getQuestionInConversation: typeof this.getQuestionAnswerInConversation = this.getQuestionAnswerInConversation;
|
|
227
|
+
//askQuestionInConversation: typeof this.getQuestionAnswerInConversation = this.getQuestionAnswerInConversation;
|
|
228
|
+
//getConversationAnswer: typeof this.getAnswerInConversation = this.getAnswerInConversation;
|
|
229
229
|
/**
|
|
230
230
|
* Asks the AI to answer a question using the whole conversation
|
|
231
231
|
* (If you want to use only the conversation, without adding a new message,
|
|
@@ -257,7 +257,22 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
257
257
|
*/
|
|
258
258
|
async resolveConversation(set) {
|
|
259
259
|
try {
|
|
260
|
-
set.conversation.
|
|
260
|
+
if (set.conversation.find(message => message.role === oai_gpt_message_role_enum_1.DyNTS_OAI_GPT_Message_Role.system)) {
|
|
261
|
+
/* throw new DyFM_Error({
|
|
262
|
+
...this.getDefaultErrorSettings(
|
|
263
|
+
'resolveConversation',
|
|
264
|
+
new Error('System message found in conversation'),
|
|
265
|
+
set.issuer
|
|
266
|
+
),
|
|
267
|
+
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-OAB-RC1`,
|
|
268
|
+
}); */
|
|
269
|
+
fsm_dynamo_1.DyFM_Log.error('System message found in conversation', {
|
|
270
|
+
conversation: set.conversation,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
set.conversation.unshift(this.getDefaultSystemMessage(set.settings));
|
|
275
|
+
}
|
|
261
276
|
// conversation shortening
|
|
262
277
|
const shortenedConversation = this.shortenConversation(set);
|
|
263
278
|
this.validateConversation(shortenedConversation);
|
|
@@ -281,7 +296,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
281
296
|
});
|
|
282
297
|
}
|
|
283
298
|
}
|
|
284
|
-
resolveSimpleUserMessageInConversation = this.resolveConversation;
|
|
299
|
+
//resolveSimpleUserMessageInConversation: typeof this.resolveConversation = this.resolveConversation;
|
|
285
300
|
shortenConversation(set) {
|
|
286
301
|
try {
|
|
287
302
|
const clonedConversation = fsm_dynamo_1.DyFM_Object.clone(set.conversation);
|
|
@@ -289,7 +304,7 @@ class DyNTS_OAI_LLMChat_ServiceBase extends oai_llm_service_base_1.DyNTS_OAI_LLM
|
|
|
289
304
|
const systemMessagesStringLength = JSON.stringify(systemMessages).length;
|
|
290
305
|
const msgs = clonedConversation.filter(message => message.role !== oai_gpt_message_role_enum_1.DyNTS_OAI_GPT_Message_Role.system).map(message => message.content);
|
|
291
306
|
let stringifiedMessages = JSON.stringify(msgs);
|
|
292
|
-
if (this.debugLog
|
|
307
|
+
if (this.debugLog) {
|
|
293
308
|
fsm_dynamo_1.DyFM_Log.info(' DyNTS_OAI_LLMChat_ServiceBase: before shortening conversation', {
|
|
294
309
|
stringifiedMessagesLength: stringifiedMessages.length,
|
|
295
310
|
conversationLength: clonedConversation.length,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oai-llm-chat.service-base.js","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_services/oai-llm-chat.service-base.ts"],"names":[],"mappings":";;;AAGA,sDAAoK;AAEpK,uFAAoF;AAIpF,mFAAiF;AAEjF,iEAAmE;AACnE,yFAAsF;AAGtF;;;;;;GAMG;AAEH,kCAAkC;AAElC,MAAa,6BAA8B,SAAQ,gDAAyB;IAE1E;;;;;OAKG;IACH,KAAK,CAAC,2BAA2B,CAC/B,GAQC;QAED,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC;QAEtD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAEtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,+BAA+B,CAAC,GAAG,CAAC,CAAC;QAE/D,OAAO,MAAM,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACnF,CAAC;IACD,
|
|
1
|
+
{"version":3,"file":"oai-llm-chat.service-base.js","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_services/oai-llm-chat.service-base.ts"],"names":[],"mappings":";;;AAGA,sDAAoK;AAEpK,uFAAoF;AAIpF,mFAAiF;AAEjF,iEAAmE;AACnE,yFAAsF;AAGtF;;;;;;GAMG;AAEH,kCAAkC;AAElC,MAAa,6BAA8B,SAAQ,gDAAyB;IAE1E;;;;;OAKG;IACH,KAAK,CAAC,2BAA2B,CAC/B,GAQC;QAED,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC;QAEtD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAEtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,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