@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
|
@@ -16,37 +16,95 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
16
16
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.request} to ask the question,
|
|
17
17
|
* and the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.upperCaseYes} to check the answer
|
|
18
18
|
*/
|
|
19
|
-
yesNoQuestionInConversation(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
yesNoQuestionInConversation(set: {
|
|
20
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
21
|
+
question: string;
|
|
22
|
+
issuer: string;
|
|
23
|
+
settings?: DyFM_GPTCall_Settings;
|
|
24
|
+
debugLog?: boolean;
|
|
25
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
26
|
+
replaceThisInLog?: string;
|
|
27
|
+
}): Promise<boolean>;
|
|
28
|
+
askYesNoQuestionInConversation: (set: {
|
|
29
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
30
|
+
question: string;
|
|
31
|
+
issuer: string;
|
|
32
|
+
settings?: DyFM_GPTCall_Settings;
|
|
33
|
+
debugLog?: boolean;
|
|
34
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
35
|
+
replaceThisInLog?: string;
|
|
36
|
+
}) => Promise<boolean>;
|
|
23
37
|
/**
|
|
24
38
|
* Asks the AI to answer a simple question
|
|
25
39
|
*
|
|
26
40
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.simpleQuestion} to ask the question
|
|
27
41
|
*/
|
|
28
|
-
simpleQuestionInConversation(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
simpleQuestionInConversation(set: {
|
|
43
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
44
|
+
question: string;
|
|
45
|
+
issuer: string;
|
|
46
|
+
settings?: DyFM_GPTCall_Settings;
|
|
47
|
+
debugLog?: boolean;
|
|
48
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
49
|
+
replaceThisInLog?: string;
|
|
50
|
+
}): Promise<string>;
|
|
51
|
+
askSimpleQuestionInConversation: (set: {
|
|
52
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
53
|
+
question: string;
|
|
54
|
+
issuer: string;
|
|
55
|
+
settings?: DyFM_GPTCall_Settings;
|
|
56
|
+
debugLog?: boolean;
|
|
57
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
58
|
+
replaceThisInLog?: string;
|
|
59
|
+
}) => Promise<string>;
|
|
32
60
|
/**
|
|
33
61
|
* Asks the AI to answer a percentage question
|
|
34
62
|
*
|
|
35
63
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.percentageOnly} to ask the question
|
|
36
64
|
*/
|
|
37
|
-
percentageQuestionInConversation(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
65
|
+
percentageQuestionInConversation(set: {
|
|
66
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
67
|
+
question: string;
|
|
68
|
+
issuer: string;
|
|
69
|
+
settings?: DyFM_GPTCall_Settings;
|
|
70
|
+
debugLog?: boolean;
|
|
71
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
72
|
+
replaceThisInLog?: string;
|
|
73
|
+
}): Promise<number>;
|
|
74
|
+
askPercentageQuestionInConversation: (set: {
|
|
75
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
76
|
+
question: string;
|
|
77
|
+
issuer: string;
|
|
78
|
+
settings?: DyFM_GPTCall_Settings;
|
|
79
|
+
debugLog?: boolean;
|
|
80
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
81
|
+
replaceThisInLog?: string;
|
|
82
|
+
}) => Promise<number>;
|
|
41
83
|
/**
|
|
42
84
|
* Asks the AI to select one of the options from the list
|
|
43
85
|
*
|
|
44
86
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
|
|
45
87
|
*/
|
|
46
|
-
selectQuestionInConversation(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
88
|
+
selectQuestionInConversation(set: {
|
|
89
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
90
|
+
question: string;
|
|
91
|
+
selectFrom: string[];
|
|
92
|
+
issuer: string;
|
|
93
|
+
settings?: DyFM_GPTCall_Settings;
|
|
94
|
+
debugLog?: boolean;
|
|
95
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
96
|
+
replaceThisInLog?: string;
|
|
97
|
+
}): Promise<string>;
|
|
98
|
+
askSelectQuestionInConversation: (set: {
|
|
99
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
100
|
+
question: string;
|
|
101
|
+
selectFrom: string[];
|
|
102
|
+
issuer: string;
|
|
103
|
+
settings?: DyFM_GPTCall_Settings;
|
|
104
|
+
debugLog?: boolean;
|
|
105
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
106
|
+
replaceThisInLog?: string;
|
|
107
|
+
}) => Promise<string>;
|
|
50
108
|
/**
|
|
51
109
|
* Asks the AI to select one of the options from the list
|
|
52
110
|
* Similar to {@link askSelectQuestion},
|
|
@@ -54,12 +112,28 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
54
112
|
*
|
|
55
113
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
|
|
56
114
|
*/
|
|
57
|
-
requestSelectInConversation<T>(
|
|
58
|
-
|
|
59
|
-
|
|
115
|
+
requestSelectInConversation<T>(set: {
|
|
116
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
117
|
+
question: string;
|
|
118
|
+
selectFrom: T[];
|
|
119
|
+
issuer: string;
|
|
120
|
+
settings?: DyFM_GPTCall_Settings;
|
|
121
|
+
debugLog?: boolean;
|
|
122
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
123
|
+
replaceThisInLog?: string;
|
|
124
|
+
}): Promise<T | {
|
|
60
125
|
unparsableResult: string;
|
|
61
126
|
}>;
|
|
62
|
-
askRequestSelectInConversation: <T>(
|
|
127
|
+
askRequestSelectInConversation: <T>(set: {
|
|
128
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
129
|
+
question: string;
|
|
130
|
+
selectFrom: T[];
|
|
131
|
+
issuer: string;
|
|
132
|
+
settings?: DyFM_GPTCall_Settings;
|
|
133
|
+
debugLog?: boolean;
|
|
134
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
135
|
+
replaceThisInLog?: string;
|
|
136
|
+
}) => Promise<T | {
|
|
63
137
|
unparsableResult: string;
|
|
64
138
|
}>;
|
|
65
139
|
/**
|
|
@@ -67,10 +141,26 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
67
141
|
*
|
|
68
142
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
|
|
69
143
|
*/
|
|
70
|
-
multipleSelectQuestionWithOptionsInConversation(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
144
|
+
multipleSelectQuestionWithOptionsInConversation(set: {
|
|
145
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
146
|
+
question: string;
|
|
147
|
+
options: string[];
|
|
148
|
+
issuer: string;
|
|
149
|
+
settings?: DyFM_GPTCall_Settings;
|
|
150
|
+
debugLog?: boolean;
|
|
151
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
152
|
+
replaceThisInLog?: string;
|
|
153
|
+
}): Promise<string[]>;
|
|
154
|
+
askMultipleSelectQuestionWithOptionsInConversation: (set: {
|
|
155
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
156
|
+
question: string;
|
|
157
|
+
options: string[];
|
|
158
|
+
issuer: string;
|
|
159
|
+
settings?: DyFM_GPTCall_Settings;
|
|
160
|
+
debugLog?: boolean;
|
|
161
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
162
|
+
replaceThisInLog?: string;
|
|
163
|
+
}) => Promise<string[]>;
|
|
74
164
|
/**
|
|
75
165
|
* Asks the AI to select one or more of the options from the list
|
|
76
166
|
* Similar to {@link askMultipleSelectQuestionWithOptions},
|
|
@@ -78,10 +168,26 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
78
168
|
*
|
|
79
169
|
* Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
|
|
80
170
|
*/
|
|
81
|
-
requestMultipleSelectInConversation<T>(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
171
|
+
requestMultipleSelectInConversation<T>(set: {
|
|
172
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
173
|
+
question: string;
|
|
174
|
+
options: T[];
|
|
175
|
+
issuer: string;
|
|
176
|
+
settings?: DyFM_GPTCall_Settings;
|
|
177
|
+
debugLog?: boolean;
|
|
178
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
179
|
+
replaceThisInLog?: string;
|
|
180
|
+
}): Promise<T[]>;
|
|
181
|
+
askRequestMultipleSelectInConversation: <T>(set: {
|
|
182
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
183
|
+
question: string;
|
|
184
|
+
options: T[];
|
|
185
|
+
issuer: string;
|
|
186
|
+
settings?: DyFM_GPTCall_Settings;
|
|
187
|
+
debugLog?: boolean;
|
|
188
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
189
|
+
replaceThisInLog?: string;
|
|
190
|
+
}) => Promise<T[]>;
|
|
85
191
|
/**
|
|
86
192
|
* Asks the AI to answer a question that must result a JSON object
|
|
87
193
|
*
|
|
@@ -91,12 +197,26 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
91
197
|
*
|
|
92
198
|
* (uses {@link DyFM_safeParseJSON})
|
|
93
199
|
*/
|
|
94
|
-
jsonQuestionInConversation<T = any>(
|
|
95
|
-
|
|
96
|
-
|
|
200
|
+
jsonQuestionInConversation<T = any>(set: {
|
|
201
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
202
|
+
question: string;
|
|
203
|
+
issuer: string;
|
|
204
|
+
settings?: DyFM_GPTCall_Settings;
|
|
205
|
+
debugLog?: boolean;
|
|
206
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
207
|
+
replaceThisInLog?: string;
|
|
208
|
+
}): Promise<T | {
|
|
97
209
|
unparsableResult: string;
|
|
98
210
|
}>;
|
|
99
|
-
askJsonQuestionInConversation: <T = any>(
|
|
211
|
+
askJsonQuestionInConversation: <T = any>(set: {
|
|
212
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
213
|
+
question: string;
|
|
214
|
+
issuer: string;
|
|
215
|
+
settings?: DyFM_GPTCall_Settings;
|
|
216
|
+
debugLog?: boolean;
|
|
217
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
218
|
+
replaceThisInLog?: string;
|
|
219
|
+
}) => Promise<T | {
|
|
100
220
|
unparsableResult: string;
|
|
101
221
|
}>;
|
|
102
222
|
/**
|
|
@@ -108,12 +228,28 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
108
228
|
*
|
|
109
229
|
* (uses {@link DyFM_safeParseJSON})
|
|
110
230
|
*/
|
|
111
|
-
jsonQuestionWithKeysDescriptionInConversation<T = any>(
|
|
112
|
-
|
|
113
|
-
|
|
231
|
+
jsonQuestionWithKeysDescriptionInConversation<T = any>(set: {
|
|
232
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
233
|
+
question: string;
|
|
234
|
+
keysDescription: string;
|
|
235
|
+
issuer: string;
|
|
236
|
+
settings?: DyFM_GPTCall_Settings;
|
|
237
|
+
debugLog?: boolean;
|
|
238
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
239
|
+
replaceThisInLog?: string;
|
|
240
|
+
}): Promise<T | {
|
|
114
241
|
unparsableResult: string;
|
|
115
242
|
}>;
|
|
116
|
-
askJsonQuestionWithKeysDescriptionInConversation: <T = any>(
|
|
243
|
+
askJsonQuestionWithKeysDescriptionInConversation: <T = any>(set: {
|
|
244
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
245
|
+
question: string;
|
|
246
|
+
keysDescription: string;
|
|
247
|
+
issuer: string;
|
|
248
|
+
settings?: DyFM_GPTCall_Settings;
|
|
249
|
+
debugLog?: boolean;
|
|
250
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
251
|
+
replaceThisInLog?: string;
|
|
252
|
+
}) => Promise<T | {
|
|
117
253
|
unparsableResult: string;
|
|
118
254
|
}>;
|
|
119
255
|
/**
|
|
@@ -125,12 +261,28 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
125
261
|
*
|
|
126
262
|
* (uses {@link DyFM_safeParseJSON})
|
|
127
263
|
*/
|
|
128
|
-
jsonQuestionWithExactKeysInConversation<T = any>(
|
|
129
|
-
|
|
130
|
-
|
|
264
|
+
jsonQuestionWithExactKeysInConversation<T = any>(set: {
|
|
265
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
266
|
+
question: string;
|
|
267
|
+
keys: string[];
|
|
268
|
+
issuer: string;
|
|
269
|
+
settings?: DyFM_GPTCall_Settings;
|
|
270
|
+
debugLog?: boolean;
|
|
271
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
272
|
+
replaceThisInLog?: string;
|
|
273
|
+
}): Promise<T | {
|
|
131
274
|
unparsableResult: string;
|
|
132
275
|
}>;
|
|
133
|
-
askJsonQuestionWithExactKeysInConversation: <T = any>(
|
|
276
|
+
askJsonQuestionWithExactKeysInConversation: <T = any>(set: {
|
|
277
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
278
|
+
question: string;
|
|
279
|
+
keys: string[];
|
|
280
|
+
issuer: string;
|
|
281
|
+
settings?: DyFM_GPTCall_Settings;
|
|
282
|
+
debugLog?: boolean;
|
|
283
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
284
|
+
replaceThisInLog?: string;
|
|
285
|
+
}) => Promise<T | {
|
|
134
286
|
unparsableResult: string;
|
|
135
287
|
}>;
|
|
136
288
|
/**
|
|
@@ -142,15 +294,56 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
142
294
|
*
|
|
143
295
|
* (uses {@link DyFM_safeParseList})
|
|
144
296
|
*/
|
|
145
|
-
listQuestionInConversation(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
297
|
+
listQuestionInConversation(set: {
|
|
298
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
299
|
+
question: string;
|
|
300
|
+
issuer: string;
|
|
301
|
+
settings?: DyFM_GPTCall_Settings;
|
|
302
|
+
debugLog?: boolean;
|
|
303
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
304
|
+
replaceThisInLog?: string;
|
|
305
|
+
}): Promise<string[]>;
|
|
306
|
+
askListQuestionInConversation: (set: {
|
|
307
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
308
|
+
question: string;
|
|
309
|
+
issuer: string;
|
|
310
|
+
settings?: DyFM_GPTCall_Settings;
|
|
311
|
+
debugLog?: boolean;
|
|
312
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
313
|
+
replaceThisInLog?: string;
|
|
314
|
+
}) => Promise<string[]>;
|
|
149
315
|
/**
|
|
150
316
|
* Asks the AI to answer a question
|
|
151
317
|
*
|
|
152
318
|
* Uses the {@link resolveSimpleUserMessage}
|
|
153
319
|
*/
|
|
320
|
+
getQuestionAnswerInConversation(set: {
|
|
321
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
322
|
+
question: string;
|
|
323
|
+
issuer: string;
|
|
324
|
+
settings?: DyFM_GPTCall_Settings;
|
|
325
|
+
debugLog?: boolean;
|
|
326
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
327
|
+
replaceThisInLog?: string;
|
|
328
|
+
}): Promise<string>;
|
|
329
|
+
getQuestionInConversation: (set: {
|
|
330
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
331
|
+
question: string;
|
|
332
|
+
issuer: string;
|
|
333
|
+
settings?: DyFM_GPTCall_Settings;
|
|
334
|
+
debugLog?: boolean;
|
|
335
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
336
|
+
replaceThisInLog?: string;
|
|
337
|
+
}) => Promise<string>;
|
|
338
|
+
askQuestionInConversation: (set: {
|
|
339
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
340
|
+
question: string;
|
|
341
|
+
issuer: string;
|
|
342
|
+
settings?: DyFM_GPTCall_Settings;
|
|
343
|
+
debugLog?: boolean;
|
|
344
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
345
|
+
replaceThisInLog?: string;
|
|
346
|
+
}) => Promise<string>;
|
|
154
347
|
/**
|
|
155
348
|
* Asks the AI to answer a question using the whole conversation
|
|
156
349
|
* (If you want to use only the conversation, without adding a new message,
|
|
@@ -158,24 +351,57 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
|
|
|
158
351
|
*
|
|
159
352
|
* Uses the {@link resolveConversation}
|
|
160
353
|
*/
|
|
161
|
-
getAnswerInConversation(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
354
|
+
getAnswerInConversation(set: {
|
|
355
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
356
|
+
newMessage: string;
|
|
357
|
+
issuer: string;
|
|
358
|
+
settings?: DyFM_GPTCall_Settings;
|
|
359
|
+
debugLog?: boolean;
|
|
360
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
361
|
+
replaceThisInLog?: string;
|
|
362
|
+
}): Promise<string>;
|
|
363
|
+
resolveConversationMessage(set: {
|
|
364
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
365
|
+
issuer: string;
|
|
366
|
+
settings?: DyFM_GPTCall_Settings;
|
|
367
|
+
getFullResponse?: boolean;
|
|
368
|
+
debugLog?: boolean;
|
|
369
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
370
|
+
replaceThisInLog?: string;
|
|
371
|
+
}): Promise<string>;
|
|
167
372
|
/**
|
|
168
373
|
* Resolves a conversation
|
|
169
374
|
*
|
|
170
375
|
* Uses the {@link getMessageCreateInput}
|
|
171
376
|
*/
|
|
172
|
-
resolveConversation(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
377
|
+
resolveConversation(set: {
|
|
378
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
379
|
+
issuer: string;
|
|
380
|
+
settings?: DyFM_GPTCall_Settings;
|
|
381
|
+
getFullResponse?: boolean;
|
|
382
|
+
debugLog?: boolean;
|
|
383
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
384
|
+
replaceThisInLog?: string;
|
|
385
|
+
}): Promise<string | ChatCompletion>;
|
|
386
|
+
resolveSimpleUserMessageInConversation: (set: {
|
|
387
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
388
|
+
issuer: string;
|
|
389
|
+
settings?: DyFM_GPTCall_Settings;
|
|
390
|
+
getFullResponse?: boolean;
|
|
391
|
+
debugLog?: boolean;
|
|
392
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
393
|
+
replaceThisInLog?: string;
|
|
394
|
+
}) => Promise<string | ChatCompletion>;
|
|
395
|
+
protected shortenConversation(set: {
|
|
396
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
397
|
+
issuer: string;
|
|
398
|
+
debugLog?: boolean;
|
|
399
|
+
}): DyNTS_OAI_GPT_Message[];
|
|
400
|
+
protected logConversation(set: {
|
|
401
|
+
conversation: DyNTS_OAI_GPT_Message[];
|
|
402
|
+
debugLog?: boolean;
|
|
403
|
+
/** this is used to readably replace too long contents to eg '...' in logs */
|
|
404
|
+
replaceThisInLog?: string;
|
|
405
|
+
}): void;
|
|
180
406
|
}
|
|
181
407
|
//# sourceMappingURL=oai-llm-chat.service-base.d.ts.map
|
|
@@ -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,EAA0C,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAI3G;;;;;;GAMG;AAIH,qBAAa,6BAA8B,SAAQ,yBAAyB;IAE1E;;;;;OAKG;IACG,2BAA2B,CAC/B,YAAY,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"oai-llm-chat.service-base.d.ts","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_services/oai-llm-chat.service-base.ts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