raspberry_games_server_game_logic 1.8.421 → 1.8.422
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 +335 -314
- package/Logic_Debertz-ai_module.js.map +1 -1
- package/Logic_Debertz-core.js +743 -715
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +10887 -10891
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_server.d.ts +3 -1
- package/Logic_Debertz-game_server.js +1013 -1013
- package/Logic_Debertz-game_server.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +10 -10
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-coroutines-core.js +1 -1
- package/ktor-ktor-client-logging.js +4 -3
- package/ktor-ktor-client-logging.js.map +1 -1
- package/package.json +1 -1
- package/raspberry-cardgame-lib-random.js +3 -3
|
@@ -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', './kotlinx-serialization-kotlinx-serialization-json.js', './Kosi-Kodein-kodein-di.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', './Kosi-Kaverit-kaverit.js', './ktor-ktor-serialization-kotlinx-json.js', './ktor-ktor-client-logging.js', './ktor-ktor-client-content-negotiation.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('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./Kosi-Kodein-kodein-di.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('./Kosi-Kaverit-kaverit.js'), require('./ktor-ktor-serialization-kotlinx-json.js'), require('./ktor-ktor-client-logging.js'), require('./ktor-ktor-client-content-negotiation.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'.");
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
if (typeof globalThis['Kosi-Kodein-kodein-di'] === 'undefined') {
|
|
26
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'.");
|
|
27
27
|
}
|
|
28
|
-
if (typeof globalThis['
|
|
29
|
-
throw new Error("Error loading module 'Logic_Debertz-ai_module'. Its dependency '
|
|
30
|
-
}
|
|
31
|
-
if (typeof globalThis['ktor-ktor-client-logging'] === 'undefined') {
|
|
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'.");
|
|
28
|
+
if (typeof globalThis['Kosi-Kaverit-kaverit'] === 'undefined') {
|
|
29
|
+
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'.");
|
|
33
30
|
}
|
|
34
31
|
if (typeof globalThis['ktor-ktor-serialization-kotlinx-json'] === 'undefined') {
|
|
35
32
|
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
33
|
}
|
|
37
|
-
if (typeof globalThis['
|
|
38
|
-
throw new Error("Error loading module 'Logic_Debertz-ai_module'. Its dependency '
|
|
34
|
+
if (typeof globalThis['ktor-ktor-client-logging'] === 'undefined') {
|
|
35
|
+
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'.");
|
|
36
|
+
}
|
|
37
|
+
if (typeof globalThis['ktor-ktor-client-content-negotiation'] === 'undefined') {
|
|
38
|
+
throw new Error("Error loading module 'Logic_Debertz-ai_module'. Its dependency 'ktor-ktor-client-content-negotiation' was not found. Please, check whether 'ktor-ktor-client-content-negotiation' 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['kotlinx-serialization-kotlinx-serialization-json'], globalThis['Kosi-Kodein-kodein-di'], 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['Kosi-Kaverit-kaverit'], globalThis['ktor-ktor-serialization-kotlinx-json'], globalThis['ktor-ktor-client-logging'], globalThis['ktor-ktor-client-content-negotiation']);
|
|
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_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_org_kodein_di_kodein_di,
|
|
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_org_kodein_type_kaverit, kotlin_io_ktor_ktor_serialization_kotlinx_json, kotlin_io_ktor_ktor_client_logging, kotlin_io_ktor_ktor_client_content_negotiation) {
|
|
43
43
|
'use strict';
|
|
44
44
|
//region block: imports
|
|
45
45
|
var imul = Math.imul;
|
|
@@ -104,6 +104,7 @@
|
|
|
104
104
|
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f2;
|
|
105
105
|
var Enum = kotlin_kotlin.$_$.eh;
|
|
106
106
|
var getNumberHashCode = kotlin_kotlin.$_$.hc;
|
|
107
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.gc;
|
|
107
108
|
var DoubleSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q;
|
|
108
109
|
var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;
|
|
109
110
|
var LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u;
|
|
@@ -119,16 +120,17 @@
|
|
|
119
120
|
var listOf = kotlin_kotlin.$_$.g8;
|
|
120
121
|
var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b;
|
|
121
122
|
var Module_init_$Create$ = kotlin_org_kodein_di_kodein_di.$_$.a;
|
|
122
|
-
var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.u;
|
|
123
|
-
var Plugin_getInstance = kotlin_io_ktor_ktor_client_content_negotiation.$_$.a;
|
|
124
|
-
var Companion_getInstance_0 = kotlin_io_ktor_ktor_client_logging.$_$.d;
|
|
125
|
-
var json = kotlin_io_ktor_ktor_serialization_kotlinx_json.$_$.a;
|
|
126
|
-
var Companion_instance_0 = kotlin_io_ktor_ktor_client_logging.$_$.c;
|
|
127
|
-
var get_DEFAULT = kotlin_io_ktor_ktor_client_logging.$_$.e;
|
|
128
|
-
var LogLevel_INFO_getInstance = kotlin_io_ktor_ktor_client_logging.$_$.b;
|
|
129
123
|
var typeToken = kotlin_org_kodein_type_kaverit.$_$.d;
|
|
130
124
|
var TypeToken = kotlin_org_kodein_type_kaverit.$_$.b;
|
|
131
125
|
var isInterface = kotlin_kotlin.$_$.zc;
|
|
126
|
+
var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.u;
|
|
127
|
+
var json = kotlin_io_ktor_ktor_serialization_kotlinx_json.$_$.a;
|
|
128
|
+
var Companion_instance_0 = kotlin_io_ktor_ktor_client_logging.$_$.d;
|
|
129
|
+
var get_DEFAULT = kotlin_io_ktor_ktor_client_logging.$_$.f;
|
|
130
|
+
var LogLevel_NONE_getInstance = kotlin_io_ktor_ktor_client_logging.$_$.c;
|
|
131
|
+
var LogLevel_INFO_getInstance = kotlin_io_ktor_ktor_client_logging.$_$.b;
|
|
132
|
+
var Plugin_getInstance = kotlin_io_ktor_ktor_client_content_negotiation.$_$.a;
|
|
133
|
+
var Companion_getInstance_0 = kotlin_io_ktor_ktor_client_logging.$_$.e;
|
|
132
134
|
var HttpClient_0 = kotlin_io_ktor_ktor_client_core.$_$.v;
|
|
133
135
|
var Singleton = kotlin_org_kodein_di_kodein_di.$_$.d;
|
|
134
136
|
//endregion
|
|
@@ -171,14 +173,14 @@
|
|
|
171
173
|
}
|
|
172
174
|
function OpenAIApiImpl$chatCompletion$lambda(this$0) {
|
|
173
175
|
return function ($this$headers) {
|
|
174
|
-
$this$headers.w39(HttpHeaders_getInstance().s3f_1, 'Bearer ' + this$0.
|
|
176
|
+
$this$headers.w39(HttpHeaders_getInstance().s3f_1, 'Bearer ' + this$0.n6m_1.g6m_1);
|
|
175
177
|
return Unit_instance;
|
|
176
178
|
};
|
|
177
179
|
}
|
|
178
180
|
function $chatCompletionCOROUTINE$(_this__u8e3s4, messages, resultContinuation) {
|
|
179
181
|
CoroutineImpl.call(this, resultContinuation);
|
|
180
|
-
this.
|
|
181
|
-
this.
|
|
182
|
+
this.x6m_1 = _this__u8e3s4;
|
|
183
|
+
this.y6m_1 = messages;
|
|
182
184
|
}
|
|
183
185
|
protoOf($chatCompletionCOROUTINE$).a9 = function () {
|
|
184
186
|
var suspendResult = this.u8_1;
|
|
@@ -189,12 +191,12 @@
|
|
|
189
191
|
case 0:
|
|
190
192
|
this.t8_1 = 4;
|
|
191
193
|
this.t8_1 = 3;
|
|
192
|
-
var request = new OpenAIRequest(this.
|
|
193
|
-
var tmp0 = this.
|
|
194
|
-
var urlString = this.
|
|
194
|
+
var request = new OpenAIRequest(this.x6m_1.n6m_1.h6m_1, this.y6m_1, this.x6m_1.n6m_1.j6m_1, this.x6m_1.n6m_1.k6m_1);
|
|
195
|
+
var tmp0 = this.x6m_1.o6m_1;
|
|
196
|
+
var urlString = this.x6m_1.n6m_1.i6m_1 + '/chat/completions';
|
|
195
197
|
var this_0 = new HttpRequestBuilder();
|
|
196
198
|
url(this_0, urlString);
|
|
197
|
-
headers(this_0, OpenAIApiImpl$chatCompletion$lambda(this.
|
|
199
|
+
headers(this_0, OpenAIApiImpl$chatCompletion$lambda(this.x6m_1));
|
|
198
200
|
contentType(this_0, Application_getInstance().x3d_1);
|
|
199
201
|
if (request == null) {
|
|
200
202
|
this_0.o3s_1 = NullBody_instance;
|
|
@@ -250,7 +252,7 @@
|
|
|
250
252
|
case 1:
|
|
251
253
|
var response = suspendResult;
|
|
252
254
|
var tmp_8 = this;
|
|
253
|
-
tmp_8.
|
|
255
|
+
tmp_8.a6n_1 = Companion_instance;
|
|
254
256
|
this.s8_1 = 2;
|
|
255
257
|
var tmp_9 = response.p3v();
|
|
256
258
|
var tmp_10 = JsType_instance;
|
|
@@ -278,8 +280,8 @@
|
|
|
278
280
|
case 2:
|
|
279
281
|
var tmp2 = suspendResult instanceof OpenAIResponse ? suspendResult : THROW_CCE();
|
|
280
282
|
var tmp_14 = this;
|
|
281
|
-
this.
|
|
282
|
-
tmp_14.
|
|
283
|
+
this.a6n_1;
|
|
284
|
+
tmp_14.z6m_1 = _Result___init__impl__xyqfz8(tmp2);
|
|
283
285
|
this.t8_1 = 4;
|
|
284
286
|
this.s8_1 = 5;
|
|
285
287
|
continue $sm;
|
|
@@ -289,7 +291,7 @@
|
|
|
289
291
|
if (tmp_15 instanceof Exception) {
|
|
290
292
|
var e = this.v8_1;
|
|
291
293
|
var tmp_16 = this;
|
|
292
|
-
tmp_16.
|
|
294
|
+
tmp_16.z6m_1 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
293
295
|
this.s8_1 = 5;
|
|
294
296
|
continue $sm;
|
|
295
297
|
} else {
|
|
@@ -300,7 +302,7 @@
|
|
|
300
302
|
throw this.v8_1;
|
|
301
303
|
case 5:
|
|
302
304
|
this.t8_1 = 4;
|
|
303
|
-
return new Result(this.
|
|
305
|
+
return new Result(this.z6m_1);
|
|
304
306
|
}
|
|
305
307
|
} catch ($p) {
|
|
306
308
|
var e_0 = $p;
|
|
@@ -314,10 +316,10 @@
|
|
|
314
316
|
while (true);
|
|
315
317
|
};
|
|
316
318
|
function OpenAIApiImpl(config, httpClient) {
|
|
317
|
-
this.
|
|
318
|
-
this.
|
|
319
|
+
this.n6m_1 = config;
|
|
320
|
+
this.o6m_1 = httpClient;
|
|
319
321
|
}
|
|
320
|
-
protoOf(OpenAIApiImpl).
|
|
322
|
+
protoOf(OpenAIApiImpl).f6m = function (messages, $completion) {
|
|
321
323
|
var tmp = new $chatCompletionCOROUTINE$(this, messages, $completion);
|
|
322
324
|
tmp.u8_1 = Unit_instance;
|
|
323
325
|
tmp.v8_1 = null;
|
|
@@ -329,15 +331,15 @@
|
|
|
329
331
|
function BotChatCache() {
|
|
330
332
|
}
|
|
331
333
|
function CacheEntry(value, timestamp) {
|
|
332
|
-
this.
|
|
333
|
-
this.
|
|
334
|
+
this.c6n_1 = value;
|
|
335
|
+
this.d6n_1 = timestamp;
|
|
334
336
|
}
|
|
335
337
|
protoOf(CacheEntry).toString = function () {
|
|
336
|
-
return 'CacheEntry(value=' + this.
|
|
338
|
+
return 'CacheEntry(value=' + this.c6n_1 + ', timestamp=' + this.d6n_1.toString() + ')';
|
|
337
339
|
};
|
|
338
340
|
protoOf(CacheEntry).hashCode = function () {
|
|
339
|
-
var result = getStringHashCode(this.
|
|
340
|
-
result = imul(result, 31) + this.
|
|
341
|
+
var result = getStringHashCode(this.c6n_1);
|
|
342
|
+
result = imul(result, 31) + this.d6n_1.hashCode() | 0;
|
|
341
343
|
return result;
|
|
342
344
|
};
|
|
343
345
|
protoOf(CacheEntry).equals = function (other) {
|
|
@@ -345,36 +347,36 @@
|
|
|
345
347
|
return true;
|
|
346
348
|
if (!(other instanceof CacheEntry))
|
|
347
349
|
return false;
|
|
348
|
-
if (!(this.
|
|
350
|
+
if (!(this.c6n_1 === other.c6n_1))
|
|
349
351
|
return false;
|
|
350
|
-
if (!equalsLong(this.
|
|
352
|
+
if (!equalsLong(this.d6n_1, other.d6n_1))
|
|
351
353
|
return false;
|
|
352
354
|
return true;
|
|
353
355
|
};
|
|
354
356
|
function cleanExpired($this) {
|
|
355
357
|
var now = System_instance.ck().qk();
|
|
356
|
-
var tmp = $this.
|
|
358
|
+
var tmp = $this.g6n_1.v();
|
|
357
359
|
removeAll(tmp, InMemoryBotChatCache$cleanExpired$lambda(now, $this));
|
|
358
360
|
}
|
|
359
361
|
function InMemoryBotChatCache$cleanExpired$lambda($now, this$0) {
|
|
360
362
|
return function (_destruct__k2r9zo) {
|
|
361
363
|
// Inline function 'kotlin.collections.component2' call
|
|
362
364
|
var entry = _destruct__k2r9zo.x();
|
|
363
|
-
return compare(subtract($now, entry.
|
|
365
|
+
return compare(subtract($now, entry.d6n_1), this$0.e6n_1) > 0;
|
|
364
366
|
};
|
|
365
367
|
}
|
|
366
368
|
function InMemoryBotChatCache(ttlMillis, maxSize) {
|
|
367
369
|
ttlMillis = ttlMillis === VOID ? new Long(300000, 0) : ttlMillis;
|
|
368
370
|
maxSize = maxSize === VOID ? 100 : maxSize;
|
|
369
|
-
this.
|
|
370
|
-
this.
|
|
371
|
+
this.e6n_1 = ttlMillis;
|
|
372
|
+
this.f6n_1 = maxSize;
|
|
371
373
|
var tmp = this;
|
|
372
374
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
373
|
-
tmp.
|
|
375
|
+
tmp.g6n_1 = LinkedHashMap_init_$Create$();
|
|
374
376
|
}
|
|
375
377
|
protoOf(InMemoryBotChatCache).t1b = function (key) {
|
|
376
378
|
cleanExpired(this);
|
|
377
|
-
var tmp0_elvis_lhs = this.
|
|
379
|
+
var tmp0_elvis_lhs = this.g6n_1.c2(key);
|
|
378
380
|
var tmp;
|
|
379
381
|
if (tmp0_elvis_lhs == null) {
|
|
380
382
|
return null;
|
|
@@ -382,17 +384,17 @@
|
|
|
382
384
|
tmp = tmp0_elvis_lhs;
|
|
383
385
|
}
|
|
384
386
|
var entry = tmp;
|
|
385
|
-
if (compare(subtract(System_instance.ck().qk(), entry.
|
|
386
|
-
this.
|
|
387
|
+
if (compare(subtract(System_instance.ck().qk(), entry.d6n_1), this.e6n_1) > 0) {
|
|
388
|
+
this.g6n_1.g2(key);
|
|
387
389
|
return null;
|
|
388
390
|
}
|
|
389
|
-
return entry.
|
|
391
|
+
return entry.c6n_1;
|
|
390
392
|
};
|
|
391
|
-
protoOf(InMemoryBotChatCache).
|
|
393
|
+
protoOf(InMemoryBotChatCache).b6n = function (key, value) {
|
|
392
394
|
cleanExpired(this);
|
|
393
|
-
if (this.
|
|
395
|
+
if (this.g6n_1.o() >= this.f6n_1) {
|
|
394
396
|
// Inline function 'kotlin.collections.minByOrNull' call
|
|
395
|
-
var tmp0 = this.
|
|
397
|
+
var tmp0 = this.g6n_1.v();
|
|
396
398
|
var tmp$ret$0;
|
|
397
399
|
$l$block_0: {
|
|
398
400
|
// Inline function 'kotlin.collections.minByOrNull' call
|
|
@@ -406,10 +408,10 @@
|
|
|
406
408
|
tmp$ret$0 = minElem;
|
|
407
409
|
break $l$block_0;
|
|
408
410
|
}
|
|
409
|
-
var minValue = minElem.x().
|
|
411
|
+
var minValue = minElem.x().d6n_1;
|
|
410
412
|
do {
|
|
411
413
|
var e = iterator.n();
|
|
412
|
-
var v = e.x().
|
|
414
|
+
var v = e.x().d6n_1;
|
|
413
415
|
if (compareTo(minValue, v) > 0) {
|
|
414
416
|
minElem = e;
|
|
415
417
|
minValue = v;
|
|
@@ -424,24 +426,24 @@
|
|
|
424
426
|
null;
|
|
425
427
|
else {
|
|
426
428
|
// Inline function 'kotlin.let' call
|
|
427
|
-
this.
|
|
429
|
+
this.g6n_1.g2(oldestKey);
|
|
428
430
|
}
|
|
429
431
|
}
|
|
430
|
-
var tmp0_0 = this.
|
|
432
|
+
var tmp0_0 = this.g6n_1;
|
|
431
433
|
// Inline function 'kotlin.collections.set' call
|
|
432
434
|
var value_0 = new CacheEntry(value, System_instance.ck().qk());
|
|
433
435
|
tmp0_0.f2(key, value_0);
|
|
434
436
|
};
|
|
435
437
|
function BotChatConfig() {
|
|
436
438
|
BotChatConfig_instance = this;
|
|
437
|
-
this.
|
|
438
|
-
this.
|
|
439
|
-
this.
|
|
440
|
-
this.
|
|
441
|
-
this.
|
|
442
|
-
}
|
|
443
|
-
protoOf(BotChatConfig).
|
|
444
|
-
var tmp0_elvis_lhs = this.
|
|
439
|
+
this.h6n_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.')]);
|
|
440
|
+
this.i6n_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.';
|
|
441
|
+
this.j6n_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';
|
|
442
|
+
this.k6n_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!";
|
|
443
|
+
this.l6n_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.';
|
|
444
|
+
}
|
|
445
|
+
protoOf(BotChatConfig).m6n = function (playerNumber) {
|
|
446
|
+
var tmp0_elvis_lhs = this.h6n_1.c2(playerNumber % this.h6n_1.o() | 0);
|
|
445
447
|
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;
|
|
446
448
|
};
|
|
447
449
|
var BotChatConfig_instance;
|
|
@@ -460,7 +462,7 @@
|
|
|
460
462
|
// Inline function 'kotlin.arrayOf' call
|
|
461
463
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
462
464
|
// Inline function 'kotlin.js.asDynamic' call
|
|
463
|
-
tmp.
|
|
465
|
+
tmp.n6n_1 = [null, null, lazy(tmp_0, BotChatContext$Companion$$childSerializers$_anonymous__c0jn7e), null];
|
|
464
466
|
}
|
|
465
467
|
var Companion_instance_1;
|
|
466
468
|
function Companion_getInstance_1() {
|
|
@@ -475,27 +477,27 @@
|
|
|
475
477
|
tmp0_serialDesc.gz('gameState', false);
|
|
476
478
|
tmp0_serialDesc.gz('conversationHistory', true);
|
|
477
479
|
tmp0_serialDesc.gz('playerName', true);
|
|
478
|
-
this.
|
|
480
|
+
this.o6n_1 = tmp0_serialDesc;
|
|
479
481
|
}
|
|
480
|
-
protoOf($serializer).
|
|
481
|
-
var tmp0_desc = this.
|
|
482
|
+
protoOf($serializer).p6n = function (encoder, value) {
|
|
483
|
+
var tmp0_desc = this.o6n_1;
|
|
482
484
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
483
|
-
var tmp2_cached = Companion_getInstance_1().
|
|
484
|
-
tmp1_output.dt(tmp0_desc, 0, value.
|
|
485
|
-
tmp1_output.dt(tmp0_desc, 1, value.
|
|
486
|
-
if (tmp1_output.lt(tmp0_desc, 2) ? true : !equals(value.
|
|
487
|
-
tmp1_output.ft(tmp0_desc, 2, tmp2_cached[2].x(), value.
|
|
485
|
+
var tmp2_cached = Companion_getInstance_1().n6n_1;
|
|
486
|
+
tmp1_output.dt(tmp0_desc, 0, value.q6n_1);
|
|
487
|
+
tmp1_output.dt(tmp0_desc, 1, value.r6n_1);
|
|
488
|
+
if (tmp1_output.lt(tmp0_desc, 2) ? true : !equals(value.s6n_1, emptyList())) {
|
|
489
|
+
tmp1_output.ft(tmp0_desc, 2, tmp2_cached[2].x(), value.s6n_1);
|
|
488
490
|
}
|
|
489
|
-
if (tmp1_output.lt(tmp0_desc, 3) ? true : !(value.
|
|
490
|
-
tmp1_output.ht(tmp0_desc, 3, StringSerializer_getInstance(), value.
|
|
491
|
+
if (tmp1_output.lt(tmp0_desc, 3) ? true : !(value.t6n_1 == null)) {
|
|
492
|
+
tmp1_output.ht(tmp0_desc, 3, StringSerializer_getInstance(), value.t6n_1);
|
|
491
493
|
}
|
|
492
494
|
tmp1_output.pr(tmp0_desc);
|
|
493
495
|
};
|
|
494
496
|
protoOf($serializer).co = function (encoder, value) {
|
|
495
|
-
return this.
|
|
497
|
+
return this.p6n(encoder, value instanceof BotChatContext ? value : THROW_CCE());
|
|
496
498
|
};
|
|
497
499
|
protoOf($serializer).do = function (decoder) {
|
|
498
|
-
var tmp0_desc = this.
|
|
500
|
+
var tmp0_desc = this.o6n_1;
|
|
499
501
|
var tmp1_flag = true;
|
|
500
502
|
var tmp2_index = 0;
|
|
501
503
|
var tmp3_bitMask0 = 0;
|
|
@@ -504,7 +506,7 @@
|
|
|
504
506
|
var tmp6_local2 = null;
|
|
505
507
|
var tmp7_local3 = null;
|
|
506
508
|
var tmp8_input = decoder.or(tmp0_desc);
|
|
507
|
-
var tmp9_cached = Companion_getInstance_1().
|
|
509
|
+
var tmp9_cached = Companion_getInstance_1().n6n_1;
|
|
508
510
|
if (tmp8_input.es()) {
|
|
509
511
|
tmp4_local0 = tmp8_input.yr(tmp0_desc, 0);
|
|
510
512
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -545,10 +547,10 @@
|
|
|
545
547
|
return BotChatContext_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
546
548
|
};
|
|
547
549
|
protoOf($serializer).bo = function () {
|
|
548
|
-
return this.
|
|
550
|
+
return this.o6n_1;
|
|
549
551
|
};
|
|
550
552
|
protoOf($serializer).vz = function () {
|
|
551
|
-
var tmp0_cached = Companion_getInstance_1().
|
|
553
|
+
var tmp0_cached = Companion_getInstance_1().n6n_1;
|
|
552
554
|
// Inline function 'kotlin.arrayOf' call
|
|
553
555
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
554
556
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -562,18 +564,18 @@
|
|
|
562
564
|
}
|
|
563
565
|
function BotChatContext_init_$Init$(seen0, botPersonality, gameState, conversationHistory, playerName, serializationConstructorMarker, $this) {
|
|
564
566
|
if (!(3 === (3 & seen0))) {
|
|
565
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance().
|
|
567
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance().o6n_1);
|
|
566
568
|
}
|
|
567
|
-
$this.
|
|
568
|
-
$this.
|
|
569
|
+
$this.q6n_1 = botPersonality;
|
|
570
|
+
$this.r6n_1 = gameState;
|
|
569
571
|
if (0 === (seen0 & 4))
|
|
570
|
-
$this.
|
|
572
|
+
$this.s6n_1 = emptyList();
|
|
571
573
|
else
|
|
572
|
-
$this.
|
|
574
|
+
$this.s6n_1 = conversationHistory;
|
|
573
575
|
if (0 === (seen0 & 8))
|
|
574
|
-
$this.
|
|
576
|
+
$this.t6n_1 = null;
|
|
575
577
|
else
|
|
576
|
-
$this.
|
|
578
|
+
$this.t6n_1 = playerName;
|
|
577
579
|
return $this;
|
|
578
580
|
}
|
|
579
581
|
function BotChatContext_init_$Create$(seen0, botPersonality, gameState, conversationHistory, playerName, serializationConstructorMarker) {
|
|
@@ -583,19 +585,19 @@
|
|
|
583
585
|
Companion_getInstance_1();
|
|
584
586
|
conversationHistory = conversationHistory === VOID ? emptyList() : conversationHistory;
|
|
585
587
|
playerName = playerName === VOID ? null : playerName;
|
|
586
|
-
this.
|
|
587
|
-
this.
|
|
588
|
-
this.
|
|
589
|
-
this.
|
|
588
|
+
this.q6n_1 = botPersonality;
|
|
589
|
+
this.r6n_1 = gameState;
|
|
590
|
+
this.s6n_1 = conversationHistory;
|
|
591
|
+
this.t6n_1 = playerName;
|
|
590
592
|
}
|
|
591
593
|
protoOf(BotChatContext).toString = function () {
|
|
592
|
-
return 'BotChatContext(botPersonality=' + this.
|
|
594
|
+
return 'BotChatContext(botPersonality=' + this.q6n_1 + ', gameState=' + this.r6n_1 + ', conversationHistory=' + toString(this.s6n_1) + ', playerName=' + this.t6n_1 + ')';
|
|
593
595
|
};
|
|
594
596
|
protoOf(BotChatContext).hashCode = function () {
|
|
595
|
-
var result = getStringHashCode(this.
|
|
596
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
597
|
-
result = imul(result, 31) + hashCode(this.
|
|
598
|
-
result = imul(result, 31) + (this.
|
|
597
|
+
var result = getStringHashCode(this.q6n_1);
|
|
598
|
+
result = imul(result, 31) + getStringHashCode(this.r6n_1) | 0;
|
|
599
|
+
result = imul(result, 31) + hashCode(this.s6n_1) | 0;
|
|
600
|
+
result = imul(result, 31) + (this.t6n_1 == null ? 0 : getStringHashCode(this.t6n_1)) | 0;
|
|
599
601
|
return result;
|
|
600
602
|
};
|
|
601
603
|
protoOf(BotChatContext).equals = function (other) {
|
|
@@ -603,18 +605,18 @@
|
|
|
603
605
|
return true;
|
|
604
606
|
if (!(other instanceof BotChatContext))
|
|
605
607
|
return false;
|
|
606
|
-
if (!(this.
|
|
608
|
+
if (!(this.q6n_1 === other.q6n_1))
|
|
607
609
|
return false;
|
|
608
|
-
if (!(this.
|
|
610
|
+
if (!(this.r6n_1 === other.r6n_1))
|
|
609
611
|
return false;
|
|
610
|
-
if (!equals(this.
|
|
612
|
+
if (!equals(this.s6n_1, other.s6n_1))
|
|
611
613
|
return false;
|
|
612
|
-
if (!(this.
|
|
614
|
+
if (!(this.t6n_1 == other.t6n_1))
|
|
613
615
|
return false;
|
|
614
616
|
return true;
|
|
615
617
|
};
|
|
616
618
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
617
|
-
return $this.
|
|
619
|
+
return $this.u6n_1.x();
|
|
618
620
|
}
|
|
619
621
|
function ChatMessage$Role$Companion$_anonymous__13jozo() {
|
|
620
622
|
var tmp = values();
|
|
@@ -638,7 +640,7 @@
|
|
|
638
640
|
Companion_instance_2 = this;
|
|
639
641
|
var tmp = this;
|
|
640
642
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
641
|
-
tmp.
|
|
643
|
+
tmp.u6n_1 = lazy(tmp_0, ChatMessage$Role$Companion$_anonymous__13jozo);
|
|
642
644
|
}
|
|
643
645
|
protoOf(Companion_0).a1c = function () {
|
|
644
646
|
return _get_$cachedSerializer__te6jhj(this);
|
|
@@ -676,15 +678,15 @@
|
|
|
676
678
|
// Inline function 'kotlin.arrayOf' call
|
|
677
679
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
678
680
|
// Inline function 'kotlin.js.asDynamic' call
|
|
679
|
-
tmp.
|
|
681
|
+
tmp.v6n_1 = [lazy(tmp_0, ChatMessage$Companion$$childSerializers$_anonymous__qywqat), null];
|
|
680
682
|
}
|
|
681
|
-
protoOf(Companion_1).
|
|
683
|
+
protoOf(Companion_1).w6n = function (content) {
|
|
682
684
|
return new ChatMessage(Role_SYSTEM_getInstance(), content);
|
|
683
685
|
};
|
|
684
|
-
protoOf(Companion_1).
|
|
686
|
+
protoOf(Companion_1).x6n = function (content) {
|
|
685
687
|
return new ChatMessage(Role_USER_getInstance(), content);
|
|
686
688
|
};
|
|
687
|
-
protoOf(Companion_1).
|
|
689
|
+
protoOf(Companion_1).y6n = function (content) {
|
|
688
690
|
return new ChatMessage(Role_ASSISTANT_getInstance(), content);
|
|
689
691
|
};
|
|
690
692
|
var Companion_instance_3;
|
|
@@ -698,28 +700,28 @@
|
|
|
698
700
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.ChatMessage', this, 2);
|
|
699
701
|
tmp0_serialDesc.gz('role', false);
|
|
700
702
|
tmp0_serialDesc.gz('content', false);
|
|
701
|
-
this.
|
|
703
|
+
this.z6n_1 = tmp0_serialDesc;
|
|
702
704
|
}
|
|
703
|
-
protoOf($serializer_0).
|
|
704
|
-
var tmp0_desc = this.
|
|
705
|
+
protoOf($serializer_0).a6o = function (encoder, value) {
|
|
706
|
+
var tmp0_desc = this.z6n_1;
|
|
705
707
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
706
|
-
var tmp2_cached = Companion_getInstance_3().
|
|
707
|
-
tmp1_output.ft(tmp0_desc, 0, tmp2_cached[0].x(), value.
|
|
708
|
-
tmp1_output.dt(tmp0_desc, 1, value.
|
|
708
|
+
var tmp2_cached = Companion_getInstance_3().v6n_1;
|
|
709
|
+
tmp1_output.ft(tmp0_desc, 0, tmp2_cached[0].x(), value.b6o_1);
|
|
710
|
+
tmp1_output.dt(tmp0_desc, 1, value.c6o_1);
|
|
709
711
|
tmp1_output.pr(tmp0_desc);
|
|
710
712
|
};
|
|
711
713
|
protoOf($serializer_0).co = function (encoder, value) {
|
|
712
|
-
return this.
|
|
714
|
+
return this.a6o(encoder, value instanceof ChatMessage ? value : THROW_CCE());
|
|
713
715
|
};
|
|
714
716
|
protoOf($serializer_0).do = function (decoder) {
|
|
715
|
-
var tmp0_desc = this.
|
|
717
|
+
var tmp0_desc = this.z6n_1;
|
|
716
718
|
var tmp1_flag = true;
|
|
717
719
|
var tmp2_index = 0;
|
|
718
720
|
var tmp3_bitMask0 = 0;
|
|
719
721
|
var tmp4_local0 = null;
|
|
720
722
|
var tmp5_local1 = null;
|
|
721
723
|
var tmp6_input = decoder.or(tmp0_desc);
|
|
722
|
-
var tmp7_cached = Companion_getInstance_3().
|
|
724
|
+
var tmp7_cached = Companion_getInstance_3().v6n_1;
|
|
723
725
|
if (tmp6_input.es()) {
|
|
724
726
|
tmp4_local0 = tmp6_input.as(tmp0_desc, 0, tmp7_cached[0].x(), tmp4_local0);
|
|
725
727
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -748,13 +750,13 @@
|
|
|
748
750
|
return ChatMessage_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
749
751
|
};
|
|
750
752
|
protoOf($serializer_0).bo = function () {
|
|
751
|
-
return this.
|
|
753
|
+
return this.z6n_1;
|
|
752
754
|
};
|
|
753
755
|
protoOf($serializer_0).vz = function () {
|
|
754
756
|
// Inline function 'kotlin.arrayOf' call
|
|
755
757
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
756
758
|
// Inline function 'kotlin.js.asDynamic' call
|
|
757
|
-
return [Companion_getInstance_3().
|
|
759
|
+
return [Companion_getInstance_3().v6n_1[0].x(), StringSerializer_getInstance()];
|
|
758
760
|
};
|
|
759
761
|
var $serializer_instance_0;
|
|
760
762
|
function $serializer_getInstance_0() {
|
|
@@ -764,10 +766,10 @@
|
|
|
764
766
|
}
|
|
765
767
|
function ChatMessage_init_$Init$(seen0, role, content, serializationConstructorMarker, $this) {
|
|
766
768
|
if (!(3 === (3 & seen0))) {
|
|
767
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance_0().
|
|
769
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_0().z6n_1);
|
|
768
770
|
}
|
|
769
|
-
$this.
|
|
770
|
-
$this.
|
|
771
|
+
$this.b6o_1 = role;
|
|
772
|
+
$this.c6o_1 = content;
|
|
771
773
|
return $this;
|
|
772
774
|
}
|
|
773
775
|
function ChatMessage_init_$Create$(seen0, role, content, serializationConstructorMarker) {
|
|
@@ -787,15 +789,15 @@
|
|
|
787
789
|
}
|
|
788
790
|
function ChatMessage(role, content) {
|
|
789
791
|
Companion_getInstance_3();
|
|
790
|
-
this.
|
|
791
|
-
this.
|
|
792
|
+
this.b6o_1 = role;
|
|
793
|
+
this.c6o_1 = content;
|
|
792
794
|
}
|
|
793
795
|
protoOf(ChatMessage).toString = function () {
|
|
794
|
-
return 'ChatMessage(role=' + this.
|
|
796
|
+
return 'ChatMessage(role=' + this.b6o_1.toString() + ', content=' + this.c6o_1 + ')';
|
|
795
797
|
};
|
|
796
798
|
protoOf(ChatMessage).hashCode = function () {
|
|
797
|
-
var result = this.
|
|
798
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
799
|
+
var result = this.b6o_1.hashCode();
|
|
800
|
+
result = imul(result, 31) + getStringHashCode(this.c6o_1) | 0;
|
|
799
801
|
return result;
|
|
800
802
|
};
|
|
801
803
|
protoOf(ChatMessage).equals = function (other) {
|
|
@@ -803,35 +805,38 @@
|
|
|
803
805
|
return true;
|
|
804
806
|
if (!(other instanceof ChatMessage))
|
|
805
807
|
return false;
|
|
806
|
-
if (!this.
|
|
808
|
+
if (!this.b6o_1.equals(other.b6o_1))
|
|
807
809
|
return false;
|
|
808
|
-
if (!(this.
|
|
810
|
+
if (!(this.c6o_1 === other.c6o_1))
|
|
809
811
|
return false;
|
|
810
812
|
return true;
|
|
811
813
|
};
|
|
812
|
-
function OpenAIConfig(apiKey, model, baseUrl, temperature, maxTokens, timeout) {
|
|
814
|
+
function OpenAIConfig(apiKey, model, baseUrl, temperature, maxTokens, timeout, enableDebugLogging) {
|
|
813
815
|
model = model === VOID ? 'gpt-3.5-turbo' : model;
|
|
814
816
|
baseUrl = baseUrl === VOID ? 'https://api.openai.com/v1' : baseUrl;
|
|
815
817
|
temperature = temperature === VOID ? 0.7 : temperature;
|
|
816
818
|
maxTokens = maxTokens === VOID ? 150 : maxTokens;
|
|
817
819
|
timeout = timeout === VOID ? 30000 : timeout;
|
|
818
|
-
|
|
819
|
-
this.g6m_1 =
|
|
820
|
-
this.h6m_1 =
|
|
821
|
-
this.i6m_1 =
|
|
822
|
-
this.j6m_1 =
|
|
823
|
-
this.k6m_1 =
|
|
820
|
+
enableDebugLogging = enableDebugLogging === VOID ? false : enableDebugLogging;
|
|
821
|
+
this.g6m_1 = apiKey;
|
|
822
|
+
this.h6m_1 = model;
|
|
823
|
+
this.i6m_1 = baseUrl;
|
|
824
|
+
this.j6m_1 = temperature;
|
|
825
|
+
this.k6m_1 = maxTokens;
|
|
826
|
+
this.l6m_1 = timeout;
|
|
827
|
+
this.m6m_1 = enableDebugLogging;
|
|
824
828
|
}
|
|
825
829
|
protoOf(OpenAIConfig).toString = function () {
|
|
826
|
-
return 'OpenAIConfig(apiKey=' + this.
|
|
830
|
+
return 'OpenAIConfig(apiKey=' + this.g6m_1 + ', model=' + this.h6m_1 + ', baseUrl=' + this.i6m_1 + ', temperature=' + this.j6m_1 + ', maxTokens=' + this.k6m_1 + ', timeout=' + this.l6m_1 + ', enableDebugLogging=' + this.m6m_1 + ')';
|
|
827
831
|
};
|
|
828
832
|
protoOf(OpenAIConfig).hashCode = function () {
|
|
829
|
-
var result = getStringHashCode(this.
|
|
830
|
-
result = imul(result, 31) + getStringHashCode(this.g6m_1) | 0;
|
|
833
|
+
var result = getStringHashCode(this.g6m_1);
|
|
831
834
|
result = imul(result, 31) + getStringHashCode(this.h6m_1) | 0;
|
|
832
|
-
result = imul(result, 31) +
|
|
833
|
-
result = imul(result, 31) + this.j6m_1 | 0;
|
|
835
|
+
result = imul(result, 31) + getStringHashCode(this.i6m_1) | 0;
|
|
836
|
+
result = imul(result, 31) + getNumberHashCode(this.j6m_1) | 0;
|
|
834
837
|
result = imul(result, 31) + this.k6m_1 | 0;
|
|
838
|
+
result = imul(result, 31) + this.l6m_1 | 0;
|
|
839
|
+
result = imul(result, 31) + getBooleanHashCode(this.m6m_1) | 0;
|
|
835
840
|
return result;
|
|
836
841
|
};
|
|
837
842
|
protoOf(OpenAIConfig).equals = function (other) {
|
|
@@ -839,18 +844,20 @@
|
|
|
839
844
|
return true;
|
|
840
845
|
if (!(other instanceof OpenAIConfig))
|
|
841
846
|
return false;
|
|
842
|
-
if (!(this.f6m_1 === other.f6m_1))
|
|
843
|
-
return false;
|
|
844
847
|
if (!(this.g6m_1 === other.g6m_1))
|
|
845
848
|
return false;
|
|
846
849
|
if (!(this.h6m_1 === other.h6m_1))
|
|
847
850
|
return false;
|
|
848
|
-
if (!
|
|
851
|
+
if (!(this.i6m_1 === other.i6m_1))
|
|
849
852
|
return false;
|
|
850
|
-
if (!(this.j6m_1
|
|
853
|
+
if (!equals(this.j6m_1, other.j6m_1))
|
|
851
854
|
return false;
|
|
852
855
|
if (!(this.k6m_1 === other.k6m_1))
|
|
853
856
|
return false;
|
|
857
|
+
if (!(this.l6m_1 === other.l6m_1))
|
|
858
|
+
return false;
|
|
859
|
+
if (!(this.m6m_1 === other.m6m_1))
|
|
860
|
+
return false;
|
|
854
861
|
return true;
|
|
855
862
|
};
|
|
856
863
|
function OpenAIRequest$Companion$$childSerializers$_anonymous__ff5rn1() {
|
|
@@ -863,7 +870,7 @@
|
|
|
863
870
|
// Inline function 'kotlin.arrayOf' call
|
|
864
871
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
865
872
|
// Inline function 'kotlin.js.asDynamic' call
|
|
866
|
-
tmp.
|
|
873
|
+
tmp.d6o_1 = [null, lazy(tmp_0, OpenAIRequest$Companion$$childSerializers$_anonymous__ff5rn1), null, null];
|
|
867
874
|
}
|
|
868
875
|
var Companion_instance_4;
|
|
869
876
|
function Companion_getInstance_4() {
|
|
@@ -878,23 +885,23 @@
|
|
|
878
885
|
tmp0_serialDesc.gz('messages', false);
|
|
879
886
|
tmp0_serialDesc.gz('temperature', false);
|
|
880
887
|
tmp0_serialDesc.gz('max_tokens', false);
|
|
881
|
-
this.
|
|
888
|
+
this.e6o_1 = tmp0_serialDesc;
|
|
882
889
|
}
|
|
883
|
-
protoOf($serializer_1).
|
|
884
|
-
var tmp0_desc = this.
|
|
890
|
+
protoOf($serializer_1).f6o = function (encoder, value) {
|
|
891
|
+
var tmp0_desc = this.e6o_1;
|
|
885
892
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
886
|
-
var tmp2_cached = Companion_getInstance_4().
|
|
887
|
-
tmp1_output.dt(tmp0_desc, 0, value.
|
|
888
|
-
tmp1_output.ft(tmp0_desc, 1, tmp2_cached[1].x(), value.
|
|
889
|
-
tmp1_output.bt(tmp0_desc, 2, value.
|
|
890
|
-
tmp1_output.ys(tmp0_desc, 3, value.
|
|
893
|
+
var tmp2_cached = Companion_getInstance_4().d6o_1;
|
|
894
|
+
tmp1_output.dt(tmp0_desc, 0, value.g6o_1);
|
|
895
|
+
tmp1_output.ft(tmp0_desc, 1, tmp2_cached[1].x(), value.h6o_1);
|
|
896
|
+
tmp1_output.bt(tmp0_desc, 2, value.i6o_1);
|
|
897
|
+
tmp1_output.ys(tmp0_desc, 3, value.j6o_1);
|
|
891
898
|
tmp1_output.pr(tmp0_desc);
|
|
892
899
|
};
|
|
893
900
|
protoOf($serializer_1).co = function (encoder, value) {
|
|
894
|
-
return this.
|
|
901
|
+
return this.f6o(encoder, value instanceof OpenAIRequest ? value : THROW_CCE());
|
|
895
902
|
};
|
|
896
903
|
protoOf($serializer_1).do = function (decoder) {
|
|
897
|
-
var tmp0_desc = this.
|
|
904
|
+
var tmp0_desc = this.e6o_1;
|
|
898
905
|
var tmp1_flag = true;
|
|
899
906
|
var tmp2_index = 0;
|
|
900
907
|
var tmp3_bitMask0 = 0;
|
|
@@ -903,7 +910,7 @@
|
|
|
903
910
|
var tmp6_local2 = 0.0;
|
|
904
911
|
var tmp7_local3 = 0;
|
|
905
912
|
var tmp8_input = decoder.or(tmp0_desc);
|
|
906
|
-
var tmp9_cached = Companion_getInstance_4().
|
|
913
|
+
var tmp9_cached = Companion_getInstance_4().d6o_1;
|
|
907
914
|
if (tmp8_input.es()) {
|
|
908
915
|
tmp4_local0 = tmp8_input.yr(tmp0_desc, 0);
|
|
909
916
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -944,10 +951,10 @@
|
|
|
944
951
|
return OpenAIRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
945
952
|
};
|
|
946
953
|
protoOf($serializer_1).bo = function () {
|
|
947
|
-
return this.
|
|
954
|
+
return this.e6o_1;
|
|
948
955
|
};
|
|
949
956
|
protoOf($serializer_1).vz = function () {
|
|
950
|
-
var tmp0_cached = Companion_getInstance_4().
|
|
957
|
+
var tmp0_cached = Companion_getInstance_4().d6o_1;
|
|
951
958
|
// Inline function 'kotlin.arrayOf' call
|
|
952
959
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
953
960
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -961,12 +968,12 @@
|
|
|
961
968
|
}
|
|
962
969
|
function OpenAIRequest_init_$Init$(seen0, model, messages, temperature, maxTokens, serializationConstructorMarker, $this) {
|
|
963
970
|
if (!(15 === (15 & seen0))) {
|
|
964
|
-
throwMissingFieldException(seen0, 15, $serializer_getInstance_1().
|
|
971
|
+
throwMissingFieldException(seen0, 15, $serializer_getInstance_1().e6o_1);
|
|
965
972
|
}
|
|
966
|
-
$this.
|
|
967
|
-
$this.
|
|
968
|
-
$this.
|
|
969
|
-
$this.
|
|
973
|
+
$this.g6o_1 = model;
|
|
974
|
+
$this.h6o_1 = messages;
|
|
975
|
+
$this.i6o_1 = temperature;
|
|
976
|
+
$this.j6o_1 = maxTokens;
|
|
970
977
|
return $this;
|
|
971
978
|
}
|
|
972
979
|
function OpenAIRequest_init_$Create$(seen0, model, messages, temperature, maxTokens, serializationConstructorMarker) {
|
|
@@ -974,19 +981,19 @@
|
|
|
974
981
|
}
|
|
975
982
|
function OpenAIRequest(model, messages, temperature, maxTokens) {
|
|
976
983
|
Companion_getInstance_4();
|
|
977
|
-
this.
|
|
978
|
-
this.
|
|
979
|
-
this.
|
|
980
|
-
this.
|
|
984
|
+
this.g6o_1 = model;
|
|
985
|
+
this.h6o_1 = messages;
|
|
986
|
+
this.i6o_1 = temperature;
|
|
987
|
+
this.j6o_1 = maxTokens;
|
|
981
988
|
}
|
|
982
989
|
protoOf(OpenAIRequest).toString = function () {
|
|
983
|
-
return 'OpenAIRequest(model=' + this.
|
|
990
|
+
return 'OpenAIRequest(model=' + this.g6o_1 + ', messages=' + toString(this.h6o_1) + ', temperature=' + this.i6o_1 + ', maxTokens=' + this.j6o_1 + ')';
|
|
984
991
|
};
|
|
985
992
|
protoOf(OpenAIRequest).hashCode = function () {
|
|
986
|
-
var result = getStringHashCode(this.
|
|
987
|
-
result = imul(result, 31) + hashCode(this.
|
|
988
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
989
|
-
result = imul(result, 31) + this.
|
|
993
|
+
var result = getStringHashCode(this.g6o_1);
|
|
994
|
+
result = imul(result, 31) + hashCode(this.h6o_1) | 0;
|
|
995
|
+
result = imul(result, 31) + getNumberHashCode(this.i6o_1) | 0;
|
|
996
|
+
result = imul(result, 31) + this.j6o_1 | 0;
|
|
990
997
|
return result;
|
|
991
998
|
};
|
|
992
999
|
protoOf(OpenAIRequest).equals = function (other) {
|
|
@@ -994,13 +1001,13 @@
|
|
|
994
1001
|
return true;
|
|
995
1002
|
if (!(other instanceof OpenAIRequest))
|
|
996
1003
|
return false;
|
|
997
|
-
if (!(this.
|
|
1004
|
+
if (!(this.g6o_1 === other.g6o_1))
|
|
998
1005
|
return false;
|
|
999
|
-
if (!equals(this.
|
|
1006
|
+
if (!equals(this.h6o_1, other.h6o_1))
|
|
1000
1007
|
return false;
|
|
1001
|
-
if (!equals(this.
|
|
1008
|
+
if (!equals(this.i6o_1, other.i6o_1))
|
|
1002
1009
|
return false;
|
|
1003
|
-
if (!(this.
|
|
1010
|
+
if (!(this.j6o_1 === other.j6o_1))
|
|
1004
1011
|
return false;
|
|
1005
1012
|
return true;
|
|
1006
1013
|
};
|
|
@@ -1010,23 +1017,23 @@
|
|
|
1010
1017
|
tmp0_serialDesc.gz('index', false);
|
|
1011
1018
|
tmp0_serialDesc.gz('message', false);
|
|
1012
1019
|
tmp0_serialDesc.gz('finish_reason', true);
|
|
1013
|
-
this.
|
|
1020
|
+
this.k6o_1 = tmp0_serialDesc;
|
|
1014
1021
|
}
|
|
1015
|
-
protoOf($serializer_2).
|
|
1016
|
-
var tmp0_desc = this.
|
|
1022
|
+
protoOf($serializer_2).l6o = function (encoder, value) {
|
|
1023
|
+
var tmp0_desc = this.k6o_1;
|
|
1017
1024
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
1018
|
-
tmp1_output.ys(tmp0_desc, 0, value.
|
|
1019
|
-
tmp1_output.ft(tmp0_desc, 1, $serializer_getInstance_0(), value.
|
|
1020
|
-
if (tmp1_output.lt(tmp0_desc, 2) ? true : !(value.
|
|
1021
|
-
tmp1_output.ht(tmp0_desc, 2, StringSerializer_getInstance(), value.
|
|
1025
|
+
tmp1_output.ys(tmp0_desc, 0, value.m6o_1);
|
|
1026
|
+
tmp1_output.ft(tmp0_desc, 1, $serializer_getInstance_0(), value.n6o_1);
|
|
1027
|
+
if (tmp1_output.lt(tmp0_desc, 2) ? true : !(value.o6o_1 == null)) {
|
|
1028
|
+
tmp1_output.ht(tmp0_desc, 2, StringSerializer_getInstance(), value.o6o_1);
|
|
1022
1029
|
}
|
|
1023
1030
|
tmp1_output.pr(tmp0_desc);
|
|
1024
1031
|
};
|
|
1025
1032
|
protoOf($serializer_2).co = function (encoder, value) {
|
|
1026
|
-
return this.
|
|
1033
|
+
return this.l6o(encoder, value instanceof Choice ? value : THROW_CCE());
|
|
1027
1034
|
};
|
|
1028
1035
|
protoOf($serializer_2).do = function (decoder) {
|
|
1029
|
-
var tmp0_desc = this.
|
|
1036
|
+
var tmp0_desc = this.k6o_1;
|
|
1030
1037
|
var tmp1_flag = true;
|
|
1031
1038
|
var tmp2_index = 0;
|
|
1032
1039
|
var tmp3_bitMask0 = 0;
|
|
@@ -1068,7 +1075,7 @@
|
|
|
1068
1075
|
return Choice_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
1069
1076
|
};
|
|
1070
1077
|
protoOf($serializer_2).bo = function () {
|
|
1071
|
-
return this.
|
|
1078
|
+
return this.k6o_1;
|
|
1072
1079
|
};
|
|
1073
1080
|
protoOf($serializer_2).vz = function () {
|
|
1074
1081
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -1084,14 +1091,14 @@
|
|
|
1084
1091
|
}
|
|
1085
1092
|
function Choice_init_$Init$(seen0, index, message, finishReason, serializationConstructorMarker, $this) {
|
|
1086
1093
|
if (!(3 === (3 & seen0))) {
|
|
1087
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance_2().
|
|
1094
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_2().k6o_1);
|
|
1088
1095
|
}
|
|
1089
|
-
$this.
|
|
1090
|
-
$this.
|
|
1096
|
+
$this.m6o_1 = index;
|
|
1097
|
+
$this.n6o_1 = message;
|
|
1091
1098
|
if (0 === (seen0 & 4))
|
|
1092
|
-
$this.
|
|
1099
|
+
$this.o6o_1 = null;
|
|
1093
1100
|
else
|
|
1094
|
-
$this.
|
|
1101
|
+
$this.o6o_1 = finishReason;
|
|
1095
1102
|
return $this;
|
|
1096
1103
|
}
|
|
1097
1104
|
function Choice_init_$Create$(seen0, index, message, finishReason, serializationConstructorMarker) {
|
|
@@ -1103,21 +1110,21 @@
|
|
|
1103
1110
|
tmp0_serialDesc.gz('prompt_tokens', false);
|
|
1104
1111
|
tmp0_serialDesc.gz('completion_tokens', false);
|
|
1105
1112
|
tmp0_serialDesc.gz('total_tokens', false);
|
|
1106
|
-
this.
|
|
1113
|
+
this.p6o_1 = tmp0_serialDesc;
|
|
1107
1114
|
}
|
|
1108
|
-
protoOf($serializer_3).
|
|
1109
|
-
var tmp0_desc = this.
|
|
1115
|
+
protoOf($serializer_3).q6o = function (encoder, value) {
|
|
1116
|
+
var tmp0_desc = this.p6o_1;
|
|
1110
1117
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
1111
|
-
tmp1_output.ys(tmp0_desc, 0, value.
|
|
1112
|
-
tmp1_output.ys(tmp0_desc, 1, value.
|
|
1113
|
-
tmp1_output.ys(tmp0_desc, 2, value.
|
|
1118
|
+
tmp1_output.ys(tmp0_desc, 0, value.r6o_1);
|
|
1119
|
+
tmp1_output.ys(tmp0_desc, 1, value.s6o_1);
|
|
1120
|
+
tmp1_output.ys(tmp0_desc, 2, value.t6o_1);
|
|
1114
1121
|
tmp1_output.pr(tmp0_desc);
|
|
1115
1122
|
};
|
|
1116
1123
|
protoOf($serializer_3).co = function (encoder, value) {
|
|
1117
|
-
return this.
|
|
1124
|
+
return this.q6o(encoder, value instanceof Usage ? value : THROW_CCE());
|
|
1118
1125
|
};
|
|
1119
1126
|
protoOf($serializer_3).do = function (decoder) {
|
|
1120
|
-
var tmp0_desc = this.
|
|
1127
|
+
var tmp0_desc = this.p6o_1;
|
|
1121
1128
|
var tmp1_flag = true;
|
|
1122
1129
|
var tmp2_index = 0;
|
|
1123
1130
|
var tmp3_bitMask0 = 0;
|
|
@@ -1159,7 +1166,7 @@
|
|
|
1159
1166
|
return Usage_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
1160
1167
|
};
|
|
1161
1168
|
protoOf($serializer_3).bo = function () {
|
|
1162
|
-
return this.
|
|
1169
|
+
return this.p6o_1;
|
|
1163
1170
|
};
|
|
1164
1171
|
protoOf($serializer_3).vz = function () {
|
|
1165
1172
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -1175,11 +1182,11 @@
|
|
|
1175
1182
|
}
|
|
1176
1183
|
function Usage_init_$Init$(seen0, promptTokens, completionTokens, totalTokens, serializationConstructorMarker, $this) {
|
|
1177
1184
|
if (!(7 === (7 & seen0))) {
|
|
1178
|
-
throwMissingFieldException(seen0, 7, $serializer_getInstance_3().
|
|
1185
|
+
throwMissingFieldException(seen0, 7, $serializer_getInstance_3().p6o_1);
|
|
1179
1186
|
}
|
|
1180
|
-
$this.
|
|
1181
|
-
$this.
|
|
1182
|
-
$this.
|
|
1187
|
+
$this.r6o_1 = promptTokens;
|
|
1188
|
+
$this.s6o_1 = completionTokens;
|
|
1189
|
+
$this.t6o_1 = totalTokens;
|
|
1183
1190
|
return $this;
|
|
1184
1191
|
}
|
|
1185
1192
|
function Usage_init_$Create$(seen0, promptTokens, completionTokens, totalTokens, serializationConstructorMarker) {
|
|
@@ -1191,12 +1198,12 @@
|
|
|
1191
1198
|
function Choice() {
|
|
1192
1199
|
}
|
|
1193
1200
|
protoOf(Choice).toString = function () {
|
|
1194
|
-
return 'Choice(index=' + this.
|
|
1201
|
+
return 'Choice(index=' + this.m6o_1 + ', message=' + this.n6o_1.toString() + ', finishReason=' + this.o6o_1 + ')';
|
|
1195
1202
|
};
|
|
1196
1203
|
protoOf(Choice).hashCode = function () {
|
|
1197
|
-
var result = this.
|
|
1198
|
-
result = imul(result, 31) + this.
|
|
1199
|
-
result = imul(result, 31) + (this.
|
|
1204
|
+
var result = this.m6o_1;
|
|
1205
|
+
result = imul(result, 31) + this.n6o_1.hashCode() | 0;
|
|
1206
|
+
result = imul(result, 31) + (this.o6o_1 == null ? 0 : getStringHashCode(this.o6o_1)) | 0;
|
|
1200
1207
|
return result;
|
|
1201
1208
|
};
|
|
1202
1209
|
protoOf(Choice).equals = function (other) {
|
|
@@ -1204,23 +1211,23 @@
|
|
|
1204
1211
|
return true;
|
|
1205
1212
|
if (!(other instanceof Choice))
|
|
1206
1213
|
return false;
|
|
1207
|
-
if (!(this.
|
|
1214
|
+
if (!(this.m6o_1 === other.m6o_1))
|
|
1208
1215
|
return false;
|
|
1209
|
-
if (!this.
|
|
1216
|
+
if (!this.n6o_1.equals(other.n6o_1))
|
|
1210
1217
|
return false;
|
|
1211
|
-
if (!(this.
|
|
1218
|
+
if (!(this.o6o_1 == other.o6o_1))
|
|
1212
1219
|
return false;
|
|
1213
1220
|
return true;
|
|
1214
1221
|
};
|
|
1215
1222
|
function Usage() {
|
|
1216
1223
|
}
|
|
1217
1224
|
protoOf(Usage).toString = function () {
|
|
1218
|
-
return 'Usage(promptTokens=' + this.
|
|
1225
|
+
return 'Usage(promptTokens=' + this.r6o_1 + ', completionTokens=' + this.s6o_1 + ', totalTokens=' + this.t6o_1 + ')';
|
|
1219
1226
|
};
|
|
1220
1227
|
protoOf(Usage).hashCode = function () {
|
|
1221
|
-
var result = this.
|
|
1222
|
-
result = imul(result, 31) + this.
|
|
1223
|
-
result = imul(result, 31) + this.
|
|
1228
|
+
var result = this.r6o_1;
|
|
1229
|
+
result = imul(result, 31) + this.s6o_1 | 0;
|
|
1230
|
+
result = imul(result, 31) + this.t6o_1 | 0;
|
|
1224
1231
|
return result;
|
|
1225
1232
|
};
|
|
1226
1233
|
protoOf(Usage).equals = function (other) {
|
|
@@ -1228,11 +1235,11 @@
|
|
|
1228
1235
|
return true;
|
|
1229
1236
|
if (!(other instanceof Usage))
|
|
1230
1237
|
return false;
|
|
1231
|
-
if (!(this.
|
|
1238
|
+
if (!(this.r6o_1 === other.r6o_1))
|
|
1232
1239
|
return false;
|
|
1233
|
-
if (!(this.
|
|
1240
|
+
if (!(this.s6o_1 === other.s6o_1))
|
|
1234
1241
|
return false;
|
|
1235
|
-
if (!(this.
|
|
1242
|
+
if (!(this.t6o_1 === other.t6o_1))
|
|
1236
1243
|
return false;
|
|
1237
1244
|
return true;
|
|
1238
1245
|
};
|
|
@@ -1243,7 +1250,7 @@
|
|
|
1243
1250
|
// Inline function 'kotlin.arrayOf' call
|
|
1244
1251
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1245
1252
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1246
|
-
tmp.
|
|
1253
|
+
tmp.u6o_1 = [null, null, null, null, lazy(tmp_0, OpenAIResponse$Companion$$childSerializers$_anonymous__z8nlex), null];
|
|
1247
1254
|
}
|
|
1248
1255
|
var Companion_instance_5;
|
|
1249
1256
|
function Companion_getInstance_5() {
|
|
@@ -1260,27 +1267,27 @@
|
|
|
1260
1267
|
tmp0_serialDesc.gz('model', false);
|
|
1261
1268
|
tmp0_serialDesc.gz('choices', false);
|
|
1262
1269
|
tmp0_serialDesc.gz('usage', true);
|
|
1263
|
-
this.
|
|
1270
|
+
this.v6o_1 = tmp0_serialDesc;
|
|
1264
1271
|
}
|
|
1265
|
-
protoOf($serializer_4).
|
|
1266
|
-
var tmp0_desc = this.
|
|
1272
|
+
protoOf($serializer_4).w6o = function (encoder, value) {
|
|
1273
|
+
var tmp0_desc = this.v6o_1;
|
|
1267
1274
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
1268
|
-
var tmp2_cached = Companion_getInstance_5().
|
|
1269
|
-
tmp1_output.dt(tmp0_desc, 0, value.
|
|
1270
|
-
tmp1_output.dt(tmp0_desc, 1, value.
|
|
1271
|
-
tmp1_output.zs(tmp0_desc, 2, value.
|
|
1272
|
-
tmp1_output.dt(tmp0_desc, 3, value.
|
|
1273
|
-
tmp1_output.ft(tmp0_desc, 4, tmp2_cached[4].x(), value.
|
|
1274
|
-
if (tmp1_output.lt(tmp0_desc, 5) ? true : !(value.
|
|
1275
|
-
tmp1_output.ht(tmp0_desc, 5, $serializer_getInstance_3(), value.
|
|
1275
|
+
var tmp2_cached = Companion_getInstance_5().u6o_1;
|
|
1276
|
+
tmp1_output.dt(tmp0_desc, 0, value.x6o_1);
|
|
1277
|
+
tmp1_output.dt(tmp0_desc, 1, value.y6o_1);
|
|
1278
|
+
tmp1_output.zs(tmp0_desc, 2, value.z6o_1);
|
|
1279
|
+
tmp1_output.dt(tmp0_desc, 3, value.a6p_1);
|
|
1280
|
+
tmp1_output.ft(tmp0_desc, 4, tmp2_cached[4].x(), value.b6p_1);
|
|
1281
|
+
if (tmp1_output.lt(tmp0_desc, 5) ? true : !(value.c6p_1 == null)) {
|
|
1282
|
+
tmp1_output.ht(tmp0_desc, 5, $serializer_getInstance_3(), value.c6p_1);
|
|
1276
1283
|
}
|
|
1277
1284
|
tmp1_output.pr(tmp0_desc);
|
|
1278
1285
|
};
|
|
1279
1286
|
protoOf($serializer_4).co = function (encoder, value) {
|
|
1280
|
-
return this.
|
|
1287
|
+
return this.w6o(encoder, value instanceof OpenAIResponse ? value : THROW_CCE());
|
|
1281
1288
|
};
|
|
1282
1289
|
protoOf($serializer_4).do = function (decoder) {
|
|
1283
|
-
var tmp0_desc = this.
|
|
1290
|
+
var tmp0_desc = this.v6o_1;
|
|
1284
1291
|
var tmp1_flag = true;
|
|
1285
1292
|
var tmp2_index = 0;
|
|
1286
1293
|
var tmp3_bitMask0 = 0;
|
|
@@ -1291,7 +1298,7 @@
|
|
|
1291
1298
|
var tmp8_local4 = null;
|
|
1292
1299
|
var tmp9_local5 = null;
|
|
1293
1300
|
var tmp10_input = decoder.or(tmp0_desc);
|
|
1294
|
-
var tmp11_cached = Companion_getInstance_5().
|
|
1301
|
+
var tmp11_cached = Companion_getInstance_5().u6o_1;
|
|
1295
1302
|
if (tmp10_input.es()) {
|
|
1296
1303
|
tmp4_local0 = tmp10_input.yr(tmp0_desc, 0);
|
|
1297
1304
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -1344,10 +1351,10 @@
|
|
|
1344
1351
|
return OpenAIResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
|
|
1345
1352
|
};
|
|
1346
1353
|
protoOf($serializer_4).bo = function () {
|
|
1347
|
-
return this.
|
|
1354
|
+
return this.v6o_1;
|
|
1348
1355
|
};
|
|
1349
1356
|
protoOf($serializer_4).vz = function () {
|
|
1350
|
-
var tmp0_cached = Companion_getInstance_5().
|
|
1357
|
+
var tmp0_cached = Companion_getInstance_5().u6o_1;
|
|
1351
1358
|
// Inline function 'kotlin.arrayOf' call
|
|
1352
1359
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1353
1360
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -1361,17 +1368,17 @@
|
|
|
1361
1368
|
}
|
|
1362
1369
|
function OpenAIResponse_init_$Init$(seen0, id, objectType, created, model, choices, usage, serializationConstructorMarker, $this) {
|
|
1363
1370
|
if (!(31 === (31 & seen0))) {
|
|
1364
|
-
throwMissingFieldException(seen0, 31, $serializer_getInstance_4().
|
|
1371
|
+
throwMissingFieldException(seen0, 31, $serializer_getInstance_4().v6o_1);
|
|
1365
1372
|
}
|
|
1366
|
-
$this.
|
|
1367
|
-
$this.
|
|
1368
|
-
$this.
|
|
1369
|
-
$this.
|
|
1370
|
-
$this.
|
|
1373
|
+
$this.x6o_1 = id;
|
|
1374
|
+
$this.y6o_1 = objectType;
|
|
1375
|
+
$this.z6o_1 = created;
|
|
1376
|
+
$this.a6p_1 = model;
|
|
1377
|
+
$this.b6p_1 = choices;
|
|
1371
1378
|
if (0 === (seen0 & 32))
|
|
1372
|
-
$this.
|
|
1379
|
+
$this.c6p_1 = null;
|
|
1373
1380
|
else
|
|
1374
|
-
$this.
|
|
1381
|
+
$this.c6p_1 = usage;
|
|
1375
1382
|
return $this;
|
|
1376
1383
|
}
|
|
1377
1384
|
function OpenAIResponse_init_$Create$(seen0, id, objectType, created, model, choices, usage, serializationConstructorMarker) {
|
|
@@ -1380,23 +1387,23 @@
|
|
|
1380
1387
|
function OpenAIResponse(id, objectType, created, model, choices, usage) {
|
|
1381
1388
|
Companion_getInstance_5();
|
|
1382
1389
|
usage = usage === VOID ? null : usage;
|
|
1383
|
-
this.
|
|
1384
|
-
this.
|
|
1385
|
-
this.
|
|
1386
|
-
this.
|
|
1387
|
-
this.
|
|
1388
|
-
this.
|
|
1390
|
+
this.x6o_1 = id;
|
|
1391
|
+
this.y6o_1 = objectType;
|
|
1392
|
+
this.z6o_1 = created;
|
|
1393
|
+
this.a6p_1 = model;
|
|
1394
|
+
this.b6p_1 = choices;
|
|
1395
|
+
this.c6p_1 = usage;
|
|
1389
1396
|
}
|
|
1390
1397
|
protoOf(OpenAIResponse).toString = function () {
|
|
1391
|
-
return 'OpenAIResponse(id=' + this.
|
|
1398
|
+
return 'OpenAIResponse(id=' + this.x6o_1 + ', objectType=' + this.y6o_1 + ', created=' + this.z6o_1.toString() + ', model=' + this.a6p_1 + ', choices=' + toString(this.b6p_1) + ', usage=' + toString_0(this.c6p_1) + ')';
|
|
1392
1399
|
};
|
|
1393
1400
|
protoOf(OpenAIResponse).hashCode = function () {
|
|
1394
|
-
var result = getStringHashCode(this.
|
|
1395
|
-
result = imul(result, 31) + getStringHashCode(this.w6o_1) | 0;
|
|
1396
|
-
result = imul(result, 31) + this.x6o_1.hashCode() | 0;
|
|
1401
|
+
var result = getStringHashCode(this.x6o_1);
|
|
1397
1402
|
result = imul(result, 31) + getStringHashCode(this.y6o_1) | 0;
|
|
1398
|
-
result = imul(result, 31) +
|
|
1399
|
-
result = imul(result, 31) + (this.a6p_1
|
|
1403
|
+
result = imul(result, 31) + this.z6o_1.hashCode() | 0;
|
|
1404
|
+
result = imul(result, 31) + getStringHashCode(this.a6p_1) | 0;
|
|
1405
|
+
result = imul(result, 31) + hashCode(this.b6p_1) | 0;
|
|
1406
|
+
result = imul(result, 31) + (this.c6p_1 == null ? 0 : this.c6p_1.hashCode()) | 0;
|
|
1400
1407
|
return result;
|
|
1401
1408
|
};
|
|
1402
1409
|
protoOf(OpenAIResponse).equals = function (other) {
|
|
@@ -1404,24 +1411,24 @@
|
|
|
1404
1411
|
return true;
|
|
1405
1412
|
if (!(other instanceof OpenAIResponse))
|
|
1406
1413
|
return false;
|
|
1407
|
-
if (!(this.
|
|
1414
|
+
if (!(this.x6o_1 === other.x6o_1))
|
|
1408
1415
|
return false;
|
|
1409
|
-
if (!(this.
|
|
1416
|
+
if (!(this.y6o_1 === other.y6o_1))
|
|
1410
1417
|
return false;
|
|
1411
|
-
if (!equalsLong(this.
|
|
1418
|
+
if (!equalsLong(this.z6o_1, other.z6o_1))
|
|
1412
1419
|
return false;
|
|
1413
|
-
if (!(this.
|
|
1420
|
+
if (!(this.a6p_1 === other.a6p_1))
|
|
1414
1421
|
return false;
|
|
1415
|
-
if (!equals(this.
|
|
1422
|
+
if (!equals(this.b6p_1, other.b6p_1))
|
|
1416
1423
|
return false;
|
|
1417
|
-
if (!equals(this.
|
|
1424
|
+
if (!equals(this.c6p_1, other.c6p_1))
|
|
1418
1425
|
return false;
|
|
1419
1426
|
return true;
|
|
1420
1427
|
};
|
|
1421
1428
|
function $executeRequestCOROUTINE$(_this__u8e3s4, messages, resultContinuation) {
|
|
1422
1429
|
CoroutineImpl.call(this, resultContinuation);
|
|
1423
|
-
this.
|
|
1424
|
-
this.
|
|
1430
|
+
this.l6p_1 = _this__u8e3s4;
|
|
1431
|
+
this.m6p_1 = messages;
|
|
1425
1432
|
}
|
|
1426
1433
|
protoOf($executeRequestCOROUTINE$).a9 = function () {
|
|
1427
1434
|
var suspendResult = this.u8_1;
|
|
@@ -1432,7 +1439,7 @@
|
|
|
1432
1439
|
case 0:
|
|
1433
1440
|
this.t8_1 = 3;
|
|
1434
1441
|
this.s8_1 = 1;
|
|
1435
|
-
suspendResult = this.
|
|
1442
|
+
suspendResult = this.l6p_1.n6p_1.f6m(this.m6p_1, this);
|
|
1436
1443
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1437
1444
|
return suspendResult;
|
|
1438
1445
|
}
|
|
@@ -1454,9 +1461,9 @@
|
|
|
1454
1461
|
var $this$runCatching = this_1.tl_1;
|
|
1455
1462
|
var tmp_2 = _Result___get_value__impl__bjfvqg($this$runCatching);
|
|
1456
1463
|
var response = (tmp_2 == null ? true : !(tmp_2 == null)) ? tmp_2 : THROW_CCE();
|
|
1457
|
-
var tmp0_safe_receiver = firstOrNull(response.
|
|
1458
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1459
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1464
|
+
var tmp0_safe_receiver = firstOrNull(response.b6p_1);
|
|
1465
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n6o_1;
|
|
1466
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.c6o_1;
|
|
1460
1467
|
var tmp_3;
|
|
1461
1468
|
if (tmp2_elvis_lhs == null) {
|
|
1462
1469
|
throw IllegalStateException_init_$Create$('No response from OpenAI');
|
|
@@ -1496,9 +1503,9 @@
|
|
|
1496
1503
|
while (true);
|
|
1497
1504
|
};
|
|
1498
1505
|
function BaseOpenAIRepository(openAIApi) {
|
|
1499
|
-
this.
|
|
1506
|
+
this.n6p_1 = openAIApi;
|
|
1500
1507
|
}
|
|
1501
|
-
protoOf(BaseOpenAIRepository).
|
|
1508
|
+
protoOf(BaseOpenAIRepository).o6p = function (messages, $completion) {
|
|
1502
1509
|
var tmp = new $executeRequestCOROUTINE$(this, messages, $completion);
|
|
1503
1510
|
tmp.u8_1 = Unit_instance;
|
|
1504
1511
|
tmp.v8_1 = null;
|
|
@@ -1530,9 +1537,9 @@
|
|
|
1530
1537
|
// Inline function 'kotlin.let' call
|
|
1531
1538
|
this_0.sb(getStringHashCode(take(message, 50))).d8(':');
|
|
1532
1539
|
}
|
|
1533
|
-
this_0.sb(getStringHashCode(context.
|
|
1540
|
+
this_0.sb(getStringHashCode(context.q6n_1));
|
|
1534
1541
|
this_0.d8(':');
|
|
1535
|
-
this_0.sb(getStringHashCode(context.
|
|
1542
|
+
this_0.sb(getStringHashCode(context.r6n_1));
|
|
1536
1543
|
var key = this_0.toString();
|
|
1537
1544
|
return key;
|
|
1538
1545
|
}
|
|
@@ -1545,23 +1552,23 @@
|
|
|
1545
1552
|
var this_0 = StringBuilder_init_$Create$();
|
|
1546
1553
|
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');
|
|
1547
1554
|
this_0.d8('\n\n');
|
|
1548
|
-
this_0.d8('Your personality: ' + context.
|
|
1555
|
+
this_0.d8('Your personality: ' + context.q6n_1);
|
|
1549
1556
|
this_0.d8('\n');
|
|
1550
|
-
this_0.d8('Current game state: ' + context.
|
|
1557
|
+
this_0.d8('Current game state: ' + context.r6n_1);
|
|
1551
1558
|
this_0.d8('\n\n');
|
|
1552
1559
|
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!");
|
|
1553
|
-
if (!(context.
|
|
1554
|
-
this_0.d8('\nYou are chatting with ' + context.
|
|
1560
|
+
if (!(context.t6n_1 == null)) {
|
|
1561
|
+
this_0.d8('\nYou are chatting with ' + context.t6n_1 + '.');
|
|
1555
1562
|
}
|
|
1556
1563
|
var tmp$ret$3 = this_0.toString();
|
|
1557
|
-
messages.j(tmp.
|
|
1564
|
+
messages.j(tmp.w6n(tmp$ret$3));
|
|
1558
1565
|
// Inline function 'kotlin.collections.forEach' call
|
|
1559
|
-
var _iterator__ex2g4s = takeLast(context.
|
|
1566
|
+
var _iterator__ex2g4s = takeLast(context.s6n_1, 5).l();
|
|
1560
1567
|
while (_iterator__ex2g4s.m()) {
|
|
1561
1568
|
var element = _iterator__ex2g4s.n();
|
|
1562
|
-
messages.j(Companion_getInstance_3().
|
|
1569
|
+
messages.j(Companion_getInstance_3().y6n(element));
|
|
1563
1570
|
}
|
|
1564
|
-
messages.j(Companion_getInstance_3().
|
|
1571
|
+
messages.j(Companion_getInstance_3().x6n(playerMessage));
|
|
1565
1572
|
return messages;
|
|
1566
1573
|
}
|
|
1567
1574
|
function buildRandomMessagePrompt($this, context) {
|
|
@@ -1571,19 +1578,19 @@
|
|
|
1571
1578
|
var this_0 = StringBuilder_init_$Create$();
|
|
1572
1579
|
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');
|
|
1573
1580
|
this_0.d8('\n\n');
|
|
1574
|
-
this_0.d8('Your personality: ' + context.
|
|
1581
|
+
this_0.d8('Your personality: ' + context.q6n_1);
|
|
1575
1582
|
this_0.d8('\n');
|
|
1576
|
-
this_0.d8('Current game state: ' + context.
|
|
1583
|
+
this_0.d8('Current game state: ' + context.r6n_1);
|
|
1577
1584
|
this_0.d8('\n\n');
|
|
1578
1585
|
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.');
|
|
1579
1586
|
var tmp$ret$2 = this_0.toString();
|
|
1580
|
-
return listOf([tmp.
|
|
1587
|
+
return listOf([tmp.w6n(tmp$ret$2), Companion_getInstance_3().x6n('Generate a spontaneous comment about the current game situation.')]);
|
|
1581
1588
|
}
|
|
1582
1589
|
function $executeRequestCOROUTINE$_0(_this__u8e3s4, messages, cacheKey, resultContinuation) {
|
|
1583
1590
|
CoroutineImpl.call(this, resultContinuation);
|
|
1584
|
-
this.
|
|
1585
|
-
this.
|
|
1586
|
-
this.
|
|
1591
|
+
this.z6p_1 = _this__u8e3s4;
|
|
1592
|
+
this.a6q_1 = messages;
|
|
1593
|
+
this.b6q_1 = cacheKey;
|
|
1587
1594
|
}
|
|
1588
1595
|
protoOf($executeRequestCOROUTINE$_0).a9 = function () {
|
|
1589
1596
|
var suspendResult = this.u8_1;
|
|
@@ -1594,7 +1601,7 @@
|
|
|
1594
1601
|
case 0:
|
|
1595
1602
|
this.t8_1 = 3;
|
|
1596
1603
|
this.s8_1 = 1;
|
|
1597
|
-
suspendResult = this.
|
|
1604
|
+
suspendResult = this.z6p_1.d6q_1.o6p(this.a6q_1, this);
|
|
1598
1605
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1599
1606
|
return suspendResult;
|
|
1600
1607
|
}
|
|
@@ -1616,7 +1623,7 @@
|
|
|
1616
1623
|
var $this$runCatching = this_1.tl_1;
|
|
1617
1624
|
var tmp_2 = _Result___get_value__impl__bjfvqg($this$runCatching);
|
|
1618
1625
|
var content = (tmp_2 == null ? true : !(tmp_2 == null)) ? tmp_2 : THROW_CCE();
|
|
1619
|
-
this.
|
|
1626
|
+
this.z6p_1.c6q_1.b6n(this.b6q_1, content);
|
|
1620
1627
|
tmp_1 = _Result___init__impl__xyqfz8(content);
|
|
1621
1628
|
} catch ($p) {
|
|
1622
1629
|
var tmp_3;
|
|
@@ -1649,12 +1656,12 @@
|
|
|
1649
1656
|
while (true);
|
|
1650
1657
|
};
|
|
1651
1658
|
function BotChatRepositoryImpl(openAIApi, cache) {
|
|
1652
|
-
this.
|
|
1653
|
-
this.
|
|
1659
|
+
this.c6q_1 = cache;
|
|
1660
|
+
this.d6q_1 = new BaseOpenAIRepository(openAIApi);
|
|
1654
1661
|
}
|
|
1655
|
-
protoOf(BotChatRepositoryImpl).
|
|
1662
|
+
protoOf(BotChatRepositoryImpl).p6p = function (playerMessage, context, $completion) {
|
|
1656
1663
|
var cacheKey = buildCacheKey(this, 'answer', playerMessage, context);
|
|
1657
|
-
var tmp0_safe_receiver = this.
|
|
1664
|
+
var tmp0_safe_receiver = this.c6q_1.t1b(cacheKey);
|
|
1658
1665
|
if (tmp0_safe_receiver == null)
|
|
1659
1666
|
null;
|
|
1660
1667
|
else {
|
|
@@ -1669,9 +1676,9 @@
|
|
|
1669
1676
|
return tmp;
|
|
1670
1677
|
return tmp;
|
|
1671
1678
|
};
|
|
1672
|
-
protoOf(BotChatRepositoryImpl).
|
|
1679
|
+
protoOf(BotChatRepositoryImpl).q6p = function (context, $completion) {
|
|
1673
1680
|
var cacheKey = buildCacheKey(this, 'random', null, context);
|
|
1674
|
-
var tmp0_safe_receiver = this.
|
|
1681
|
+
var tmp0_safe_receiver = this.c6q_1.t1b(cacheKey);
|
|
1675
1682
|
if (tmp0_safe_receiver == null)
|
|
1676
1683
|
null;
|
|
1677
1684
|
else {
|
|
@@ -1700,8 +1707,8 @@
|
|
|
1700
1707
|
tmp = json;
|
|
1701
1708
|
}
|
|
1702
1709
|
json = tmp;
|
|
1703
|
-
this.
|
|
1704
|
-
this.
|
|
1710
|
+
this.e6q_1 = json;
|
|
1711
|
+
this.f6q_1 = new BaseOpenAIRepository(openAIApi);
|
|
1705
1712
|
}
|
|
1706
1713
|
function aiModule(config) {
|
|
1707
1714
|
return Module_init_$Create$('AIModule', VOID, VOID, aiModule$lambda(config));
|
|
@@ -1715,29 +1722,43 @@
|
|
|
1715
1722
|
return new InMemoryBotChatCache(new Long(300000, 0), 100);
|
|
1716
1723
|
}
|
|
1717
1724
|
function aiModule$lambda$lambda_1($this$singleton) {
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
var
|
|
1722
|
-
$
|
|
1723
|
-
var
|
|
1724
|
-
|
|
1725
|
-
|
|
1725
|
+
// Inline function 'org.kodein.di.instance' call
|
|
1726
|
+
var tmp = $this$singleton.o60();
|
|
1727
|
+
// Inline function 'org.kodein.type.generic' call
|
|
1728
|
+
var tmp_0 = typeToken(createKType(getKClass(OpenAIConfig), arrayOf([]), false));
|
|
1729
|
+
var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
|
|
1730
|
+
var openAIConfig = tmp.n60(tmp$ret$0, null);
|
|
1731
|
+
return HttpClient(aiModule$lambda$lambda$lambda(openAIConfig));
|
|
1732
|
+
}
|
|
1733
|
+
function aiModule$lambda$lambda$lambda$lambda$lambda($openAIConfig) {
|
|
1734
|
+
return function ($this$Json) {
|
|
1735
|
+
$this$Json.f1a_1 = true;
|
|
1736
|
+
$this$Json.g1a_1 = true;
|
|
1737
|
+
$this$Json.h1a_1 = $openAIConfig.m6m_1;
|
|
1738
|
+
return Unit_instance;
|
|
1739
|
+
};
|
|
1726
1740
|
}
|
|
1727
|
-
function aiModule$lambda$lambda$lambda$lambda($
|
|
1728
|
-
|
|
1729
|
-
|
|
1741
|
+
function aiModule$lambda$lambda$lambda$lambda($openAIConfig) {
|
|
1742
|
+
return function ($this$install) {
|
|
1743
|
+
json($this$install, Json(VOID, aiModule$lambda$lambda$lambda$lambda$lambda($openAIConfig)));
|
|
1744
|
+
return Unit_instance;
|
|
1745
|
+
};
|
|
1730
1746
|
}
|
|
1731
|
-
function aiModule$lambda$lambda$lambda$
|
|
1732
|
-
$this$
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1747
|
+
function aiModule$lambda$lambda$lambda$lambda_0($openAIConfig) {
|
|
1748
|
+
return function ($this$install) {
|
|
1749
|
+
$this$install.g4q(get_DEFAULT(Companion_instance_0));
|
|
1750
|
+
$this$install.f4q_1 = $openAIConfig.m6m_1 ? LogLevel_INFO_getInstance() : LogLevel_NONE_getInstance();
|
|
1751
|
+
return Unit_instance;
|
|
1752
|
+
};
|
|
1736
1753
|
}
|
|
1737
|
-
function aiModule$lambda$lambda$lambda
|
|
1738
|
-
$this$
|
|
1739
|
-
|
|
1740
|
-
|
|
1754
|
+
function aiModule$lambda$lambda$lambda($openAIConfig) {
|
|
1755
|
+
return function ($this$HttpClient) {
|
|
1756
|
+
var tmp = Plugin_getInstance();
|
|
1757
|
+
$this$HttpClient.s3t(tmp, aiModule$lambda$lambda$lambda$lambda($openAIConfig));
|
|
1758
|
+
var tmp_0 = Companion_getInstance_0();
|
|
1759
|
+
$this$HttpClient.s3t(tmp_0, aiModule$lambda$lambda$lambda$lambda_0($openAIConfig));
|
|
1760
|
+
return Unit_instance;
|
|
1761
|
+
};
|
|
1741
1762
|
}
|
|
1742
1763
|
function aiModule$lambda$lambda_2($this$singleton) {
|
|
1743
1764
|
// Inline function 'org.kodein.di.instance' call
|