client_plugin_logic_deb 1.8.451 → 1.8.453
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/Kosi-Kaverit-kaverit.js +94 -94
- package/Kosi-Kaverit-kaverit.js.map +1 -1
- package/Kosi-Kodein-kodein-di.js +828 -788
- package/Kosi-Kodein-kodein-di.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +1928 -1928
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/Logic_Debertz-ai_module.js +684 -688
- package/Logic_Debertz-ai_module.js.map +1 -1
- package/Logic_Debertz-client_plugin.d.ts +784 -698
- package/Logic_Debertz-client_plugin.js +5091 -5091
- package/Logic_Debertz-client_plugin.js.map +1 -1
- package/Logic_Debertz-core.js +2256 -2270
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +21274 -21284
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_client.js +13526 -13573
- package/Logic_Debertz-game_client.js.map +1 -1
- package/Logic_Debertz-game_server.js +2260 -2273
- package/Logic_Debertz-game_server.js.map +1 -1
- package/error-library-error.js +7 -7
- package/kotlin-kotlin-stdlib.js +5719 -4846
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +22 -22
- package/kotlinx-coroutines-core.js +3652 -3603
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.js +204 -5
- package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +1699 -438
- package/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +2256 -2255
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-io.js +15 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js +1630 -1630
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +457 -395
- package/ktor-ktor-client-content-negotiation.js.map +1 -1
- package/ktor-ktor-client-core.js +6643 -3939
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-client-logging.js +2627 -893
- package/ktor-ktor-client-logging.js.map +1 -1
- package/ktor-ktor-events.js +14 -14
- package/ktor-ktor-events.js.map +1 -1
- package/ktor-ktor-http-cio.js +2278 -0
- package/ktor-ktor-http-cio.js.map +1 -0
- package/ktor-ktor-http.js +1268 -1128
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +2624 -5540
- package/ktor-ktor-io.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.js +8 -8
- package/ktor-ktor-serialization-kotlinx-json.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx.js +333 -339
- package/ktor-ktor-serialization-kotlinx.js.map +1 -1
- package/ktor-ktor-serialization.js +143 -153
- package/ktor-ktor-serialization.js.map +1 -1
- package/{ktor-ktor-client-js.js → ktor-ktor-sse.js} +2 -2
- package/ktor-ktor-sse.js.map +1 -0
- package/ktor-ktor-utils.js +1711 -1144
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websockets.js +123 -136
- package/ktor-ktor-websockets.js.map +1 -1
- package/package.json +2 -4
- package/random-library-crypto-rand.js +15 -15
- package/random-library-crypto-rand.js.map +1 -1
- package/random-library-secure-random.js +10 -10
- package/random-library-secure-random.js.map +1 -1
- package/raspberry-cardgame-lib-core.js +376 -377
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +120 -121
- package/raspberry-cardgame-lib-logger.js.map +1 -1
- package/raspberry-cardgame-lib-random.js +1181 -1207
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/uuid.js +38 -38
- package/uuid.js.map +1 -1
- /package/{ktor-ktor-client-js.js.map → kotlinx-serialization-kotlinx-serialization-json-io.js.map} +0 -0
|
@@ -43,95 +43,94 @@
|
|
|
43
43
|
'use strict';
|
|
44
44
|
//region block: imports
|
|
45
45
|
var imul = Math.imul;
|
|
46
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
47
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
46
|
+
var protoOf = kotlin_kotlin.$_$.be;
|
|
47
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.ed;
|
|
48
48
|
var VOID = kotlin_kotlin.$_$.b;
|
|
49
|
-
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.
|
|
50
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
51
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
52
|
-
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.
|
|
53
|
-
var
|
|
54
|
-
var
|
|
49
|
+
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
|
|
50
|
+
var Unit_instance = kotlin_kotlin.$_$.i5;
|
|
51
|
+
var CoroutineImpl = kotlin_kotlin.$_$.db;
|
|
52
|
+
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.q;
|
|
53
|
+
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.h;
|
|
54
|
+
var url = kotlin_io_ktor_ktor_client_core.$_$.u;
|
|
55
|
+
var headers = kotlin_io_ktor_ktor_client_core.$_$.s;
|
|
55
56
|
var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.b;
|
|
56
|
-
var contentType = kotlin_io_ktor_ktor_http.$_$.
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.p;
|
|
57
|
+
var contentType = kotlin_io_ktor_ktor_http.$_$.k1;
|
|
58
|
+
var getKClass = kotlin_kotlin.$_$.ve;
|
|
59
|
+
var arrayOf = kotlin_kotlin.$_$.bj;
|
|
60
|
+
var createKType = kotlin_kotlin.$_$.te;
|
|
61
|
+
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.k;
|
|
62
|
+
var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.t;
|
|
63
63
|
var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.a;
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
var
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var
|
|
80
|
-
var
|
|
81
|
-
var
|
|
82
|
-
var
|
|
83
|
-
var
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var initMetadataForObject = kotlin_kotlin.$_$.vc;
|
|
64
|
+
var HttpStatement = kotlin_io_ktor_ktor_client_core.$_$.x;
|
|
65
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.na;
|
|
66
|
+
var Companion_instance = kotlin_kotlin.$_$.d5;
|
|
67
|
+
var THROW_CCE = kotlin_kotlin.$_$.ni;
|
|
68
|
+
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.w2;
|
|
69
|
+
var createFailure = kotlin_kotlin.$_$.ej;
|
|
70
|
+
var Exception = kotlin_kotlin.$_$.ei;
|
|
71
|
+
var Result = kotlin_kotlin.$_$.li;
|
|
72
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.cd;
|
|
73
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ad;
|
|
74
|
+
var getStringHashCode = kotlin_kotlin.$_$.yc;
|
|
75
|
+
var equalsLong = kotlin_kotlin.$_$.sb;
|
|
76
|
+
var System_instance = kotlin_kotlin.$_$.x4;
|
|
77
|
+
var removeAll = kotlin_kotlin.$_$.c9;
|
|
78
|
+
var subtract = kotlin_kotlin.$_$.ec;
|
|
79
|
+
var compare = kotlin_kotlin.$_$.nb;
|
|
80
|
+
var Long = kotlin_kotlin.$_$.hi;
|
|
81
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.r;
|
|
82
|
+
var compareTo = kotlin_kotlin.$_$.rc;
|
|
83
|
+
var to = kotlin_kotlin.$_$.sj;
|
|
84
|
+
var mapOf = kotlin_kotlin.$_$.q8;
|
|
85
|
+
var initMetadataForObject = kotlin_kotlin.$_$.gd;
|
|
87
86
|
var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w;
|
|
88
87
|
var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y1;
|
|
89
88
|
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.e;
|
|
90
|
-
var lazy = kotlin_kotlin.$_$.
|
|
91
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
89
|
+
var lazy = kotlin_kotlin.$_$.kj;
|
|
90
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.bd;
|
|
92
91
|
var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f2;
|
|
93
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
94
|
-
var equals = kotlin_kotlin.$_$.
|
|
92
|
+
var emptyList = kotlin_kotlin.$_$.i7;
|
|
93
|
+
var equals = kotlin_kotlin.$_$.tc;
|
|
95
94
|
var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g;
|
|
96
95
|
var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a1;
|
|
97
96
|
var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a2;
|
|
98
97
|
var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b2;
|
|
99
98
|
var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k2;
|
|
100
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
101
|
-
var toString = kotlin_kotlin.$_$.
|
|
102
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
99
|
+
var objectCreate = kotlin_kotlin.$_$.ae;
|
|
100
|
+
var toString = kotlin_kotlin.$_$.ee;
|
|
101
|
+
var hashCode = kotlin_kotlin.$_$.zc;
|
|
103
102
|
var createAnnotatedEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;
|
|
104
103
|
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g2;
|
|
105
|
-
var Enum = kotlin_kotlin.$_$.
|
|
106
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
107
|
-
var getBooleanHashCode = kotlin_kotlin.$_$.
|
|
104
|
+
var Enum = kotlin_kotlin.$_$.ci;
|
|
105
|
+
var getNumberHashCode = kotlin_kotlin.$_$.wc;
|
|
106
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.vc;
|
|
108
107
|
var DoubleSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r;
|
|
109
108
|
var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u;
|
|
110
109
|
var LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v;
|
|
111
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
112
|
-
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.
|
|
113
|
-
var firstOrNull = kotlin_kotlin.$_$.
|
|
114
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
115
|
-
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.
|
|
116
|
-
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.
|
|
117
|
-
var take = kotlin_kotlin.$_$.
|
|
118
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
119
|
-
var takeLast = kotlin_kotlin.$_$.
|
|
120
|
-
var listOf = kotlin_kotlin.$_$.
|
|
110
|
+
var toString_0 = kotlin_kotlin.$_$.rj;
|
|
111
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.a3;
|
|
112
|
+
var firstOrNull = kotlin_kotlin.$_$.o7;
|
|
113
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.r1;
|
|
114
|
+
var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.z2;
|
|
115
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.b1;
|
|
116
|
+
var take = kotlin_kotlin.$_$.wg;
|
|
117
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.i;
|
|
118
|
+
var takeLast = kotlin_kotlin.$_$.q9;
|
|
119
|
+
var listOf = kotlin_kotlin.$_$.n8;
|
|
121
120
|
var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.d;
|
|
122
121
|
var Module_init_$Create$ = kotlin_org_kodein_di_kodein_di.$_$.a;
|
|
123
122
|
var typeToken = kotlin_org_kodein_type_kaverit.$_$.d;
|
|
124
123
|
var TypeToken = kotlin_org_kodein_type_kaverit.$_$.b;
|
|
125
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
126
|
-
var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.
|
|
124
|
+
var isInterface = kotlin_kotlin.$_$.pd;
|
|
125
|
+
var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.b1;
|
|
127
126
|
var json = kotlin_io_ktor_ktor_serialization_kotlinx_json.$_$.a;
|
|
128
127
|
var Companion_instance_0 = kotlin_io_ktor_ktor_client_logging.$_$.d;
|
|
129
|
-
var get_DEFAULT = kotlin_io_ktor_ktor_client_logging.$_$.
|
|
128
|
+
var get_DEFAULT = kotlin_io_ktor_ktor_client_logging.$_$.e;
|
|
130
129
|
var LogLevel_NONE_getInstance = kotlin_io_ktor_ktor_client_logging.$_$.c;
|
|
131
130
|
var LogLevel_INFO_getInstance = kotlin_io_ktor_ktor_client_logging.$_$.b;
|
|
132
|
-
var
|
|
133
|
-
var
|
|
134
|
-
var HttpClient_0 = kotlin_io_ktor_ktor_client_core.$_$.
|
|
131
|
+
var get_ContentNegotiation = kotlin_io_ktor_ktor_client_content_negotiation.$_$.a;
|
|
132
|
+
var get_Logging = kotlin_io_ktor_ktor_client_logging.$_$.f;
|
|
133
|
+
var HttpClient_0 = kotlin_io_ktor_ktor_client_core.$_$.c1;
|
|
135
134
|
var Singleton = kotlin_org_kodein_di_kodein_di.$_$.d;
|
|
136
135
|
//endregion
|
|
137
136
|
//region block: pre-declaration
|
|
@@ -146,7 +145,7 @@
|
|
|
146
145
|
initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
147
146
|
initMetadataForClass(BotChatContext, 'BotChatContext', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});
|
|
148
147
|
initMetadataForCompanion(Companion_0, VOID, [SerializerFactory]);
|
|
149
|
-
initMetadataForClass(Role, 'Role', VOID, Enum, VOID, VOID, VOID, {0:
|
|
148
|
+
initMetadataForClass(Role, 'Role', VOID, Enum, VOID, VOID, VOID, {0: Companion_getInstance_1});
|
|
150
149
|
initMetadataForCompanion(Companion_1);
|
|
151
150
|
initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
152
151
|
initMetadataForClass(ChatMessage, 'ChatMessage', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_0});
|
|
@@ -173,77 +172,76 @@
|
|
|
173
172
|
}
|
|
174
173
|
function OpenAIApiImpl$chatCompletion$lambda(this$0) {
|
|
175
174
|
return function ($this$headers) {
|
|
176
|
-
$this$headers.
|
|
175
|
+
$this$headers.q3b(HttpHeaders_getInstance().c3j_1, 'Bearer ' + this$0.t7n_1.m7n_1);
|
|
177
176
|
return Unit_instance;
|
|
178
177
|
};
|
|
179
178
|
}
|
|
180
179
|
function $chatCompletionCOROUTINE$(_this__u8e3s4, messages, resultContinuation) {
|
|
181
180
|
CoroutineImpl.call(this, resultContinuation);
|
|
182
|
-
this.
|
|
183
|
-
this.
|
|
181
|
+
this.d7o_1 = _this__u8e3s4;
|
|
182
|
+
this.e7o_1 = messages;
|
|
184
183
|
}
|
|
185
|
-
protoOf($chatCompletionCOROUTINE$).
|
|
186
|
-
var suspendResult = this.
|
|
184
|
+
protoOf($chatCompletionCOROUTINE$).m9 = function () {
|
|
185
|
+
var suspendResult = this.g9_1;
|
|
187
186
|
$sm: do
|
|
188
187
|
try {
|
|
189
|
-
var tmp = this.
|
|
188
|
+
var tmp = this.e9_1;
|
|
190
189
|
switch (tmp) {
|
|
191
190
|
case 0:
|
|
192
|
-
this.
|
|
193
|
-
this.
|
|
194
|
-
var request = new OpenAIRequest(this.
|
|
195
|
-
var tmp0 = this.
|
|
196
|
-
var urlString = this.
|
|
197
|
-
var
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
191
|
+
this.f9_1 = 4;
|
|
192
|
+
this.f9_1 = 3;
|
|
193
|
+
var request = new OpenAIRequest(this.d7o_1.t7n_1.n7n_1, this.e7o_1, this.d7o_1.t7n_1.p7n_1, this.d7o_1.t7n_1.q7n_1);
|
|
194
|
+
var tmp0 = this.d7o_1.u7n_1;
|
|
195
|
+
var urlString = this.d7o_1.t7n_1.o7n_1 + '/chat/completions';
|
|
196
|
+
var builder = new HttpRequestBuilder();
|
|
197
|
+
builder.j44_1 = Companion_getInstance().a3n_1;
|
|
198
|
+
url(builder, urlString);
|
|
199
|
+
headers(builder, OpenAIApiImpl$chatCompletion$lambda(this.d7o_1));
|
|
200
|
+
contentType(builder, Application_getInstance().u3g_1);
|
|
201
201
|
if (request == null) {
|
|
202
|
-
|
|
203
|
-
var tmp_0 =
|
|
204
|
-
var tmp_1
|
|
205
|
-
var tmp_2;
|
|
202
|
+
builder.l44_1 = NullBody_instance;
|
|
203
|
+
var tmp_0 = getKClass(OpenAIRequest);
|
|
204
|
+
var tmp_1;
|
|
206
205
|
try {
|
|
207
|
-
|
|
206
|
+
tmp_1 = createKType(getKClass(OpenAIRequest), arrayOf([]), false);
|
|
208
207
|
} catch ($p) {
|
|
209
|
-
var
|
|
208
|
+
var tmp_2;
|
|
210
209
|
if ($p instanceof Error) {
|
|
211
|
-
var
|
|
212
|
-
|
|
210
|
+
var _unused_var__etf5q3 = $p;
|
|
211
|
+
tmp_2 = null;
|
|
213
212
|
} else {
|
|
214
213
|
throw $p;
|
|
215
214
|
}
|
|
216
|
-
|
|
215
|
+
tmp_1 = tmp_2;
|
|
217
216
|
}
|
|
218
|
-
|
|
217
|
+
builder.b4a(new TypeInfo(tmp_0, tmp_1));
|
|
219
218
|
} else {
|
|
220
219
|
if (request instanceof OutgoingContent) {
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
builder.l44_1 = request;
|
|
221
|
+
builder.b4a(null);
|
|
223
222
|
} else {
|
|
224
|
-
|
|
225
|
-
var
|
|
226
|
-
var
|
|
227
|
-
var tmp_6;
|
|
223
|
+
builder.l44_1 = request;
|
|
224
|
+
var tmp_3 = getKClass(OpenAIRequest);
|
|
225
|
+
var tmp_4;
|
|
228
226
|
try {
|
|
229
|
-
|
|
227
|
+
tmp_4 = createKType(getKClass(OpenAIRequest), arrayOf([]), false);
|
|
230
228
|
} catch ($p) {
|
|
231
|
-
var
|
|
229
|
+
var tmp_5;
|
|
232
230
|
if ($p instanceof Error) {
|
|
233
|
-
var
|
|
234
|
-
|
|
231
|
+
var _unused_var__etf5q3_0 = $p;
|
|
232
|
+
tmp_5 = null;
|
|
235
233
|
} else {
|
|
236
234
|
throw $p;
|
|
237
235
|
}
|
|
238
|
-
|
|
236
|
+
tmp_4 = tmp_5;
|
|
239
237
|
}
|
|
240
|
-
|
|
238
|
+
builder.b4a(new TypeInfo(tmp_3, tmp_4));
|
|
241
239
|
}
|
|
242
240
|
}
|
|
243
241
|
|
|
244
|
-
|
|
245
|
-
this.
|
|
246
|
-
suspendResult = (new HttpStatement(
|
|
242
|
+
builder.j44_1 = Companion_getInstance().a3n_1;
|
|
243
|
+
this.e9_1 = 1;
|
|
244
|
+
suspendResult = (new HttpStatement(builder, tmp0)).u55(this);
|
|
247
245
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
248
246
|
return suspendResult;
|
|
249
247
|
}
|
|
@@ -251,27 +249,25 @@
|
|
|
251
249
|
continue $sm;
|
|
252
250
|
case 1:
|
|
253
251
|
var response = suspendResult;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
var
|
|
258
|
-
var
|
|
259
|
-
var tmp_11 = getKClass(OpenAIResponse);
|
|
260
|
-
var tmp_12;
|
|
252
|
+
this.g7o_1 = Companion_instance;
|
|
253
|
+
this.e9_1 = 2;
|
|
254
|
+
var tmp_6 = response.x45();
|
|
255
|
+
var tmp_7 = getKClass(OpenAIResponse);
|
|
256
|
+
var tmp_8;
|
|
261
257
|
try {
|
|
262
|
-
|
|
258
|
+
tmp_8 = createKType(getKClass(OpenAIResponse), arrayOf([]), false);
|
|
263
259
|
} catch ($p) {
|
|
264
|
-
var
|
|
260
|
+
var tmp_9;
|
|
265
261
|
if ($p instanceof Error) {
|
|
266
|
-
var
|
|
267
|
-
|
|
262
|
+
var _unused_var__etf5q3_1 = $p;
|
|
263
|
+
tmp_9 = null;
|
|
268
264
|
} else {
|
|
269
265
|
throw $p;
|
|
270
266
|
}
|
|
271
|
-
|
|
267
|
+
tmp_8 = tmp_9;
|
|
272
268
|
}
|
|
273
269
|
|
|
274
|
-
suspendResult =
|
|
270
|
+
suspendResult = tmp_6.u45(new TypeInfo(tmp_7, tmp_8), this);
|
|
275
271
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
276
272
|
return suspendResult;
|
|
277
273
|
}
|
|
@@ -279,51 +275,51 @@
|
|
|
279
275
|
continue $sm;
|
|
280
276
|
case 2:
|
|
281
277
|
var tmp2 = suspendResult instanceof OpenAIResponse ? suspendResult : THROW_CCE();
|
|
282
|
-
var
|
|
283
|
-
this.
|
|
284
|
-
|
|
285
|
-
this.
|
|
286
|
-
this.
|
|
278
|
+
var tmp_10 = this;
|
|
279
|
+
this.g7o_1;
|
|
280
|
+
tmp_10.f7o_1 = _Result___init__impl__xyqfz8(tmp2);
|
|
281
|
+
this.f9_1 = 4;
|
|
282
|
+
this.e9_1 = 5;
|
|
287
283
|
continue $sm;
|
|
288
284
|
case 3:
|
|
289
|
-
this.
|
|
290
|
-
var
|
|
291
|
-
if (
|
|
292
|
-
var e = this.
|
|
293
|
-
var
|
|
294
|
-
|
|
295
|
-
this.
|
|
285
|
+
this.f9_1 = 4;
|
|
286
|
+
var tmp_11 = this.h9_1;
|
|
287
|
+
if (tmp_11 instanceof Exception) {
|
|
288
|
+
var e = this.h9_1;
|
|
289
|
+
var tmp_12 = this;
|
|
290
|
+
tmp_12.f7o_1 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
291
|
+
this.e9_1 = 5;
|
|
296
292
|
continue $sm;
|
|
297
293
|
} else {
|
|
298
|
-
throw this.
|
|
294
|
+
throw this.h9_1;
|
|
299
295
|
}
|
|
300
296
|
|
|
301
297
|
case 4:
|
|
302
|
-
throw this.
|
|
298
|
+
throw this.h9_1;
|
|
303
299
|
case 5:
|
|
304
|
-
this.
|
|
305
|
-
return new Result(this.
|
|
300
|
+
this.f9_1 = 4;
|
|
301
|
+
return new Result(this.f7o_1);
|
|
306
302
|
}
|
|
307
303
|
} catch ($p) {
|
|
308
304
|
var e_0 = $p;
|
|
309
|
-
if (this.
|
|
305
|
+
if (this.f9_1 === 4) {
|
|
310
306
|
throw e_0;
|
|
311
307
|
} else {
|
|
312
|
-
this.
|
|
313
|
-
this.
|
|
308
|
+
this.e9_1 = this.f9_1;
|
|
309
|
+
this.h9_1 = e_0;
|
|
314
310
|
}
|
|
315
311
|
}
|
|
316
312
|
while (true);
|
|
317
313
|
};
|
|
318
314
|
function OpenAIApiImpl(config, httpClient) {
|
|
319
|
-
this.
|
|
320
|
-
this.
|
|
315
|
+
this.t7n_1 = config;
|
|
316
|
+
this.u7n_1 = httpClient;
|
|
321
317
|
}
|
|
322
|
-
protoOf(OpenAIApiImpl).
|
|
318
|
+
protoOf(OpenAIApiImpl).l7n = function (messages, $completion) {
|
|
323
319
|
var tmp = new $chatCompletionCOROUTINE$(this, messages, $completion);
|
|
324
|
-
tmp.
|
|
325
|
-
tmp.
|
|
326
|
-
var tmp_0 = tmp.
|
|
320
|
+
tmp.g9_1 = Unit_instance;
|
|
321
|
+
tmp.h9_1 = null;
|
|
322
|
+
var tmp_0 = tmp.m9();
|
|
327
323
|
if (tmp_0 === get_COROUTINE_SUSPENDED())
|
|
328
324
|
return tmp_0;
|
|
329
325
|
return tmp_0;
|
|
@@ -331,15 +327,15 @@
|
|
|
331
327
|
function BotChatCache() {
|
|
332
328
|
}
|
|
333
329
|
function CacheEntry(value, timestamp) {
|
|
334
|
-
this.
|
|
335
|
-
this.
|
|
330
|
+
this.i7o_1 = value;
|
|
331
|
+
this.j7o_1 = timestamp;
|
|
336
332
|
}
|
|
337
333
|
protoOf(CacheEntry).toString = function () {
|
|
338
|
-
return 'CacheEntry(value=' + this.
|
|
334
|
+
return 'CacheEntry(value=' + this.i7o_1 + ', timestamp=' + this.j7o_1.toString() + ')';
|
|
339
335
|
};
|
|
340
336
|
protoOf(CacheEntry).hashCode = function () {
|
|
341
|
-
var result = getStringHashCode(this.
|
|
342
|
-
result = imul(result, 31) + this.
|
|
337
|
+
var result = getStringHashCode(this.i7o_1);
|
|
338
|
+
result = imul(result, 31) + this.j7o_1.hashCode() | 0;
|
|
343
339
|
return result;
|
|
344
340
|
};
|
|
345
341
|
protoOf(CacheEntry).equals = function (other) {
|
|
@@ -347,36 +343,36 @@
|
|
|
347
343
|
return true;
|
|
348
344
|
if (!(other instanceof CacheEntry))
|
|
349
345
|
return false;
|
|
350
|
-
if (!(this.
|
|
346
|
+
if (!(this.i7o_1 === other.i7o_1))
|
|
351
347
|
return false;
|
|
352
|
-
if (!equalsLong(this.
|
|
348
|
+
if (!equalsLong(this.j7o_1, other.j7o_1))
|
|
353
349
|
return false;
|
|
354
350
|
return true;
|
|
355
351
|
};
|
|
356
352
|
function cleanExpired($this) {
|
|
357
|
-
var now = System_instance.
|
|
358
|
-
var tmp = $this.
|
|
353
|
+
var now = System_instance.ik().fl();
|
|
354
|
+
var tmp = $this.m7o_1.m1();
|
|
359
355
|
removeAll(tmp, InMemoryBotChatCache$cleanExpired$lambda(now, $this));
|
|
360
356
|
}
|
|
361
357
|
function InMemoryBotChatCache$cleanExpired$lambda($now, this$0) {
|
|
362
358
|
return function (_destruct__k2r9zo) {
|
|
363
359
|
// Inline function 'kotlin.collections.component2' call
|
|
364
|
-
var entry = _destruct__k2r9zo.
|
|
365
|
-
return compare(subtract($now, entry.
|
|
360
|
+
var entry = _destruct__k2r9zo.o1();
|
|
361
|
+
return compare(subtract($now, entry.j7o_1), this$0.k7o_1) > 0;
|
|
366
362
|
};
|
|
367
363
|
}
|
|
368
364
|
function InMemoryBotChatCache(ttlMillis, maxSize) {
|
|
369
365
|
ttlMillis = ttlMillis === VOID ? new Long(300000, 0) : ttlMillis;
|
|
370
366
|
maxSize = maxSize === VOID ? 100 : maxSize;
|
|
371
|
-
this.
|
|
372
|
-
this.
|
|
367
|
+
this.k7o_1 = ttlMillis;
|
|
368
|
+
this.l7o_1 = maxSize;
|
|
373
369
|
var tmp = this;
|
|
374
370
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
375
|
-
tmp.
|
|
371
|
+
tmp.m7o_1 = LinkedHashMap_init_$Create$();
|
|
376
372
|
}
|
|
377
|
-
protoOf(InMemoryBotChatCache).
|
|
373
|
+
protoOf(InMemoryBotChatCache).i3a = function (key) {
|
|
378
374
|
cleanExpired(this);
|
|
379
|
-
var tmp0_elvis_lhs = this.
|
|
375
|
+
var tmp0_elvis_lhs = this.m7o_1.v2(key);
|
|
380
376
|
var tmp;
|
|
381
377
|
if (tmp0_elvis_lhs == null) {
|
|
382
378
|
return null;
|
|
@@ -384,66 +380,66 @@
|
|
|
384
380
|
tmp = tmp0_elvis_lhs;
|
|
385
381
|
}
|
|
386
382
|
var entry = tmp;
|
|
387
|
-
if (compare(subtract(System_instance.
|
|
388
|
-
this.
|
|
383
|
+
if (compare(subtract(System_instance.ik().fl(), entry.j7o_1), this.k7o_1) > 0) {
|
|
384
|
+
this.m7o_1.h3(key);
|
|
389
385
|
return null;
|
|
390
386
|
}
|
|
391
|
-
return entry.
|
|
387
|
+
return entry.i7o_1;
|
|
392
388
|
};
|
|
393
|
-
protoOf(InMemoryBotChatCache).
|
|
389
|
+
protoOf(InMemoryBotChatCache).h7o = function (key, value) {
|
|
394
390
|
cleanExpired(this);
|
|
395
|
-
if (this.
|
|
391
|
+
if (this.m7o_1.g1() >= this.l7o_1) {
|
|
396
392
|
// Inline function 'kotlin.collections.minByOrNull' call
|
|
397
|
-
var tmp0 = this.
|
|
393
|
+
var tmp0 = this.m7o_1.m1();
|
|
398
394
|
var tmp$ret$0;
|
|
399
395
|
$l$block_0: {
|
|
400
396
|
// Inline function 'kotlin.collections.minByOrNull' call
|
|
401
|
-
var iterator = tmp0.
|
|
402
|
-
if (!iterator.
|
|
397
|
+
var iterator = tmp0.t();
|
|
398
|
+
if (!iterator.u()) {
|
|
403
399
|
tmp$ret$0 = null;
|
|
404
400
|
break $l$block_0;
|
|
405
401
|
}
|
|
406
|
-
var minElem = iterator.
|
|
407
|
-
if (!iterator.
|
|
402
|
+
var minElem = iterator.v();
|
|
403
|
+
if (!iterator.u()) {
|
|
408
404
|
tmp$ret$0 = minElem;
|
|
409
405
|
break $l$block_0;
|
|
410
406
|
}
|
|
411
|
-
var minValue = minElem.
|
|
407
|
+
var minValue = minElem.o1().j7o_1;
|
|
412
408
|
do {
|
|
413
|
-
var e = iterator.
|
|
414
|
-
var v = e.
|
|
409
|
+
var e = iterator.v();
|
|
410
|
+
var v = e.o1().j7o_1;
|
|
415
411
|
if (compareTo(minValue, v) > 0) {
|
|
416
412
|
minElem = e;
|
|
417
413
|
minValue = v;
|
|
418
414
|
}
|
|
419
415
|
}
|
|
420
|
-
while (iterator.
|
|
416
|
+
while (iterator.u());
|
|
421
417
|
tmp$ret$0 = minElem;
|
|
422
418
|
}
|
|
423
419
|
var tmp0_safe_receiver = tmp$ret$0;
|
|
424
|
-
var oldestKey = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
420
|
+
var oldestKey = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n1();
|
|
425
421
|
if (oldestKey == null)
|
|
426
422
|
null;
|
|
427
423
|
else {
|
|
428
424
|
// Inline function 'kotlin.let' call
|
|
429
|
-
this.
|
|
425
|
+
this.m7o_1.h3(oldestKey);
|
|
430
426
|
}
|
|
431
427
|
}
|
|
432
|
-
var tmp0_0 = this.
|
|
428
|
+
var tmp0_0 = this.m7o_1;
|
|
433
429
|
// Inline function 'kotlin.collections.set' call
|
|
434
|
-
var value_0 = new CacheEntry(value, System_instance.
|
|
435
|
-
tmp0_0.
|
|
430
|
+
var value_0 = new CacheEntry(value, System_instance.ik().fl());
|
|
431
|
+
tmp0_0.g3(key, value_0);
|
|
436
432
|
};
|
|
437
433
|
function BotChatConfig() {
|
|
438
434
|
BotChatConfig_instance = this;
|
|
439
|
-
this.
|
|
440
|
-
this.
|
|
441
|
-
this.
|
|
442
|
-
this.
|
|
443
|
-
this.
|
|
444
|
-
}
|
|
445
|
-
protoOf(BotChatConfig).
|
|
446
|
-
var tmp0_elvis_lhs = this.
|
|
435
|
+
this.n7o_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.')]);
|
|
436
|
+
this.o7o_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.';
|
|
437
|
+
this.p7o_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';
|
|
438
|
+
this.q7o_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!";
|
|
439
|
+
this.r7o_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.';
|
|
440
|
+
}
|
|
441
|
+
protoOf(BotChatConfig).s7o = function (playerNumber) {
|
|
442
|
+
var tmp0_elvis_lhs = this.n7o_1.v2(playerNumber % this.n7o_1.g1() | 0);
|
|
447
443
|
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;
|
|
448
444
|
};
|
|
449
445
|
var BotChatConfig_instance;
|
|
@@ -462,10 +458,10 @@
|
|
|
462
458
|
// Inline function 'kotlin.arrayOf' call
|
|
463
459
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
464
460
|
// Inline function 'kotlin.js.asDynamic' call
|
|
465
|
-
tmp.
|
|
461
|
+
tmp.t7o_1 = [null, null, lazy(tmp_0, BotChatContext$Companion$$childSerializers$_anonymous__c0jn7e), null];
|
|
466
462
|
}
|
|
467
463
|
var Companion_instance_1;
|
|
468
|
-
function
|
|
464
|
+
function Companion_getInstance_0() {
|
|
469
465
|
if (Companion_instance_1 == null)
|
|
470
466
|
new Companion();
|
|
471
467
|
return Companion_instance_1;
|
|
@@ -473,31 +469,31 @@
|
|
|
473
469
|
function $serializer() {
|
|
474
470
|
$serializer_instance = this;
|
|
475
471
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.BotChatContext', this, 4);
|
|
476
|
-
tmp0_serialDesc.
|
|
477
|
-
tmp0_serialDesc.
|
|
478
|
-
tmp0_serialDesc.
|
|
479
|
-
tmp0_serialDesc.
|
|
480
|
-
this.
|
|
481
|
-
}
|
|
482
|
-
protoOf($serializer).
|
|
483
|
-
var tmp0_desc = this.
|
|
484
|
-
var tmp1_output = encoder.
|
|
485
|
-
var tmp2_cached =
|
|
486
|
-
tmp1_output.
|
|
487
|
-
tmp1_output.
|
|
488
|
-
if (tmp1_output.
|
|
489
|
-
tmp1_output.
|
|
472
|
+
tmp0_serialDesc.xz('botPersonality', false);
|
|
473
|
+
tmp0_serialDesc.xz('gameState', false);
|
|
474
|
+
tmp0_serialDesc.xz('conversationHistory', true);
|
|
475
|
+
tmp0_serialDesc.xz('playerName', true);
|
|
476
|
+
this.u7o_1 = tmp0_serialDesc;
|
|
477
|
+
}
|
|
478
|
+
protoOf($serializer).v7o = function (encoder, value) {
|
|
479
|
+
var tmp0_desc = this.u7o_1;
|
|
480
|
+
var tmp1_output = encoder.fs(tmp0_desc);
|
|
481
|
+
var tmp2_cached = Companion_getInstance_0().t7o_1;
|
|
482
|
+
tmp1_output.ut(tmp0_desc, 0, value.w7o_1);
|
|
483
|
+
tmp1_output.ut(tmp0_desc, 1, value.x7o_1);
|
|
484
|
+
if (tmp1_output.cu(tmp0_desc, 2) ? true : !equals(value.y7o_1, emptyList())) {
|
|
485
|
+
tmp1_output.wt(tmp0_desc, 2, tmp2_cached[2].o1(), value.y7o_1);
|
|
490
486
|
}
|
|
491
|
-
if (tmp1_output.
|
|
492
|
-
tmp1_output.
|
|
487
|
+
if (tmp1_output.cu(tmp0_desc, 3) ? true : !(value.z7o_1 == null)) {
|
|
488
|
+
tmp1_output.yt(tmp0_desc, 3, StringSerializer_getInstance(), value.z7o_1);
|
|
493
489
|
}
|
|
494
|
-
tmp1_output.
|
|
490
|
+
tmp1_output.gs(tmp0_desc);
|
|
495
491
|
};
|
|
496
|
-
protoOf($serializer).
|
|
497
|
-
return this.
|
|
492
|
+
protoOf($serializer).to = function (encoder, value) {
|
|
493
|
+
return this.v7o(encoder, value instanceof BotChatContext ? value : THROW_CCE());
|
|
498
494
|
};
|
|
499
|
-
protoOf($serializer).
|
|
500
|
-
var tmp0_desc = this.
|
|
495
|
+
protoOf($serializer).uo = function (decoder) {
|
|
496
|
+
var tmp0_desc = this.u7o_1;
|
|
501
497
|
var tmp1_flag = true;
|
|
502
498
|
var tmp2_index = 0;
|
|
503
499
|
var tmp3_bitMask0 = 0;
|
|
@@ -505,56 +501,56 @@
|
|
|
505
501
|
var tmp5_local1 = null;
|
|
506
502
|
var tmp6_local2 = null;
|
|
507
503
|
var tmp7_local3 = null;
|
|
508
|
-
var tmp8_input = decoder.
|
|
509
|
-
var tmp9_cached =
|
|
510
|
-
if (tmp8_input.
|
|
511
|
-
tmp4_local0 = tmp8_input.
|
|
504
|
+
var tmp8_input = decoder.fs(tmp0_desc);
|
|
505
|
+
var tmp9_cached = Companion_getInstance_0().t7o_1;
|
|
506
|
+
if (tmp8_input.vs()) {
|
|
507
|
+
tmp4_local0 = tmp8_input.ps(tmp0_desc, 0);
|
|
512
508
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
513
|
-
tmp5_local1 = tmp8_input.
|
|
509
|
+
tmp5_local1 = tmp8_input.ps(tmp0_desc, 1);
|
|
514
510
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
515
|
-
tmp6_local2 = tmp8_input.
|
|
511
|
+
tmp6_local2 = tmp8_input.rs(tmp0_desc, 2, tmp9_cached[2].o1(), tmp6_local2);
|
|
516
512
|
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
517
|
-
tmp7_local3 = tmp8_input.
|
|
513
|
+
tmp7_local3 = tmp8_input.ts(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
|
|
518
514
|
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
519
515
|
} else
|
|
520
516
|
while (tmp1_flag) {
|
|
521
|
-
tmp2_index = tmp8_input.
|
|
517
|
+
tmp2_index = tmp8_input.ws(tmp0_desc);
|
|
522
518
|
switch (tmp2_index) {
|
|
523
519
|
case -1:
|
|
524
520
|
tmp1_flag = false;
|
|
525
521
|
break;
|
|
526
522
|
case 0:
|
|
527
|
-
tmp4_local0 = tmp8_input.
|
|
523
|
+
tmp4_local0 = tmp8_input.ps(tmp0_desc, 0);
|
|
528
524
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
529
525
|
break;
|
|
530
526
|
case 1:
|
|
531
|
-
tmp5_local1 = tmp8_input.
|
|
527
|
+
tmp5_local1 = tmp8_input.ps(tmp0_desc, 1);
|
|
532
528
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
533
529
|
break;
|
|
534
530
|
case 2:
|
|
535
|
-
tmp6_local2 = tmp8_input.
|
|
531
|
+
tmp6_local2 = tmp8_input.rs(tmp0_desc, 2, tmp9_cached[2].o1(), tmp6_local2);
|
|
536
532
|
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
537
533
|
break;
|
|
538
534
|
case 3:
|
|
539
|
-
tmp7_local3 = tmp8_input.
|
|
535
|
+
tmp7_local3 = tmp8_input.ts(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
|
|
540
536
|
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
541
537
|
break;
|
|
542
538
|
default:
|
|
543
539
|
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
544
540
|
}
|
|
545
541
|
}
|
|
546
|
-
tmp8_input.
|
|
542
|
+
tmp8_input.gs(tmp0_desc);
|
|
547
543
|
return BotChatContext_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
548
544
|
};
|
|
549
|
-
protoOf($serializer).
|
|
550
|
-
return this.
|
|
545
|
+
protoOf($serializer).so = function () {
|
|
546
|
+
return this.u7o_1;
|
|
551
547
|
};
|
|
552
|
-
protoOf($serializer).
|
|
553
|
-
var tmp0_cached =
|
|
548
|
+
protoOf($serializer).m10 = function () {
|
|
549
|
+
var tmp0_cached = Companion_getInstance_0().t7o_1;
|
|
554
550
|
// Inline function 'kotlin.arrayOf' call
|
|
555
551
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
556
552
|
// Inline function 'kotlin.js.asDynamic' call
|
|
557
|
-
return [StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[2].
|
|
553
|
+
return [StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[2].o1(), get_nullable(StringSerializer_getInstance())];
|
|
558
554
|
};
|
|
559
555
|
var $serializer_instance;
|
|
560
556
|
function $serializer_getInstance() {
|
|
@@ -564,40 +560,40 @@
|
|
|
564
560
|
}
|
|
565
561
|
function BotChatContext_init_$Init$(seen0, botPersonality, gameState, conversationHistory, playerName, serializationConstructorMarker, $this) {
|
|
566
562
|
if (!(3 === (3 & seen0))) {
|
|
567
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance().
|
|
563
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance().u7o_1);
|
|
568
564
|
}
|
|
569
|
-
$this.
|
|
570
|
-
$this.
|
|
565
|
+
$this.w7o_1 = botPersonality;
|
|
566
|
+
$this.x7o_1 = gameState;
|
|
571
567
|
if (0 === (seen0 & 4))
|
|
572
|
-
$this.
|
|
568
|
+
$this.y7o_1 = emptyList();
|
|
573
569
|
else
|
|
574
|
-
$this.
|
|
570
|
+
$this.y7o_1 = conversationHistory;
|
|
575
571
|
if (0 === (seen0 & 8))
|
|
576
|
-
$this.
|
|
572
|
+
$this.z7o_1 = null;
|
|
577
573
|
else
|
|
578
|
-
$this.
|
|
574
|
+
$this.z7o_1 = playerName;
|
|
579
575
|
return $this;
|
|
580
576
|
}
|
|
581
577
|
function BotChatContext_init_$Create$(seen0, botPersonality, gameState, conversationHistory, playerName, serializationConstructorMarker) {
|
|
582
578
|
return BotChatContext_init_$Init$(seen0, botPersonality, gameState, conversationHistory, playerName, serializationConstructorMarker, objectCreate(protoOf(BotChatContext)));
|
|
583
579
|
}
|
|
584
580
|
function BotChatContext(botPersonality, gameState, conversationHistory, playerName) {
|
|
585
|
-
|
|
581
|
+
Companion_getInstance_0();
|
|
586
582
|
conversationHistory = conversationHistory === VOID ? emptyList() : conversationHistory;
|
|
587
583
|
playerName = playerName === VOID ? null : playerName;
|
|
588
|
-
this.
|
|
589
|
-
this.
|
|
590
|
-
this.
|
|
591
|
-
this.
|
|
584
|
+
this.w7o_1 = botPersonality;
|
|
585
|
+
this.x7o_1 = gameState;
|
|
586
|
+
this.y7o_1 = conversationHistory;
|
|
587
|
+
this.z7o_1 = playerName;
|
|
592
588
|
}
|
|
593
589
|
protoOf(BotChatContext).toString = function () {
|
|
594
|
-
return 'BotChatContext(botPersonality=' + this.
|
|
590
|
+
return 'BotChatContext(botPersonality=' + this.w7o_1 + ', gameState=' + this.x7o_1 + ', conversationHistory=' + toString(this.y7o_1) + ', playerName=' + this.z7o_1 + ')';
|
|
595
591
|
};
|
|
596
592
|
protoOf(BotChatContext).hashCode = function () {
|
|
597
|
-
var result = getStringHashCode(this.
|
|
598
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
599
|
-
result = imul(result, 31) + hashCode(this.
|
|
600
|
-
result = imul(result, 31) + (this.
|
|
593
|
+
var result = getStringHashCode(this.w7o_1);
|
|
594
|
+
result = imul(result, 31) + getStringHashCode(this.x7o_1) | 0;
|
|
595
|
+
result = imul(result, 31) + hashCode(this.y7o_1) | 0;
|
|
596
|
+
result = imul(result, 31) + (this.z7o_1 == null ? 0 : getStringHashCode(this.z7o_1)) | 0;
|
|
601
597
|
return result;
|
|
602
598
|
};
|
|
603
599
|
protoOf(BotChatContext).equals = function (other) {
|
|
@@ -605,18 +601,18 @@
|
|
|
605
601
|
return true;
|
|
606
602
|
if (!(other instanceof BotChatContext))
|
|
607
603
|
return false;
|
|
608
|
-
if (!(this.
|
|
604
|
+
if (!(this.w7o_1 === other.w7o_1))
|
|
609
605
|
return false;
|
|
610
|
-
if (!(this.
|
|
606
|
+
if (!(this.x7o_1 === other.x7o_1))
|
|
611
607
|
return false;
|
|
612
|
-
if (!equals(this.
|
|
608
|
+
if (!equals(this.y7o_1, other.y7o_1))
|
|
613
609
|
return false;
|
|
614
|
-
if (!(this.
|
|
610
|
+
if (!(this.z7o_1 == other.z7o_1))
|
|
615
611
|
return false;
|
|
616
612
|
return true;
|
|
617
613
|
};
|
|
618
614
|
function _get_$cachedSerializer__te6jhj($this) {
|
|
619
|
-
return $this.
|
|
615
|
+
return $this.a7p_1.o1();
|
|
620
616
|
}
|
|
621
617
|
function ChatMessage$Role$Companion$_anonymous__13jozo() {
|
|
622
618
|
var tmp = values();
|
|
@@ -640,16 +636,16 @@
|
|
|
640
636
|
Companion_instance_2 = this;
|
|
641
637
|
var tmp = this;
|
|
642
638
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
643
|
-
tmp.
|
|
639
|
+
tmp.a7p_1 = lazy(tmp_0, ChatMessage$Role$Companion$_anonymous__13jozo);
|
|
644
640
|
}
|
|
645
|
-
protoOf(Companion_0).
|
|
641
|
+
protoOf(Companion_0).e5e = function () {
|
|
646
642
|
return _get_$cachedSerializer__te6jhj(this);
|
|
647
643
|
};
|
|
648
|
-
protoOf(Companion_0).
|
|
649
|
-
return this.
|
|
644
|
+
protoOf(Companion_0).x10 = function (typeParamsSerializers) {
|
|
645
|
+
return this.e5e();
|
|
650
646
|
};
|
|
651
647
|
var Companion_instance_2;
|
|
652
|
-
function
|
|
648
|
+
function Companion_getInstance_1() {
|
|
653
649
|
Role_initEntries();
|
|
654
650
|
if (Companion_instance_2 == null)
|
|
655
651
|
new Companion_0();
|
|
@@ -663,10 +659,10 @@
|
|
|
663
659
|
Role_SYSTEM_instance = new Role('SYSTEM', 0);
|
|
664
660
|
Role_USER_instance = new Role('USER', 1);
|
|
665
661
|
Role_ASSISTANT_instance = new Role('ASSISTANT', 2);
|
|
666
|
-
|
|
662
|
+
Companion_getInstance_1();
|
|
667
663
|
}
|
|
668
664
|
function ChatMessage$Companion$$childSerializers$_anonymous__qywqat() {
|
|
669
|
-
return
|
|
665
|
+
return Companion_getInstance_1().e5e();
|
|
670
666
|
}
|
|
671
667
|
function Role(name, ordinal) {
|
|
672
668
|
Enum.call(this, name, ordinal);
|
|
@@ -678,19 +674,19 @@
|
|
|
678
674
|
// Inline function 'kotlin.arrayOf' call
|
|
679
675
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
680
676
|
// Inline function 'kotlin.js.asDynamic' call
|
|
681
|
-
tmp.
|
|
677
|
+
tmp.b7p_1 = [lazy(tmp_0, ChatMessage$Companion$$childSerializers$_anonymous__qywqat), null];
|
|
682
678
|
}
|
|
683
|
-
protoOf(Companion_1).
|
|
679
|
+
protoOf(Companion_1).c7p = function (content) {
|
|
684
680
|
return new ChatMessage(Role_SYSTEM_getInstance(), content);
|
|
685
681
|
};
|
|
686
|
-
protoOf(Companion_1).
|
|
682
|
+
protoOf(Companion_1).d7p = function (content) {
|
|
687
683
|
return new ChatMessage(Role_USER_getInstance(), content);
|
|
688
684
|
};
|
|
689
|
-
protoOf(Companion_1).
|
|
685
|
+
protoOf(Companion_1).e7p = function (content) {
|
|
690
686
|
return new ChatMessage(Role_ASSISTANT_getInstance(), content);
|
|
691
687
|
};
|
|
692
688
|
var Companion_instance_3;
|
|
693
|
-
function
|
|
689
|
+
function Companion_getInstance_2() {
|
|
694
690
|
if (Companion_instance_3 == null)
|
|
695
691
|
new Companion_1();
|
|
696
692
|
return Companion_instance_3;
|
|
@@ -698,65 +694,65 @@
|
|
|
698
694
|
function $serializer_0() {
|
|
699
695
|
$serializer_instance_0 = this;
|
|
700
696
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.ChatMessage', this, 2);
|
|
701
|
-
tmp0_serialDesc.
|
|
702
|
-
tmp0_serialDesc.
|
|
703
|
-
this.
|
|
704
|
-
}
|
|
705
|
-
protoOf($serializer_0).
|
|
706
|
-
var tmp0_desc = this.
|
|
707
|
-
var tmp1_output = encoder.
|
|
708
|
-
var tmp2_cached =
|
|
709
|
-
tmp1_output.
|
|
710
|
-
tmp1_output.
|
|
711
|
-
tmp1_output.
|
|
712
|
-
};
|
|
713
|
-
protoOf($serializer_0).
|
|
714
|
-
return this.
|
|
715
|
-
};
|
|
716
|
-
protoOf($serializer_0).
|
|
717
|
-
var tmp0_desc = this.
|
|
697
|
+
tmp0_serialDesc.xz('role', false);
|
|
698
|
+
tmp0_serialDesc.xz('content', false);
|
|
699
|
+
this.f7p_1 = tmp0_serialDesc;
|
|
700
|
+
}
|
|
701
|
+
protoOf($serializer_0).g7p = function (encoder, value) {
|
|
702
|
+
var tmp0_desc = this.f7p_1;
|
|
703
|
+
var tmp1_output = encoder.fs(tmp0_desc);
|
|
704
|
+
var tmp2_cached = Companion_getInstance_2().b7p_1;
|
|
705
|
+
tmp1_output.wt(tmp0_desc, 0, tmp2_cached[0].o1(), value.h7p_1);
|
|
706
|
+
tmp1_output.ut(tmp0_desc, 1, value.i7p_1);
|
|
707
|
+
tmp1_output.gs(tmp0_desc);
|
|
708
|
+
};
|
|
709
|
+
protoOf($serializer_0).to = function (encoder, value) {
|
|
710
|
+
return this.g7p(encoder, value instanceof ChatMessage ? value : THROW_CCE());
|
|
711
|
+
};
|
|
712
|
+
protoOf($serializer_0).uo = function (decoder) {
|
|
713
|
+
var tmp0_desc = this.f7p_1;
|
|
718
714
|
var tmp1_flag = true;
|
|
719
715
|
var tmp2_index = 0;
|
|
720
716
|
var tmp3_bitMask0 = 0;
|
|
721
717
|
var tmp4_local0 = null;
|
|
722
718
|
var tmp5_local1 = null;
|
|
723
|
-
var tmp6_input = decoder.
|
|
724
|
-
var tmp7_cached =
|
|
725
|
-
if (tmp6_input.
|
|
726
|
-
tmp4_local0 = tmp6_input.
|
|
719
|
+
var tmp6_input = decoder.fs(tmp0_desc);
|
|
720
|
+
var tmp7_cached = Companion_getInstance_2().b7p_1;
|
|
721
|
+
if (tmp6_input.vs()) {
|
|
722
|
+
tmp4_local0 = tmp6_input.rs(tmp0_desc, 0, tmp7_cached[0].o1(), tmp4_local0);
|
|
727
723
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
728
|
-
tmp5_local1 = tmp6_input.
|
|
724
|
+
tmp5_local1 = tmp6_input.ps(tmp0_desc, 1);
|
|
729
725
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
730
726
|
} else
|
|
731
727
|
while (tmp1_flag) {
|
|
732
|
-
tmp2_index = tmp6_input.
|
|
728
|
+
tmp2_index = tmp6_input.ws(tmp0_desc);
|
|
733
729
|
switch (tmp2_index) {
|
|
734
730
|
case -1:
|
|
735
731
|
tmp1_flag = false;
|
|
736
732
|
break;
|
|
737
733
|
case 0:
|
|
738
|
-
tmp4_local0 = tmp6_input.
|
|
734
|
+
tmp4_local0 = tmp6_input.rs(tmp0_desc, 0, tmp7_cached[0].o1(), tmp4_local0);
|
|
739
735
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
740
736
|
break;
|
|
741
737
|
case 1:
|
|
742
|
-
tmp5_local1 = tmp6_input.
|
|
738
|
+
tmp5_local1 = tmp6_input.ps(tmp0_desc, 1);
|
|
743
739
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
744
740
|
break;
|
|
745
741
|
default:
|
|
746
742
|
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
747
743
|
}
|
|
748
744
|
}
|
|
749
|
-
tmp6_input.
|
|
745
|
+
tmp6_input.gs(tmp0_desc);
|
|
750
746
|
return ChatMessage_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
751
747
|
};
|
|
752
|
-
protoOf($serializer_0).
|
|
753
|
-
return this.
|
|
748
|
+
protoOf($serializer_0).so = function () {
|
|
749
|
+
return this.f7p_1;
|
|
754
750
|
};
|
|
755
|
-
protoOf($serializer_0).
|
|
751
|
+
protoOf($serializer_0).m10 = function () {
|
|
756
752
|
// Inline function 'kotlin.arrayOf' call
|
|
757
753
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
758
754
|
// Inline function 'kotlin.js.asDynamic' call
|
|
759
|
-
return [
|
|
755
|
+
return [Companion_getInstance_2().b7p_1[0].o1(), StringSerializer_getInstance()];
|
|
760
756
|
};
|
|
761
757
|
var $serializer_instance_0;
|
|
762
758
|
function $serializer_getInstance_0() {
|
|
@@ -766,10 +762,10 @@
|
|
|
766
762
|
}
|
|
767
763
|
function ChatMessage_init_$Init$(seen0, role, content, serializationConstructorMarker, $this) {
|
|
768
764
|
if (!(3 === (3 & seen0))) {
|
|
769
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance_0().
|
|
765
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_0().f7p_1);
|
|
770
766
|
}
|
|
771
|
-
$this.
|
|
772
|
-
$this.
|
|
767
|
+
$this.h7p_1 = role;
|
|
768
|
+
$this.i7p_1 = content;
|
|
773
769
|
return $this;
|
|
774
770
|
}
|
|
775
771
|
function ChatMessage_init_$Create$(seen0, role, content, serializationConstructorMarker) {
|
|
@@ -788,16 +784,16 @@
|
|
|
788
784
|
return Role_ASSISTANT_instance;
|
|
789
785
|
}
|
|
790
786
|
function ChatMessage(role, content) {
|
|
791
|
-
|
|
792
|
-
this.
|
|
793
|
-
this.
|
|
787
|
+
Companion_getInstance_2();
|
|
788
|
+
this.h7p_1 = role;
|
|
789
|
+
this.i7p_1 = content;
|
|
794
790
|
}
|
|
795
791
|
protoOf(ChatMessage).toString = function () {
|
|
796
|
-
return 'ChatMessage(role=' + this.
|
|
792
|
+
return 'ChatMessage(role=' + this.h7p_1.toString() + ', content=' + this.i7p_1 + ')';
|
|
797
793
|
};
|
|
798
794
|
protoOf(ChatMessage).hashCode = function () {
|
|
799
|
-
var result = this.
|
|
800
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
795
|
+
var result = this.h7p_1.hashCode();
|
|
796
|
+
result = imul(result, 31) + getStringHashCode(this.i7p_1) | 0;
|
|
801
797
|
return result;
|
|
802
798
|
};
|
|
803
799
|
protoOf(ChatMessage).equals = function (other) {
|
|
@@ -805,9 +801,9 @@
|
|
|
805
801
|
return true;
|
|
806
802
|
if (!(other instanceof ChatMessage))
|
|
807
803
|
return false;
|
|
808
|
-
if (!this.
|
|
804
|
+
if (!this.h7p_1.equals(other.h7p_1))
|
|
809
805
|
return false;
|
|
810
|
-
if (!(this.
|
|
806
|
+
if (!(this.i7p_1 === other.i7p_1))
|
|
811
807
|
return false;
|
|
812
808
|
return true;
|
|
813
809
|
};
|
|
@@ -818,25 +814,25 @@
|
|
|
818
814
|
maxTokens = maxTokens === VOID ? 150 : maxTokens;
|
|
819
815
|
timeout = timeout === VOID ? 30000 : timeout;
|
|
820
816
|
enableDebugLogging = enableDebugLogging === VOID ? false : enableDebugLogging;
|
|
821
|
-
this.
|
|
822
|
-
this.
|
|
823
|
-
this.
|
|
824
|
-
this.
|
|
825
|
-
this.
|
|
826
|
-
this.
|
|
827
|
-
this.
|
|
817
|
+
this.m7n_1 = apiKey;
|
|
818
|
+
this.n7n_1 = model;
|
|
819
|
+
this.o7n_1 = baseUrl;
|
|
820
|
+
this.p7n_1 = temperature;
|
|
821
|
+
this.q7n_1 = maxTokens;
|
|
822
|
+
this.r7n_1 = timeout;
|
|
823
|
+
this.s7n_1 = enableDebugLogging;
|
|
828
824
|
}
|
|
829
825
|
protoOf(OpenAIConfig).toString = function () {
|
|
830
|
-
return 'OpenAIConfig(apiKey=' + this.
|
|
826
|
+
return 'OpenAIConfig(apiKey=' + this.m7n_1 + ', model=' + this.n7n_1 + ', baseUrl=' + this.o7n_1 + ', temperature=' + this.p7n_1 + ', maxTokens=' + this.q7n_1 + ', timeout=' + this.r7n_1 + ', enableDebugLogging=' + this.s7n_1 + ')';
|
|
831
827
|
};
|
|
832
828
|
protoOf(OpenAIConfig).hashCode = function () {
|
|
833
|
-
var result = getStringHashCode(this.
|
|
834
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
835
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
836
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
837
|
-
result = imul(result, 31) + this.
|
|
838
|
-
result = imul(result, 31) + this.
|
|
839
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
829
|
+
var result = getStringHashCode(this.m7n_1);
|
|
830
|
+
result = imul(result, 31) + getStringHashCode(this.n7n_1) | 0;
|
|
831
|
+
result = imul(result, 31) + getStringHashCode(this.o7n_1) | 0;
|
|
832
|
+
result = imul(result, 31) + getNumberHashCode(this.p7n_1) | 0;
|
|
833
|
+
result = imul(result, 31) + this.q7n_1 | 0;
|
|
834
|
+
result = imul(result, 31) + this.r7n_1 | 0;
|
|
835
|
+
result = imul(result, 31) + getBooleanHashCode(this.s7n_1) | 0;
|
|
840
836
|
return result;
|
|
841
837
|
};
|
|
842
838
|
protoOf(OpenAIConfig).equals = function (other) {
|
|
@@ -844,19 +840,19 @@
|
|
|
844
840
|
return true;
|
|
845
841
|
if (!(other instanceof OpenAIConfig))
|
|
846
842
|
return false;
|
|
847
|
-
if (!(this.
|
|
843
|
+
if (!(this.m7n_1 === other.m7n_1))
|
|
848
844
|
return false;
|
|
849
|
-
if (!(this.
|
|
845
|
+
if (!(this.n7n_1 === other.n7n_1))
|
|
850
846
|
return false;
|
|
851
|
-
if (!(this.
|
|
847
|
+
if (!(this.o7n_1 === other.o7n_1))
|
|
852
848
|
return false;
|
|
853
|
-
if (!equals(this.
|
|
849
|
+
if (!equals(this.p7n_1, other.p7n_1))
|
|
854
850
|
return false;
|
|
855
|
-
if (!(this.
|
|
851
|
+
if (!(this.q7n_1 === other.q7n_1))
|
|
856
852
|
return false;
|
|
857
|
-
if (!(this.
|
|
853
|
+
if (!(this.r7n_1 === other.r7n_1))
|
|
858
854
|
return false;
|
|
859
|
-
if (!(this.
|
|
855
|
+
if (!(this.s7n_1 === other.s7n_1))
|
|
860
856
|
return false;
|
|
861
857
|
return true;
|
|
862
858
|
};
|
|
@@ -870,10 +866,10 @@
|
|
|
870
866
|
// Inline function 'kotlin.arrayOf' call
|
|
871
867
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
872
868
|
// Inline function 'kotlin.js.asDynamic' call
|
|
873
|
-
tmp.
|
|
869
|
+
tmp.j7p_1 = [null, lazy(tmp_0, OpenAIRequest$Companion$$childSerializers$_anonymous__ff5rn1), null, null];
|
|
874
870
|
}
|
|
875
871
|
var Companion_instance_4;
|
|
876
|
-
function
|
|
872
|
+
function Companion_getInstance_3() {
|
|
877
873
|
if (Companion_instance_4 == null)
|
|
878
874
|
new Companion_2();
|
|
879
875
|
return Companion_instance_4;
|
|
@@ -881,27 +877,27 @@
|
|
|
881
877
|
function $serializer_1() {
|
|
882
878
|
$serializer_instance_1 = this;
|
|
883
879
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.OpenAIRequest', this, 4);
|
|
884
|
-
tmp0_serialDesc.
|
|
885
|
-
tmp0_serialDesc.
|
|
886
|
-
tmp0_serialDesc.
|
|
887
|
-
tmp0_serialDesc.
|
|
888
|
-
this.
|
|
889
|
-
}
|
|
890
|
-
protoOf($serializer_1).
|
|
891
|
-
var tmp0_desc = this.
|
|
892
|
-
var tmp1_output = encoder.
|
|
893
|
-
var tmp2_cached =
|
|
894
|
-
tmp1_output.
|
|
895
|
-
tmp1_output.
|
|
896
|
-
tmp1_output.
|
|
897
|
-
tmp1_output.
|
|
898
|
-
tmp1_output.
|
|
899
|
-
};
|
|
900
|
-
protoOf($serializer_1).
|
|
901
|
-
return this.
|
|
902
|
-
};
|
|
903
|
-
protoOf($serializer_1).
|
|
904
|
-
var tmp0_desc = this.
|
|
880
|
+
tmp0_serialDesc.xz('model', false);
|
|
881
|
+
tmp0_serialDesc.xz('messages', false);
|
|
882
|
+
tmp0_serialDesc.xz('temperature', false);
|
|
883
|
+
tmp0_serialDesc.xz('max_tokens', false);
|
|
884
|
+
this.k7p_1 = tmp0_serialDesc;
|
|
885
|
+
}
|
|
886
|
+
protoOf($serializer_1).l7p = function (encoder, value) {
|
|
887
|
+
var tmp0_desc = this.k7p_1;
|
|
888
|
+
var tmp1_output = encoder.fs(tmp0_desc);
|
|
889
|
+
var tmp2_cached = Companion_getInstance_3().j7p_1;
|
|
890
|
+
tmp1_output.ut(tmp0_desc, 0, value.m7p_1);
|
|
891
|
+
tmp1_output.wt(tmp0_desc, 1, tmp2_cached[1].o1(), value.n7p_1);
|
|
892
|
+
tmp1_output.st(tmp0_desc, 2, value.o7p_1);
|
|
893
|
+
tmp1_output.pt(tmp0_desc, 3, value.p7p_1);
|
|
894
|
+
tmp1_output.gs(tmp0_desc);
|
|
895
|
+
};
|
|
896
|
+
protoOf($serializer_1).to = function (encoder, value) {
|
|
897
|
+
return this.l7p(encoder, value instanceof OpenAIRequest ? value : THROW_CCE());
|
|
898
|
+
};
|
|
899
|
+
protoOf($serializer_1).uo = function (decoder) {
|
|
900
|
+
var tmp0_desc = this.k7p_1;
|
|
905
901
|
var tmp1_flag = true;
|
|
906
902
|
var tmp2_index = 0;
|
|
907
903
|
var tmp3_bitMask0 = 0;
|
|
@@ -909,56 +905,56 @@
|
|
|
909
905
|
var tmp5_local1 = null;
|
|
910
906
|
var tmp6_local2 = 0.0;
|
|
911
907
|
var tmp7_local3 = 0;
|
|
912
|
-
var tmp8_input = decoder.
|
|
913
|
-
var tmp9_cached =
|
|
914
|
-
if (tmp8_input.
|
|
915
|
-
tmp4_local0 = tmp8_input.
|
|
908
|
+
var tmp8_input = decoder.fs(tmp0_desc);
|
|
909
|
+
var tmp9_cached = Companion_getInstance_3().j7p_1;
|
|
910
|
+
if (tmp8_input.vs()) {
|
|
911
|
+
tmp4_local0 = tmp8_input.ps(tmp0_desc, 0);
|
|
916
912
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
917
|
-
tmp5_local1 = tmp8_input.
|
|
913
|
+
tmp5_local1 = tmp8_input.rs(tmp0_desc, 1, tmp9_cached[1].o1(), tmp5_local1);
|
|
918
914
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
919
|
-
tmp6_local2 = tmp8_input.
|
|
915
|
+
tmp6_local2 = tmp8_input.ns(tmp0_desc, 2);
|
|
920
916
|
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
921
|
-
tmp7_local3 = tmp8_input.
|
|
917
|
+
tmp7_local3 = tmp8_input.ks(tmp0_desc, 3);
|
|
922
918
|
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
923
919
|
} else
|
|
924
920
|
while (tmp1_flag) {
|
|
925
|
-
tmp2_index = tmp8_input.
|
|
921
|
+
tmp2_index = tmp8_input.ws(tmp0_desc);
|
|
926
922
|
switch (tmp2_index) {
|
|
927
923
|
case -1:
|
|
928
924
|
tmp1_flag = false;
|
|
929
925
|
break;
|
|
930
926
|
case 0:
|
|
931
|
-
tmp4_local0 = tmp8_input.
|
|
927
|
+
tmp4_local0 = tmp8_input.ps(tmp0_desc, 0);
|
|
932
928
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
933
929
|
break;
|
|
934
930
|
case 1:
|
|
935
|
-
tmp5_local1 = tmp8_input.
|
|
931
|
+
tmp5_local1 = tmp8_input.rs(tmp0_desc, 1, tmp9_cached[1].o1(), tmp5_local1);
|
|
936
932
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
937
933
|
break;
|
|
938
934
|
case 2:
|
|
939
|
-
tmp6_local2 = tmp8_input.
|
|
935
|
+
tmp6_local2 = tmp8_input.ns(tmp0_desc, 2);
|
|
940
936
|
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
941
937
|
break;
|
|
942
938
|
case 3:
|
|
943
|
-
tmp7_local3 = tmp8_input.
|
|
939
|
+
tmp7_local3 = tmp8_input.ks(tmp0_desc, 3);
|
|
944
940
|
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
945
941
|
break;
|
|
946
942
|
default:
|
|
947
943
|
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
948
944
|
}
|
|
949
945
|
}
|
|
950
|
-
tmp8_input.
|
|
946
|
+
tmp8_input.gs(tmp0_desc);
|
|
951
947
|
return OpenAIRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
952
948
|
};
|
|
953
|
-
protoOf($serializer_1).
|
|
954
|
-
return this.
|
|
949
|
+
protoOf($serializer_1).so = function () {
|
|
950
|
+
return this.k7p_1;
|
|
955
951
|
};
|
|
956
|
-
protoOf($serializer_1).
|
|
957
|
-
var tmp0_cached =
|
|
952
|
+
protoOf($serializer_1).m10 = function () {
|
|
953
|
+
var tmp0_cached = Companion_getInstance_3().j7p_1;
|
|
958
954
|
// Inline function 'kotlin.arrayOf' call
|
|
959
955
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
960
956
|
// Inline function 'kotlin.js.asDynamic' call
|
|
961
|
-
return [StringSerializer_getInstance(), tmp0_cached[1].
|
|
957
|
+
return [StringSerializer_getInstance(), tmp0_cached[1].o1(), DoubleSerializer_getInstance(), IntSerializer_getInstance()];
|
|
962
958
|
};
|
|
963
959
|
var $serializer_instance_1;
|
|
964
960
|
function $serializer_getInstance_1() {
|
|
@@ -968,32 +964,32 @@
|
|
|
968
964
|
}
|
|
969
965
|
function OpenAIRequest_init_$Init$(seen0, model, messages, temperature, maxTokens, serializationConstructorMarker, $this) {
|
|
970
966
|
if (!(15 === (15 & seen0))) {
|
|
971
|
-
throwMissingFieldException(seen0, 15, $serializer_getInstance_1().
|
|
967
|
+
throwMissingFieldException(seen0, 15, $serializer_getInstance_1().k7p_1);
|
|
972
968
|
}
|
|
973
|
-
$this.
|
|
974
|
-
$this.
|
|
975
|
-
$this.
|
|
976
|
-
$this.
|
|
969
|
+
$this.m7p_1 = model;
|
|
970
|
+
$this.n7p_1 = messages;
|
|
971
|
+
$this.o7p_1 = temperature;
|
|
972
|
+
$this.p7p_1 = maxTokens;
|
|
977
973
|
return $this;
|
|
978
974
|
}
|
|
979
975
|
function OpenAIRequest_init_$Create$(seen0, model, messages, temperature, maxTokens, serializationConstructorMarker) {
|
|
980
976
|
return OpenAIRequest_init_$Init$(seen0, model, messages, temperature, maxTokens, serializationConstructorMarker, objectCreate(protoOf(OpenAIRequest)));
|
|
981
977
|
}
|
|
982
978
|
function OpenAIRequest(model, messages, temperature, maxTokens) {
|
|
983
|
-
|
|
984
|
-
this.
|
|
985
|
-
this.
|
|
986
|
-
this.
|
|
987
|
-
this.
|
|
979
|
+
Companion_getInstance_3();
|
|
980
|
+
this.m7p_1 = model;
|
|
981
|
+
this.n7p_1 = messages;
|
|
982
|
+
this.o7p_1 = temperature;
|
|
983
|
+
this.p7p_1 = maxTokens;
|
|
988
984
|
}
|
|
989
985
|
protoOf(OpenAIRequest).toString = function () {
|
|
990
|
-
return 'OpenAIRequest(model=' + this.
|
|
986
|
+
return 'OpenAIRequest(model=' + this.m7p_1 + ', messages=' + toString(this.n7p_1) + ', temperature=' + this.o7p_1 + ', maxTokens=' + this.p7p_1 + ')';
|
|
991
987
|
};
|
|
992
988
|
protoOf(OpenAIRequest).hashCode = function () {
|
|
993
|
-
var result = getStringHashCode(this.
|
|
994
|
-
result = imul(result, 31) + hashCode(this.
|
|
995
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
996
|
-
result = imul(result, 31) + this.
|
|
989
|
+
var result = getStringHashCode(this.m7p_1);
|
|
990
|
+
result = imul(result, 31) + hashCode(this.n7p_1) | 0;
|
|
991
|
+
result = imul(result, 31) + getNumberHashCode(this.o7p_1) | 0;
|
|
992
|
+
result = imul(result, 31) + this.p7p_1 | 0;
|
|
997
993
|
return result;
|
|
998
994
|
};
|
|
999
995
|
protoOf(OpenAIRequest).equals = function (other) {
|
|
@@ -1001,83 +997,83 @@
|
|
|
1001
997
|
return true;
|
|
1002
998
|
if (!(other instanceof OpenAIRequest))
|
|
1003
999
|
return false;
|
|
1004
|
-
if (!(this.
|
|
1000
|
+
if (!(this.m7p_1 === other.m7p_1))
|
|
1005
1001
|
return false;
|
|
1006
|
-
if (!equals(this.
|
|
1002
|
+
if (!equals(this.n7p_1, other.n7p_1))
|
|
1007
1003
|
return false;
|
|
1008
|
-
if (!equals(this.
|
|
1004
|
+
if (!equals(this.o7p_1, other.o7p_1))
|
|
1009
1005
|
return false;
|
|
1010
|
-
if (!(this.
|
|
1006
|
+
if (!(this.p7p_1 === other.p7p_1))
|
|
1011
1007
|
return false;
|
|
1012
1008
|
return true;
|
|
1013
1009
|
};
|
|
1014
1010
|
function $serializer_2() {
|
|
1015
1011
|
$serializer_instance_2 = this;
|
|
1016
1012
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.OpenAIResponse.Choice', this, 3);
|
|
1017
|
-
tmp0_serialDesc.
|
|
1018
|
-
tmp0_serialDesc.
|
|
1019
|
-
tmp0_serialDesc.
|
|
1020
|
-
this.
|
|
1021
|
-
}
|
|
1022
|
-
protoOf($serializer_2).
|
|
1023
|
-
var tmp0_desc = this.
|
|
1024
|
-
var tmp1_output = encoder.
|
|
1025
|
-
tmp1_output.
|
|
1026
|
-
tmp1_output.
|
|
1027
|
-
if (tmp1_output.
|
|
1028
|
-
tmp1_output.
|
|
1013
|
+
tmp0_serialDesc.xz('index', false);
|
|
1014
|
+
tmp0_serialDesc.xz('message', false);
|
|
1015
|
+
tmp0_serialDesc.xz('finish_reason', true);
|
|
1016
|
+
this.q7p_1 = tmp0_serialDesc;
|
|
1017
|
+
}
|
|
1018
|
+
protoOf($serializer_2).r7p = function (encoder, value) {
|
|
1019
|
+
var tmp0_desc = this.q7p_1;
|
|
1020
|
+
var tmp1_output = encoder.fs(tmp0_desc);
|
|
1021
|
+
tmp1_output.pt(tmp0_desc, 0, value.s7p_1);
|
|
1022
|
+
tmp1_output.wt(tmp0_desc, 1, $serializer_getInstance_0(), value.t7p_1);
|
|
1023
|
+
if (tmp1_output.cu(tmp0_desc, 2) ? true : !(value.u7p_1 == null)) {
|
|
1024
|
+
tmp1_output.yt(tmp0_desc, 2, StringSerializer_getInstance(), value.u7p_1);
|
|
1029
1025
|
}
|
|
1030
|
-
tmp1_output.
|
|
1026
|
+
tmp1_output.gs(tmp0_desc);
|
|
1031
1027
|
};
|
|
1032
|
-
protoOf($serializer_2).
|
|
1033
|
-
return this.
|
|
1028
|
+
protoOf($serializer_2).to = function (encoder, value) {
|
|
1029
|
+
return this.r7p(encoder, value instanceof Choice ? value : THROW_CCE());
|
|
1034
1030
|
};
|
|
1035
|
-
protoOf($serializer_2).
|
|
1036
|
-
var tmp0_desc = this.
|
|
1031
|
+
protoOf($serializer_2).uo = function (decoder) {
|
|
1032
|
+
var tmp0_desc = this.q7p_1;
|
|
1037
1033
|
var tmp1_flag = true;
|
|
1038
1034
|
var tmp2_index = 0;
|
|
1039
1035
|
var tmp3_bitMask0 = 0;
|
|
1040
1036
|
var tmp4_local0 = 0;
|
|
1041
1037
|
var tmp5_local1 = null;
|
|
1042
1038
|
var tmp6_local2 = null;
|
|
1043
|
-
var tmp7_input = decoder.
|
|
1044
|
-
if (tmp7_input.
|
|
1045
|
-
tmp4_local0 = tmp7_input.
|
|
1039
|
+
var tmp7_input = decoder.fs(tmp0_desc);
|
|
1040
|
+
if (tmp7_input.vs()) {
|
|
1041
|
+
tmp4_local0 = tmp7_input.ks(tmp0_desc, 0);
|
|
1046
1042
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1047
|
-
tmp5_local1 = tmp7_input.
|
|
1043
|
+
tmp5_local1 = tmp7_input.rs(tmp0_desc, 1, $serializer_getInstance_0(), tmp5_local1);
|
|
1048
1044
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1049
|
-
tmp6_local2 = tmp7_input.
|
|
1045
|
+
tmp6_local2 = tmp7_input.ts(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
|
|
1050
1046
|
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1051
1047
|
} else
|
|
1052
1048
|
while (tmp1_flag) {
|
|
1053
|
-
tmp2_index = tmp7_input.
|
|
1049
|
+
tmp2_index = tmp7_input.ws(tmp0_desc);
|
|
1054
1050
|
switch (tmp2_index) {
|
|
1055
1051
|
case -1:
|
|
1056
1052
|
tmp1_flag = false;
|
|
1057
1053
|
break;
|
|
1058
1054
|
case 0:
|
|
1059
|
-
tmp4_local0 = tmp7_input.
|
|
1055
|
+
tmp4_local0 = tmp7_input.ks(tmp0_desc, 0);
|
|
1060
1056
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1061
1057
|
break;
|
|
1062
1058
|
case 1:
|
|
1063
|
-
tmp5_local1 = tmp7_input.
|
|
1059
|
+
tmp5_local1 = tmp7_input.rs(tmp0_desc, 1, $serializer_getInstance_0(), tmp5_local1);
|
|
1064
1060
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1065
1061
|
break;
|
|
1066
1062
|
case 2:
|
|
1067
|
-
tmp6_local2 = tmp7_input.
|
|
1063
|
+
tmp6_local2 = tmp7_input.ts(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
|
|
1068
1064
|
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1069
1065
|
break;
|
|
1070
1066
|
default:
|
|
1071
1067
|
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1072
1068
|
}
|
|
1073
1069
|
}
|
|
1074
|
-
tmp7_input.
|
|
1070
|
+
tmp7_input.gs(tmp0_desc);
|
|
1075
1071
|
return Choice_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
1076
1072
|
};
|
|
1077
|
-
protoOf($serializer_2).
|
|
1078
|
-
return this.
|
|
1073
|
+
protoOf($serializer_2).so = function () {
|
|
1074
|
+
return this.q7p_1;
|
|
1079
1075
|
};
|
|
1080
|
-
protoOf($serializer_2).
|
|
1076
|
+
protoOf($serializer_2).m10 = function () {
|
|
1081
1077
|
// Inline function 'kotlin.arrayOf' call
|
|
1082
1078
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1083
1079
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -1091,14 +1087,14 @@
|
|
|
1091
1087
|
}
|
|
1092
1088
|
function Choice_init_$Init$(seen0, index, message, finishReason, serializationConstructorMarker, $this) {
|
|
1093
1089
|
if (!(3 === (3 & seen0))) {
|
|
1094
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance_2().
|
|
1090
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_2().q7p_1);
|
|
1095
1091
|
}
|
|
1096
|
-
$this.
|
|
1097
|
-
$this.
|
|
1092
|
+
$this.s7p_1 = index;
|
|
1093
|
+
$this.t7p_1 = message;
|
|
1098
1094
|
if (0 === (seen0 & 4))
|
|
1099
|
-
$this.
|
|
1095
|
+
$this.u7p_1 = null;
|
|
1100
1096
|
else
|
|
1101
|
-
$this.
|
|
1097
|
+
$this.u7p_1 = finishReason;
|
|
1102
1098
|
return $this;
|
|
1103
1099
|
}
|
|
1104
1100
|
function Choice_init_$Create$(seen0, index, message, finishReason, serializationConstructorMarker) {
|
|
@@ -1107,68 +1103,68 @@
|
|
|
1107
1103
|
function $serializer_3() {
|
|
1108
1104
|
$serializer_instance_3 = this;
|
|
1109
1105
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.OpenAIResponse.Usage', this, 3);
|
|
1110
|
-
tmp0_serialDesc.
|
|
1111
|
-
tmp0_serialDesc.
|
|
1112
|
-
tmp0_serialDesc.
|
|
1113
|
-
this.
|
|
1114
|
-
}
|
|
1115
|
-
protoOf($serializer_3).
|
|
1116
|
-
var tmp0_desc = this.
|
|
1117
|
-
var tmp1_output = encoder.
|
|
1118
|
-
tmp1_output.
|
|
1119
|
-
tmp1_output.
|
|
1120
|
-
tmp1_output.
|
|
1121
|
-
tmp1_output.
|
|
1122
|
-
};
|
|
1123
|
-
protoOf($serializer_3).
|
|
1124
|
-
return this.
|
|
1125
|
-
};
|
|
1126
|
-
protoOf($serializer_3).
|
|
1127
|
-
var tmp0_desc = this.
|
|
1106
|
+
tmp0_serialDesc.xz('prompt_tokens', false);
|
|
1107
|
+
tmp0_serialDesc.xz('completion_tokens', false);
|
|
1108
|
+
tmp0_serialDesc.xz('total_tokens', false);
|
|
1109
|
+
this.v7p_1 = tmp0_serialDesc;
|
|
1110
|
+
}
|
|
1111
|
+
protoOf($serializer_3).w7p = function (encoder, value) {
|
|
1112
|
+
var tmp0_desc = this.v7p_1;
|
|
1113
|
+
var tmp1_output = encoder.fs(tmp0_desc);
|
|
1114
|
+
tmp1_output.pt(tmp0_desc, 0, value.x7p_1);
|
|
1115
|
+
tmp1_output.pt(tmp0_desc, 1, value.y7p_1);
|
|
1116
|
+
tmp1_output.pt(tmp0_desc, 2, value.z7p_1);
|
|
1117
|
+
tmp1_output.gs(tmp0_desc);
|
|
1118
|
+
};
|
|
1119
|
+
protoOf($serializer_3).to = function (encoder, value) {
|
|
1120
|
+
return this.w7p(encoder, value instanceof Usage ? value : THROW_CCE());
|
|
1121
|
+
};
|
|
1122
|
+
protoOf($serializer_3).uo = function (decoder) {
|
|
1123
|
+
var tmp0_desc = this.v7p_1;
|
|
1128
1124
|
var tmp1_flag = true;
|
|
1129
1125
|
var tmp2_index = 0;
|
|
1130
1126
|
var tmp3_bitMask0 = 0;
|
|
1131
1127
|
var tmp4_local0 = 0;
|
|
1132
1128
|
var tmp5_local1 = 0;
|
|
1133
1129
|
var tmp6_local2 = 0;
|
|
1134
|
-
var tmp7_input = decoder.
|
|
1135
|
-
if (tmp7_input.
|
|
1136
|
-
tmp4_local0 = tmp7_input.
|
|
1130
|
+
var tmp7_input = decoder.fs(tmp0_desc);
|
|
1131
|
+
if (tmp7_input.vs()) {
|
|
1132
|
+
tmp4_local0 = tmp7_input.ks(tmp0_desc, 0);
|
|
1137
1133
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1138
|
-
tmp5_local1 = tmp7_input.
|
|
1134
|
+
tmp5_local1 = tmp7_input.ks(tmp0_desc, 1);
|
|
1139
1135
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1140
|
-
tmp6_local2 = tmp7_input.
|
|
1136
|
+
tmp6_local2 = tmp7_input.ks(tmp0_desc, 2);
|
|
1141
1137
|
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1142
1138
|
} else
|
|
1143
1139
|
while (tmp1_flag) {
|
|
1144
|
-
tmp2_index = tmp7_input.
|
|
1140
|
+
tmp2_index = tmp7_input.ws(tmp0_desc);
|
|
1145
1141
|
switch (tmp2_index) {
|
|
1146
1142
|
case -1:
|
|
1147
1143
|
tmp1_flag = false;
|
|
1148
1144
|
break;
|
|
1149
1145
|
case 0:
|
|
1150
|
-
tmp4_local0 = tmp7_input.
|
|
1146
|
+
tmp4_local0 = tmp7_input.ks(tmp0_desc, 0);
|
|
1151
1147
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1152
1148
|
break;
|
|
1153
1149
|
case 1:
|
|
1154
|
-
tmp5_local1 = tmp7_input.
|
|
1150
|
+
tmp5_local1 = tmp7_input.ks(tmp0_desc, 1);
|
|
1155
1151
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1156
1152
|
break;
|
|
1157
1153
|
case 2:
|
|
1158
|
-
tmp6_local2 = tmp7_input.
|
|
1154
|
+
tmp6_local2 = tmp7_input.ks(tmp0_desc, 2);
|
|
1159
1155
|
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1160
1156
|
break;
|
|
1161
1157
|
default:
|
|
1162
1158
|
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1163
1159
|
}
|
|
1164
1160
|
}
|
|
1165
|
-
tmp7_input.
|
|
1161
|
+
tmp7_input.gs(tmp0_desc);
|
|
1166
1162
|
return Usage_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
1167
1163
|
};
|
|
1168
|
-
protoOf($serializer_3).
|
|
1169
|
-
return this.
|
|
1164
|
+
protoOf($serializer_3).so = function () {
|
|
1165
|
+
return this.v7p_1;
|
|
1170
1166
|
};
|
|
1171
|
-
protoOf($serializer_3).
|
|
1167
|
+
protoOf($serializer_3).m10 = function () {
|
|
1172
1168
|
// Inline function 'kotlin.arrayOf' call
|
|
1173
1169
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1174
1170
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -1182,11 +1178,11 @@
|
|
|
1182
1178
|
}
|
|
1183
1179
|
function Usage_init_$Init$(seen0, promptTokens, completionTokens, totalTokens, serializationConstructorMarker, $this) {
|
|
1184
1180
|
if (!(7 === (7 & seen0))) {
|
|
1185
|
-
throwMissingFieldException(seen0, 7, $serializer_getInstance_3().
|
|
1181
|
+
throwMissingFieldException(seen0, 7, $serializer_getInstance_3().v7p_1);
|
|
1186
1182
|
}
|
|
1187
|
-
$this.
|
|
1188
|
-
$this.
|
|
1189
|
-
$this.
|
|
1183
|
+
$this.x7p_1 = promptTokens;
|
|
1184
|
+
$this.y7p_1 = completionTokens;
|
|
1185
|
+
$this.z7p_1 = totalTokens;
|
|
1190
1186
|
return $this;
|
|
1191
1187
|
}
|
|
1192
1188
|
function Usage_init_$Create$(seen0, promptTokens, completionTokens, totalTokens, serializationConstructorMarker) {
|
|
@@ -1198,12 +1194,12 @@
|
|
|
1198
1194
|
function Choice() {
|
|
1199
1195
|
}
|
|
1200
1196
|
protoOf(Choice).toString = function () {
|
|
1201
|
-
return 'Choice(index=' + this.
|
|
1197
|
+
return 'Choice(index=' + this.s7p_1 + ', message=' + this.t7p_1.toString() + ', finishReason=' + this.u7p_1 + ')';
|
|
1202
1198
|
};
|
|
1203
1199
|
protoOf(Choice).hashCode = function () {
|
|
1204
|
-
var result = this.
|
|
1205
|
-
result = imul(result, 31) + this.
|
|
1206
|
-
result = imul(result, 31) + (this.
|
|
1200
|
+
var result = this.s7p_1;
|
|
1201
|
+
result = imul(result, 31) + this.t7p_1.hashCode() | 0;
|
|
1202
|
+
result = imul(result, 31) + (this.u7p_1 == null ? 0 : getStringHashCode(this.u7p_1)) | 0;
|
|
1207
1203
|
return result;
|
|
1208
1204
|
};
|
|
1209
1205
|
protoOf(Choice).equals = function (other) {
|
|
@@ -1211,23 +1207,23 @@
|
|
|
1211
1207
|
return true;
|
|
1212
1208
|
if (!(other instanceof Choice))
|
|
1213
1209
|
return false;
|
|
1214
|
-
if (!(this.
|
|
1210
|
+
if (!(this.s7p_1 === other.s7p_1))
|
|
1215
1211
|
return false;
|
|
1216
|
-
if (!this.
|
|
1212
|
+
if (!this.t7p_1.equals(other.t7p_1))
|
|
1217
1213
|
return false;
|
|
1218
|
-
if (!(this.
|
|
1214
|
+
if (!(this.u7p_1 == other.u7p_1))
|
|
1219
1215
|
return false;
|
|
1220
1216
|
return true;
|
|
1221
1217
|
};
|
|
1222
1218
|
function Usage() {
|
|
1223
1219
|
}
|
|
1224
1220
|
protoOf(Usage).toString = function () {
|
|
1225
|
-
return 'Usage(promptTokens=' + this.
|
|
1221
|
+
return 'Usage(promptTokens=' + this.x7p_1 + ', completionTokens=' + this.y7p_1 + ', totalTokens=' + this.z7p_1 + ')';
|
|
1226
1222
|
};
|
|
1227
1223
|
protoOf(Usage).hashCode = function () {
|
|
1228
|
-
var result = this.
|
|
1229
|
-
result = imul(result, 31) + this.
|
|
1230
|
-
result = imul(result, 31) + this.
|
|
1224
|
+
var result = this.x7p_1;
|
|
1225
|
+
result = imul(result, 31) + this.y7p_1 | 0;
|
|
1226
|
+
result = imul(result, 31) + this.z7p_1 | 0;
|
|
1231
1227
|
return result;
|
|
1232
1228
|
};
|
|
1233
1229
|
protoOf(Usage).equals = function (other) {
|
|
@@ -1235,11 +1231,11 @@
|
|
|
1235
1231
|
return true;
|
|
1236
1232
|
if (!(other instanceof Usage))
|
|
1237
1233
|
return false;
|
|
1238
|
-
if (!(this.
|
|
1234
|
+
if (!(this.x7p_1 === other.x7p_1))
|
|
1239
1235
|
return false;
|
|
1240
|
-
if (!(this.
|
|
1236
|
+
if (!(this.y7p_1 === other.y7p_1))
|
|
1241
1237
|
return false;
|
|
1242
|
-
if (!(this.
|
|
1238
|
+
if (!(this.z7p_1 === other.z7p_1))
|
|
1243
1239
|
return false;
|
|
1244
1240
|
return true;
|
|
1245
1241
|
};
|
|
@@ -1250,10 +1246,10 @@
|
|
|
1250
1246
|
// Inline function 'kotlin.arrayOf' call
|
|
1251
1247
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1252
1248
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1253
|
-
tmp.
|
|
1249
|
+
tmp.a7q_1 = [null, null, null, null, lazy(tmp_0, OpenAIResponse$Companion$$childSerializers$_anonymous__z8nlex), null];
|
|
1254
1250
|
}
|
|
1255
1251
|
var Companion_instance_5;
|
|
1256
|
-
function
|
|
1252
|
+
function Companion_getInstance_4() {
|
|
1257
1253
|
if (Companion_instance_5 == null)
|
|
1258
1254
|
new Companion_3();
|
|
1259
1255
|
return Companion_instance_5;
|
|
@@ -1261,33 +1257,33 @@
|
|
|
1261
1257
|
function $serializer_4() {
|
|
1262
1258
|
$serializer_instance_4 = this;
|
|
1263
1259
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.OpenAIResponse', this, 6);
|
|
1264
|
-
tmp0_serialDesc.
|
|
1265
|
-
tmp0_serialDesc.
|
|
1266
|
-
tmp0_serialDesc.
|
|
1267
|
-
tmp0_serialDesc.
|
|
1268
|
-
tmp0_serialDesc.
|
|
1269
|
-
tmp0_serialDesc.
|
|
1270
|
-
this.
|
|
1271
|
-
}
|
|
1272
|
-
protoOf($serializer_4).
|
|
1273
|
-
var tmp0_desc = this.
|
|
1274
|
-
var tmp1_output = encoder.
|
|
1275
|
-
var tmp2_cached =
|
|
1276
|
-
tmp1_output.
|
|
1277
|
-
tmp1_output.
|
|
1278
|
-
tmp1_output.
|
|
1279
|
-
tmp1_output.
|
|
1280
|
-
tmp1_output.
|
|
1281
|
-
if (tmp1_output.
|
|
1282
|
-
tmp1_output.
|
|
1260
|
+
tmp0_serialDesc.xz('id', false);
|
|
1261
|
+
tmp0_serialDesc.xz('object', false);
|
|
1262
|
+
tmp0_serialDesc.xz('created', false);
|
|
1263
|
+
tmp0_serialDesc.xz('model', false);
|
|
1264
|
+
tmp0_serialDesc.xz('choices', false);
|
|
1265
|
+
tmp0_serialDesc.xz('usage', true);
|
|
1266
|
+
this.b7q_1 = tmp0_serialDesc;
|
|
1267
|
+
}
|
|
1268
|
+
protoOf($serializer_4).c7q = function (encoder, value) {
|
|
1269
|
+
var tmp0_desc = this.b7q_1;
|
|
1270
|
+
var tmp1_output = encoder.fs(tmp0_desc);
|
|
1271
|
+
var tmp2_cached = Companion_getInstance_4().a7q_1;
|
|
1272
|
+
tmp1_output.ut(tmp0_desc, 0, value.d7q_1);
|
|
1273
|
+
tmp1_output.ut(tmp0_desc, 1, value.e7q_1);
|
|
1274
|
+
tmp1_output.qt(tmp0_desc, 2, value.f7q_1);
|
|
1275
|
+
tmp1_output.ut(tmp0_desc, 3, value.g7q_1);
|
|
1276
|
+
tmp1_output.wt(tmp0_desc, 4, tmp2_cached[4].o1(), value.h7q_1);
|
|
1277
|
+
if (tmp1_output.cu(tmp0_desc, 5) ? true : !(value.i7q_1 == null)) {
|
|
1278
|
+
tmp1_output.yt(tmp0_desc, 5, $serializer_getInstance_3(), value.i7q_1);
|
|
1283
1279
|
}
|
|
1284
|
-
tmp1_output.
|
|
1280
|
+
tmp1_output.gs(tmp0_desc);
|
|
1285
1281
|
};
|
|
1286
|
-
protoOf($serializer_4).
|
|
1287
|
-
return this.
|
|
1282
|
+
protoOf($serializer_4).to = function (encoder, value) {
|
|
1283
|
+
return this.c7q(encoder, value instanceof OpenAIResponse ? value : THROW_CCE());
|
|
1288
1284
|
};
|
|
1289
|
-
protoOf($serializer_4).
|
|
1290
|
-
var tmp0_desc = this.
|
|
1285
|
+
protoOf($serializer_4).uo = function (decoder) {
|
|
1286
|
+
var tmp0_desc = this.b7q_1;
|
|
1291
1287
|
var tmp1_flag = true;
|
|
1292
1288
|
var tmp2_index = 0;
|
|
1293
1289
|
var tmp3_bitMask0 = 0;
|
|
@@ -1297,68 +1293,68 @@
|
|
|
1297
1293
|
var tmp7_local3 = null;
|
|
1298
1294
|
var tmp8_local4 = null;
|
|
1299
1295
|
var tmp9_local5 = null;
|
|
1300
|
-
var tmp10_input = decoder.
|
|
1301
|
-
var tmp11_cached =
|
|
1302
|
-
if (tmp10_input.
|
|
1303
|
-
tmp4_local0 = tmp10_input.
|
|
1296
|
+
var tmp10_input = decoder.fs(tmp0_desc);
|
|
1297
|
+
var tmp11_cached = Companion_getInstance_4().a7q_1;
|
|
1298
|
+
if (tmp10_input.vs()) {
|
|
1299
|
+
tmp4_local0 = tmp10_input.ps(tmp0_desc, 0);
|
|
1304
1300
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1305
|
-
tmp5_local1 = tmp10_input.
|
|
1301
|
+
tmp5_local1 = tmp10_input.ps(tmp0_desc, 1);
|
|
1306
1302
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1307
|
-
tmp6_local2 = tmp10_input.
|
|
1303
|
+
tmp6_local2 = tmp10_input.ls(tmp0_desc, 2);
|
|
1308
1304
|
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1309
|
-
tmp7_local3 = tmp10_input.
|
|
1305
|
+
tmp7_local3 = tmp10_input.ps(tmp0_desc, 3);
|
|
1310
1306
|
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1311
|
-
tmp8_local4 = tmp10_input.
|
|
1307
|
+
tmp8_local4 = tmp10_input.rs(tmp0_desc, 4, tmp11_cached[4].o1(), tmp8_local4);
|
|
1312
1308
|
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
1313
|
-
tmp9_local5 = tmp10_input.
|
|
1309
|
+
tmp9_local5 = tmp10_input.ts(tmp0_desc, 5, $serializer_getInstance_3(), tmp9_local5);
|
|
1314
1310
|
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
1315
1311
|
} else
|
|
1316
1312
|
while (tmp1_flag) {
|
|
1317
|
-
tmp2_index = tmp10_input.
|
|
1313
|
+
tmp2_index = tmp10_input.ws(tmp0_desc);
|
|
1318
1314
|
switch (tmp2_index) {
|
|
1319
1315
|
case -1:
|
|
1320
1316
|
tmp1_flag = false;
|
|
1321
1317
|
break;
|
|
1322
1318
|
case 0:
|
|
1323
|
-
tmp4_local0 = tmp10_input.
|
|
1319
|
+
tmp4_local0 = tmp10_input.ps(tmp0_desc, 0);
|
|
1324
1320
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1325
1321
|
break;
|
|
1326
1322
|
case 1:
|
|
1327
|
-
tmp5_local1 = tmp10_input.
|
|
1323
|
+
tmp5_local1 = tmp10_input.ps(tmp0_desc, 1);
|
|
1328
1324
|
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1329
1325
|
break;
|
|
1330
1326
|
case 2:
|
|
1331
|
-
tmp6_local2 = tmp10_input.
|
|
1327
|
+
tmp6_local2 = tmp10_input.ls(tmp0_desc, 2);
|
|
1332
1328
|
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1333
1329
|
break;
|
|
1334
1330
|
case 3:
|
|
1335
|
-
tmp7_local3 = tmp10_input.
|
|
1331
|
+
tmp7_local3 = tmp10_input.ps(tmp0_desc, 3);
|
|
1336
1332
|
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1337
1333
|
break;
|
|
1338
1334
|
case 4:
|
|
1339
|
-
tmp8_local4 = tmp10_input.
|
|
1335
|
+
tmp8_local4 = tmp10_input.rs(tmp0_desc, 4, tmp11_cached[4].o1(), tmp8_local4);
|
|
1340
1336
|
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
1341
1337
|
break;
|
|
1342
1338
|
case 5:
|
|
1343
|
-
tmp9_local5 = tmp10_input.
|
|
1339
|
+
tmp9_local5 = tmp10_input.ts(tmp0_desc, 5, $serializer_getInstance_3(), tmp9_local5);
|
|
1344
1340
|
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
1345
1341
|
break;
|
|
1346
1342
|
default:
|
|
1347
1343
|
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1348
1344
|
}
|
|
1349
1345
|
}
|
|
1350
|
-
tmp10_input.
|
|
1346
|
+
tmp10_input.gs(tmp0_desc);
|
|
1351
1347
|
return OpenAIResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
|
|
1352
1348
|
};
|
|
1353
|
-
protoOf($serializer_4).
|
|
1354
|
-
return this.
|
|
1349
|
+
protoOf($serializer_4).so = function () {
|
|
1350
|
+
return this.b7q_1;
|
|
1355
1351
|
};
|
|
1356
|
-
protoOf($serializer_4).
|
|
1357
|
-
var tmp0_cached =
|
|
1352
|
+
protoOf($serializer_4).m10 = function () {
|
|
1353
|
+
var tmp0_cached = Companion_getInstance_4().a7q_1;
|
|
1358
1354
|
// Inline function 'kotlin.arrayOf' call
|
|
1359
1355
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1360
1356
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1361
|
-
return [StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[4].
|
|
1357
|
+
return [StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[4].o1(), get_nullable($serializer_getInstance_3())];
|
|
1362
1358
|
};
|
|
1363
1359
|
var $serializer_instance_4;
|
|
1364
1360
|
function $serializer_getInstance_4() {
|
|
@@ -1368,42 +1364,42 @@
|
|
|
1368
1364
|
}
|
|
1369
1365
|
function OpenAIResponse_init_$Init$(seen0, id, objectType, created, model, choices, usage, serializationConstructorMarker, $this) {
|
|
1370
1366
|
if (!(31 === (31 & seen0))) {
|
|
1371
|
-
throwMissingFieldException(seen0, 31, $serializer_getInstance_4().
|
|
1367
|
+
throwMissingFieldException(seen0, 31, $serializer_getInstance_4().b7q_1);
|
|
1372
1368
|
}
|
|
1373
|
-
$this.
|
|
1374
|
-
$this.
|
|
1375
|
-
$this.
|
|
1376
|
-
$this.
|
|
1377
|
-
$this.
|
|
1369
|
+
$this.d7q_1 = id;
|
|
1370
|
+
$this.e7q_1 = objectType;
|
|
1371
|
+
$this.f7q_1 = created;
|
|
1372
|
+
$this.g7q_1 = model;
|
|
1373
|
+
$this.h7q_1 = choices;
|
|
1378
1374
|
if (0 === (seen0 & 32))
|
|
1379
|
-
$this.
|
|
1375
|
+
$this.i7q_1 = null;
|
|
1380
1376
|
else
|
|
1381
|
-
$this.
|
|
1377
|
+
$this.i7q_1 = usage;
|
|
1382
1378
|
return $this;
|
|
1383
1379
|
}
|
|
1384
1380
|
function OpenAIResponse_init_$Create$(seen0, id, objectType, created, model, choices, usage, serializationConstructorMarker) {
|
|
1385
1381
|
return OpenAIResponse_init_$Init$(seen0, id, objectType, created, model, choices, usage, serializationConstructorMarker, objectCreate(protoOf(OpenAIResponse)));
|
|
1386
1382
|
}
|
|
1387
1383
|
function OpenAIResponse(id, objectType, created, model, choices, usage) {
|
|
1388
|
-
|
|
1384
|
+
Companion_getInstance_4();
|
|
1389
1385
|
usage = usage === VOID ? null : usage;
|
|
1390
|
-
this.
|
|
1391
|
-
this.
|
|
1392
|
-
this.
|
|
1393
|
-
this.
|
|
1394
|
-
this.
|
|
1395
|
-
this.
|
|
1386
|
+
this.d7q_1 = id;
|
|
1387
|
+
this.e7q_1 = objectType;
|
|
1388
|
+
this.f7q_1 = created;
|
|
1389
|
+
this.g7q_1 = model;
|
|
1390
|
+
this.h7q_1 = choices;
|
|
1391
|
+
this.i7q_1 = usage;
|
|
1396
1392
|
}
|
|
1397
1393
|
protoOf(OpenAIResponse).toString = function () {
|
|
1398
|
-
return 'OpenAIResponse(id=' + this.
|
|
1394
|
+
return 'OpenAIResponse(id=' + this.d7q_1 + ', objectType=' + this.e7q_1 + ', created=' + this.f7q_1.toString() + ', model=' + this.g7q_1 + ', choices=' + toString(this.h7q_1) + ', usage=' + toString_0(this.i7q_1) + ')';
|
|
1399
1395
|
};
|
|
1400
1396
|
protoOf(OpenAIResponse).hashCode = function () {
|
|
1401
|
-
var result = getStringHashCode(this.
|
|
1402
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
1403
|
-
result = imul(result, 31) + this.
|
|
1404
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
1405
|
-
result = imul(result, 31) + hashCode(this.
|
|
1406
|
-
result = imul(result, 31) + (this.
|
|
1397
|
+
var result = getStringHashCode(this.d7q_1);
|
|
1398
|
+
result = imul(result, 31) + getStringHashCode(this.e7q_1) | 0;
|
|
1399
|
+
result = imul(result, 31) + this.f7q_1.hashCode() | 0;
|
|
1400
|
+
result = imul(result, 31) + getStringHashCode(this.g7q_1) | 0;
|
|
1401
|
+
result = imul(result, 31) + hashCode(this.h7q_1) | 0;
|
|
1402
|
+
result = imul(result, 31) + (this.i7q_1 == null ? 0 : this.i7q_1.hashCode()) | 0;
|
|
1407
1403
|
return result;
|
|
1408
1404
|
};
|
|
1409
1405
|
protoOf(OpenAIResponse).equals = function (other) {
|
|
@@ -1411,59 +1407,59 @@
|
|
|
1411
1407
|
return true;
|
|
1412
1408
|
if (!(other instanceof OpenAIResponse))
|
|
1413
1409
|
return false;
|
|
1414
|
-
if (!(this.
|
|
1410
|
+
if (!(this.d7q_1 === other.d7q_1))
|
|
1415
1411
|
return false;
|
|
1416
|
-
if (!(this.
|
|
1412
|
+
if (!(this.e7q_1 === other.e7q_1))
|
|
1417
1413
|
return false;
|
|
1418
|
-
if (!equalsLong(this.
|
|
1414
|
+
if (!equalsLong(this.f7q_1, other.f7q_1))
|
|
1419
1415
|
return false;
|
|
1420
|
-
if (!(this.
|
|
1416
|
+
if (!(this.g7q_1 === other.g7q_1))
|
|
1421
1417
|
return false;
|
|
1422
|
-
if (!equals(this.
|
|
1418
|
+
if (!equals(this.h7q_1, other.h7q_1))
|
|
1423
1419
|
return false;
|
|
1424
|
-
if (!equals(this.
|
|
1420
|
+
if (!equals(this.i7q_1, other.i7q_1))
|
|
1425
1421
|
return false;
|
|
1426
1422
|
return true;
|
|
1427
1423
|
};
|
|
1428
1424
|
function $executeRequestCOROUTINE$(_this__u8e3s4, messages, resultContinuation) {
|
|
1429
1425
|
CoroutineImpl.call(this, resultContinuation);
|
|
1430
|
-
this.
|
|
1431
|
-
this.
|
|
1426
|
+
this.r7q_1 = _this__u8e3s4;
|
|
1427
|
+
this.s7q_1 = messages;
|
|
1432
1428
|
}
|
|
1433
|
-
protoOf($executeRequestCOROUTINE$).
|
|
1434
|
-
var suspendResult = this.
|
|
1429
|
+
protoOf($executeRequestCOROUTINE$).m9 = function () {
|
|
1430
|
+
var suspendResult = this.g9_1;
|
|
1435
1431
|
$sm: do
|
|
1436
1432
|
try {
|
|
1437
|
-
var tmp = this.
|
|
1433
|
+
var tmp = this.e9_1;
|
|
1438
1434
|
switch (tmp) {
|
|
1439
1435
|
case 0:
|
|
1440
|
-
this.
|
|
1441
|
-
this.
|
|
1442
|
-
suspendResult = this.
|
|
1436
|
+
this.f9_1 = 3;
|
|
1437
|
+
this.e9_1 = 1;
|
|
1438
|
+
suspendResult = this.r7q_1.t7q_1.l7n(this.s7q_1, this);
|
|
1443
1439
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1444
1440
|
return suspendResult;
|
|
1445
1441
|
}
|
|
1446
1442
|
|
|
1447
|
-
this.
|
|
1443
|
+
this.e9_1 = 2;
|
|
1448
1444
|
continue $sm;
|
|
1449
1445
|
case 1:
|
|
1450
|
-
var unboxed = suspendResult.
|
|
1446
|
+
var unboxed = suspendResult.hm_1;
|
|
1451
1447
|
suspendResult = new Result(unboxed);
|
|
1452
|
-
this.
|
|
1448
|
+
this.e9_1 = 2;
|
|
1453
1449
|
continue $sm;
|
|
1454
1450
|
case 2:
|
|
1455
|
-
var this_0 = suspendResult.
|
|
1451
|
+
var this_0 = suspendResult.hm_1;
|
|
1456
1452
|
var tmp_0;
|
|
1457
1453
|
if (_Result___get_isSuccess__impl__sndoy8(this_0)) {
|
|
1458
1454
|
var this_1 = new Result(this_0);
|
|
1459
1455
|
var tmp_1;
|
|
1460
1456
|
try {
|
|
1461
|
-
var $this$runCatching = this_1.
|
|
1457
|
+
var $this$runCatching = this_1.hm_1;
|
|
1462
1458
|
var tmp_2 = _Result___get_value__impl__bjfvqg($this$runCatching);
|
|
1463
1459
|
var response = (tmp_2 == null ? true : !(tmp_2 == null)) ? tmp_2 : THROW_CCE();
|
|
1464
|
-
var tmp0_safe_receiver = firstOrNull(response.
|
|
1465
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1466
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1460
|
+
var tmp0_safe_receiver = firstOrNull(response.h7q_1);
|
|
1461
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t7p_1;
|
|
1462
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.i7p_1;
|
|
1467
1463
|
var tmp_3;
|
|
1468
1464
|
if (tmp2_elvis_lhs == null) {
|
|
1469
1465
|
throw IllegalStateException_init_$Create$('No response from OpenAI');
|
|
@@ -1489,27 +1485,27 @@
|
|
|
1489
1485
|
|
|
1490
1486
|
return new Result(tmp_0);
|
|
1491
1487
|
case 3:
|
|
1492
|
-
throw this.
|
|
1488
|
+
throw this.h9_1;
|
|
1493
1489
|
}
|
|
1494
1490
|
} catch ($p) {
|
|
1495
1491
|
var e_0 = $p;
|
|
1496
|
-
if (this.
|
|
1492
|
+
if (this.f9_1 === 3) {
|
|
1497
1493
|
throw e_0;
|
|
1498
1494
|
} else {
|
|
1499
|
-
this.
|
|
1500
|
-
this.
|
|
1495
|
+
this.e9_1 = this.f9_1;
|
|
1496
|
+
this.h9_1 = e_0;
|
|
1501
1497
|
}
|
|
1502
1498
|
}
|
|
1503
1499
|
while (true);
|
|
1504
1500
|
};
|
|
1505
1501
|
function BaseOpenAIRepository(openAIApi) {
|
|
1506
|
-
this.
|
|
1502
|
+
this.t7q_1 = openAIApi;
|
|
1507
1503
|
}
|
|
1508
|
-
protoOf(BaseOpenAIRepository).
|
|
1504
|
+
protoOf(BaseOpenAIRepository).u7q = function (messages, $completion) {
|
|
1509
1505
|
var tmp = new $executeRequestCOROUTINE$(this, messages, $completion);
|
|
1510
|
-
tmp.
|
|
1511
|
-
tmp.
|
|
1512
|
-
var tmp_0 = tmp.
|
|
1506
|
+
tmp.g9_1 = Unit_instance;
|
|
1507
|
+
tmp.h9_1 = null;
|
|
1508
|
+
var tmp_0 = tmp.m9();
|
|
1513
1509
|
if (tmp_0 === get_COROUTINE_SUSPENDED())
|
|
1514
1510
|
return tmp_0;
|
|
1515
1511
|
return tmp_0;
|
|
@@ -1518,9 +1514,9 @@
|
|
|
1518
1514
|
}
|
|
1519
1515
|
function executeRequest($this, messages, cacheKey, $completion) {
|
|
1520
1516
|
var tmp = new $executeRequestCOROUTINE$_0($this, messages, cacheKey, $completion);
|
|
1521
|
-
tmp.
|
|
1522
|
-
tmp.
|
|
1523
|
-
var tmp_0 = tmp.
|
|
1517
|
+
tmp.g9_1 = Unit_instance;
|
|
1518
|
+
tmp.h9_1 = null;
|
|
1519
|
+
var tmp_0 = tmp.m9();
|
|
1524
1520
|
if (tmp_0 === get_COROUTINE_SUSPENDED())
|
|
1525
1521
|
return tmp_0;
|
|
1526
1522
|
return tmp_0;
|
|
@@ -1529,101 +1525,101 @@
|
|
|
1529
1525
|
// Inline function 'kotlin.text.buildString' call
|
|
1530
1526
|
// Inline function 'kotlin.apply' call
|
|
1531
1527
|
var this_0 = StringBuilder_init_$Create$();
|
|
1532
|
-
this_0.
|
|
1533
|
-
this_0.
|
|
1528
|
+
this_0.q(type);
|
|
1529
|
+
this_0.q(':');
|
|
1534
1530
|
if (message == null)
|
|
1535
1531
|
null;
|
|
1536
1532
|
else {
|
|
1537
1533
|
// Inline function 'kotlin.let' call
|
|
1538
|
-
this_0.
|
|
1534
|
+
this_0.qc(getStringHashCode(take(message, 50))).q(':');
|
|
1539
1535
|
}
|
|
1540
|
-
this_0.
|
|
1541
|
-
this_0.
|
|
1542
|
-
this_0.
|
|
1536
|
+
this_0.qc(getStringHashCode(context.w7o_1));
|
|
1537
|
+
this_0.q(':');
|
|
1538
|
+
this_0.qc(getStringHashCode(context.x7o_1));
|
|
1543
1539
|
var key = this_0.toString();
|
|
1544
1540
|
return key;
|
|
1545
1541
|
}
|
|
1546
1542
|
function buildConversationMessages($this, playerMessage, context) {
|
|
1547
1543
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1548
1544
|
var messages = ArrayList_init_$Create$();
|
|
1549
|
-
var tmp =
|
|
1545
|
+
var tmp = Companion_getInstance_2();
|
|
1550
1546
|
// Inline function 'kotlin.text.buildString' call
|
|
1551
1547
|
// Inline function 'kotlin.apply' call
|
|
1552
1548
|
var this_0 = StringBuilder_init_$Create$();
|
|
1553
|
-
this_0.
|
|
1554
|
-
this_0.
|
|
1555
|
-
this_0.
|
|
1556
|
-
this_0.
|
|
1557
|
-
this_0.
|
|
1558
|
-
this_0.
|
|
1559
|
-
this_0.
|
|
1560
|
-
if (!(context.
|
|
1561
|
-
this_0.
|
|
1549
|
+
this_0.q('\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');
|
|
1550
|
+
this_0.q('\n\n');
|
|
1551
|
+
this_0.q('Your personality: ' + context.w7o_1);
|
|
1552
|
+
this_0.q('\n');
|
|
1553
|
+
this_0.q('Current game state: ' + context.x7o_1);
|
|
1554
|
+
this_0.q('\n\n');
|
|
1555
|
+
this_0.q("\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!");
|
|
1556
|
+
if (!(context.z7o_1 == null)) {
|
|
1557
|
+
this_0.q('\nYou are chatting with ' + context.z7o_1 + '.');
|
|
1562
1558
|
}
|
|
1563
1559
|
var tmp$ret$3 = this_0.toString();
|
|
1564
|
-
messages.
|
|
1560
|
+
messages.e1(tmp.c7p(tmp$ret$3));
|
|
1565
1561
|
// Inline function 'kotlin.collections.forEach' call
|
|
1566
|
-
var _iterator__ex2g4s = takeLast(context.
|
|
1567
|
-
while (_iterator__ex2g4s.
|
|
1568
|
-
var element = _iterator__ex2g4s.
|
|
1569
|
-
messages.
|
|
1562
|
+
var _iterator__ex2g4s = takeLast(context.y7o_1, 5).t();
|
|
1563
|
+
while (_iterator__ex2g4s.u()) {
|
|
1564
|
+
var element = _iterator__ex2g4s.v();
|
|
1565
|
+
messages.e1(Companion_getInstance_2().e7p(element));
|
|
1570
1566
|
}
|
|
1571
|
-
messages.
|
|
1567
|
+
messages.e1(Companion_getInstance_2().d7p(playerMessage));
|
|
1572
1568
|
return messages;
|
|
1573
1569
|
}
|
|
1574
1570
|
function buildRandomMessagePrompt($this, context) {
|
|
1575
|
-
var tmp =
|
|
1571
|
+
var tmp = Companion_getInstance_2();
|
|
1576
1572
|
// Inline function 'kotlin.text.buildString' call
|
|
1577
1573
|
// Inline function 'kotlin.apply' call
|
|
1578
1574
|
var this_0 = StringBuilder_init_$Create$();
|
|
1579
|
-
this_0.
|
|
1580
|
-
this_0.
|
|
1581
|
-
this_0.
|
|
1582
|
-
this_0.
|
|
1583
|
-
this_0.
|
|
1584
|
-
this_0.
|
|
1585
|
-
this_0.
|
|
1575
|
+
this_0.q('\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');
|
|
1576
|
+
this_0.q('\n\n');
|
|
1577
|
+
this_0.q('Your personality: ' + context.w7o_1);
|
|
1578
|
+
this_0.q('\n');
|
|
1579
|
+
this_0.q('Current game state: ' + context.x7o_1);
|
|
1580
|
+
this_0.q('\n\n');
|
|
1581
|
+
this_0.q('\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.');
|
|
1586
1582
|
var tmp$ret$2 = this_0.toString();
|
|
1587
|
-
return listOf([tmp.
|
|
1583
|
+
return listOf([tmp.c7p(tmp$ret$2), Companion_getInstance_2().d7p('Generate a spontaneous comment about the current game situation.')]);
|
|
1588
1584
|
}
|
|
1589
1585
|
function $executeRequestCOROUTINE$_0(_this__u8e3s4, messages, cacheKey, resultContinuation) {
|
|
1590
1586
|
CoroutineImpl.call(this, resultContinuation);
|
|
1591
|
-
this.
|
|
1592
|
-
this.
|
|
1593
|
-
this.
|
|
1587
|
+
this.f7r_1 = _this__u8e3s4;
|
|
1588
|
+
this.g7r_1 = messages;
|
|
1589
|
+
this.h7r_1 = cacheKey;
|
|
1594
1590
|
}
|
|
1595
|
-
protoOf($executeRequestCOROUTINE$_0).
|
|
1596
|
-
var suspendResult = this.
|
|
1591
|
+
protoOf($executeRequestCOROUTINE$_0).m9 = function () {
|
|
1592
|
+
var suspendResult = this.g9_1;
|
|
1597
1593
|
$sm: do
|
|
1598
1594
|
try {
|
|
1599
|
-
var tmp = this.
|
|
1595
|
+
var tmp = this.e9_1;
|
|
1600
1596
|
switch (tmp) {
|
|
1601
1597
|
case 0:
|
|
1602
|
-
this.
|
|
1603
|
-
this.
|
|
1604
|
-
suspendResult = this.
|
|
1598
|
+
this.f9_1 = 3;
|
|
1599
|
+
this.e9_1 = 1;
|
|
1600
|
+
suspendResult = this.f7r_1.j7r_1.u7q(this.g7r_1, this);
|
|
1605
1601
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1606
1602
|
return suspendResult;
|
|
1607
1603
|
}
|
|
1608
1604
|
|
|
1609
|
-
this.
|
|
1605
|
+
this.e9_1 = 2;
|
|
1610
1606
|
continue $sm;
|
|
1611
1607
|
case 1:
|
|
1612
|
-
var unboxed = suspendResult.
|
|
1608
|
+
var unboxed = suspendResult.hm_1;
|
|
1613
1609
|
suspendResult = new Result(unboxed);
|
|
1614
|
-
this.
|
|
1610
|
+
this.e9_1 = 2;
|
|
1615
1611
|
continue $sm;
|
|
1616
1612
|
case 2:
|
|
1617
|
-
var this_0 = suspendResult.
|
|
1613
|
+
var this_0 = suspendResult.hm_1;
|
|
1618
1614
|
var tmp_0;
|
|
1619
1615
|
if (_Result___get_isSuccess__impl__sndoy8(this_0)) {
|
|
1620
1616
|
var this_1 = new Result(this_0);
|
|
1621
1617
|
var tmp_1;
|
|
1622
1618
|
try {
|
|
1623
|
-
var $this$runCatching = this_1.
|
|
1619
|
+
var $this$runCatching = this_1.hm_1;
|
|
1624
1620
|
var tmp_2 = _Result___get_value__impl__bjfvqg($this$runCatching);
|
|
1625
1621
|
var content = (tmp_2 == null ? true : !(tmp_2 == null)) ? tmp_2 : THROW_CCE();
|
|
1626
|
-
this.
|
|
1622
|
+
this.f7r_1.i7r_1.h7o(this.h7r_1, content);
|
|
1627
1623
|
tmp_1 = _Result___init__impl__xyqfz8(content);
|
|
1628
1624
|
} catch ($p) {
|
|
1629
1625
|
var tmp_3;
|
|
@@ -1642,26 +1638,26 @@
|
|
|
1642
1638
|
|
|
1643
1639
|
return new Result(tmp_0);
|
|
1644
1640
|
case 3:
|
|
1645
|
-
throw this.
|
|
1641
|
+
throw this.h9_1;
|
|
1646
1642
|
}
|
|
1647
1643
|
} catch ($p) {
|
|
1648
1644
|
var e_0 = $p;
|
|
1649
|
-
if (this.
|
|
1645
|
+
if (this.f9_1 === 3) {
|
|
1650
1646
|
throw e_0;
|
|
1651
1647
|
} else {
|
|
1652
|
-
this.
|
|
1653
|
-
this.
|
|
1648
|
+
this.e9_1 = this.f9_1;
|
|
1649
|
+
this.h9_1 = e_0;
|
|
1654
1650
|
}
|
|
1655
1651
|
}
|
|
1656
1652
|
while (true);
|
|
1657
1653
|
};
|
|
1658
1654
|
function BotChatRepositoryImpl(openAIApi, cache) {
|
|
1659
|
-
this.
|
|
1660
|
-
this.
|
|
1655
|
+
this.i7r_1 = cache;
|
|
1656
|
+
this.j7r_1 = new BaseOpenAIRepository(openAIApi);
|
|
1661
1657
|
}
|
|
1662
|
-
protoOf(BotChatRepositoryImpl).
|
|
1658
|
+
protoOf(BotChatRepositoryImpl).v7q = function (playerMessage, context, $completion) {
|
|
1663
1659
|
var cacheKey = buildCacheKey(this, 'answer', playerMessage, context);
|
|
1664
|
-
var tmp0_safe_receiver = this.
|
|
1660
|
+
var tmp0_safe_receiver = this.i7r_1.i3a(cacheKey);
|
|
1665
1661
|
if (tmp0_safe_receiver == null)
|
|
1666
1662
|
null;
|
|
1667
1663
|
else {
|
|
@@ -1676,9 +1672,9 @@
|
|
|
1676
1672
|
return tmp;
|
|
1677
1673
|
return tmp;
|
|
1678
1674
|
};
|
|
1679
|
-
protoOf(BotChatRepositoryImpl).
|
|
1675
|
+
protoOf(BotChatRepositoryImpl).w7q = function (context, $completion) {
|
|
1680
1676
|
var cacheKey = buildCacheKey(this, 'random', null, context);
|
|
1681
|
-
var tmp0_safe_receiver = this.
|
|
1677
|
+
var tmp0_safe_receiver = this.i7r_1.i3a(cacheKey);
|
|
1682
1678
|
if (tmp0_safe_receiver == null)
|
|
1683
1679
|
null;
|
|
1684
1680
|
else {
|
|
@@ -1696,7 +1692,7 @@
|
|
|
1696
1692
|
function UserReportsResolverRepository() {
|
|
1697
1693
|
}
|
|
1698
1694
|
function UserReportsResolverRepositoryImpl$_init_$lambda_sckkav($this$Json) {
|
|
1699
|
-
$this$Json.
|
|
1695
|
+
$this$Json.l5c_1 = true;
|
|
1700
1696
|
return Unit_instance;
|
|
1701
1697
|
}
|
|
1702
1698
|
function UserReportsResolverRepositoryImpl(openAIApi, json) {
|
|
@@ -1707,8 +1703,8 @@
|
|
|
1707
1703
|
tmp = json;
|
|
1708
1704
|
}
|
|
1709
1705
|
json = tmp;
|
|
1710
|
-
this.
|
|
1711
|
-
this.
|
|
1706
|
+
this.k7r_1 = json;
|
|
1707
|
+
this.l7r_1 = new BaseOpenAIRepository(openAIApi);
|
|
1712
1708
|
}
|
|
1713
1709
|
function aiModule(config) {
|
|
1714
1710
|
return Module_init_$Create$('AIModule', VOID, VOID, aiModule$lambda(config));
|
|
@@ -1723,18 +1719,18 @@
|
|
|
1723
1719
|
}
|
|
1724
1720
|
function aiModule$lambda$lambda_1($this$singleton) {
|
|
1725
1721
|
// Inline function 'org.kodein.di.instance' call
|
|
1726
|
-
var tmp = $this$singleton.
|
|
1722
|
+
var tmp = $this$singleton.m1d();
|
|
1727
1723
|
// Inline function 'org.kodein.type.generic' call
|
|
1728
1724
|
var tmp_0 = typeToken(createKType(getKClass(OpenAIConfig), arrayOf([]), false));
|
|
1729
1725
|
var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
|
|
1730
|
-
var openAIConfig = tmp.
|
|
1726
|
+
var openAIConfig = tmp.l1d(tmp$ret$0, null);
|
|
1731
1727
|
return HttpClient(aiModule$lambda$lambda$lambda(openAIConfig));
|
|
1732
1728
|
}
|
|
1733
1729
|
function aiModule$lambda$lambda$lambda$lambda$lambda($openAIConfig) {
|
|
1734
1730
|
return function ($this$Json) {
|
|
1735
|
-
$this$Json.
|
|
1736
|
-
$this$Json.
|
|
1737
|
-
$this$Json.
|
|
1731
|
+
$this$Json.l5c_1 = true;
|
|
1732
|
+
$this$Json.m5c_1 = true;
|
|
1733
|
+
$this$Json.n5c_1 = $openAIConfig.s7n_1;
|
|
1738
1734
|
return Unit_instance;
|
|
1739
1735
|
};
|
|
1740
1736
|
}
|
|
@@ -1746,57 +1742,57 @@
|
|
|
1746
1742
|
}
|
|
1747
1743
|
function aiModule$lambda$lambda$lambda$lambda_0($openAIConfig) {
|
|
1748
1744
|
return function ($this$install) {
|
|
1749
|
-
$this$install.
|
|
1750
|
-
$this$install.
|
|
1745
|
+
$this$install.o5q(get_DEFAULT(Companion_instance_0));
|
|
1746
|
+
$this$install.n5q_1 = $openAIConfig.s7n_1 ? LogLevel_INFO_getInstance() : LogLevel_NONE_getInstance();
|
|
1751
1747
|
return Unit_instance;
|
|
1752
1748
|
};
|
|
1753
1749
|
}
|
|
1754
1750
|
function aiModule$lambda$lambda$lambda($openAIConfig) {
|
|
1755
1751
|
return function ($this$HttpClient) {
|
|
1756
|
-
var tmp =
|
|
1757
|
-
$this$HttpClient.
|
|
1758
|
-
var tmp_0 =
|
|
1759
|
-
$this$HttpClient.
|
|
1752
|
+
var tmp = get_ContentNegotiation();
|
|
1753
|
+
$this$HttpClient.p45(tmp, aiModule$lambda$lambda$lambda$lambda($openAIConfig));
|
|
1754
|
+
var tmp_0 = get_Logging();
|
|
1755
|
+
$this$HttpClient.p45(tmp_0, aiModule$lambda$lambda$lambda$lambda_0($openAIConfig));
|
|
1760
1756
|
return Unit_instance;
|
|
1761
1757
|
};
|
|
1762
1758
|
}
|
|
1763
1759
|
function aiModule$lambda$lambda_2($this$singleton) {
|
|
1764
1760
|
// Inline function 'org.kodein.di.instance' call
|
|
1765
|
-
var tmp = $this$singleton.
|
|
1761
|
+
var tmp = $this$singleton.m1d();
|
|
1766
1762
|
// Inline function 'org.kodein.type.generic' call
|
|
1767
1763
|
var tmp_0 = typeToken(createKType(getKClass(OpenAIConfig), arrayOf([]), false));
|
|
1768
1764
|
var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
|
|
1769
|
-
var tmp_1 = tmp.
|
|
1765
|
+
var tmp_1 = tmp.l1d(tmp$ret$0, null);
|
|
1770
1766
|
// Inline function 'org.kodein.di.instance' call
|
|
1771
|
-
var tmp_2 = $this$singleton.
|
|
1767
|
+
var tmp_2 = $this$singleton.m1d();
|
|
1772
1768
|
// Inline function 'org.kodein.type.generic' call
|
|
1773
1769
|
var tmp_3 = typeToken(createKType(getKClass(HttpClient_0), arrayOf([]), false));
|
|
1774
1770
|
var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
|
|
1775
|
-
var tmp$ret$3 = tmp_2.
|
|
1771
|
+
var tmp$ret$3 = tmp_2.l1d(tmp$ret$2, null);
|
|
1776
1772
|
return new OpenAIApiImpl(tmp_1, tmp$ret$3);
|
|
1777
1773
|
}
|
|
1778
1774
|
function aiModule$lambda$lambda_3($this$singleton) {
|
|
1779
1775
|
// Inline function 'org.kodein.di.instance' call
|
|
1780
|
-
var tmp = $this$singleton.
|
|
1776
|
+
var tmp = $this$singleton.m1d();
|
|
1781
1777
|
// Inline function 'org.kodein.type.generic' call
|
|
1782
1778
|
var tmp_0 = typeToken(createKType(getKClass(OpenAIApi), arrayOf([]), false));
|
|
1783
1779
|
var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
|
|
1784
|
-
var tmp_1 = tmp.
|
|
1780
|
+
var tmp_1 = tmp.l1d(tmp$ret$0, null);
|
|
1785
1781
|
// Inline function 'org.kodein.di.instance' call
|
|
1786
|
-
var tmp_2 = $this$singleton.
|
|
1782
|
+
var tmp_2 = $this$singleton.m1d();
|
|
1787
1783
|
// Inline function 'org.kodein.type.generic' call
|
|
1788
1784
|
var tmp_3 = typeToken(createKType(getKClass(BotChatCache), arrayOf([]), false));
|
|
1789
1785
|
var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
|
|
1790
|
-
var tmp$ret$3 = tmp_2.
|
|
1786
|
+
var tmp$ret$3 = tmp_2.l1d(tmp$ret$2, null);
|
|
1791
1787
|
return new BotChatRepositoryImpl(tmp_1, tmp$ret$3);
|
|
1792
1788
|
}
|
|
1793
1789
|
function aiModule$lambda$lambda_4($this$singleton) {
|
|
1794
1790
|
// Inline function 'org.kodein.di.instance' call
|
|
1795
|
-
var tmp = $this$singleton.
|
|
1791
|
+
var tmp = $this$singleton.m1d();
|
|
1796
1792
|
// Inline function 'org.kodein.type.generic' call
|
|
1797
1793
|
var tmp_0 = typeToken(createKType(getKClass(OpenAIApi), arrayOf([]), false));
|
|
1798
1794
|
var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
|
|
1799
|
-
var tmp$ret$1 = tmp.
|
|
1795
|
+
var tmp$ret$1 = tmp.l1d(tmp$ret$0, null);
|
|
1800
1796
|
return new UserReportsResolverRepositoryImpl(tmp$ret$1);
|
|
1801
1797
|
}
|
|
1802
1798
|
function aiModule$lambda($config) {
|
|
@@ -1805,102 +1801,102 @@
|
|
|
1805
1801
|
// Inline function 'org.kodein.type.generic' call
|
|
1806
1802
|
var tmp = typeToken(createKType(getKClass(OpenAIConfig), arrayOf([]), false));
|
|
1807
1803
|
var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
|
|
1808
|
-
var tmp_0 = $this$Module.
|
|
1804
|
+
var tmp_0 = $this$Module.y1b(tmp$ret$0, null, null);
|
|
1809
1805
|
// Inline function 'org.kodein.di.singleton' call
|
|
1810
1806
|
var creator = aiModule$lambda$lambda($config);
|
|
1811
|
-
var tmp_1 = $this$Module.
|
|
1812
|
-
var tmp_2 = $this$Module.
|
|
1813
|
-
var tmp_3 = $this$Module.
|
|
1807
|
+
var tmp_1 = $this$Module.d1c();
|
|
1808
|
+
var tmp_2 = $this$Module.b1c();
|
|
1809
|
+
var tmp_3 = $this$Module.c1c();
|
|
1814
1810
|
// Inline function 'org.kodein.type.generic' call
|
|
1815
1811
|
var tmp_4 = typeToken(createKType(getKClass(OpenAIConfig), arrayOf([]), false));
|
|
1816
1812
|
var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
|
|
1817
1813
|
var tmp$ret$3 = new Singleton(tmp_1, tmp_2, tmp_3, tmp$ret$2, null, true, creator);
|
|
1818
|
-
tmp_0.
|
|
1814
|
+
tmp_0.b1g(tmp$ret$3);
|
|
1819
1815
|
// Inline function 'org.kodein.di.bind' call
|
|
1820
1816
|
// Inline function 'org.kodein.type.generic' call
|
|
1821
1817
|
var tmp_5 = typeToken(createKType(getKClass(BotChatCache), arrayOf([]), false));
|
|
1822
1818
|
var tmp$ret$4 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
|
|
1823
|
-
var tmp_6 = $this$Module.
|
|
1819
|
+
var tmp_6 = $this$Module.y1b(tmp$ret$4, null, null);
|
|
1824
1820
|
// Inline function 'org.kodein.di.singleton' call
|
|
1825
1821
|
var creator_0 = aiModule$lambda$lambda_0;
|
|
1826
|
-
var tmp_7 = $this$Module.
|
|
1827
|
-
var tmp_8 = $this$Module.
|
|
1828
|
-
var tmp_9 = $this$Module.
|
|
1822
|
+
var tmp_7 = $this$Module.d1c();
|
|
1823
|
+
var tmp_8 = $this$Module.b1c();
|
|
1824
|
+
var tmp_9 = $this$Module.c1c();
|
|
1829
1825
|
// Inline function 'org.kodein.type.generic' call
|
|
1830
1826
|
var tmp_10 = typeToken(createKType(getKClass(InMemoryBotChatCache), arrayOf([]), false));
|
|
1831
1827
|
var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
|
|
1832
1828
|
var tmp$ret$7 = new Singleton(tmp_7, tmp_8, tmp_9, tmp$ret$6, null, true, creator_0);
|
|
1833
|
-
tmp_6.
|
|
1829
|
+
tmp_6.b1g(tmp$ret$7);
|
|
1834
1830
|
// Inline function 'org.kodein.di.bind' call
|
|
1835
1831
|
// Inline function 'org.kodein.type.generic' call
|
|
1836
1832
|
var tmp_11 = typeToken(createKType(getKClass(HttpClient_0), arrayOf([]), false));
|
|
1837
1833
|
var tmp$ret$8 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
|
|
1838
|
-
var tmp_12 = $this$Module.
|
|
1834
|
+
var tmp_12 = $this$Module.y1b(tmp$ret$8, null, null);
|
|
1839
1835
|
// Inline function 'org.kodein.di.singleton' call
|
|
1840
1836
|
var creator_1 = aiModule$lambda$lambda_1;
|
|
1841
|
-
var tmp_13 = $this$Module.
|
|
1842
|
-
var tmp_14 = $this$Module.
|
|
1843
|
-
var tmp_15 = $this$Module.
|
|
1837
|
+
var tmp_13 = $this$Module.d1c();
|
|
1838
|
+
var tmp_14 = $this$Module.b1c();
|
|
1839
|
+
var tmp_15 = $this$Module.c1c();
|
|
1844
1840
|
// Inline function 'org.kodein.type.generic' call
|
|
1845
1841
|
var tmp_16 = typeToken(createKType(getKClass(HttpClient_0), arrayOf([]), false));
|
|
1846
1842
|
var tmp$ret$10 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
|
|
1847
1843
|
var tmp$ret$11 = new Singleton(tmp_13, tmp_14, tmp_15, tmp$ret$10, null, true, creator_1);
|
|
1848
|
-
tmp_12.
|
|
1844
|
+
tmp_12.b1g(tmp$ret$11);
|
|
1849
1845
|
// Inline function 'org.kodein.di.bind' call
|
|
1850
1846
|
// Inline function 'org.kodein.type.generic' call
|
|
1851
1847
|
var tmp_17 = typeToken(createKType(getKClass(OpenAIApi), arrayOf([]), false));
|
|
1852
1848
|
var tmp$ret$12 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
|
|
1853
|
-
var tmp_18 = $this$Module.
|
|
1849
|
+
var tmp_18 = $this$Module.y1b(tmp$ret$12, null, null);
|
|
1854
1850
|
// Inline function 'org.kodein.di.singleton' call
|
|
1855
1851
|
var creator_2 = aiModule$lambda$lambda_2;
|
|
1856
|
-
var tmp_19 = $this$Module.
|
|
1857
|
-
var tmp_20 = $this$Module.
|
|
1858
|
-
var tmp_21 = $this$Module.
|
|
1852
|
+
var tmp_19 = $this$Module.d1c();
|
|
1853
|
+
var tmp_20 = $this$Module.b1c();
|
|
1854
|
+
var tmp_21 = $this$Module.c1c();
|
|
1859
1855
|
// Inline function 'org.kodein.type.generic' call
|
|
1860
1856
|
var tmp_22 = typeToken(createKType(getKClass(OpenAIApiImpl), arrayOf([]), false));
|
|
1861
1857
|
var tmp$ret$14 = isInterface(tmp_22, TypeToken) ? tmp_22 : THROW_CCE();
|
|
1862
1858
|
var tmp$ret$15 = new Singleton(tmp_19, tmp_20, tmp_21, tmp$ret$14, null, true, creator_2);
|
|
1863
|
-
tmp_18.
|
|
1859
|
+
tmp_18.b1g(tmp$ret$15);
|
|
1864
1860
|
// Inline function 'org.kodein.di.bind' call
|
|
1865
1861
|
// Inline function 'org.kodein.type.generic' call
|
|
1866
1862
|
var tmp_23 = typeToken(createKType(getKClass(BotChatRepository), arrayOf([]), false));
|
|
1867
1863
|
var tmp$ret$16 = isInterface(tmp_23, TypeToken) ? tmp_23 : THROW_CCE();
|
|
1868
|
-
var tmp_24 = $this$Module.
|
|
1864
|
+
var tmp_24 = $this$Module.y1b(tmp$ret$16, null, null);
|
|
1869
1865
|
// Inline function 'org.kodein.di.singleton' call
|
|
1870
1866
|
var creator_3 = aiModule$lambda$lambda_3;
|
|
1871
|
-
var tmp_25 = $this$Module.
|
|
1872
|
-
var tmp_26 = $this$Module.
|
|
1873
|
-
var tmp_27 = $this$Module.
|
|
1867
|
+
var tmp_25 = $this$Module.d1c();
|
|
1868
|
+
var tmp_26 = $this$Module.b1c();
|
|
1869
|
+
var tmp_27 = $this$Module.c1c();
|
|
1874
1870
|
// Inline function 'org.kodein.type.generic' call
|
|
1875
1871
|
var tmp_28 = typeToken(createKType(getKClass(BotChatRepositoryImpl), arrayOf([]), false));
|
|
1876
1872
|
var tmp$ret$18 = isInterface(tmp_28, TypeToken) ? tmp_28 : THROW_CCE();
|
|
1877
1873
|
var tmp$ret$19 = new Singleton(tmp_25, tmp_26, tmp_27, tmp$ret$18, null, true, creator_3);
|
|
1878
|
-
tmp_24.
|
|
1874
|
+
tmp_24.b1g(tmp$ret$19);
|
|
1879
1875
|
// Inline function 'org.kodein.di.bind' call
|
|
1880
1876
|
// Inline function 'org.kodein.type.generic' call
|
|
1881
1877
|
var tmp_29 = typeToken(createKType(getKClass(UserReportsResolverRepository), arrayOf([]), false));
|
|
1882
1878
|
var tmp$ret$20 = isInterface(tmp_29, TypeToken) ? tmp_29 : THROW_CCE();
|
|
1883
|
-
var tmp_30 = $this$Module.
|
|
1879
|
+
var tmp_30 = $this$Module.y1b(tmp$ret$20, null, null);
|
|
1884
1880
|
// Inline function 'org.kodein.di.singleton' call
|
|
1885
1881
|
var creator_4 = aiModule$lambda$lambda_4;
|
|
1886
|
-
var tmp_31 = $this$Module.
|
|
1887
|
-
var tmp_32 = $this$Module.
|
|
1888
|
-
var tmp_33 = $this$Module.
|
|
1882
|
+
var tmp_31 = $this$Module.d1c();
|
|
1883
|
+
var tmp_32 = $this$Module.b1c();
|
|
1884
|
+
var tmp_33 = $this$Module.c1c();
|
|
1889
1885
|
// Inline function 'org.kodein.type.generic' call
|
|
1890
1886
|
var tmp_34 = typeToken(createKType(getKClass(UserReportsResolverRepositoryImpl), arrayOf([]), false));
|
|
1891
1887
|
var tmp$ret$22 = isInterface(tmp_34, TypeToken) ? tmp_34 : THROW_CCE();
|
|
1892
1888
|
var tmp$ret$23 = new Singleton(tmp_31, tmp_32, tmp_33, tmp$ret$22, null, true, creator_4);
|
|
1893
|
-
tmp_30.
|
|
1889
|
+
tmp_30.b1g(tmp$ret$23);
|
|
1894
1890
|
return Unit_instance;
|
|
1895
1891
|
};
|
|
1896
1892
|
}
|
|
1897
1893
|
//region block: post-declaration
|
|
1898
|
-
protoOf($serializer).
|
|
1899
|
-
protoOf($serializer_0).
|
|
1900
|
-
protoOf($serializer_1).
|
|
1901
|
-
protoOf($serializer_2).
|
|
1902
|
-
protoOf($serializer_3).
|
|
1903
|
-
protoOf($serializer_4).
|
|
1894
|
+
protoOf($serializer).n10 = typeParametersSerializers;
|
|
1895
|
+
protoOf($serializer_0).n10 = typeParametersSerializers;
|
|
1896
|
+
protoOf($serializer_1).n10 = typeParametersSerializers;
|
|
1897
|
+
protoOf($serializer_2).n10 = typeParametersSerializers;
|
|
1898
|
+
protoOf($serializer_3).n10 = typeParametersSerializers;
|
|
1899
|
+
protoOf($serializer_4).n10 = typeParametersSerializers;
|
|
1904
1900
|
//endregion
|
|
1905
1901
|
//region block: exports
|
|
1906
1902
|
_.$_$ = _.$_$ || {};
|