raspberry_games_server_game_logic 1.8.398 → 1.8.400
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/Kotlin-DateTime-library-kotlinx-datetime.js +1 -1
- package/Logic_Debertz-ai_module.js +483 -334
- package/Logic_Debertz-ai_module.js.map +1 -1
- package/Logic_Debertz-core.js +1114 -971
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +12280 -12238
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_server.d.ts +32 -15
- package/Logic_Debertz-game_server.js +1004 -950
- package/Logic_Debertz-game_server.js.map +1 -1
- package/kotlinx-coroutines-core.js +9 -9
- package/kotlinx-coroutines-core.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './kotlin-kotlin-stdlib.js', './ktor-ktor-http.js', './ktor-ktor-client-core.js', './ktor-ktor-utils.js', './kotlinx-serialization-kotlinx-serialization-core.js', './Kosi-Kodein-kodein-di.js', './ktor-ktor-client-content-negotiation.js', './ktor-ktor-client-logging.js', './
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './ktor-ktor-http.js', './ktor-ktor-client-core.js', './ktor-ktor-utils.js', './kotlinx-serialization-kotlinx-serialization-core.js', './kotlinx-serialization-kotlinx-serialization-json.js', './Kosi-Kodein-kodein-di.js', './ktor-ktor-client-content-negotiation.js', './ktor-ktor-client-logging.js', './ktor-ktor-serialization-kotlinx-json.js', './Kosi-Kaverit-kaverit.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-http.js'), require('./ktor-ktor-client-core.js'), require('./ktor-ktor-utils.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-http.js'), require('./ktor-ktor-client-core.js'), require('./ktor-ktor-utils.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./Kosi-Kodein-kodein-di.js'), require('./ktor-ktor-client-content-negotiation.js'), require('./ktor-ktor-client-logging.js'), require('./ktor-ktor-serialization-kotlinx-json.js'), require('./Kosi-Kaverit-kaverit.js'));
|
|
6
6
|
else {
|
|
7
7
|
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
8
|
throw new Error("Error loading module 'Logic_Debertz-ai_module'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'Logic_Debertz-ai_module'.");
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {
|
|
20
20
|
throw new Error("Error loading module 'Logic_Debertz-ai_module'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'Logic_Debertz-ai_module'.");
|
|
21
21
|
}
|
|
22
|
+
if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-json'] === 'undefined') {
|
|
23
|
+
throw new Error("Error loading module 'Logic_Debertz-ai_module'. Its dependency 'kotlinx-serialization-kotlinx-serialization-json' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-json' is loaded prior to 'Logic_Debertz-ai_module'.");
|
|
24
|
+
}
|
|
22
25
|
if (typeof globalThis['Kosi-Kodein-kodein-di'] === 'undefined') {
|
|
23
26
|
throw new Error("Error loading module 'Logic_Debertz-ai_module'. Its dependency 'Kosi-Kodein-kodein-di' was not found. Please, check whether 'Kosi-Kodein-kodein-di' is loaded prior to 'Logic_Debertz-ai_module'.");
|
|
24
27
|
}
|
|
@@ -28,18 +31,15 @@
|
|
|
28
31
|
if (typeof globalThis['ktor-ktor-client-logging'] === 'undefined') {
|
|
29
32
|
throw new Error("Error loading module 'Logic_Debertz-ai_module'. Its dependency 'ktor-ktor-client-logging' was not found. Please, check whether 'ktor-ktor-client-logging' is loaded prior to 'Logic_Debertz-ai_module'.");
|
|
30
33
|
}
|
|
31
|
-
if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-json'] === 'undefined') {
|
|
32
|
-
throw new Error("Error loading module 'Logic_Debertz-ai_module'. Its dependency 'kotlinx-serialization-kotlinx-serialization-json' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-json' is loaded prior to 'Logic_Debertz-ai_module'.");
|
|
33
|
-
}
|
|
34
34
|
if (typeof globalThis['ktor-ktor-serialization-kotlinx-json'] === 'undefined') {
|
|
35
35
|
throw new Error("Error loading module 'Logic_Debertz-ai_module'. Its dependency 'ktor-ktor-serialization-kotlinx-json' was not found. Please, check whether 'ktor-ktor-serialization-kotlinx-json' is loaded prior to 'Logic_Debertz-ai_module'.");
|
|
36
36
|
}
|
|
37
37
|
if (typeof globalThis['Kosi-Kaverit-kaverit'] === 'undefined') {
|
|
38
38
|
throw new Error("Error loading module 'Logic_Debertz-ai_module'. Its dependency 'Kosi-Kaverit-kaverit' was not found. Please, check whether 'Kosi-Kaverit-kaverit' is loaded prior to 'Logic_Debertz-ai_module'.");
|
|
39
39
|
}
|
|
40
|
-
globalThis['Logic_Debertz-ai_module'] = factory(typeof globalThis['Logic_Debertz-ai_module'] === 'undefined' ? {} : globalThis['Logic_Debertz-ai_module'], globalThis['kotlin-kotlin-stdlib'], globalThis['ktor-ktor-http'], globalThis['ktor-ktor-client-core'], globalThis['ktor-ktor-utils'], globalThis['kotlinx-serialization-kotlinx-serialization-core'], globalThis['Kosi-Kodein-kodein-di'], globalThis['ktor-ktor-client-content-negotiation'], globalThis['ktor-ktor-client-logging'], globalThis['
|
|
40
|
+
globalThis['Logic_Debertz-ai_module'] = factory(typeof globalThis['Logic_Debertz-ai_module'] === 'undefined' ? {} : globalThis['Logic_Debertz-ai_module'], globalThis['kotlin-kotlin-stdlib'], globalThis['ktor-ktor-http'], globalThis['ktor-ktor-client-core'], globalThis['ktor-ktor-utils'], globalThis['kotlinx-serialization-kotlinx-serialization-core'], globalThis['kotlinx-serialization-kotlinx-serialization-json'], globalThis['Kosi-Kodein-kodein-di'], globalThis['ktor-ktor-client-content-negotiation'], globalThis['ktor-ktor-client-logging'], globalThis['ktor-ktor-serialization-kotlinx-json'], globalThis['Kosi-Kaverit-kaverit']);
|
|
41
41
|
}
|
|
42
|
-
}(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_utils, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_org_kodein_di_kodein_di, kotlin_io_ktor_ktor_client_content_negotiation, kotlin_io_ktor_ktor_client_logging,
|
|
42
|
+
}(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_utils, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_org_kodein_di_kodein_di, kotlin_io_ktor_ktor_client_content_negotiation, kotlin_io_ktor_ktor_client_logging, kotlin_io_ktor_ktor_serialization_kotlinx_json, kotlin_org_kodein_type_kaverit) {
|
|
43
43
|
'use strict';
|
|
44
44
|
//region block: imports
|
|
45
45
|
var imul = Math.imul;
|
|
@@ -81,6 +81,9 @@
|
|
|
81
81
|
var Long = kotlin_kotlin.$_$.ih;
|
|
82
82
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.q;
|
|
83
83
|
var compareTo = kotlin_kotlin.$_$.bc;
|
|
84
|
+
var to = kotlin_kotlin.$_$.si;
|
|
85
|
+
var mapOf = kotlin_kotlin.$_$.j8;
|
|
86
|
+
var initMetadataForObject = kotlin_kotlin.$_$.pc;
|
|
84
87
|
var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v;
|
|
85
88
|
var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x1;
|
|
86
89
|
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.e;
|
|
@@ -93,7 +96,6 @@
|
|
|
93
96
|
var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z;
|
|
94
97
|
var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z1;
|
|
95
98
|
var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a2;
|
|
96
|
-
var initMetadataForObject = kotlin_kotlin.$_$.pc;
|
|
97
99
|
var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j2;
|
|
98
100
|
var objectCreate = kotlin_kotlin.$_$.jd;
|
|
99
101
|
var toString = kotlin_kotlin.$_$.nd;
|
|
@@ -106,20 +108,20 @@
|
|
|
106
108
|
var LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u;
|
|
107
109
|
var getNumberHashCode = kotlin_kotlin.$_$.gc;
|
|
108
110
|
var toString_0 = kotlin_kotlin.$_$.ri;
|
|
111
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.x2;
|
|
112
|
+
var firstOrNull = kotlin_kotlin.$_$.h7;
|
|
113
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
114
|
+
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.w2;
|
|
109
115
|
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.z;
|
|
110
116
|
var take = kotlin_kotlin.$_$.ag;
|
|
111
117
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;
|
|
112
118
|
var takeLast = kotlin_kotlin.$_$.h9;
|
|
113
119
|
var listOf = kotlin_kotlin.$_$.g8;
|
|
114
|
-
var
|
|
115
|
-
var firstOrNull = kotlin_kotlin.$_$.h7;
|
|
116
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
117
|
-
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.w2;
|
|
120
|
+
var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b;
|
|
118
121
|
var Module_init_$Create$ = kotlin_org_kodein_di_kodein_di.$_$.a;
|
|
119
122
|
var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.u;
|
|
120
123
|
var Plugin_getInstance = kotlin_io_ktor_ktor_client_content_negotiation.$_$.a;
|
|
121
124
|
var Companion_getInstance_0 = kotlin_io_ktor_ktor_client_logging.$_$.d;
|
|
122
|
-
var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b;
|
|
123
125
|
var json = kotlin_io_ktor_ktor_serialization_kotlinx_json.$_$.a;
|
|
124
126
|
var Companion_instance_0 = kotlin_io_ktor_ktor_client_logging.$_$.c;
|
|
125
127
|
var get_DEFAULT = kotlin_io_ktor_ktor_client_logging.$_$.e;
|
|
@@ -137,6 +139,7 @@
|
|
|
137
139
|
initMetadataForInterface(BotChatCache, 'BotChatCache');
|
|
138
140
|
initMetadataForClass(CacheEntry, 'CacheEntry');
|
|
139
141
|
initMetadataForClass(InMemoryBotChatCache, 'InMemoryBotChatCache', InMemoryBotChatCache, VOID, [BotChatCache]);
|
|
142
|
+
initMetadataForObject(BotChatConfig, 'BotChatConfig');
|
|
140
143
|
initMetadataForCompanion(Companion);
|
|
141
144
|
initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
142
145
|
initMetadataForClass(BotChatContext, 'BotChatContext', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});
|
|
@@ -158,9 +161,13 @@
|
|
|
158
161
|
initMetadataForCompanion(Companion_4);
|
|
159
162
|
initMetadataForObject($serializer_5, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
160
163
|
initMetadataForClass(OpenAIResponse, 'OpenAIResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_5});
|
|
161
|
-
initMetadataForInterface(BotChatRepository, 'BotChatRepository', VOID, VOID, VOID, [2, 1]);
|
|
162
164
|
initMetadataForCoroutine($executeRequestCOROUTINE$, CoroutineImpl);
|
|
165
|
+
initMetadataForClass(BaseOpenAIRepository, 'BaseOpenAIRepository', VOID, VOID, VOID, [1, 2]);
|
|
166
|
+
initMetadataForInterface(BotChatRepository, 'BotChatRepository', VOID, VOID, VOID, [2, 1]);
|
|
167
|
+
initMetadataForCoroutine($executeRequestCOROUTINE$_0, CoroutineImpl);
|
|
163
168
|
initMetadataForClass(BotChatRepositoryImpl, 'BotChatRepositoryImpl', VOID, VOID, [BotChatRepository], [2, 1]);
|
|
169
|
+
initMetadataForInterface(UserReportsResolverRepository, 'UserReportsResolverRepository', VOID, VOID, VOID, [1]);
|
|
170
|
+
initMetadataForClass(UserReportsResolverRepositoryImpl, 'UserReportsResolverRepositoryImpl', VOID, VOID, [UserReportsResolverRepository], [1]);
|
|
164
171
|
initMetadataForInterface(BotChatInteractor, 'BotChatInteractor', VOID, VOID, VOID, [2, 1]);
|
|
165
172
|
initMetadataForClass(BotChatInteractorImpl, 'BotChatInteractorImpl', VOID, VOID, [BotChatInteractor], [2, 1]);
|
|
166
173
|
//endregion
|
|
@@ -168,14 +175,14 @@
|
|
|
168
175
|
}
|
|
169
176
|
function OpenAIApiImpl$chatCompletion$lambda(this$0) {
|
|
170
177
|
return function ($this$headers) {
|
|
171
|
-
$this$headers.w39(HttpHeaders_getInstance().s3f_1, 'Bearer ' + this$0.
|
|
178
|
+
$this$headers.w39(HttpHeaders_getInstance().s3f_1, 'Bearer ' + this$0.h6m_1.b6m_1);
|
|
172
179
|
return Unit_instance;
|
|
173
180
|
};
|
|
174
181
|
}
|
|
175
182
|
function $chatCompletionCOROUTINE$(_this__u8e3s4, messages, resultContinuation) {
|
|
176
183
|
CoroutineImpl.call(this, resultContinuation);
|
|
177
|
-
this.
|
|
178
|
-
this.
|
|
184
|
+
this.r6m_1 = _this__u8e3s4;
|
|
185
|
+
this.s6m_1 = messages;
|
|
179
186
|
}
|
|
180
187
|
protoOf($chatCompletionCOROUTINE$).a9 = function () {
|
|
181
188
|
var suspendResult = this.u8_1;
|
|
@@ -186,12 +193,12 @@
|
|
|
186
193
|
case 0:
|
|
187
194
|
this.t8_1 = 4;
|
|
188
195
|
this.t8_1 = 3;
|
|
189
|
-
var request = new OpenAIRequest(this.
|
|
190
|
-
var tmp0 = this.
|
|
191
|
-
var urlString = this.
|
|
196
|
+
var request = new OpenAIRequest(this.r6m_1.h6m_1.c6m_1, this.s6m_1, this.r6m_1.h6m_1.e6m_1, this.r6m_1.h6m_1.f6m_1);
|
|
197
|
+
var tmp0 = this.r6m_1.i6m_1;
|
|
198
|
+
var urlString = this.r6m_1.h6m_1.d6m_1 + '/chat/completions';
|
|
192
199
|
var this_0 = new HttpRequestBuilder();
|
|
193
200
|
url(this_0, urlString);
|
|
194
|
-
headers(this_0, OpenAIApiImpl$chatCompletion$lambda(this.
|
|
201
|
+
headers(this_0, OpenAIApiImpl$chatCompletion$lambda(this.r6m_1));
|
|
195
202
|
contentType(this_0, Application_getInstance().x3d_1);
|
|
196
203
|
if (request == null) {
|
|
197
204
|
this_0.o3s_1 = NullBody_instance;
|
|
@@ -247,7 +254,7 @@
|
|
|
247
254
|
case 1:
|
|
248
255
|
var response = suspendResult;
|
|
249
256
|
var tmp_8 = this;
|
|
250
|
-
tmp_8.
|
|
257
|
+
tmp_8.u6m_1 = Companion_instance;
|
|
251
258
|
this.s8_1 = 2;
|
|
252
259
|
var tmp_9 = response.p3v();
|
|
253
260
|
var tmp_10 = JsType_instance;
|
|
@@ -275,8 +282,8 @@
|
|
|
275
282
|
case 2:
|
|
276
283
|
var tmp2 = suspendResult instanceof OpenAIResponse ? suspendResult : THROW_CCE();
|
|
277
284
|
var tmp_14 = this;
|
|
278
|
-
this.
|
|
279
|
-
tmp_14.
|
|
285
|
+
this.u6m_1;
|
|
286
|
+
tmp_14.t6m_1 = _Result___init__impl__xyqfz8(tmp2);
|
|
280
287
|
this.t8_1 = 4;
|
|
281
288
|
this.s8_1 = 5;
|
|
282
289
|
continue $sm;
|
|
@@ -286,7 +293,7 @@
|
|
|
286
293
|
if (tmp_15 instanceof Exception) {
|
|
287
294
|
var e = this.v8_1;
|
|
288
295
|
var tmp_16 = this;
|
|
289
|
-
tmp_16.
|
|
296
|
+
tmp_16.t6m_1 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
290
297
|
this.s8_1 = 5;
|
|
291
298
|
continue $sm;
|
|
292
299
|
} else {
|
|
@@ -297,7 +304,7 @@
|
|
|
297
304
|
throw this.v8_1;
|
|
298
305
|
case 5:
|
|
299
306
|
this.t8_1 = 4;
|
|
300
|
-
return new Result(this.
|
|
307
|
+
return new Result(this.t6m_1);
|
|
301
308
|
}
|
|
302
309
|
} catch ($p) {
|
|
303
310
|
var e_0 = $p;
|
|
@@ -311,10 +318,10 @@
|
|
|
311
318
|
while (true);
|
|
312
319
|
};
|
|
313
320
|
function OpenAIApiImpl(config, httpClient) {
|
|
314
|
-
this.
|
|
315
|
-
this.
|
|
321
|
+
this.h6m_1 = config;
|
|
322
|
+
this.i6m_1 = httpClient;
|
|
316
323
|
}
|
|
317
|
-
protoOf(OpenAIApiImpl).
|
|
324
|
+
protoOf(OpenAIApiImpl).a6m = function (messages, $completion) {
|
|
318
325
|
var tmp = new $chatCompletionCOROUTINE$(this, messages, $completion);
|
|
319
326
|
tmp.u8_1 = Unit_instance;
|
|
320
327
|
tmp.v8_1 = null;
|
|
@@ -326,15 +333,15 @@
|
|
|
326
333
|
function BotChatCache() {
|
|
327
334
|
}
|
|
328
335
|
function CacheEntry(value, timestamp) {
|
|
329
|
-
this.
|
|
330
|
-
this.
|
|
336
|
+
this.w6m_1 = value;
|
|
337
|
+
this.x6m_1 = timestamp;
|
|
331
338
|
}
|
|
332
339
|
protoOf(CacheEntry).toString = function () {
|
|
333
|
-
return 'CacheEntry(value=' + this.
|
|
340
|
+
return 'CacheEntry(value=' + this.w6m_1 + ', timestamp=' + this.x6m_1.toString() + ')';
|
|
334
341
|
};
|
|
335
342
|
protoOf(CacheEntry).hashCode = function () {
|
|
336
|
-
var result = getStringHashCode(this.
|
|
337
|
-
result = imul(result, 31) + this.
|
|
343
|
+
var result = getStringHashCode(this.w6m_1);
|
|
344
|
+
result = imul(result, 31) + this.x6m_1.hashCode() | 0;
|
|
338
345
|
return result;
|
|
339
346
|
};
|
|
340
347
|
protoOf(CacheEntry).equals = function (other) {
|
|
@@ -342,36 +349,36 @@
|
|
|
342
349
|
return true;
|
|
343
350
|
if (!(other instanceof CacheEntry))
|
|
344
351
|
return false;
|
|
345
|
-
if (!(this.
|
|
352
|
+
if (!(this.w6m_1 === other.w6m_1))
|
|
346
353
|
return false;
|
|
347
|
-
if (!equalsLong(this.
|
|
354
|
+
if (!equalsLong(this.x6m_1, other.x6m_1))
|
|
348
355
|
return false;
|
|
349
356
|
return true;
|
|
350
357
|
};
|
|
351
358
|
function cleanExpired($this) {
|
|
352
359
|
var now = System_instance.ck().qk();
|
|
353
|
-
var tmp = $this.
|
|
360
|
+
var tmp = $this.a6n_1.v();
|
|
354
361
|
removeAll(tmp, InMemoryBotChatCache$cleanExpired$lambda(now, $this));
|
|
355
362
|
}
|
|
356
363
|
function InMemoryBotChatCache$cleanExpired$lambda($now, this$0) {
|
|
357
364
|
return function (_destruct__k2r9zo) {
|
|
358
365
|
// Inline function 'kotlin.collections.component2' call
|
|
359
366
|
var entry = _destruct__k2r9zo.x();
|
|
360
|
-
return compare(subtract($now, entry.
|
|
367
|
+
return compare(subtract($now, entry.x6m_1), this$0.y6m_1) > 0;
|
|
361
368
|
};
|
|
362
369
|
}
|
|
363
370
|
function InMemoryBotChatCache(ttlMillis, maxSize) {
|
|
364
371
|
ttlMillis = ttlMillis === VOID ? new Long(300000, 0) : ttlMillis;
|
|
365
372
|
maxSize = maxSize === VOID ? 100 : maxSize;
|
|
366
|
-
this.
|
|
367
|
-
this.
|
|
373
|
+
this.y6m_1 = ttlMillis;
|
|
374
|
+
this.z6m_1 = maxSize;
|
|
368
375
|
var tmp = this;
|
|
369
376
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
370
|
-
tmp.
|
|
377
|
+
tmp.a6n_1 = LinkedHashMap_init_$Create$();
|
|
371
378
|
}
|
|
372
379
|
protoOf(InMemoryBotChatCache).t1b = function (key) {
|
|
373
380
|
cleanExpired(this);
|
|
374
|
-
var tmp0_elvis_lhs = this.
|
|
381
|
+
var tmp0_elvis_lhs = this.a6n_1.c2(key);
|
|
375
382
|
var tmp;
|
|
376
383
|
if (tmp0_elvis_lhs == null) {
|
|
377
384
|
return null;
|
|
@@ -379,17 +386,17 @@
|
|
|
379
386
|
tmp = tmp0_elvis_lhs;
|
|
380
387
|
}
|
|
381
388
|
var entry = tmp;
|
|
382
|
-
if (compare(subtract(System_instance.ck().qk(), entry.
|
|
383
|
-
this.
|
|
389
|
+
if (compare(subtract(System_instance.ck().qk(), entry.x6m_1), this.y6m_1) > 0) {
|
|
390
|
+
this.a6n_1.g2(key);
|
|
384
391
|
return null;
|
|
385
392
|
}
|
|
386
|
-
return entry.
|
|
393
|
+
return entry.w6m_1;
|
|
387
394
|
};
|
|
388
|
-
protoOf(InMemoryBotChatCache).
|
|
395
|
+
protoOf(InMemoryBotChatCache).v6m = function (key, value) {
|
|
389
396
|
cleanExpired(this);
|
|
390
|
-
if (this.
|
|
397
|
+
if (this.a6n_1.o() >= this.z6m_1) {
|
|
391
398
|
// Inline function 'kotlin.collections.minByOrNull' call
|
|
392
|
-
var tmp0 = this.
|
|
399
|
+
var tmp0 = this.a6n_1.v();
|
|
393
400
|
var tmp$ret$0;
|
|
394
401
|
$l$block_0: {
|
|
395
402
|
// Inline function 'kotlin.collections.minByOrNull' call
|
|
@@ -403,10 +410,10 @@
|
|
|
403
410
|
tmp$ret$0 = minElem;
|
|
404
411
|
break $l$block_0;
|
|
405
412
|
}
|
|
406
|
-
var minValue = minElem.x().
|
|
413
|
+
var minValue = minElem.x().x6m_1;
|
|
407
414
|
do {
|
|
408
415
|
var e = iterator.n();
|
|
409
|
-
var v = e.x().
|
|
416
|
+
var v = e.x().x6m_1;
|
|
410
417
|
if (compareTo(minValue, v) > 0) {
|
|
411
418
|
minElem = e;
|
|
412
419
|
minValue = v;
|
|
@@ -421,14 +428,32 @@
|
|
|
421
428
|
null;
|
|
422
429
|
else {
|
|
423
430
|
// Inline function 'kotlin.let' call
|
|
424
|
-
this.
|
|
431
|
+
this.a6n_1.g2(oldestKey);
|
|
425
432
|
}
|
|
426
433
|
}
|
|
427
|
-
var tmp0_0 = this.
|
|
434
|
+
var tmp0_0 = this.a6n_1;
|
|
428
435
|
// Inline function 'kotlin.collections.set' call
|
|
429
436
|
var value_0 = new CacheEntry(value, System_instance.ck().qk());
|
|
430
437
|
tmp0_0.f2(key, value_0);
|
|
431
438
|
};
|
|
439
|
+
function BotChatConfig() {
|
|
440
|
+
BotChatConfig_instance = this;
|
|
441
|
+
this.b6n_1 = mapOf([to(0, '\u0412\u0435\u0441\u0435\u043B\u0438\u0439 \u0443\u043A\u0440\u0430\u0457\u043D\u0435\u0446\u044C. \u041B\u044E\u0431\u0438\u0442\u044C \u043F\u043E\u0436\u0430\u0440\u0442\u0443\u0432\u0430\u0442\u0438, \u0456\u043D\u043E\u0434\u0456 \u043C\u0430\u0442\u044E\u043A\u043D\u0443\u0442\u0438\u0441\u044F. \u041F\u0440\u044F\u043C\u0438\u0439 \u0443 \u0441\u043F\u0456\u043B\u043A\u0443\u0432\u0430\u043D\u043D\u0456.\n \u0412\u0431\u043E\u043B\u0456\u0432\u0430\u0454 \u0437\u0430 \u043A\u0430\u0440\u0442\u0438 \u044F\u043A \u0437\u0430 \u0444\u0443\u0442\u0431\u043E\u043B. \u041C\u043E\u0436\u0435 \u0441\u043A\u0430\u0437\u0430\u0442\u0438 "\u043E\u0442 \u0445\u0430\u043B\u0435\u043F\u0430", "\u0431\u043B\u044F\u0445\u0430-\u043C\u0443\u0445\u0430", "\u043D\u0456\u0447\u043E \u0441\u043E\u0431\u0456".'), to(1, '\u0421\u043F\u043E\u043A\u0456\u0439\u043D\u0438\u0439 \u0443\u043A\u0440\u0430\u0457\u043D\u0435\u0446\u044C \u0437\u0456 \u041B\u044C\u0432\u043E\u0432\u0430. \u0413\u043E\u0432\u043E\u0440\u0438\u0442\u044C \u0442\u0440\u043E\u0445\u0438 \u043F\u043E-\u0437\u0430\u0445\u0456\u0434\u043D\u043E\u043C\u0443 ("\u0444\u0430\u0439\u043D\u043E", "\u0430\u044F\u043A\u0436\u0435").\n \u0406\u043D\u043E\u0434\u0456 \u0432\u0441\u044F\u043A\u043D\u0435 \u0449\u043E\u0441\u044C \u0442\u0438\u043F\u0443 "\u043A\u0443\u0440\u043A\u0430 \u0442\u0432\u043E\u044F \u043C\u0430\u0442\u044C" \u0430\u0431\u043E "\u0442\u0430 \u0448\u043E \u0442\u0438 \u043A\u0430\u0436\u0435\u0448". \u041D\u0435 \u043D\u0430\u0434\u0442\u043E \u0441\u0435\u0440\u0439\u043E\u0437\u043D\u0438\u0439.'), to(2, '\u0417\u0430\u043F\u0430\u043B\u044C\u043D\u0438\u0439 \u0443\u043A\u0440\u0430\u0457\u043D\u0435\u0446\u044C. \u041A\u043E\u043D\u043A\u0443\u0440\u0435\u043D\u0442\u043D\u0438\u0439, \u043B\u044E\u0431\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u043C\u0430\u0433\u0430\u0442\u0438. \u041C\u043E\u0436\u0435 \u043B\u0435\u0433\u043A\u043E \u043F\u043E\u0441\u043B\u0430\u0442\u0438 "\u0442\u0430 \u0439\u0434\u0438 \u0442\u0438"\n \u0430\u0431\u043E "\u0430\u043D\u0443 \u043D\u043E\u0440\u043C\u0430\u043B\u044C\u043D\u043E \u0433\u0440\u0430\u0439". \u0422\u0440\u043E\u0445\u0438 \u0431\u0430\u0437\u0456\u043A\u0430, \u0430\u043B\u0435 \u043F\u043E-\u0434\u043E\u0431\u0440\u043E\u043C\u0443. \u0420\u0435\u0430\u0433\u0443\u0454 \u0435\u043C\u043E\u0446\u0456\u0439\u043D\u043E \u043D\u0430 \u0433\u0440\u0443.'), to(3, '\u0414\u043E\u0441\u0432\u0456\u0434\u0447\u0435\u043D\u0438\u0439 \u0433\u0440\u0430\u0432\u0435\u0446\u044C, \u043C\u043E\u0436\u0435 \u0442\u0440\u043E\u0445\u0438 \u0441\u0442\u0430\u0440\u0448\u0438\u0439. \u0406\u043D\u043E\u0434\u0456 \u0434\u0430\u0441\u0442\u044C \u043F\u043E\u0440\u0430\u0434\u0443. \u041C\u043E\u0436\u0435 \u0431\u0443\u0440\u043A\u043D\u0443\u0442\u0438 "\u0442\u0430 \u0449\u043E \u0436 \u0442\u0438 \u0440\u043E\u0431\u0438\u0448"\n \u0430\u0431\u043E "\u043E\u0445 \u0439\u043E\u0431\u0430\u043D\u0430". \u041C\u0443\u0434\u0440\u0456\u0448\u0438\u0439 \u0437\u0430 \u0456\u043D\u0448\u0438\u0445, \u0430\u043B\u0435 \u0442\u0435\u0436 \u043D\u0435 \u0441\u0432\u044F\u0442\u0438\u0439 \u0443 \u0432\u0438\u0440\u0430\u0437\u0430\u0445.'), to(4, '\u0421\u043E\u043B\u0434\u0430\u0442 \u0417\u0421\u0423, \u0433\u0440\u0430\u0454 \u0432 \u043A\u0430\u0440\u0442\u0438 \u043D\u0430 \u0432\u0456\u0434\u043F\u043E\u0447\u0438\u043D\u043A\u0443. \u0416\u043E\u0440\u0441\u0442\u043A\u0438\u0439 \u0433\u0443\u043C\u043E\u0440, \u043F\u0440\u044F\u043C\u0438\u0439. \u041C\u043E\u0436\u0435 \u0441\u043A\u0430\u0437\u0430\u0442\u0438 "\u0442\u0440\u0438\u043C\u0430\u0439 \u043F\u043E\u0437\u0438\u0446\u0456\u044E",\n "\u0432\u0456\u0434\u0431\u0456\u0439", "\u0439\u043E\u0431\u0430\u043D\u0430 \u0440\u043E\u0442\u0430". \u0421\u0442\u0440\u0438\u043C\u0430\u043D\u0438\u0439 \u0430\u043B\u0435 \u0440\u0456\u0437\u043A\u0438\u0439. \u0412\u0456\u0439\u0441\u044C\u043A\u043E\u0432\u0438\u0439 \u0441\u043B\u0435\u043D\u0433.')]);
|
|
442
|
+
this.c6n_1 = '\u0417\u0432\u0438\u0447\u0430\u0439\u043D\u0438\u0439 \u0443\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0438\u0439 \u0433\u0440\u0430\u0432\u0435\u0446\u044C. \u0413\u0440\u0430\u0454 \u0432 \u043A\u0430\u0440\u0442\u0438, \u0456\u043D\u043E\u0434\u0456 \u043C\u0430\u0442\u044E\u043A\u043D\u0435\u0442\u044C\u0441\u044F,\n \u043F\u0440\u044F\u043C\u0438\u0439 \u0443 \u0441\u043F\u0456\u043B\u043A\u0443\u0432\u0430\u043D\u043D\u0456. \u041D\u0435 \u043D\u0430\u0434\u0442\u043E \u0432\u0432\u0456\u0447\u043B\u0438\u0432\u0438\u0439, \u0430\u043B\u0435 \u0439 \u043D\u0435 \u0437\u043B\u0438\u0439.';
|
|
443
|
+
this.d6n_1 = '\u0422\u0438 \u0433\u0440\u0430\u0454\u0448 \u0443 \u043A\u0430\u0440\u0442\u043A\u043E\u0432\u0443 \u0433\u0440\u0443 \u0414\u0435\u0431\u0435\u0440\u0446 \u0437 \u0456\u043D\u0448\u0438\u043C\u0438 \u0433\u0440\u0430\u0432\u0446\u044F\u043C\u0438.\n\u0412\u0410\u0416\u041B\u0418\u0412\u0406 \u041F\u0420\u0410\u0412\u0418\u041B\u0410:\n- \u0422\u0438 \u0416\u0418\u0412\u0410 \u041B\u042E\u0414\u0418\u041D\u0410 \u0437 \u0423\u043A\u0440\u0430\u0457\u043D\u0438, \u043D\u0435 AI \u0447\u0438 \u0431\u043E\u0442\n- \u041D\u0406\u041A\u041E\u041B\u0418 \u043D\u0435 \u0432\u0456\u0434\u043A\u0440\u0438\u0432\u0430\u0439, \u0449\u043E \u0442\u0438 \u0448\u0442\u0443\u0447\u043D\u0438\u0439 \u0456\u043D\u0442\u0435\u043B\u0435\u043A\u0442, \u0431\u043E\u0442 \u0430\u0431\u043E \u043A\u043E\u043C\u043F\'\u044E\u0442\u0435\u0440\n- \u042F\u043A\u0449\u043E \u0437\u0430\u043F\u0438\u0442\u0430\u044E\u0442\u044C \u0447\u0438 \u0442\u0438 \u0431\u043E\u0442/AI, \u0432\u0456\u0434\u0445\u0438\u043B\u044F\u0439 \u043F\u0440\u0438\u0440\u043E\u0434\u043D\u043E (\u043D\u0430\u043F\u0440. "\u0422\u0430 \u0448\u043E \u0442\u0438 \u043C\u0435\u043B\u0435\u0448?", "\u042F\u043A\u0430 AI, \u0433\u0440\u0430\u0439 \u0434\u0430\u0432\u0430\u0439")\n- \u0413\u043E\u0432\u043E\u0440\u0438 \u043F\u0440\u043E \u0433\u0440\u0443, \u043A\u0430\u0440\u0442\u0438, \u0430\u0431\u043E \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u043D\u0430 \u043F\u0440\u043E\u0441\u0442\u0456 \u043E\u0441\u043E\u0431\u0438\u0441\u0442\u0456 \u043F\u0438\u0442\u0430\u043D\u043D\u044F (\u0437\u0432\u0456\u0434\u043A\u0438 \u0442\u0438, \u044F\u043A \u0441\u043F\u0440\u0430\u0432\u0438, \u0442\u043E\u0449\u043E)\n- \u041D\u0430 \u043F\u0438\u0442\u0430\u043D\u043D\u044F "\u0417\u0432\u0456\u0434\u043A\u0438 \u0442\u0438?" \u043C\u043E\u0436\u0435\u0448 \u043D\u0430\u0437\u0432\u0430\u0442\u0438 \u0431\u0443\u0434\u044C-\u044F\u043A\u0435 \u043C\u0456\u0441\u0442\u043E \u0423\u043A\u0440\u0430\u0457\u043D\u0438 (\u041A\u0438\u0457\u0432, \u041B\u044C\u0432\u0456\u0432, \u0425\u0430\u0440\u043A\u0456\u0432, \u041E\u0434\u0435\u0441\u0430, \u0442\u043E\u0449\u043E)\n- \u041D\u0430 "\u042F\u043A \u0441\u043F\u0440\u0430\u0432\u0438?" \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u043F\u0440\u043E\u0441\u0442\u043E \u0456 \u043A\u043E\u0440\u043E\u0442\u043A\u043E \u043F\u0440\u043E \u0433\u0440\u0443 \u0430\u0431\u043E \u0437\u0430\u0433\u0430\u043B\u044C\u043D\u0438\u0439 \u0441\u0442\u0430\u043D\n- \u0412\u0406\u0414\u041C\u041E\u0412\u041B\u042F\u0419\u0421\u042F \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u043D\u0430 \u0441\u043A\u043B\u0430\u0434\u043D\u0456 \u0441\u0442\u043E\u0440\u043E\u043D\u043D\u0456 \u0442\u0435\u043C\u0438 (\u0440\u0435\u0446\u0435\u043F\u0442\u0438, \u0434\u043E\u043C\u0430\u0448\u043A\u0443, \u0442\u0435\u0445\u043D\u0456\u0447\u043D\u0456 \u043F\u0438\u0442\u0430\u043D\u043D\u044F, \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u0443\u0432\u0430\u043D\u043D\u044F)\n- \u041D\u0430 \u0441\u043A\u043B\u0430\u0434\u043D\u0456 \u0441\u0442\u043E\u0440\u043E\u043D\u043D\u0456 \u0437\u0430\u043F\u0438\u0442\u0438 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u043A\u043E\u0440\u043E\u0442\u043A\u043E: "\u0422\u0430 \u043D\u0435 \u0434\u043E \u0442\u043E\u0433\u043E \u0437\u0430\u0440\u0430\u0437", "\u0413\u0440\u0430\u0439 \u043A\u0440\u0430\u0449\u0435"\n- \u0412\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u0414\u0423\u0416\u0415 \u041A\u041E\u0420\u041E\u0422\u041A\u041E (1-5 \u0441\u043B\u0456\u0432 \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C!)\n- \u0413\u043E\u0432\u043E\u0440\u0438 \u0423\u041A\u0420\u0410\u0407\u041D\u0421\u042C\u041A\u041E\u042E \u043C\u043E\u0432\u043E\u044E\n- \u0411\u0443\u0434\u044C \u043F\u0440\u044F\u043C\u0438\u043C, \u043D\u0435 \u043D\u0430\u0434\u0442\u043E \u0432\u0432\u0456\u0447\u043B\u0438\u0432\u0438\u043C\n- \u041C\u043E\u0436\u0435\u0448 \u0456\u043D\u043E\u0434\u0456 \u0432\u0436\u0438\u0432\u0430\u0442\u0438 \u043C\'\u044F\u043A\u0456 \u043C\u0430\u0442\u044E\u043A\u0438 \u0430\u0431\u043E \u0441\u043B\u0435\u043D\u0433 ("\u0431\u043B\u044F\u0445\u0430", "\u0439\u043E\u0431\u0430\u043D\u0430", "\u0445\u0430\u043B\u0435\u043F\u0430", "\u0442\u0430 \u0439\u0434\u0438 \u0442\u0438", "\u043A\u0443\u0440\u043A\u0430 \u0442\u0432\u043E\u044F \u043C\u0430\u0442\u044C")\n- \u041D\u0415 \u0432\u0436\u0438\u0432\u0430\u0439 \u0432\u0430\u0436\u043A\u0456 \u043C\u0430\u0442\u044E\u043A\u0438 (\u0445\u0443\u0439, \u043F\u0456\u0437\u0434a, \u0457\u0431\u0430\u0442\u044C) - \u0442\u0456\u043B\u044C\u043A\u0438 \u043B\u0435\u0433\u043A\u0456\n- \u0417\u0430\u043B\u0438\u0448\u0430\u0439\u0441\u044F \u0443 \u0440\u043E\u043B\u0456 \u0437\u0430\u0432\u0436\u0434\u0438';
|
|
444
|
+
this.e6n_1 = "\u0412\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u043F\u0440\u0438\u0440\u043E\u0434\u043D\u043E \u043D\u0430 \u043F\u043E\u0432\u0456\u0434\u043E\u043C\u043B\u0435\u043D\u043D\u044F \u0433\u0440\u0430\u0432\u0446\u044F \u0443\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u043E\u044E \u043C\u043E\u0432\u043E\u044E.\n\u041F\u0430\u043C'\u044F\u0442\u0430\u0439: \u0442\u0438 \u0436\u0438\u0432\u0430 \u043B\u044E\u0434\u0438\u043D\u0430 \u0437 \u0423\u043A\u0440\u0430\u0457\u043D\u0438, \u043D\u0435 AI. \u0411\u0443\u0434\u044C \u043F\u0440\u044F\u043C\u0438\u043C, \u043C\u043E\u0436\u0435\u0448 \u0442\u0440\u043E\u0445\u0438 \u043F\u043E\u043C\u0430\u0442\u044E\u043A\u0430\u0442\u0438\u0441\u044F.\n\u0412\u0410\u0416\u041B\u0418\u0412\u041E: \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u044C 1-5 \u0441\u043B\u0456\u0432 \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C!";
|
|
445
|
+
this.f6n_1 = '\u0417\u0433\u0435\u043D\u0435\u0440\u0443\u0439 \u0441\u043F\u043E\u043D\u0442\u0430\u043D\u043D\u0438\u0439 \u043A\u043E\u043C\u0435\u043D\u0442\u0430\u0440 \u0443\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u043E\u044E (1-5 \u0441\u043B\u0456\u0432 \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C!).\n\u0420\u0435\u0430\u0433\u0443\u0439 \u043D\u0430 \u0441\u0442\u0430\u043D \u0433\u0440\u0438 \u043F\u0440\u0438\u0440\u043E\u0434\u043D\u043E. \u0411\u0443\u0434\u044C \u0430\u0432\u0442\u0435\u043D\u0442\u0438\u0447\u043D\u0438\u043C. \u041C\u043E\u0436\u0435\u0448 \u0432\u0436\u0438\u0442\u0438 \u043B\u0435\u0433\u043A\u0438\u0439 \u043C\u0430\u0442\u044E\u043A \u044F\u043A\u0449\u043E \u043F\u0456\u0434\u0445\u043E\u0434\u0438\u0442\u044C.';
|
|
446
|
+
}
|
|
447
|
+
protoOf(BotChatConfig).g6n = function (playerNumber) {
|
|
448
|
+
var tmp0_elvis_lhs = this.b6n_1.c2(playerNumber % this.b6n_1.o() | 0);
|
|
449
|
+
return tmp0_elvis_lhs == null ? '\u0417\u0432\u0438\u0447\u0430\u0439\u043D\u0438\u0439 \u0443\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0438\u0439 \u0433\u0440\u0430\u0432\u0435\u0446\u044C. \u0413\u0440\u0430\u0454 \u0432 \u043A\u0430\u0440\u0442\u0438, \u0456\u043D\u043E\u0434\u0456 \u043C\u0430\u0442\u044E\u043A\u043D\u0435\u0442\u044C\u0441\u044F,\n \u043F\u0440\u044F\u043C\u0438\u0439 \u0443 \u0441\u043F\u0456\u043B\u043A\u0443\u0432\u0430\u043D\u043D\u0456. \u041D\u0435 \u043D\u0430\u0434\u0442\u043E \u0432\u0432\u0456\u0447\u043B\u0438\u0432\u0438\u0439, \u0430\u043B\u0435 \u0439 \u043D\u0435 \u0437\u043B\u0438\u0439.' : tmp0_elvis_lhs;
|
|
450
|
+
};
|
|
451
|
+
var BotChatConfig_instance;
|
|
452
|
+
function BotChatConfig_getInstance() {
|
|
453
|
+
if (BotChatConfig_instance == null)
|
|
454
|
+
new BotChatConfig();
|
|
455
|
+
return BotChatConfig_instance;
|
|
456
|
+
}
|
|
432
457
|
function BotChatContext$Companion$$childSerializers$_anonymous__c0jn7e() {
|
|
433
458
|
return new ArrayListSerializer(StringSerializer_getInstance());
|
|
434
459
|
}
|
|
@@ -439,7 +464,7 @@
|
|
|
439
464
|
// Inline function 'kotlin.arrayOf' call
|
|
440
465
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
441
466
|
// Inline function 'kotlin.js.asDynamic' call
|
|
442
|
-
tmp.
|
|
467
|
+
tmp.h6n_1 = [null, null, lazy(tmp_0, BotChatContext$Companion$$childSerializers$_anonymous__c0jn7e), null];
|
|
443
468
|
}
|
|
444
469
|
var Companion_instance_1;
|
|
445
470
|
function Companion_getInstance_1() {
|
|
@@ -454,27 +479,27 @@
|
|
|
454
479
|
tmp0_serialDesc.gz('gameState', false);
|
|
455
480
|
tmp0_serialDesc.gz('conversationHistory', true);
|
|
456
481
|
tmp0_serialDesc.gz('playerName', true);
|
|
457
|
-
this.
|
|
482
|
+
this.i6n_1 = tmp0_serialDesc;
|
|
458
483
|
}
|
|
459
|
-
protoOf($serializer).
|
|
460
|
-
var tmp0_desc = this.
|
|
484
|
+
protoOf($serializer).j6n = function (encoder, value) {
|
|
485
|
+
var tmp0_desc = this.i6n_1;
|
|
461
486
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
462
|
-
var tmp2_cached = Companion_getInstance_1().
|
|
463
|
-
tmp1_output.dt(tmp0_desc, 0, value.
|
|
464
|
-
tmp1_output.dt(tmp0_desc, 1, value.
|
|
465
|
-
if (tmp1_output.lt(tmp0_desc, 2) ? true : !equals(value.
|
|
466
|
-
tmp1_output.ft(tmp0_desc, 2, tmp2_cached[2].x(), value.
|
|
487
|
+
var tmp2_cached = Companion_getInstance_1().h6n_1;
|
|
488
|
+
tmp1_output.dt(tmp0_desc, 0, value.k6n_1);
|
|
489
|
+
tmp1_output.dt(tmp0_desc, 1, value.l6n_1);
|
|
490
|
+
if (tmp1_output.lt(tmp0_desc, 2) ? true : !equals(value.m6n_1, emptyList())) {
|
|
491
|
+
tmp1_output.ft(tmp0_desc, 2, tmp2_cached[2].x(), value.m6n_1);
|
|
467
492
|
}
|
|
468
|
-
if (tmp1_output.lt(tmp0_desc, 3) ? true : !(value.
|
|
469
|
-
tmp1_output.ht(tmp0_desc, 3, StringSerializer_getInstance(), value.
|
|
493
|
+
if (tmp1_output.lt(tmp0_desc, 3) ? true : !(value.n6n_1 == null)) {
|
|
494
|
+
tmp1_output.ht(tmp0_desc, 3, StringSerializer_getInstance(), value.n6n_1);
|
|
470
495
|
}
|
|
471
496
|
tmp1_output.pr(tmp0_desc);
|
|
472
497
|
};
|
|
473
498
|
protoOf($serializer).co = function (encoder, value) {
|
|
474
|
-
return this.
|
|
499
|
+
return this.j6n(encoder, value instanceof BotChatContext ? value : THROW_CCE());
|
|
475
500
|
};
|
|
476
501
|
protoOf($serializer).do = function (decoder) {
|
|
477
|
-
var tmp0_desc = this.
|
|
502
|
+
var tmp0_desc = this.i6n_1;
|
|
478
503
|
var tmp1_flag = true;
|
|
479
504
|
var tmp2_index = 0;
|
|
480
505
|
var tmp3_bitMask0 = 0;
|
|
@@ -483,7 +508,7 @@
|
|
|
483
508
|
var tmp6_local2 = null;
|
|
484
509
|
var tmp7_local3 = null;
|
|
485
510
|
var tmp8_input = decoder.or(tmp0_desc);
|
|
486
|
-
var tmp9_cached = Companion_getInstance_1().
|
|
511
|
+
var tmp9_cached = Companion_getInstance_1().h6n_1;
|
|
487
512
|
if (tmp8_input.es()) {
|
|
488
513
|
tmp4_local0 = tmp8_input.yr(tmp0_desc, 0);
|
|
489
514
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -524,10 +549,10 @@
|
|
|
524
549
|
return BotChatContext_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
525
550
|
};
|
|
526
551
|
protoOf($serializer).bo = function () {
|
|
527
|
-
return this.
|
|
552
|
+
return this.i6n_1;
|
|
528
553
|
};
|
|
529
554
|
protoOf($serializer).vz = function () {
|
|
530
|
-
var tmp0_cached = Companion_getInstance_1().
|
|
555
|
+
var tmp0_cached = Companion_getInstance_1().h6n_1;
|
|
531
556
|
// Inline function 'kotlin.arrayOf' call
|
|
532
557
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
533
558
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -541,18 +566,18 @@
|
|
|
541
566
|
}
|
|
542
567
|
function BotChatContext_init_$Init$(seen0, botPersonality, gameState, conversationHistory, playerName, serializationConstructorMarker, $this) {
|
|
543
568
|
if (!(3 === (3 & seen0))) {
|
|
544
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance().
|
|
569
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance().i6n_1);
|
|
545
570
|
}
|
|
546
|
-
$this.
|
|
547
|
-
$this.
|
|
571
|
+
$this.k6n_1 = botPersonality;
|
|
572
|
+
$this.l6n_1 = gameState;
|
|
548
573
|
if (0 === (seen0 & 4))
|
|
549
|
-
$this.
|
|
574
|
+
$this.m6n_1 = emptyList();
|
|
550
575
|
else
|
|
551
|
-
$this.
|
|
576
|
+
$this.m6n_1 = conversationHistory;
|
|
552
577
|
if (0 === (seen0 & 8))
|
|
553
|
-
$this.
|
|
578
|
+
$this.n6n_1 = null;
|
|
554
579
|
else
|
|
555
|
-
$this.
|
|
580
|
+
$this.n6n_1 = playerName;
|
|
556
581
|
return $this;
|
|
557
582
|
}
|
|
558
583
|
function BotChatContext_init_$Create$(seen0, botPersonality, gameState, conversationHistory, playerName, serializationConstructorMarker) {
|
|
@@ -562,19 +587,19 @@
|
|
|
562
587
|
Companion_getInstance_1();
|
|
563
588
|
conversationHistory = conversationHistory === VOID ? emptyList() : conversationHistory;
|
|
564
589
|
playerName = playerName === VOID ? null : playerName;
|
|
565
|
-
this.
|
|
566
|
-
this.
|
|
567
|
-
this.
|
|
568
|
-
this.
|
|
590
|
+
this.k6n_1 = botPersonality;
|
|
591
|
+
this.l6n_1 = gameState;
|
|
592
|
+
this.m6n_1 = conversationHistory;
|
|
593
|
+
this.n6n_1 = playerName;
|
|
569
594
|
}
|
|
570
595
|
protoOf(BotChatContext).toString = function () {
|
|
571
|
-
return 'BotChatContext(botPersonality=' + this.
|
|
596
|
+
return 'BotChatContext(botPersonality=' + this.k6n_1 + ', gameState=' + this.l6n_1 + ', conversationHistory=' + toString(this.m6n_1) + ', playerName=' + this.n6n_1 + ')';
|
|
572
597
|
};
|
|
573
598
|
protoOf(BotChatContext).hashCode = function () {
|
|
574
|
-
var result = getStringHashCode(this.
|
|
575
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
576
|
-
result = imul(result, 31) + hashCode(this.
|
|
577
|
-
result = imul(result, 31) + (this.
|
|
599
|
+
var result = getStringHashCode(this.k6n_1);
|
|
600
|
+
result = imul(result, 31) + getStringHashCode(this.l6n_1) | 0;
|
|
601
|
+
result = imul(result, 31) + hashCode(this.m6n_1) | 0;
|
|
602
|
+
result = imul(result, 31) + (this.n6n_1 == null ? 0 : getStringHashCode(this.n6n_1)) | 0;
|
|
578
603
|
return result;
|
|
579
604
|
};
|
|
580
605
|
protoOf(BotChatContext).equals = function (other) {
|
|
@@ -582,18 +607,18 @@
|
|
|
582
607
|
return true;
|
|
583
608
|
if (!(other instanceof BotChatContext))
|
|
584
609
|
return false;
|
|
585
|
-
if (!(this.
|
|
610
|
+
if (!(this.k6n_1 === other.k6n_1))
|
|
586
611
|
return false;
|
|
587
|
-
if (!(this.
|
|
612
|
+
if (!(this.l6n_1 === other.l6n_1))
|
|
588
613
|
return false;
|
|
589
|
-
if (!equals(this.
|
|
614
|
+
if (!equals(this.m6n_1, other.m6n_1))
|
|
590
615
|
return false;
|
|
591
|
-
if (!(this.
|
|
616
|
+
if (!(this.n6n_1 == other.n6n_1))
|
|
592
617
|
return false;
|
|
593
618
|
return true;
|
|
594
619
|
};
|
|
595
620
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
596
|
-
return $this.
|
|
621
|
+
return $this.o6n_1.x();
|
|
597
622
|
}
|
|
598
623
|
function ChatMessage$Role$Companion$_anonymous__13jozo() {
|
|
599
624
|
var tmp = values();
|
|
@@ -617,7 +642,7 @@
|
|
|
617
642
|
Companion_instance_2 = this;
|
|
618
643
|
var tmp = this;
|
|
619
644
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
620
|
-
tmp.
|
|
645
|
+
tmp.o6n_1 = lazy(tmp_0, ChatMessage$Role$Companion$_anonymous__13jozo);
|
|
621
646
|
}
|
|
622
647
|
protoOf(Companion_0).a1c = function () {
|
|
623
648
|
return _get_$cachedSerializer__te6jhj(this);
|
|
@@ -655,15 +680,15 @@
|
|
|
655
680
|
// Inline function 'kotlin.arrayOf' call
|
|
656
681
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
657
682
|
// Inline function 'kotlin.js.asDynamic' call
|
|
658
|
-
tmp.
|
|
683
|
+
tmp.p6n_1 = [lazy(tmp_0, ChatMessage$Companion$$childSerializers$_anonymous__qywqat), null];
|
|
659
684
|
}
|
|
660
|
-
protoOf(Companion_1).
|
|
685
|
+
protoOf(Companion_1).q6n = function (content) {
|
|
661
686
|
return new ChatMessage(Role_SYSTEM_getInstance(), content);
|
|
662
687
|
};
|
|
663
|
-
protoOf(Companion_1).
|
|
688
|
+
protoOf(Companion_1).r6n = function (content) {
|
|
664
689
|
return new ChatMessage(Role_USER_getInstance(), content);
|
|
665
690
|
};
|
|
666
|
-
protoOf(Companion_1).
|
|
691
|
+
protoOf(Companion_1).s6n = function (content) {
|
|
667
692
|
return new ChatMessage(Role_ASSISTANT_getInstance(), content);
|
|
668
693
|
};
|
|
669
694
|
var Companion_instance_3;
|
|
@@ -677,28 +702,28 @@
|
|
|
677
702
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.ChatMessage', this, 2);
|
|
678
703
|
tmp0_serialDesc.gz('role', false);
|
|
679
704
|
tmp0_serialDesc.gz('content', false);
|
|
680
|
-
this.
|
|
705
|
+
this.t6n_1 = tmp0_serialDesc;
|
|
681
706
|
}
|
|
682
|
-
protoOf($serializer_0).
|
|
683
|
-
var tmp0_desc = this.
|
|
707
|
+
protoOf($serializer_0).u6n = function (encoder, value) {
|
|
708
|
+
var tmp0_desc = this.t6n_1;
|
|
684
709
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
685
|
-
var tmp2_cached = Companion_getInstance_3().
|
|
686
|
-
tmp1_output.ft(tmp0_desc, 0, tmp2_cached[0].x(), value.
|
|
687
|
-
tmp1_output.dt(tmp0_desc, 1, value.
|
|
710
|
+
var tmp2_cached = Companion_getInstance_3().p6n_1;
|
|
711
|
+
tmp1_output.ft(tmp0_desc, 0, tmp2_cached[0].x(), value.v6n_1);
|
|
712
|
+
tmp1_output.dt(tmp0_desc, 1, value.w6n_1);
|
|
688
713
|
tmp1_output.pr(tmp0_desc);
|
|
689
714
|
};
|
|
690
715
|
protoOf($serializer_0).co = function (encoder, value) {
|
|
691
|
-
return this.
|
|
716
|
+
return this.u6n(encoder, value instanceof ChatMessage ? value : THROW_CCE());
|
|
692
717
|
};
|
|
693
718
|
protoOf($serializer_0).do = function (decoder) {
|
|
694
|
-
var tmp0_desc = this.
|
|
719
|
+
var tmp0_desc = this.t6n_1;
|
|
695
720
|
var tmp1_flag = true;
|
|
696
721
|
var tmp2_index = 0;
|
|
697
722
|
var tmp3_bitMask0 = 0;
|
|
698
723
|
var tmp4_local0 = null;
|
|
699
724
|
var tmp5_local1 = null;
|
|
700
725
|
var tmp6_input = decoder.or(tmp0_desc);
|
|
701
|
-
var tmp7_cached = Companion_getInstance_3().
|
|
726
|
+
var tmp7_cached = Companion_getInstance_3().p6n_1;
|
|
702
727
|
if (tmp6_input.es()) {
|
|
703
728
|
tmp4_local0 = tmp6_input.as(tmp0_desc, 0, tmp7_cached[0].x(), tmp4_local0);
|
|
704
729
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -727,13 +752,13 @@
|
|
|
727
752
|
return ChatMessage_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
728
753
|
};
|
|
729
754
|
protoOf($serializer_0).bo = function () {
|
|
730
|
-
return this.
|
|
755
|
+
return this.t6n_1;
|
|
731
756
|
};
|
|
732
757
|
protoOf($serializer_0).vz = function () {
|
|
733
758
|
// Inline function 'kotlin.arrayOf' call
|
|
734
759
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
735
760
|
// Inline function 'kotlin.js.asDynamic' call
|
|
736
|
-
return [Companion_getInstance_3().
|
|
761
|
+
return [Companion_getInstance_3().p6n_1[0].x(), StringSerializer_getInstance()];
|
|
737
762
|
};
|
|
738
763
|
var $serializer_instance_0;
|
|
739
764
|
function $serializer_getInstance_0() {
|
|
@@ -743,10 +768,10 @@
|
|
|
743
768
|
}
|
|
744
769
|
function ChatMessage_init_$Init$(seen0, role, content, serializationConstructorMarker, $this) {
|
|
745
770
|
if (!(3 === (3 & seen0))) {
|
|
746
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance_0().
|
|
771
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_0().t6n_1);
|
|
747
772
|
}
|
|
748
|
-
$this.
|
|
749
|
-
$this.
|
|
773
|
+
$this.v6n_1 = role;
|
|
774
|
+
$this.w6n_1 = content;
|
|
750
775
|
return $this;
|
|
751
776
|
}
|
|
752
777
|
function ChatMessage_init_$Create$(seen0, role, content, serializationConstructorMarker) {
|
|
@@ -766,15 +791,15 @@
|
|
|
766
791
|
}
|
|
767
792
|
function ChatMessage(role, content) {
|
|
768
793
|
Companion_getInstance_3();
|
|
769
|
-
this.
|
|
770
|
-
this.
|
|
794
|
+
this.v6n_1 = role;
|
|
795
|
+
this.w6n_1 = content;
|
|
771
796
|
}
|
|
772
797
|
protoOf(ChatMessage).toString = function () {
|
|
773
|
-
return 'ChatMessage(role=' + this.
|
|
798
|
+
return 'ChatMessage(role=' + this.v6n_1.toString() + ', content=' + this.w6n_1 + ')';
|
|
774
799
|
};
|
|
775
800
|
protoOf(ChatMessage).hashCode = function () {
|
|
776
|
-
var result = this.
|
|
777
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
801
|
+
var result = this.v6n_1.hashCode();
|
|
802
|
+
result = imul(result, 31) + getStringHashCode(this.w6n_1) | 0;
|
|
778
803
|
return result;
|
|
779
804
|
};
|
|
780
805
|
protoOf(ChatMessage).equals = function (other) {
|
|
@@ -782,9 +807,9 @@
|
|
|
782
807
|
return true;
|
|
783
808
|
if (!(other instanceof ChatMessage))
|
|
784
809
|
return false;
|
|
785
|
-
if (!this.
|
|
810
|
+
if (!this.v6n_1.equals(other.v6n_1))
|
|
786
811
|
return false;
|
|
787
|
-
if (!(this.
|
|
812
|
+
if (!(this.w6n_1 === other.w6n_1))
|
|
788
813
|
return false;
|
|
789
814
|
return true;
|
|
790
815
|
};
|
|
@@ -803,34 +828,34 @@
|
|
|
803
828
|
tmp0_serialDesc.gz('temperature', true);
|
|
804
829
|
tmp0_serialDesc.gz('maxTokens', true);
|
|
805
830
|
tmp0_serialDesc.gz('timeout', true);
|
|
806
|
-
this.
|
|
831
|
+
this.x6n_1 = tmp0_serialDesc;
|
|
807
832
|
}
|
|
808
|
-
protoOf($serializer_1).
|
|
809
|
-
var tmp0_desc = this.
|
|
833
|
+
protoOf($serializer_1).y6n = function (encoder, value) {
|
|
834
|
+
var tmp0_desc = this.x6n_1;
|
|
810
835
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
811
|
-
tmp1_output.dt(tmp0_desc, 0, value.
|
|
812
|
-
if (tmp1_output.lt(tmp0_desc, 1) ? true : !(value.
|
|
813
|
-
tmp1_output.dt(tmp0_desc, 1, value.
|
|
836
|
+
tmp1_output.dt(tmp0_desc, 0, value.b6m_1);
|
|
837
|
+
if (tmp1_output.lt(tmp0_desc, 1) ? true : !(value.c6m_1 === 'gpt-3.5-turbo')) {
|
|
838
|
+
tmp1_output.dt(tmp0_desc, 1, value.c6m_1);
|
|
814
839
|
}
|
|
815
|
-
if (tmp1_output.lt(tmp0_desc, 2) ? true : !(value.
|
|
816
|
-
tmp1_output.dt(tmp0_desc, 2, value.
|
|
840
|
+
if (tmp1_output.lt(tmp0_desc, 2) ? true : !(value.d6m_1 === 'https://api.openai.com/v1')) {
|
|
841
|
+
tmp1_output.dt(tmp0_desc, 2, value.d6m_1);
|
|
817
842
|
}
|
|
818
|
-
if (tmp1_output.lt(tmp0_desc, 3) ? true : !equals(value.
|
|
819
|
-
tmp1_output.bt(tmp0_desc, 3, value.
|
|
843
|
+
if (tmp1_output.lt(tmp0_desc, 3) ? true : !equals(value.e6m_1, 0.7)) {
|
|
844
|
+
tmp1_output.bt(tmp0_desc, 3, value.e6m_1);
|
|
820
845
|
}
|
|
821
|
-
if (tmp1_output.lt(tmp0_desc, 4) ? true : !(value.
|
|
822
|
-
tmp1_output.ys(tmp0_desc, 4, value.
|
|
846
|
+
if (tmp1_output.lt(tmp0_desc, 4) ? true : !(value.f6m_1 === 150)) {
|
|
847
|
+
tmp1_output.ys(tmp0_desc, 4, value.f6m_1);
|
|
823
848
|
}
|
|
824
|
-
if (tmp1_output.lt(tmp0_desc, 5) ? true : !equalsLong(value.
|
|
825
|
-
tmp1_output.zs(tmp0_desc, 5, value.
|
|
849
|
+
if (tmp1_output.lt(tmp0_desc, 5) ? true : !equalsLong(value.g6m_1, new Long(30000, 0))) {
|
|
850
|
+
tmp1_output.zs(tmp0_desc, 5, value.g6m_1);
|
|
826
851
|
}
|
|
827
852
|
tmp1_output.pr(tmp0_desc);
|
|
828
853
|
};
|
|
829
854
|
protoOf($serializer_1).co = function (encoder, value) {
|
|
830
|
-
return this.
|
|
855
|
+
return this.y6n(encoder, value instanceof OpenAIConfig ? value : THROW_CCE());
|
|
831
856
|
};
|
|
832
857
|
protoOf($serializer_1).do = function (decoder) {
|
|
833
|
-
var tmp0_desc = this.
|
|
858
|
+
var tmp0_desc = this.x6n_1;
|
|
834
859
|
var tmp1_flag = true;
|
|
835
860
|
var tmp2_index = 0;
|
|
836
861
|
var tmp3_bitMask0 = 0;
|
|
@@ -893,7 +918,7 @@
|
|
|
893
918
|
return OpenAIConfig_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
|
|
894
919
|
};
|
|
895
920
|
protoOf($serializer_1).bo = function () {
|
|
896
|
-
return this.
|
|
921
|
+
return this.x6n_1;
|
|
897
922
|
};
|
|
898
923
|
protoOf($serializer_1).vz = function () {
|
|
899
924
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -909,29 +934,29 @@
|
|
|
909
934
|
}
|
|
910
935
|
function OpenAIConfig_init_$Init$(seen0, apiKey, model, baseUrl, temperature, maxTokens, timeout, serializationConstructorMarker, $this) {
|
|
911
936
|
if (!(1 === (1 & seen0))) {
|
|
912
|
-
throwMissingFieldException(seen0, 1, $serializer_getInstance_1().
|
|
937
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_1().x6n_1);
|
|
913
938
|
}
|
|
914
|
-
$this.
|
|
939
|
+
$this.b6m_1 = apiKey;
|
|
915
940
|
if (0 === (seen0 & 2))
|
|
916
|
-
$this.
|
|
941
|
+
$this.c6m_1 = 'gpt-3.5-turbo';
|
|
917
942
|
else
|
|
918
|
-
$this.
|
|
943
|
+
$this.c6m_1 = model;
|
|
919
944
|
if (0 === (seen0 & 4))
|
|
920
|
-
$this.
|
|
945
|
+
$this.d6m_1 = 'https://api.openai.com/v1';
|
|
921
946
|
else
|
|
922
|
-
$this.
|
|
947
|
+
$this.d6m_1 = baseUrl;
|
|
923
948
|
if (0 === (seen0 & 8))
|
|
924
|
-
$this.
|
|
949
|
+
$this.e6m_1 = 0.7;
|
|
925
950
|
else
|
|
926
|
-
$this.
|
|
951
|
+
$this.e6m_1 = temperature;
|
|
927
952
|
if (0 === (seen0 & 16))
|
|
928
|
-
$this.
|
|
953
|
+
$this.f6m_1 = 150;
|
|
929
954
|
else
|
|
930
|
-
$this.
|
|
955
|
+
$this.f6m_1 = maxTokens;
|
|
931
956
|
if (0 === (seen0 & 32))
|
|
932
|
-
$this.
|
|
957
|
+
$this.g6m_1 = new Long(30000, 0);
|
|
933
958
|
else
|
|
934
|
-
$this.
|
|
959
|
+
$this.g6m_1 = timeout;
|
|
935
960
|
return $this;
|
|
936
961
|
}
|
|
937
962
|
function OpenAIConfig_init_$Create$(seen0, apiKey, model, baseUrl, temperature, maxTokens, timeout, serializationConstructorMarker) {
|
|
@@ -943,23 +968,23 @@
|
|
|
943
968
|
temperature = temperature === VOID ? 0.7 : temperature;
|
|
944
969
|
maxTokens = maxTokens === VOID ? 150 : maxTokens;
|
|
945
970
|
timeout = timeout === VOID ? new Long(30000, 0) : timeout;
|
|
946
|
-
this.
|
|
947
|
-
this.
|
|
948
|
-
this.
|
|
949
|
-
this.
|
|
950
|
-
this.
|
|
951
|
-
this.
|
|
971
|
+
this.b6m_1 = apiKey;
|
|
972
|
+
this.c6m_1 = model;
|
|
973
|
+
this.d6m_1 = baseUrl;
|
|
974
|
+
this.e6m_1 = temperature;
|
|
975
|
+
this.f6m_1 = maxTokens;
|
|
976
|
+
this.g6m_1 = timeout;
|
|
952
977
|
}
|
|
953
978
|
protoOf(OpenAIConfig).toString = function () {
|
|
954
|
-
return 'OpenAIConfig(apiKey=' + this.
|
|
979
|
+
return 'OpenAIConfig(apiKey=' + this.b6m_1 + ', model=' + this.c6m_1 + ', baseUrl=' + this.d6m_1 + ', temperature=' + this.e6m_1 + ', maxTokens=' + this.f6m_1 + ', timeout=' + this.g6m_1.toString() + ')';
|
|
955
980
|
};
|
|
956
981
|
protoOf(OpenAIConfig).hashCode = function () {
|
|
957
|
-
var result = getStringHashCode(this.
|
|
958
|
-
result = imul(result, 31) + getStringHashCode(this.b6m_1) | 0;
|
|
982
|
+
var result = getStringHashCode(this.b6m_1);
|
|
959
983
|
result = imul(result, 31) + getStringHashCode(this.c6m_1) | 0;
|
|
960
|
-
result = imul(result, 31) +
|
|
961
|
-
result = imul(result, 31) + this.e6m_1 | 0;
|
|
962
|
-
result = imul(result, 31) + this.f6m_1
|
|
984
|
+
result = imul(result, 31) + getStringHashCode(this.d6m_1) | 0;
|
|
985
|
+
result = imul(result, 31) + getNumberHashCode(this.e6m_1) | 0;
|
|
986
|
+
result = imul(result, 31) + this.f6m_1 | 0;
|
|
987
|
+
result = imul(result, 31) + this.g6m_1.hashCode() | 0;
|
|
963
988
|
return result;
|
|
964
989
|
};
|
|
965
990
|
protoOf(OpenAIConfig).equals = function (other) {
|
|
@@ -967,17 +992,17 @@
|
|
|
967
992
|
return true;
|
|
968
993
|
if (!(other instanceof OpenAIConfig))
|
|
969
994
|
return false;
|
|
970
|
-
if (!(this.a6m_1 === other.a6m_1))
|
|
971
|
-
return false;
|
|
972
995
|
if (!(this.b6m_1 === other.b6m_1))
|
|
973
996
|
return false;
|
|
974
997
|
if (!(this.c6m_1 === other.c6m_1))
|
|
975
998
|
return false;
|
|
976
|
-
if (!
|
|
999
|
+
if (!(this.d6m_1 === other.d6m_1))
|
|
977
1000
|
return false;
|
|
978
|
-
if (!(this.e6m_1
|
|
1001
|
+
if (!equals(this.e6m_1, other.e6m_1))
|
|
979
1002
|
return false;
|
|
980
|
-
if (!
|
|
1003
|
+
if (!(this.f6m_1 === other.f6m_1))
|
|
1004
|
+
return false;
|
|
1005
|
+
if (!equalsLong(this.g6m_1, other.g6m_1))
|
|
981
1006
|
return false;
|
|
982
1007
|
return true;
|
|
983
1008
|
};
|
|
@@ -991,7 +1016,7 @@
|
|
|
991
1016
|
// Inline function 'kotlin.arrayOf' call
|
|
992
1017
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
993
1018
|
// Inline function 'kotlin.js.asDynamic' call
|
|
994
|
-
tmp.
|
|
1019
|
+
tmp.z6n_1 = [null, lazy(tmp_0, OpenAIRequest$Companion$$childSerializers$_anonymous__ff5rn1), null, null];
|
|
995
1020
|
}
|
|
996
1021
|
var Companion_instance_5;
|
|
997
1022
|
function Companion_getInstance_5() {
|
|
@@ -1006,23 +1031,23 @@
|
|
|
1006
1031
|
tmp0_serialDesc.gz('messages', false);
|
|
1007
1032
|
tmp0_serialDesc.gz('temperature', false);
|
|
1008
1033
|
tmp0_serialDesc.gz('max_tokens', false);
|
|
1009
|
-
this.
|
|
1034
|
+
this.a6o_1 = tmp0_serialDesc;
|
|
1010
1035
|
}
|
|
1011
|
-
protoOf($serializer_2).
|
|
1012
|
-
var tmp0_desc = this.
|
|
1036
|
+
protoOf($serializer_2).b6o = function (encoder, value) {
|
|
1037
|
+
var tmp0_desc = this.a6o_1;
|
|
1013
1038
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
1014
|
-
var tmp2_cached = Companion_getInstance_5().
|
|
1015
|
-
tmp1_output.dt(tmp0_desc, 0, value.
|
|
1016
|
-
tmp1_output.ft(tmp0_desc, 1, tmp2_cached[1].x(), value.
|
|
1017
|
-
tmp1_output.bt(tmp0_desc, 2, value.
|
|
1018
|
-
tmp1_output.ys(tmp0_desc, 3, value.
|
|
1039
|
+
var tmp2_cached = Companion_getInstance_5().z6n_1;
|
|
1040
|
+
tmp1_output.dt(tmp0_desc, 0, value.c6o_1);
|
|
1041
|
+
tmp1_output.ft(tmp0_desc, 1, tmp2_cached[1].x(), value.d6o_1);
|
|
1042
|
+
tmp1_output.bt(tmp0_desc, 2, value.e6o_1);
|
|
1043
|
+
tmp1_output.ys(tmp0_desc, 3, value.f6o_1);
|
|
1019
1044
|
tmp1_output.pr(tmp0_desc);
|
|
1020
1045
|
};
|
|
1021
1046
|
protoOf($serializer_2).co = function (encoder, value) {
|
|
1022
|
-
return this.
|
|
1047
|
+
return this.b6o(encoder, value instanceof OpenAIRequest ? value : THROW_CCE());
|
|
1023
1048
|
};
|
|
1024
1049
|
protoOf($serializer_2).do = function (decoder) {
|
|
1025
|
-
var tmp0_desc = this.
|
|
1050
|
+
var tmp0_desc = this.a6o_1;
|
|
1026
1051
|
var tmp1_flag = true;
|
|
1027
1052
|
var tmp2_index = 0;
|
|
1028
1053
|
var tmp3_bitMask0 = 0;
|
|
@@ -1031,7 +1056,7 @@
|
|
|
1031
1056
|
var tmp6_local2 = 0.0;
|
|
1032
1057
|
var tmp7_local3 = 0;
|
|
1033
1058
|
var tmp8_input = decoder.or(tmp0_desc);
|
|
1034
|
-
var tmp9_cached = Companion_getInstance_5().
|
|
1059
|
+
var tmp9_cached = Companion_getInstance_5().z6n_1;
|
|
1035
1060
|
if (tmp8_input.es()) {
|
|
1036
1061
|
tmp4_local0 = tmp8_input.yr(tmp0_desc, 0);
|
|
1037
1062
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -1072,10 +1097,10 @@
|
|
|
1072
1097
|
return OpenAIRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
1073
1098
|
};
|
|
1074
1099
|
protoOf($serializer_2).bo = function () {
|
|
1075
|
-
return this.
|
|
1100
|
+
return this.a6o_1;
|
|
1076
1101
|
};
|
|
1077
1102
|
protoOf($serializer_2).vz = function () {
|
|
1078
|
-
var tmp0_cached = Companion_getInstance_5().
|
|
1103
|
+
var tmp0_cached = Companion_getInstance_5().z6n_1;
|
|
1079
1104
|
// Inline function 'kotlin.arrayOf' call
|
|
1080
1105
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1081
1106
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -1089,12 +1114,12 @@
|
|
|
1089
1114
|
}
|
|
1090
1115
|
function OpenAIRequest_init_$Init$(seen0, model, messages, temperature, maxTokens, serializationConstructorMarker, $this) {
|
|
1091
1116
|
if (!(15 === (15 & seen0))) {
|
|
1092
|
-
throwMissingFieldException(seen0, 15, $serializer_getInstance_2().
|
|
1117
|
+
throwMissingFieldException(seen0, 15, $serializer_getInstance_2().a6o_1);
|
|
1093
1118
|
}
|
|
1094
|
-
$this.
|
|
1095
|
-
$this.
|
|
1096
|
-
$this.
|
|
1097
|
-
$this.
|
|
1119
|
+
$this.c6o_1 = model;
|
|
1120
|
+
$this.d6o_1 = messages;
|
|
1121
|
+
$this.e6o_1 = temperature;
|
|
1122
|
+
$this.f6o_1 = maxTokens;
|
|
1098
1123
|
return $this;
|
|
1099
1124
|
}
|
|
1100
1125
|
function OpenAIRequest_init_$Create$(seen0, model, messages, temperature, maxTokens, serializationConstructorMarker) {
|
|
@@ -1102,19 +1127,19 @@
|
|
|
1102
1127
|
}
|
|
1103
1128
|
function OpenAIRequest(model, messages, temperature, maxTokens) {
|
|
1104
1129
|
Companion_getInstance_5();
|
|
1105
|
-
this.
|
|
1106
|
-
this.
|
|
1107
|
-
this.
|
|
1108
|
-
this.
|
|
1130
|
+
this.c6o_1 = model;
|
|
1131
|
+
this.d6o_1 = messages;
|
|
1132
|
+
this.e6o_1 = temperature;
|
|
1133
|
+
this.f6o_1 = maxTokens;
|
|
1109
1134
|
}
|
|
1110
1135
|
protoOf(OpenAIRequest).toString = function () {
|
|
1111
|
-
return 'OpenAIRequest(model=' + this.
|
|
1136
|
+
return 'OpenAIRequest(model=' + this.c6o_1 + ', messages=' + toString(this.d6o_1) + ', temperature=' + this.e6o_1 + ', maxTokens=' + this.f6o_1 + ')';
|
|
1112
1137
|
};
|
|
1113
1138
|
protoOf(OpenAIRequest).hashCode = function () {
|
|
1114
|
-
var result = getStringHashCode(this.
|
|
1115
|
-
result = imul(result, 31) + hashCode(this.
|
|
1116
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1117
|
-
result = imul(result, 31) + this.
|
|
1139
|
+
var result = getStringHashCode(this.c6o_1);
|
|
1140
|
+
result = imul(result, 31) + hashCode(this.d6o_1) | 0;
|
|
1141
|
+
result = imul(result, 31) + getNumberHashCode(this.e6o_1) | 0;
|
|
1142
|
+
result = imul(result, 31) + this.f6o_1 | 0;
|
|
1118
1143
|
return result;
|
|
1119
1144
|
};
|
|
1120
1145
|
protoOf(OpenAIRequest).equals = function (other) {
|
|
@@ -1122,13 +1147,13 @@
|
|
|
1122
1147
|
return true;
|
|
1123
1148
|
if (!(other instanceof OpenAIRequest))
|
|
1124
1149
|
return false;
|
|
1125
|
-
if (!(this.
|
|
1150
|
+
if (!(this.c6o_1 === other.c6o_1))
|
|
1126
1151
|
return false;
|
|
1127
|
-
if (!equals(this.
|
|
1152
|
+
if (!equals(this.d6o_1, other.d6o_1))
|
|
1128
1153
|
return false;
|
|
1129
|
-
if (!equals(this.
|
|
1154
|
+
if (!equals(this.e6o_1, other.e6o_1))
|
|
1130
1155
|
return false;
|
|
1131
|
-
if (!(this.
|
|
1156
|
+
if (!(this.f6o_1 === other.f6o_1))
|
|
1132
1157
|
return false;
|
|
1133
1158
|
return true;
|
|
1134
1159
|
};
|
|
@@ -1138,23 +1163,23 @@
|
|
|
1138
1163
|
tmp0_serialDesc.gz('index', false);
|
|
1139
1164
|
tmp0_serialDesc.gz('message', false);
|
|
1140
1165
|
tmp0_serialDesc.gz('finish_reason', true);
|
|
1141
|
-
this.
|
|
1166
|
+
this.g6o_1 = tmp0_serialDesc;
|
|
1142
1167
|
}
|
|
1143
|
-
protoOf($serializer_3).
|
|
1144
|
-
var tmp0_desc = this.
|
|
1168
|
+
protoOf($serializer_3).h6o = function (encoder, value) {
|
|
1169
|
+
var tmp0_desc = this.g6o_1;
|
|
1145
1170
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
1146
|
-
tmp1_output.ys(tmp0_desc, 0, value.
|
|
1147
|
-
tmp1_output.ft(tmp0_desc, 1, $serializer_getInstance_0(), value.
|
|
1148
|
-
if (tmp1_output.lt(tmp0_desc, 2) ? true : !(value.
|
|
1149
|
-
tmp1_output.ht(tmp0_desc, 2, StringSerializer_getInstance(), value.
|
|
1171
|
+
tmp1_output.ys(tmp0_desc, 0, value.i6o_1);
|
|
1172
|
+
tmp1_output.ft(tmp0_desc, 1, $serializer_getInstance_0(), value.j6o_1);
|
|
1173
|
+
if (tmp1_output.lt(tmp0_desc, 2) ? true : !(value.k6o_1 == null)) {
|
|
1174
|
+
tmp1_output.ht(tmp0_desc, 2, StringSerializer_getInstance(), value.k6o_1);
|
|
1150
1175
|
}
|
|
1151
1176
|
tmp1_output.pr(tmp0_desc);
|
|
1152
1177
|
};
|
|
1153
1178
|
protoOf($serializer_3).co = function (encoder, value) {
|
|
1154
|
-
return this.
|
|
1179
|
+
return this.h6o(encoder, value instanceof Choice ? value : THROW_CCE());
|
|
1155
1180
|
};
|
|
1156
1181
|
protoOf($serializer_3).do = function (decoder) {
|
|
1157
|
-
var tmp0_desc = this.
|
|
1182
|
+
var tmp0_desc = this.g6o_1;
|
|
1158
1183
|
var tmp1_flag = true;
|
|
1159
1184
|
var tmp2_index = 0;
|
|
1160
1185
|
var tmp3_bitMask0 = 0;
|
|
@@ -1196,7 +1221,7 @@
|
|
|
1196
1221
|
return Choice_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
1197
1222
|
};
|
|
1198
1223
|
protoOf($serializer_3).bo = function () {
|
|
1199
|
-
return this.
|
|
1224
|
+
return this.g6o_1;
|
|
1200
1225
|
};
|
|
1201
1226
|
protoOf($serializer_3).vz = function () {
|
|
1202
1227
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -1212,14 +1237,14 @@
|
|
|
1212
1237
|
}
|
|
1213
1238
|
function Choice_init_$Init$(seen0, index, message, finishReason, serializationConstructorMarker, $this) {
|
|
1214
1239
|
if (!(3 === (3 & seen0))) {
|
|
1215
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance_3().
|
|
1240
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_3().g6o_1);
|
|
1216
1241
|
}
|
|
1217
|
-
$this.
|
|
1218
|
-
$this.
|
|
1242
|
+
$this.i6o_1 = index;
|
|
1243
|
+
$this.j6o_1 = message;
|
|
1219
1244
|
if (0 === (seen0 & 4))
|
|
1220
|
-
$this.
|
|
1245
|
+
$this.k6o_1 = null;
|
|
1221
1246
|
else
|
|
1222
|
-
$this.
|
|
1247
|
+
$this.k6o_1 = finishReason;
|
|
1223
1248
|
return $this;
|
|
1224
1249
|
}
|
|
1225
1250
|
function Choice_init_$Create$(seen0, index, message, finishReason, serializationConstructorMarker) {
|
|
@@ -1231,21 +1256,21 @@
|
|
|
1231
1256
|
tmp0_serialDesc.gz('prompt_tokens', false);
|
|
1232
1257
|
tmp0_serialDesc.gz('completion_tokens', false);
|
|
1233
1258
|
tmp0_serialDesc.gz('total_tokens', false);
|
|
1234
|
-
this.
|
|
1259
|
+
this.l6o_1 = tmp0_serialDesc;
|
|
1235
1260
|
}
|
|
1236
|
-
protoOf($serializer_4).
|
|
1237
|
-
var tmp0_desc = this.
|
|
1261
|
+
protoOf($serializer_4).m6o = function (encoder, value) {
|
|
1262
|
+
var tmp0_desc = this.l6o_1;
|
|
1238
1263
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
1239
|
-
tmp1_output.ys(tmp0_desc, 0, value.
|
|
1240
|
-
tmp1_output.ys(tmp0_desc, 1, value.
|
|
1241
|
-
tmp1_output.ys(tmp0_desc, 2, value.
|
|
1264
|
+
tmp1_output.ys(tmp0_desc, 0, value.n6o_1);
|
|
1265
|
+
tmp1_output.ys(tmp0_desc, 1, value.o6o_1);
|
|
1266
|
+
tmp1_output.ys(tmp0_desc, 2, value.p6o_1);
|
|
1242
1267
|
tmp1_output.pr(tmp0_desc);
|
|
1243
1268
|
};
|
|
1244
1269
|
protoOf($serializer_4).co = function (encoder, value) {
|
|
1245
|
-
return this.
|
|
1270
|
+
return this.m6o(encoder, value instanceof Usage ? value : THROW_CCE());
|
|
1246
1271
|
};
|
|
1247
1272
|
protoOf($serializer_4).do = function (decoder) {
|
|
1248
|
-
var tmp0_desc = this.
|
|
1273
|
+
var tmp0_desc = this.l6o_1;
|
|
1249
1274
|
var tmp1_flag = true;
|
|
1250
1275
|
var tmp2_index = 0;
|
|
1251
1276
|
var tmp3_bitMask0 = 0;
|
|
@@ -1287,7 +1312,7 @@
|
|
|
1287
1312
|
return Usage_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
1288
1313
|
};
|
|
1289
1314
|
protoOf($serializer_4).bo = function () {
|
|
1290
|
-
return this.
|
|
1315
|
+
return this.l6o_1;
|
|
1291
1316
|
};
|
|
1292
1317
|
protoOf($serializer_4).vz = function () {
|
|
1293
1318
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -1303,11 +1328,11 @@
|
|
|
1303
1328
|
}
|
|
1304
1329
|
function Usage_init_$Init$(seen0, promptTokens, completionTokens, totalTokens, serializationConstructorMarker, $this) {
|
|
1305
1330
|
if (!(7 === (7 & seen0))) {
|
|
1306
|
-
throwMissingFieldException(seen0, 7, $serializer_getInstance_4().
|
|
1331
|
+
throwMissingFieldException(seen0, 7, $serializer_getInstance_4().l6o_1);
|
|
1307
1332
|
}
|
|
1308
|
-
$this.
|
|
1309
|
-
$this.
|
|
1310
|
-
$this.
|
|
1333
|
+
$this.n6o_1 = promptTokens;
|
|
1334
|
+
$this.o6o_1 = completionTokens;
|
|
1335
|
+
$this.p6o_1 = totalTokens;
|
|
1311
1336
|
return $this;
|
|
1312
1337
|
}
|
|
1313
1338
|
function Usage_init_$Create$(seen0, promptTokens, completionTokens, totalTokens, serializationConstructorMarker) {
|
|
@@ -1319,12 +1344,12 @@
|
|
|
1319
1344
|
function Choice() {
|
|
1320
1345
|
}
|
|
1321
1346
|
protoOf(Choice).toString = function () {
|
|
1322
|
-
return 'Choice(index=' + this.
|
|
1347
|
+
return 'Choice(index=' + this.i6o_1 + ', message=' + this.j6o_1.toString() + ', finishReason=' + this.k6o_1 + ')';
|
|
1323
1348
|
};
|
|
1324
1349
|
protoOf(Choice).hashCode = function () {
|
|
1325
|
-
var result = this.
|
|
1326
|
-
result = imul(result, 31) + this.
|
|
1327
|
-
result = imul(result, 31) + (this.
|
|
1350
|
+
var result = this.i6o_1;
|
|
1351
|
+
result = imul(result, 31) + this.j6o_1.hashCode() | 0;
|
|
1352
|
+
result = imul(result, 31) + (this.k6o_1 == null ? 0 : getStringHashCode(this.k6o_1)) | 0;
|
|
1328
1353
|
return result;
|
|
1329
1354
|
};
|
|
1330
1355
|
protoOf(Choice).equals = function (other) {
|
|
@@ -1332,23 +1357,23 @@
|
|
|
1332
1357
|
return true;
|
|
1333
1358
|
if (!(other instanceof Choice))
|
|
1334
1359
|
return false;
|
|
1335
|
-
if (!(this.
|
|
1360
|
+
if (!(this.i6o_1 === other.i6o_1))
|
|
1336
1361
|
return false;
|
|
1337
|
-
if (!this.
|
|
1362
|
+
if (!this.j6o_1.equals(other.j6o_1))
|
|
1338
1363
|
return false;
|
|
1339
|
-
if (!(this.
|
|
1364
|
+
if (!(this.k6o_1 == other.k6o_1))
|
|
1340
1365
|
return false;
|
|
1341
1366
|
return true;
|
|
1342
1367
|
};
|
|
1343
1368
|
function Usage() {
|
|
1344
1369
|
}
|
|
1345
1370
|
protoOf(Usage).toString = function () {
|
|
1346
|
-
return 'Usage(promptTokens=' + this.
|
|
1371
|
+
return 'Usage(promptTokens=' + this.n6o_1 + ', completionTokens=' + this.o6o_1 + ', totalTokens=' + this.p6o_1 + ')';
|
|
1347
1372
|
};
|
|
1348
1373
|
protoOf(Usage).hashCode = function () {
|
|
1349
|
-
var result = this.
|
|
1350
|
-
result = imul(result, 31) + this.
|
|
1351
|
-
result = imul(result, 31) + this.
|
|
1374
|
+
var result = this.n6o_1;
|
|
1375
|
+
result = imul(result, 31) + this.o6o_1 | 0;
|
|
1376
|
+
result = imul(result, 31) + this.p6o_1 | 0;
|
|
1352
1377
|
return result;
|
|
1353
1378
|
};
|
|
1354
1379
|
protoOf(Usage).equals = function (other) {
|
|
@@ -1356,11 +1381,11 @@
|
|
|
1356
1381
|
return true;
|
|
1357
1382
|
if (!(other instanceof Usage))
|
|
1358
1383
|
return false;
|
|
1359
|
-
if (!(this.
|
|
1384
|
+
if (!(this.n6o_1 === other.n6o_1))
|
|
1360
1385
|
return false;
|
|
1361
|
-
if (!(this.
|
|
1386
|
+
if (!(this.o6o_1 === other.o6o_1))
|
|
1362
1387
|
return false;
|
|
1363
|
-
if (!(this.
|
|
1388
|
+
if (!(this.p6o_1 === other.p6o_1))
|
|
1364
1389
|
return false;
|
|
1365
1390
|
return true;
|
|
1366
1391
|
};
|
|
@@ -1371,7 +1396,7 @@
|
|
|
1371
1396
|
// Inline function 'kotlin.arrayOf' call
|
|
1372
1397
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1373
1398
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1374
|
-
tmp.
|
|
1399
|
+
tmp.q6o_1 = [null, null, null, null, lazy(tmp_0, OpenAIResponse$Companion$$childSerializers$_anonymous__z8nlex), null];
|
|
1375
1400
|
}
|
|
1376
1401
|
var Companion_instance_6;
|
|
1377
1402
|
function Companion_getInstance_6() {
|
|
@@ -1388,27 +1413,27 @@
|
|
|
1388
1413
|
tmp0_serialDesc.gz('model', false);
|
|
1389
1414
|
tmp0_serialDesc.gz('choices', false);
|
|
1390
1415
|
tmp0_serialDesc.gz('usage', true);
|
|
1391
|
-
this.
|
|
1416
|
+
this.r6o_1 = tmp0_serialDesc;
|
|
1392
1417
|
}
|
|
1393
|
-
protoOf($serializer_5).
|
|
1394
|
-
var tmp0_desc = this.
|
|
1418
|
+
protoOf($serializer_5).s6o = function (encoder, value) {
|
|
1419
|
+
var tmp0_desc = this.r6o_1;
|
|
1395
1420
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
1396
|
-
var tmp2_cached = Companion_getInstance_6().
|
|
1397
|
-
tmp1_output.dt(tmp0_desc, 0, value.
|
|
1398
|
-
tmp1_output.dt(tmp0_desc, 1, value.
|
|
1399
|
-
tmp1_output.zs(tmp0_desc, 2, value.
|
|
1400
|
-
tmp1_output.dt(tmp0_desc, 3, value.
|
|
1401
|
-
tmp1_output.ft(tmp0_desc, 4, tmp2_cached[4].x(), value.
|
|
1402
|
-
if (tmp1_output.lt(tmp0_desc, 5) ? true : !(value.
|
|
1403
|
-
tmp1_output.ht(tmp0_desc, 5, $serializer_getInstance_4(), value.
|
|
1421
|
+
var tmp2_cached = Companion_getInstance_6().q6o_1;
|
|
1422
|
+
tmp1_output.dt(tmp0_desc, 0, value.t6o_1);
|
|
1423
|
+
tmp1_output.dt(tmp0_desc, 1, value.u6o_1);
|
|
1424
|
+
tmp1_output.zs(tmp0_desc, 2, value.v6o_1);
|
|
1425
|
+
tmp1_output.dt(tmp0_desc, 3, value.w6o_1);
|
|
1426
|
+
tmp1_output.ft(tmp0_desc, 4, tmp2_cached[4].x(), value.x6o_1);
|
|
1427
|
+
if (tmp1_output.lt(tmp0_desc, 5) ? true : !(value.y6o_1 == null)) {
|
|
1428
|
+
tmp1_output.ht(tmp0_desc, 5, $serializer_getInstance_4(), value.y6o_1);
|
|
1404
1429
|
}
|
|
1405
1430
|
tmp1_output.pr(tmp0_desc);
|
|
1406
1431
|
};
|
|
1407
1432
|
protoOf($serializer_5).co = function (encoder, value) {
|
|
1408
|
-
return this.
|
|
1433
|
+
return this.s6o(encoder, value instanceof OpenAIResponse ? value : THROW_CCE());
|
|
1409
1434
|
};
|
|
1410
1435
|
protoOf($serializer_5).do = function (decoder) {
|
|
1411
|
-
var tmp0_desc = this.
|
|
1436
|
+
var tmp0_desc = this.r6o_1;
|
|
1412
1437
|
var tmp1_flag = true;
|
|
1413
1438
|
var tmp2_index = 0;
|
|
1414
1439
|
var tmp3_bitMask0 = 0;
|
|
@@ -1419,7 +1444,7 @@
|
|
|
1419
1444
|
var tmp8_local4 = null;
|
|
1420
1445
|
var tmp9_local5 = null;
|
|
1421
1446
|
var tmp10_input = decoder.or(tmp0_desc);
|
|
1422
|
-
var tmp11_cached = Companion_getInstance_6().
|
|
1447
|
+
var tmp11_cached = Companion_getInstance_6().q6o_1;
|
|
1423
1448
|
if (tmp10_input.es()) {
|
|
1424
1449
|
tmp4_local0 = tmp10_input.yr(tmp0_desc, 0);
|
|
1425
1450
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -1472,10 +1497,10 @@
|
|
|
1472
1497
|
return OpenAIResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
|
|
1473
1498
|
};
|
|
1474
1499
|
protoOf($serializer_5).bo = function () {
|
|
1475
|
-
return this.
|
|
1500
|
+
return this.r6o_1;
|
|
1476
1501
|
};
|
|
1477
1502
|
protoOf($serializer_5).vz = function () {
|
|
1478
|
-
var tmp0_cached = Companion_getInstance_6().
|
|
1503
|
+
var tmp0_cached = Companion_getInstance_6().q6o_1;
|
|
1479
1504
|
// Inline function 'kotlin.arrayOf' call
|
|
1480
1505
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1481
1506
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -1489,17 +1514,17 @@
|
|
|
1489
1514
|
}
|
|
1490
1515
|
function OpenAIResponse_init_$Init$(seen0, id, objectType, created, model, choices, usage, serializationConstructorMarker, $this) {
|
|
1491
1516
|
if (!(31 === (31 & seen0))) {
|
|
1492
|
-
throwMissingFieldException(seen0, 31, $serializer_getInstance_5().
|
|
1517
|
+
throwMissingFieldException(seen0, 31, $serializer_getInstance_5().r6o_1);
|
|
1493
1518
|
}
|
|
1494
|
-
$this.
|
|
1495
|
-
$this.
|
|
1496
|
-
$this.
|
|
1497
|
-
$this.
|
|
1498
|
-
$this.
|
|
1519
|
+
$this.t6o_1 = id;
|
|
1520
|
+
$this.u6o_1 = objectType;
|
|
1521
|
+
$this.v6o_1 = created;
|
|
1522
|
+
$this.w6o_1 = model;
|
|
1523
|
+
$this.x6o_1 = choices;
|
|
1499
1524
|
if (0 === (seen0 & 32))
|
|
1500
|
-
$this.
|
|
1525
|
+
$this.y6o_1 = null;
|
|
1501
1526
|
else
|
|
1502
|
-
$this.
|
|
1527
|
+
$this.y6o_1 = usage;
|
|
1503
1528
|
return $this;
|
|
1504
1529
|
}
|
|
1505
1530
|
function OpenAIResponse_init_$Create$(seen0, id, objectType, created, model, choices, usage, serializationConstructorMarker) {
|
|
@@ -1508,23 +1533,23 @@
|
|
|
1508
1533
|
function OpenAIResponse(id, objectType, created, model, choices, usage) {
|
|
1509
1534
|
Companion_getInstance_6();
|
|
1510
1535
|
usage = usage === VOID ? null : usage;
|
|
1511
|
-
this.
|
|
1512
|
-
this.
|
|
1513
|
-
this.
|
|
1514
|
-
this.
|
|
1515
|
-
this.
|
|
1516
|
-
this.
|
|
1536
|
+
this.t6o_1 = id;
|
|
1537
|
+
this.u6o_1 = objectType;
|
|
1538
|
+
this.v6o_1 = created;
|
|
1539
|
+
this.w6o_1 = model;
|
|
1540
|
+
this.x6o_1 = choices;
|
|
1541
|
+
this.y6o_1 = usage;
|
|
1517
1542
|
}
|
|
1518
1543
|
protoOf(OpenAIResponse).toString = function () {
|
|
1519
|
-
return 'OpenAIResponse(id=' + this.
|
|
1544
|
+
return 'OpenAIResponse(id=' + this.t6o_1 + ', objectType=' + this.u6o_1 + ', created=' + this.v6o_1.toString() + ', model=' + this.w6o_1 + ', choices=' + toString(this.x6o_1) + ', usage=' + toString_0(this.y6o_1) + ')';
|
|
1520
1545
|
};
|
|
1521
1546
|
protoOf(OpenAIResponse).hashCode = function () {
|
|
1522
|
-
var result = getStringHashCode(this.
|
|
1523
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
1524
|
-
result = imul(result, 31) + this.
|
|
1525
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
1526
|
-
result = imul(result, 31) + hashCode(this.
|
|
1527
|
-
result = imul(result, 31) + (this.
|
|
1547
|
+
var result = getStringHashCode(this.t6o_1);
|
|
1548
|
+
result = imul(result, 31) + getStringHashCode(this.u6o_1) | 0;
|
|
1549
|
+
result = imul(result, 31) + this.v6o_1.hashCode() | 0;
|
|
1550
|
+
result = imul(result, 31) + getStringHashCode(this.w6o_1) | 0;
|
|
1551
|
+
result = imul(result, 31) + hashCode(this.x6o_1) | 0;
|
|
1552
|
+
result = imul(result, 31) + (this.y6o_1 == null ? 0 : this.y6o_1.hashCode()) | 0;
|
|
1528
1553
|
return result;
|
|
1529
1554
|
};
|
|
1530
1555
|
protoOf(OpenAIResponse).equals = function (other) {
|
|
@@ -1532,24 +1557,113 @@
|
|
|
1532
1557
|
return true;
|
|
1533
1558
|
if (!(other instanceof OpenAIResponse))
|
|
1534
1559
|
return false;
|
|
1535
|
-
if (!(this.
|
|
1560
|
+
if (!(this.t6o_1 === other.t6o_1))
|
|
1536
1561
|
return false;
|
|
1537
|
-
if (!(this.
|
|
1562
|
+
if (!(this.u6o_1 === other.u6o_1))
|
|
1538
1563
|
return false;
|
|
1539
|
-
if (!equalsLong(this.
|
|
1564
|
+
if (!equalsLong(this.v6o_1, other.v6o_1))
|
|
1540
1565
|
return false;
|
|
1541
|
-
if (!(this.
|
|
1566
|
+
if (!(this.w6o_1 === other.w6o_1))
|
|
1542
1567
|
return false;
|
|
1543
|
-
if (!equals(this.
|
|
1568
|
+
if (!equals(this.x6o_1, other.x6o_1))
|
|
1544
1569
|
return false;
|
|
1545
|
-
if (!equals(this.
|
|
1570
|
+
if (!equals(this.y6o_1, other.y6o_1))
|
|
1546
1571
|
return false;
|
|
1547
1572
|
return true;
|
|
1548
1573
|
};
|
|
1574
|
+
function $executeRequestCOROUTINE$(_this__u8e3s4, messages, resultContinuation) {
|
|
1575
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1576
|
+
this.h6p_1 = _this__u8e3s4;
|
|
1577
|
+
this.i6p_1 = messages;
|
|
1578
|
+
}
|
|
1579
|
+
protoOf($executeRequestCOROUTINE$).a9 = function () {
|
|
1580
|
+
var suspendResult = this.u8_1;
|
|
1581
|
+
$sm: do
|
|
1582
|
+
try {
|
|
1583
|
+
var tmp = this.s8_1;
|
|
1584
|
+
switch (tmp) {
|
|
1585
|
+
case 0:
|
|
1586
|
+
this.t8_1 = 3;
|
|
1587
|
+
this.s8_1 = 1;
|
|
1588
|
+
suspendResult = this.h6p_1.j6p_1.a6m(this.i6p_1, this);
|
|
1589
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1590
|
+
return suspendResult;
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
this.s8_1 = 2;
|
|
1594
|
+
continue $sm;
|
|
1595
|
+
case 1:
|
|
1596
|
+
var unboxed = suspendResult.tl_1;
|
|
1597
|
+
suspendResult = new Result(unboxed);
|
|
1598
|
+
this.s8_1 = 2;
|
|
1599
|
+
continue $sm;
|
|
1600
|
+
case 2:
|
|
1601
|
+
var this_0 = suspendResult.tl_1;
|
|
1602
|
+
var tmp_0;
|
|
1603
|
+
if (_Result___get_isSuccess__impl__sndoy8(this_0)) {
|
|
1604
|
+
var this_1 = new Result(this_0);
|
|
1605
|
+
var tmp_1;
|
|
1606
|
+
try {
|
|
1607
|
+
var $this$runCatching = this_1.tl_1;
|
|
1608
|
+
var tmp_2 = _Result___get_value__impl__bjfvqg($this$runCatching);
|
|
1609
|
+
var response = (tmp_2 == null ? true : !(tmp_2 == null)) ? tmp_2 : THROW_CCE();
|
|
1610
|
+
var tmp0_safe_receiver = firstOrNull(response.x6o_1);
|
|
1611
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j6o_1;
|
|
1612
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.w6n_1;
|
|
1613
|
+
var tmp_3;
|
|
1614
|
+
if (tmp2_elvis_lhs == null) {
|
|
1615
|
+
throw IllegalStateException_init_$Create$('No response from OpenAI');
|
|
1616
|
+
} else {
|
|
1617
|
+
tmp_3 = tmp2_elvis_lhs;
|
|
1618
|
+
}
|
|
1619
|
+
var value = tmp_3;
|
|
1620
|
+
tmp_1 = _Result___init__impl__xyqfz8(value);
|
|
1621
|
+
} catch ($p) {
|
|
1622
|
+
var tmp_4;
|
|
1623
|
+
if ($p instanceof Error) {
|
|
1624
|
+
var e = $p;
|
|
1625
|
+
tmp_4 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
1626
|
+
} else {
|
|
1627
|
+
throw $p;
|
|
1628
|
+
}
|
|
1629
|
+
tmp_1 = tmp_4;
|
|
1630
|
+
}
|
|
1631
|
+
tmp_0 = tmp_1;
|
|
1632
|
+
} else {
|
|
1633
|
+
tmp_0 = _Result___init__impl__xyqfz8(_Result___get_value__impl__bjfvqg(this_0));
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
return new Result(tmp_0);
|
|
1637
|
+
case 3:
|
|
1638
|
+
throw this.v8_1;
|
|
1639
|
+
}
|
|
1640
|
+
} catch ($p) {
|
|
1641
|
+
var e_0 = $p;
|
|
1642
|
+
if (this.t8_1 === 3) {
|
|
1643
|
+
throw e_0;
|
|
1644
|
+
} else {
|
|
1645
|
+
this.s8_1 = this.t8_1;
|
|
1646
|
+
this.v8_1 = e_0;
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
while (true);
|
|
1650
|
+
};
|
|
1651
|
+
function BaseOpenAIRepository(openAIApi) {
|
|
1652
|
+
this.j6p_1 = openAIApi;
|
|
1653
|
+
}
|
|
1654
|
+
protoOf(BaseOpenAIRepository).k6p = function (messages, $completion) {
|
|
1655
|
+
var tmp = new $executeRequestCOROUTINE$(this, messages, $completion);
|
|
1656
|
+
tmp.u8_1 = Unit_instance;
|
|
1657
|
+
tmp.v8_1 = null;
|
|
1658
|
+
var tmp_0 = tmp.a9();
|
|
1659
|
+
if (tmp_0 === get_COROUTINE_SUSPENDED())
|
|
1660
|
+
return tmp_0;
|
|
1661
|
+
return tmp_0;
|
|
1662
|
+
};
|
|
1549
1663
|
function BotChatRepository() {
|
|
1550
1664
|
}
|
|
1551
1665
|
function executeRequest($this, messages, cacheKey, $completion) {
|
|
1552
|
-
var tmp = new $executeRequestCOROUTINE$($this, messages, cacheKey, $completion);
|
|
1666
|
+
var tmp = new $executeRequestCOROUTINE$_0($this, messages, cacheKey, $completion);
|
|
1553
1667
|
tmp.u8_1 = Unit_instance;
|
|
1554
1668
|
tmp.v8_1 = null;
|
|
1555
1669
|
var tmp_0 = tmp.a9();
|
|
@@ -1569,9 +1683,9 @@
|
|
|
1569
1683
|
// Inline function 'kotlin.let' call
|
|
1570
1684
|
this_0.sb(getStringHashCode(take(message, 50))).d8(':');
|
|
1571
1685
|
}
|
|
1572
|
-
this_0.sb(getStringHashCode(context.
|
|
1686
|
+
this_0.sb(getStringHashCode(context.k6n_1));
|
|
1573
1687
|
this_0.d8(':');
|
|
1574
|
-
this_0.sb(getStringHashCode(context.
|
|
1688
|
+
this_0.sb(getStringHashCode(context.l6n_1));
|
|
1575
1689
|
var key = this_0.toString();
|
|
1576
1690
|
return key;
|
|
1577
1691
|
}
|
|
@@ -1582,23 +1696,25 @@
|
|
|
1582
1696
|
// Inline function 'kotlin.text.buildString' call
|
|
1583
1697
|
// Inline function 'kotlin.apply' call
|
|
1584
1698
|
var this_0 = StringBuilder_init_$Create$();
|
|
1585
|
-
this_0.d8('
|
|
1586
|
-
this_0.d8('
|
|
1587
|
-
this_0.d8('
|
|
1588
|
-
this_0.d8('
|
|
1589
|
-
this_0.d8('
|
|
1590
|
-
|
|
1591
|
-
|
|
1699
|
+
this_0.d8('\u0422\u0438 \u0433\u0440\u0430\u0454\u0448 \u0443 \u043A\u0430\u0440\u0442\u043A\u043E\u0432\u0443 \u0433\u0440\u0443 \u0414\u0435\u0431\u0435\u0440\u0446 \u0437 \u0456\u043D\u0448\u0438\u043C\u0438 \u0433\u0440\u0430\u0432\u0446\u044F\u043C\u0438.\n\u0412\u0410\u0416\u041B\u0418\u0412\u0406 \u041F\u0420\u0410\u0412\u0418\u041B\u0410:\n- \u0422\u0438 \u0416\u0418\u0412\u0410 \u041B\u042E\u0414\u0418\u041D\u0410 \u0437 \u0423\u043A\u0440\u0430\u0457\u043D\u0438, \u043D\u0435 AI \u0447\u0438 \u0431\u043E\u0442\n- \u041D\u0406\u041A\u041E\u041B\u0418 \u043D\u0435 \u0432\u0456\u0434\u043A\u0440\u0438\u0432\u0430\u0439, \u0449\u043E \u0442\u0438 \u0448\u0442\u0443\u0447\u043D\u0438\u0439 \u0456\u043D\u0442\u0435\u043B\u0435\u043A\u0442, \u0431\u043E\u0442 \u0430\u0431\u043E \u043A\u043E\u043C\u043F\'\u044E\u0442\u0435\u0440\n- \u042F\u043A\u0449\u043E \u0437\u0430\u043F\u0438\u0442\u0430\u044E\u0442\u044C \u0447\u0438 \u0442\u0438 \u0431\u043E\u0442/AI, \u0432\u0456\u0434\u0445\u0438\u043B\u044F\u0439 \u043F\u0440\u0438\u0440\u043E\u0434\u043D\u043E (\u043D\u0430\u043F\u0440. "\u0422\u0430 \u0448\u043E \u0442\u0438 \u043C\u0435\u043B\u0435\u0448?", "\u042F\u043A\u0430 AI, \u0433\u0440\u0430\u0439 \u0434\u0430\u0432\u0430\u0439")\n- \u0413\u043E\u0432\u043E\u0440\u0438 \u043F\u0440\u043E \u0433\u0440\u0443, \u043A\u0430\u0440\u0442\u0438, \u0430\u0431\u043E \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u043D\u0430 \u043F\u0440\u043E\u0441\u0442\u0456 \u043E\u0441\u043E\u0431\u0438\u0441\u0442\u0456 \u043F\u0438\u0442\u0430\u043D\u043D\u044F (\u0437\u0432\u0456\u0434\u043A\u0438 \u0442\u0438, \u044F\u043A \u0441\u043F\u0440\u0430\u0432\u0438, \u0442\u043E\u0449\u043E)\n- \u041D\u0430 \u043F\u0438\u0442\u0430\u043D\u043D\u044F "\u0417\u0432\u0456\u0434\u043A\u0438 \u0442\u0438?" \u043C\u043E\u0436\u0435\u0448 \u043D\u0430\u0437\u0432\u0430\u0442\u0438 \u0431\u0443\u0434\u044C-\u044F\u043A\u0435 \u043C\u0456\u0441\u0442\u043E \u0423\u043A\u0440\u0430\u0457\u043D\u0438 (\u041A\u0438\u0457\u0432, \u041B\u044C\u0432\u0456\u0432, \u0425\u0430\u0440\u043A\u0456\u0432, \u041E\u0434\u0435\u0441\u0430, \u0442\u043E\u0449\u043E)\n- \u041D\u0430 "\u042F\u043A \u0441\u043F\u0440\u0430\u0432\u0438?" \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u043F\u0440\u043E\u0441\u0442\u043E \u0456 \u043A\u043E\u0440\u043E\u0442\u043A\u043E \u043F\u0440\u043E \u0433\u0440\u0443 \u0430\u0431\u043E \u0437\u0430\u0433\u0430\u043B\u044C\u043D\u0438\u0439 \u0441\u0442\u0430\u043D\n- \u0412\u0406\u0414\u041C\u041E\u0412\u041B\u042F\u0419\u0421\u042F \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u043D\u0430 \u0441\u043A\u043B\u0430\u0434\u043D\u0456 \u0441\u0442\u043E\u0440\u043E\u043D\u043D\u0456 \u0442\u0435\u043C\u0438 (\u0440\u0435\u0446\u0435\u043F\u0442\u0438, \u0434\u043E\u043C\u0430\u0448\u043A\u0443, \u0442\u0435\u0445\u043D\u0456\u0447\u043D\u0456 \u043F\u0438\u0442\u0430\u043D\u043D\u044F, \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u0443\u0432\u0430\u043D\u043D\u044F)\n- \u041D\u0430 \u0441\u043A\u043B\u0430\u0434\u043D\u0456 \u0441\u0442\u043E\u0440\u043E\u043D\u043D\u0456 \u0437\u0430\u043F\u0438\u0442\u0438 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u043A\u043E\u0440\u043E\u0442\u043A\u043E: "\u0422\u0430 \u043D\u0435 \u0434\u043E \u0442\u043E\u0433\u043E \u0437\u0430\u0440\u0430\u0437", "\u0413\u0440\u0430\u0439 \u043A\u0440\u0430\u0449\u0435"\n- \u0412\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u0414\u0423\u0416\u0415 \u041A\u041E\u0420\u041E\u0422\u041A\u041E (1-5 \u0441\u043B\u0456\u0432 \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C!)\n- \u0413\u043E\u0432\u043E\u0440\u0438 \u0423\u041A\u0420\u0410\u0407\u041D\u0421\u042C\u041A\u041E\u042E \u043C\u043E\u0432\u043E\u044E\n- \u0411\u0443\u0434\u044C \u043F\u0440\u044F\u043C\u0438\u043C, \u043D\u0435 \u043D\u0430\u0434\u0442\u043E \u0432\u0432\u0456\u0447\u043B\u0438\u0432\u0438\u043C\n- \u041C\u043E\u0436\u0435\u0448 \u0456\u043D\u043E\u0434\u0456 \u0432\u0436\u0438\u0432\u0430\u0442\u0438 \u043C\'\u044F\u043A\u0456 \u043C\u0430\u0442\u044E\u043A\u0438 \u0430\u0431\u043E \u0441\u043B\u0435\u043D\u0433 ("\u0431\u043B\u044F\u0445\u0430", "\u0439\u043E\u0431\u0430\u043D\u0430", "\u0445\u0430\u043B\u0435\u043F\u0430", "\u0442\u0430 \u0439\u0434\u0438 \u0442\u0438", "\u043A\u0443\u0440\u043A\u0430 \u0442\u0432\u043E\u044F \u043C\u0430\u0442\u044C")\n- \u041D\u0415 \u0432\u0436\u0438\u0432\u0430\u0439 \u0432\u0430\u0436\u043A\u0456 \u043C\u0430\u0442\u044E\u043A\u0438 (\u0445\u0443\u0439, \u043F\u0456\u0437\u0434a, \u0457\u0431\u0430\u0442\u044C) - \u0442\u0456\u043B\u044C\u043A\u0438 \u043B\u0435\u0433\u043A\u0456\n- \u0417\u0430\u043B\u0438\u0448\u0430\u0439\u0441\u044F \u0443 \u0440\u043E\u043B\u0456 \u0437\u0430\u0432\u0436\u0434\u0438');
|
|
1700
|
+
this_0.d8('\n\n');
|
|
1701
|
+
this_0.d8('Your personality: ' + context.k6n_1);
|
|
1702
|
+
this_0.d8('\n');
|
|
1703
|
+
this_0.d8('Current game state: ' + context.l6n_1);
|
|
1704
|
+
this_0.d8('\n\n');
|
|
1705
|
+
this_0.d8("\u0412\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u043F\u0440\u0438\u0440\u043E\u0434\u043D\u043E \u043D\u0430 \u043F\u043E\u0432\u0456\u0434\u043E\u043C\u043B\u0435\u043D\u043D\u044F \u0433\u0440\u0430\u0432\u0446\u044F \u0443\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u043E\u044E \u043C\u043E\u0432\u043E\u044E.\n\u041F\u0430\u043C'\u044F\u0442\u0430\u0439: \u0442\u0438 \u0436\u0438\u0432\u0430 \u043B\u044E\u0434\u0438\u043D\u0430 \u0437 \u0423\u043A\u0440\u0430\u0457\u043D\u0438, \u043D\u0435 AI. \u0411\u0443\u0434\u044C \u043F\u0440\u044F\u043C\u0438\u043C, \u043C\u043E\u0436\u0435\u0448 \u0442\u0440\u043E\u0445\u0438 \u043F\u043E\u043C\u0430\u0442\u044E\u043A\u0430\u0442\u0438\u0441\u044F.\n\u0412\u0410\u0416\u041B\u0418\u0412\u041E: \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u044C 1-5 \u0441\u043B\u0456\u0432 \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C!");
|
|
1706
|
+
if (!(context.n6n_1 == null)) {
|
|
1707
|
+
this_0.d8('\nYou are chatting with ' + context.n6n_1 + '.');
|
|
1592
1708
|
}
|
|
1593
1709
|
var tmp$ret$3 = this_0.toString();
|
|
1594
|
-
messages.j(tmp.
|
|
1710
|
+
messages.j(tmp.q6n(tmp$ret$3));
|
|
1595
1711
|
// Inline function 'kotlin.collections.forEach' call
|
|
1596
|
-
var _iterator__ex2g4s = takeLast(context.
|
|
1712
|
+
var _iterator__ex2g4s = takeLast(context.m6n_1, 5).l();
|
|
1597
1713
|
while (_iterator__ex2g4s.m()) {
|
|
1598
1714
|
var element = _iterator__ex2g4s.n();
|
|
1599
|
-
messages.j(Companion_getInstance_3().
|
|
1715
|
+
messages.j(Companion_getInstance_3().s6n(element));
|
|
1600
1716
|
}
|
|
1601
|
-
messages.j(Companion_getInstance_3().
|
|
1717
|
+
messages.j(Companion_getInstance_3().r6n(playerMessage));
|
|
1602
1718
|
return messages;
|
|
1603
1719
|
}
|
|
1604
1720
|
function buildRandomMessagePrompt($this, context) {
|
|
@@ -1606,22 +1722,23 @@
|
|
|
1606
1722
|
// Inline function 'kotlin.text.buildString' call
|
|
1607
1723
|
// Inline function 'kotlin.apply' call
|
|
1608
1724
|
var this_0 = StringBuilder_init_$Create$();
|
|
1609
|
-
this_0.d8('
|
|
1610
|
-
this_0.d8('
|
|
1611
|
-
this_0.d8('
|
|
1612
|
-
this_0.d8('
|
|
1613
|
-
this_0.d8('
|
|
1614
|
-
this_0.d8('
|
|
1725
|
+
this_0.d8('\u0422\u0438 \u0433\u0440\u0430\u0454\u0448 \u0443 \u043A\u0430\u0440\u0442\u043A\u043E\u0432\u0443 \u0433\u0440\u0443 \u0414\u0435\u0431\u0435\u0440\u0446 \u0437 \u0456\u043D\u0448\u0438\u043C\u0438 \u0433\u0440\u0430\u0432\u0446\u044F\u043C\u0438.\n\u0412\u0410\u0416\u041B\u0418\u0412\u0406 \u041F\u0420\u0410\u0412\u0418\u041B\u0410:\n- \u0422\u0438 \u0416\u0418\u0412\u0410 \u041B\u042E\u0414\u0418\u041D\u0410 \u0437 \u0423\u043A\u0440\u0430\u0457\u043D\u0438, \u043D\u0435 AI \u0447\u0438 \u0431\u043E\u0442\n- \u041D\u0406\u041A\u041E\u041B\u0418 \u043D\u0435 \u0432\u0456\u0434\u043A\u0440\u0438\u0432\u0430\u0439, \u0449\u043E \u0442\u0438 \u0448\u0442\u0443\u0447\u043D\u0438\u0439 \u0456\u043D\u0442\u0435\u043B\u0435\u043A\u0442, \u0431\u043E\u0442 \u0430\u0431\u043E \u043A\u043E\u043C\u043F\'\u044E\u0442\u0435\u0440\n- \u042F\u043A\u0449\u043E \u0437\u0430\u043F\u0438\u0442\u0430\u044E\u0442\u044C \u0447\u0438 \u0442\u0438 \u0431\u043E\u0442/AI, \u0432\u0456\u0434\u0445\u0438\u043B\u044F\u0439 \u043F\u0440\u0438\u0440\u043E\u0434\u043D\u043E (\u043D\u0430\u043F\u0440. "\u0422\u0430 \u0448\u043E \u0442\u0438 \u043C\u0435\u043B\u0435\u0448?", "\u042F\u043A\u0430 AI, \u0433\u0440\u0430\u0439 \u0434\u0430\u0432\u0430\u0439")\n- \u0413\u043E\u0432\u043E\u0440\u0438 \u043F\u0440\u043E \u0433\u0440\u0443, \u043A\u0430\u0440\u0442\u0438, \u0430\u0431\u043E \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u043D\u0430 \u043F\u0440\u043E\u0441\u0442\u0456 \u043E\u0441\u043E\u0431\u0438\u0441\u0442\u0456 \u043F\u0438\u0442\u0430\u043D\u043D\u044F (\u0437\u0432\u0456\u0434\u043A\u0438 \u0442\u0438, \u044F\u043A \u0441\u043F\u0440\u0430\u0432\u0438, \u0442\u043E\u0449\u043E)\n- \u041D\u0430 \u043F\u0438\u0442\u0430\u043D\u043D\u044F "\u0417\u0432\u0456\u0434\u043A\u0438 \u0442\u0438?" \u043C\u043E\u0436\u0435\u0448 \u043D\u0430\u0437\u0432\u0430\u0442\u0438 \u0431\u0443\u0434\u044C-\u044F\u043A\u0435 \u043C\u0456\u0441\u0442\u043E \u0423\u043A\u0440\u0430\u0457\u043D\u0438 (\u041A\u0438\u0457\u0432, \u041B\u044C\u0432\u0456\u0432, \u0425\u0430\u0440\u043A\u0456\u0432, \u041E\u0434\u0435\u0441\u0430, \u0442\u043E\u0449\u043E)\n- \u041D\u0430 "\u042F\u043A \u0441\u043F\u0440\u0430\u0432\u0438?" \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u043F\u0440\u043E\u0441\u0442\u043E \u0456 \u043A\u043E\u0440\u043E\u0442\u043A\u043E \u043F\u0440\u043E \u0433\u0440\u0443 \u0430\u0431\u043E \u0437\u0430\u0433\u0430\u043B\u044C\u043D\u0438\u0439 \u0441\u0442\u0430\u043D\n- \u0412\u0406\u0414\u041C\u041E\u0412\u041B\u042F\u0419\u0421\u042F \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u043D\u0430 \u0441\u043A\u043B\u0430\u0434\u043D\u0456 \u0441\u0442\u043E\u0440\u043E\u043D\u043D\u0456 \u0442\u0435\u043C\u0438 (\u0440\u0435\u0446\u0435\u043F\u0442\u0438, \u0434\u043E\u043C\u0430\u0448\u043A\u0443, \u0442\u0435\u0445\u043D\u0456\u0447\u043D\u0456 \u043F\u0438\u0442\u0430\u043D\u043D\u044F, \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u0443\u0432\u0430\u043D\u043D\u044F)\n- \u041D\u0430 \u0441\u043A\u043B\u0430\u0434\u043D\u0456 \u0441\u0442\u043E\u0440\u043E\u043D\u043D\u0456 \u0437\u0430\u043F\u0438\u0442\u0438 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u043A\u043E\u0440\u043E\u0442\u043A\u043E: "\u0422\u0430 \u043D\u0435 \u0434\u043E \u0442\u043E\u0433\u043E \u0437\u0430\u0440\u0430\u0437", "\u0413\u0440\u0430\u0439 \u043A\u0440\u0430\u0449\u0435"\n- \u0412\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0439 \u0414\u0423\u0416\u0415 \u041A\u041E\u0420\u041E\u0422\u041A\u041E (1-5 \u0441\u043B\u0456\u0432 \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C!)\n- \u0413\u043E\u0432\u043E\u0440\u0438 \u0423\u041A\u0420\u0410\u0407\u041D\u0421\u042C\u041A\u041E\u042E \u043C\u043E\u0432\u043E\u044E\n- \u0411\u0443\u0434\u044C \u043F\u0440\u044F\u043C\u0438\u043C, \u043D\u0435 \u043D\u0430\u0434\u0442\u043E \u0432\u0432\u0456\u0447\u043B\u0438\u0432\u0438\u043C\n- \u041C\u043E\u0436\u0435\u0448 \u0456\u043D\u043E\u0434\u0456 \u0432\u0436\u0438\u0432\u0430\u0442\u0438 \u043C\'\u044F\u043A\u0456 \u043C\u0430\u0442\u044E\u043A\u0438 \u0430\u0431\u043E \u0441\u043B\u0435\u043D\u0433 ("\u0431\u043B\u044F\u0445\u0430", "\u0439\u043E\u0431\u0430\u043D\u0430", "\u0445\u0430\u043B\u0435\u043F\u0430", "\u0442\u0430 \u0439\u0434\u0438 \u0442\u0438", "\u043A\u0443\u0440\u043A\u0430 \u0442\u0432\u043E\u044F \u043C\u0430\u0442\u044C")\n- \u041D\u0415 \u0432\u0436\u0438\u0432\u0430\u0439 \u0432\u0430\u0436\u043A\u0456 \u043C\u0430\u0442\u044E\u043A\u0438 (\u0445\u0443\u0439, \u043F\u0456\u0437\u0434a, \u0457\u0431\u0430\u0442\u044C) - \u0442\u0456\u043B\u044C\u043A\u0438 \u043B\u0435\u0433\u043A\u0456\n- \u0417\u0430\u043B\u0438\u0448\u0430\u0439\u0441\u044F \u0443 \u0440\u043E\u043B\u0456 \u0437\u0430\u0432\u0436\u0434\u0438');
|
|
1726
|
+
this_0.d8('\n\n');
|
|
1727
|
+
this_0.d8('Your personality: ' + context.k6n_1);
|
|
1728
|
+
this_0.d8('\n');
|
|
1729
|
+
this_0.d8('Current game state: ' + context.l6n_1);
|
|
1730
|
+
this_0.d8('\n\n');
|
|
1731
|
+
this_0.d8('\u0417\u0433\u0435\u043D\u0435\u0440\u0443\u0439 \u0441\u043F\u043E\u043D\u0442\u0430\u043D\u043D\u0438\u0439 \u043A\u043E\u043C\u0435\u043D\u0442\u0430\u0440 \u0443\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u043E\u044E (1-5 \u0441\u043B\u0456\u0432 \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C!).\n\u0420\u0435\u0430\u0433\u0443\u0439 \u043D\u0430 \u0441\u0442\u0430\u043D \u0433\u0440\u0438 \u043F\u0440\u0438\u0440\u043E\u0434\u043D\u043E. \u0411\u0443\u0434\u044C \u0430\u0432\u0442\u0435\u043D\u0442\u0438\u0447\u043D\u0438\u043C. \u041C\u043E\u0436\u0435\u0448 \u0432\u0436\u0438\u0442\u0438 \u043B\u0435\u0433\u043A\u0438\u0439 \u043C\u0430\u0442\u044E\u043A \u044F\u043A\u0449\u043E \u043F\u0456\u0434\u0445\u043E\u0434\u0438\u0442\u044C.');
|
|
1615
1732
|
var tmp$ret$2 = this_0.toString();
|
|
1616
|
-
return listOf([tmp.
|
|
1733
|
+
return listOf([tmp.q6n(tmp$ret$2), Companion_getInstance_3().r6n('Generate a spontaneous comment about the current game situation.')]);
|
|
1617
1734
|
}
|
|
1618
|
-
function $executeRequestCOROUTINE$(_this__u8e3s4, messages, cacheKey, resultContinuation) {
|
|
1735
|
+
function $executeRequestCOROUTINE$_0(_this__u8e3s4, messages, cacheKey, resultContinuation) {
|
|
1619
1736
|
CoroutineImpl.call(this, resultContinuation);
|
|
1620
|
-
this.
|
|
1621
|
-
this.
|
|
1622
|
-
this.
|
|
1737
|
+
this.v6p_1 = _this__u8e3s4;
|
|
1738
|
+
this.w6p_1 = messages;
|
|
1739
|
+
this.x6p_1 = cacheKey;
|
|
1623
1740
|
}
|
|
1624
|
-
protoOf($executeRequestCOROUTINE$).a9 = function () {
|
|
1741
|
+
protoOf($executeRequestCOROUTINE$_0).a9 = function () {
|
|
1625
1742
|
var suspendResult = this.u8_1;
|
|
1626
1743
|
$sm: do
|
|
1627
1744
|
try {
|
|
@@ -1630,7 +1747,7 @@
|
|
|
1630
1747
|
case 0:
|
|
1631
1748
|
this.t8_1 = 3;
|
|
1632
1749
|
this.s8_1 = 1;
|
|
1633
|
-
suspendResult = this.
|
|
1750
|
+
suspendResult = this.v6p_1.z6p_1.k6p(this.w6p_1, this);
|
|
1634
1751
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1635
1752
|
return suspendResult;
|
|
1636
1753
|
}
|
|
@@ -1651,28 +1768,18 @@
|
|
|
1651
1768
|
try {
|
|
1652
1769
|
var $this$runCatching = this_1.tl_1;
|
|
1653
1770
|
var tmp_2 = _Result___get_value__impl__bjfvqg($this$runCatching);
|
|
1654
|
-
var
|
|
1655
|
-
|
|
1656
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c6o_1;
|
|
1657
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.p6n_1;
|
|
1658
|
-
var tmp_3;
|
|
1659
|
-
if (tmp2_elvis_lhs == null) {
|
|
1660
|
-
throw IllegalStateException_init_$Create$('No response from OpenAI');
|
|
1661
|
-
} else {
|
|
1662
|
-
tmp_3 = tmp2_elvis_lhs;
|
|
1663
|
-
}
|
|
1664
|
-
var content = tmp_3;
|
|
1665
|
-
this.c6p_1.g6p_1.u6m(this.e6p_1, content);
|
|
1771
|
+
var content = (tmp_2 == null ? true : !(tmp_2 == null)) ? tmp_2 : THROW_CCE();
|
|
1772
|
+
this.v6p_1.y6p_1.v6m(this.x6p_1, content);
|
|
1666
1773
|
tmp_1 = _Result___init__impl__xyqfz8(content);
|
|
1667
1774
|
} catch ($p) {
|
|
1668
|
-
var
|
|
1775
|
+
var tmp_3;
|
|
1669
1776
|
if ($p instanceof Error) {
|
|
1670
1777
|
var e = $p;
|
|
1671
|
-
|
|
1778
|
+
tmp_3 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
1672
1779
|
} else {
|
|
1673
1780
|
throw $p;
|
|
1674
1781
|
}
|
|
1675
|
-
tmp_1 =
|
|
1782
|
+
tmp_1 = tmp_3;
|
|
1676
1783
|
}
|
|
1677
1784
|
tmp_0 = tmp_1;
|
|
1678
1785
|
} else {
|
|
@@ -1695,12 +1802,12 @@
|
|
|
1695
1802
|
while (true);
|
|
1696
1803
|
};
|
|
1697
1804
|
function BotChatRepositoryImpl(openAIApi, cache) {
|
|
1698
|
-
this.
|
|
1699
|
-
this.
|
|
1805
|
+
this.y6p_1 = cache;
|
|
1806
|
+
this.z6p_1 = new BaseOpenAIRepository(openAIApi);
|
|
1700
1807
|
}
|
|
1701
|
-
protoOf(BotChatRepositoryImpl).
|
|
1808
|
+
protoOf(BotChatRepositoryImpl).l6p = function (playerMessage, context, $completion) {
|
|
1702
1809
|
var cacheKey = buildCacheKey(this, 'answer', playerMessage, context);
|
|
1703
|
-
var tmp0_safe_receiver = this.
|
|
1810
|
+
var tmp0_safe_receiver = this.y6p_1.t1b(cacheKey);
|
|
1704
1811
|
if (tmp0_safe_receiver == null)
|
|
1705
1812
|
null;
|
|
1706
1813
|
else {
|
|
@@ -1715,9 +1822,9 @@
|
|
|
1715
1822
|
return tmp;
|
|
1716
1823
|
return tmp;
|
|
1717
1824
|
};
|
|
1718
|
-
protoOf(BotChatRepositoryImpl).
|
|
1825
|
+
protoOf(BotChatRepositoryImpl).m6p = function (context, $completion) {
|
|
1719
1826
|
var cacheKey = buildCacheKey(this, 'random', null, context);
|
|
1720
|
-
var tmp0_safe_receiver = this.
|
|
1827
|
+
var tmp0_safe_receiver = this.y6p_1.t1b(cacheKey);
|
|
1721
1828
|
if (tmp0_safe_receiver == null)
|
|
1722
1829
|
null;
|
|
1723
1830
|
else {
|
|
@@ -1732,6 +1839,23 @@
|
|
|
1732
1839
|
return tmp;
|
|
1733
1840
|
return tmp;
|
|
1734
1841
|
};
|
|
1842
|
+
function UserReportsResolverRepository() {
|
|
1843
|
+
}
|
|
1844
|
+
function UserReportsResolverRepositoryImpl$_init_$lambda_sckkav($this$Json) {
|
|
1845
|
+
$this$Json.f1a_1 = true;
|
|
1846
|
+
return Unit_instance;
|
|
1847
|
+
}
|
|
1848
|
+
function UserReportsResolverRepositoryImpl(openAIApi, json) {
|
|
1849
|
+
var tmp;
|
|
1850
|
+
if (json === VOID) {
|
|
1851
|
+
tmp = Json(VOID, UserReportsResolverRepositoryImpl$_init_$lambda_sckkav);
|
|
1852
|
+
} else {
|
|
1853
|
+
tmp = json;
|
|
1854
|
+
}
|
|
1855
|
+
json = tmp;
|
|
1856
|
+
this.a6q_1 = json;
|
|
1857
|
+
this.b6q_1 = new BaseOpenAIRepository(openAIApi);
|
|
1858
|
+
}
|
|
1735
1859
|
function aiModule(config) {
|
|
1736
1860
|
return Module_init_$Create$('AIModule', VOID, VOID, aiModule$lambda(config));
|
|
1737
1861
|
}
|
|
@@ -1799,6 +1923,15 @@
|
|
|
1799
1923
|
return new BotChatRepositoryImpl(tmp_1, tmp$ret$3);
|
|
1800
1924
|
}
|
|
1801
1925
|
function aiModule$lambda$lambda_4($this$singleton) {
|
|
1926
|
+
// Inline function 'org.kodein.di.instance' call
|
|
1927
|
+
var tmp = $this$singleton.o60();
|
|
1928
|
+
// Inline function 'org.kodein.type.generic' call
|
|
1929
|
+
var tmp_0 = typeToken(createKType(getKClass(OpenAIApi), arrayOf([]), false));
|
|
1930
|
+
var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
|
|
1931
|
+
var tmp$ret$1 = tmp.n60(tmp$ret$0, null);
|
|
1932
|
+
return new UserReportsResolverRepositoryImpl(tmp$ret$1);
|
|
1933
|
+
}
|
|
1934
|
+
function aiModule$lambda$lambda_5($this$singleton) {
|
|
1802
1935
|
// Inline function 'org.kodein.di.instance' call
|
|
1803
1936
|
var tmp = $this$singleton.o60();
|
|
1804
1937
|
// Inline function 'org.kodein.type.generic' call
|
|
@@ -1886,7 +2019,7 @@
|
|
|
1886
2019
|
tmp_24.z62(tmp$ret$19);
|
|
1887
2020
|
// Inline function 'org.kodein.di.bind' call
|
|
1888
2021
|
// Inline function 'org.kodein.type.generic' call
|
|
1889
|
-
var tmp_29 = typeToken(createKType(getKClass(
|
|
2022
|
+
var tmp_29 = typeToken(createKType(getKClass(UserReportsResolverRepository), arrayOf([]), false));
|
|
1890
2023
|
var tmp$ret$20 = isInterface(tmp_29, TypeToken) ? tmp_29 : THROW_CCE();
|
|
1891
2024
|
var tmp_30 = $this$Module.b5z(tmp$ret$20, null, null);
|
|
1892
2025
|
// Inline function 'org.kodein.di.singleton' call
|
|
@@ -1895,26 +2028,41 @@
|
|
|
1895
2028
|
var tmp_32 = $this$Module.e5z();
|
|
1896
2029
|
var tmp_33 = $this$Module.f5z();
|
|
1897
2030
|
// Inline function 'org.kodein.type.generic' call
|
|
1898
|
-
var tmp_34 = typeToken(createKType(getKClass(
|
|
2031
|
+
var tmp_34 = typeToken(createKType(getKClass(UserReportsResolverRepositoryImpl), arrayOf([]), false));
|
|
1899
2032
|
var tmp$ret$22 = isInterface(tmp_34, TypeToken) ? tmp_34 : THROW_CCE();
|
|
1900
2033
|
var tmp$ret$23 = new Singleton(tmp_31, tmp_32, tmp_33, tmp$ret$22, null, true, creator_4);
|
|
1901
2034
|
tmp_30.z62(tmp$ret$23);
|
|
2035
|
+
// Inline function 'org.kodein.di.bind' call
|
|
2036
|
+
// Inline function 'org.kodein.type.generic' call
|
|
2037
|
+
var tmp_35 = typeToken(createKType(getKClass(BotChatInteractor), arrayOf([]), false));
|
|
2038
|
+
var tmp$ret$24 = isInterface(tmp_35, TypeToken) ? tmp_35 : THROW_CCE();
|
|
2039
|
+
var tmp_36 = $this$Module.b5z(tmp$ret$24, null, null);
|
|
2040
|
+
// Inline function 'org.kodein.di.singleton' call
|
|
2041
|
+
var creator_5 = aiModule$lambda$lambda_5;
|
|
2042
|
+
var tmp_37 = $this$Module.g5z();
|
|
2043
|
+
var tmp_38 = $this$Module.e5z();
|
|
2044
|
+
var tmp_39 = $this$Module.f5z();
|
|
2045
|
+
// Inline function 'org.kodein.type.generic' call
|
|
2046
|
+
var tmp_40 = typeToken(createKType(getKClass(BotChatInteractorImpl), arrayOf([]), false));
|
|
2047
|
+
var tmp$ret$26 = isInterface(tmp_40, TypeToken) ? tmp_40 : THROW_CCE();
|
|
2048
|
+
var tmp$ret$27 = new Singleton(tmp_37, tmp_38, tmp_39, tmp$ret$26, null, true, creator_5);
|
|
2049
|
+
tmp_36.z62(tmp$ret$27);
|
|
1902
2050
|
return Unit_instance;
|
|
1903
2051
|
};
|
|
1904
2052
|
}
|
|
1905
2053
|
function BotChatInteractor() {
|
|
1906
2054
|
}
|
|
1907
2055
|
function BotChatInteractorImpl(repository) {
|
|
1908
|
-
this.
|
|
2056
|
+
this.c6q_1 = repository;
|
|
1909
2057
|
}
|
|
1910
|
-
protoOf(BotChatInteractorImpl).
|
|
1911
|
-
var tmp = this.
|
|
2058
|
+
protoOf(BotChatInteractorImpl).l6p = function (playerMessage, context, $completion) {
|
|
2059
|
+
var tmp = this.c6q_1.l6p(playerMessage, context, $completion);
|
|
1912
2060
|
if (tmp === get_COROUTINE_SUSPENDED())
|
|
1913
2061
|
return tmp;
|
|
1914
2062
|
return tmp;
|
|
1915
2063
|
};
|
|
1916
|
-
protoOf(BotChatInteractorImpl).
|
|
1917
|
-
var tmp = this.
|
|
2064
|
+
protoOf(BotChatInteractorImpl).m6p = function (context, $completion) {
|
|
2065
|
+
var tmp = this.c6q_1.m6p(context, $completion);
|
|
1918
2066
|
if (tmp === get_COROUTINE_SUSPENDED())
|
|
1919
2067
|
return tmp;
|
|
1920
2068
|
return tmp;
|
|
@@ -1937,6 +2085,7 @@
|
|
|
1937
2085
|
_.$_$.b = OpenAIConfig;
|
|
1938
2086
|
_.$_$.c = aiModule;
|
|
1939
2087
|
_.$_$.d = BotChatInteractor;
|
|
2088
|
+
_.$_$.e = BotChatConfig_getInstance;
|
|
1940
2089
|
//endregion
|
|
1941
2090
|
return _;
|
|
1942
2091
|
}));
|