raspberry_games_server_game_logic 1.8.414 → 1.8.416
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/Logic_Debertz-ai_module.js +214 -412
- package/Logic_Debertz-ai_module.js.map +1 -1
- package/Logic_Debertz-core.js +75 -50
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +13542 -12864
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_server.d.ts +91 -4
- package/Logic_Debertz-game_server.js +1388 -1107
- package/Logic_Debertz-game_server.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +4 -4
- package/kotlinx-coroutines-core.js +1 -1
- package/package.json +1 -1
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
var createAnnotatedEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g2;
|
|
104
104
|
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f2;
|
|
105
105
|
var Enum = kotlin_kotlin.$_$.eh;
|
|
106
|
+
var getNumberHashCode = kotlin_kotlin.$_$.hc;
|
|
106
107
|
var DoubleSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q;
|
|
107
108
|
var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;
|
|
108
109
|
var LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u;
|
|
109
|
-
var getNumberHashCode = kotlin_kotlin.$_$.hc;
|
|
110
110
|
var toString_0 = kotlin_kotlin.$_$.si;
|
|
111
111
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.x2;
|
|
112
112
|
var firstOrNull = kotlin_kotlin.$_$.h7;
|
|
@@ -148,19 +148,17 @@
|
|
|
148
148
|
initMetadataForCompanion(Companion_1);
|
|
149
149
|
initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
150
150
|
initMetadataForClass(ChatMessage, 'ChatMessage', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_0});
|
|
151
|
+
initMetadataForClass(OpenAIConfig, 'OpenAIConfig');
|
|
151
152
|
initMetadataForCompanion(Companion_2);
|
|
152
153
|
initMetadataForObject($serializer_1, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
153
|
-
initMetadataForClass(
|
|
154
|
-
initMetadataForCompanion(Companion_3);
|
|
154
|
+
initMetadataForClass(OpenAIRequest, 'OpenAIRequest', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_1});
|
|
155
155
|
initMetadataForObject($serializer_2, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
156
|
-
initMetadataForClass(OpenAIRequest, 'OpenAIRequest', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_2});
|
|
157
156
|
initMetadataForObject($serializer_3, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
157
|
+
initMetadataForClass(Choice, 'Choice', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_2});
|
|
158
|
+
initMetadataForClass(Usage, 'Usage', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_3});
|
|
159
|
+
initMetadataForCompanion(Companion_3);
|
|
158
160
|
initMetadataForObject($serializer_4, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
159
|
-
initMetadataForClass(
|
|
160
|
-
initMetadataForClass(Usage, 'Usage', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_4});
|
|
161
|
-
initMetadataForCompanion(Companion_4);
|
|
162
|
-
initMetadataForObject($serializer_5, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
163
|
-
initMetadataForClass(OpenAIResponse, 'OpenAIResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_5});
|
|
161
|
+
initMetadataForClass(OpenAIResponse, 'OpenAIResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_4});
|
|
164
162
|
initMetadataForCoroutine($executeRequestCOROUTINE$, CoroutineImpl);
|
|
165
163
|
initMetadataForClass(BaseOpenAIRepository, 'BaseOpenAIRepository', VOID, VOID, VOID, [1, 2]);
|
|
166
164
|
initMetadataForInterface(BotChatRepository, 'BotChatRepository', VOID, VOID, VOID, [2, 1]);
|
|
@@ -168,8 +166,6 @@
|
|
|
168
166
|
initMetadataForClass(BotChatRepositoryImpl, 'BotChatRepositoryImpl', VOID, VOID, [BotChatRepository], [2, 1]);
|
|
169
167
|
initMetadataForInterface(UserReportsResolverRepository, 'UserReportsResolverRepository', VOID, VOID, VOID, [1]);
|
|
170
168
|
initMetadataForClass(UserReportsResolverRepositoryImpl, 'UserReportsResolverRepositoryImpl', VOID, VOID, [UserReportsResolverRepository], [1]);
|
|
171
|
-
initMetadataForInterface(BotChatInteractor, 'BotChatInteractor', VOID, VOID, VOID, [2, 1]);
|
|
172
|
-
initMetadataForClass(BotChatInteractorImpl, 'BotChatInteractorImpl', VOID, VOID, [BotChatInteractor], [2, 1]);
|
|
173
169
|
//endregion
|
|
174
170
|
function OpenAIApi() {
|
|
175
171
|
}
|
|
@@ -813,161 +809,12 @@
|
|
|
813
809
|
return false;
|
|
814
810
|
return true;
|
|
815
811
|
};
|
|
816
|
-
function Companion_2() {
|
|
817
|
-
}
|
|
818
|
-
var Companion_instance_4;
|
|
819
|
-
function Companion_getInstance_4() {
|
|
820
|
-
return Companion_instance_4;
|
|
821
|
-
}
|
|
822
|
-
function $serializer_1() {
|
|
823
|
-
$serializer_instance_1 = this;
|
|
824
|
-
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.OpenAIConfig', this, 6);
|
|
825
|
-
tmp0_serialDesc.gz('apiKey', false);
|
|
826
|
-
tmp0_serialDesc.gz('model', true);
|
|
827
|
-
tmp0_serialDesc.gz('baseUrl', true);
|
|
828
|
-
tmp0_serialDesc.gz('temperature', true);
|
|
829
|
-
tmp0_serialDesc.gz('maxTokens', true);
|
|
830
|
-
tmp0_serialDesc.gz('timeout', true);
|
|
831
|
-
this.b6o_1 = tmp0_serialDesc;
|
|
832
|
-
}
|
|
833
|
-
protoOf($serializer_1).c6o = function (encoder, value) {
|
|
834
|
-
var tmp0_desc = this.b6o_1;
|
|
835
|
-
var tmp1_output = encoder.or(tmp0_desc);
|
|
836
|
-
tmp1_output.dt(tmp0_desc, 0, value.f6m_1);
|
|
837
|
-
if (tmp1_output.lt(tmp0_desc, 1) ? true : !(value.g6m_1 === 'gpt-3.5-turbo')) {
|
|
838
|
-
tmp1_output.dt(tmp0_desc, 1, value.g6m_1);
|
|
839
|
-
}
|
|
840
|
-
if (tmp1_output.lt(tmp0_desc, 2) ? true : !(value.h6m_1 === 'https://api.openai.com/v1')) {
|
|
841
|
-
tmp1_output.dt(tmp0_desc, 2, value.h6m_1);
|
|
842
|
-
}
|
|
843
|
-
if (tmp1_output.lt(tmp0_desc, 3) ? true : !equals(value.i6m_1, 0.7)) {
|
|
844
|
-
tmp1_output.bt(tmp0_desc, 3, value.i6m_1);
|
|
845
|
-
}
|
|
846
|
-
if (tmp1_output.lt(tmp0_desc, 4) ? true : !(value.j6m_1 === 150)) {
|
|
847
|
-
tmp1_output.ys(tmp0_desc, 4, value.j6m_1);
|
|
848
|
-
}
|
|
849
|
-
if (tmp1_output.lt(tmp0_desc, 5) ? true : !equalsLong(value.k6m_1, new Long(30000, 0))) {
|
|
850
|
-
tmp1_output.zs(tmp0_desc, 5, value.k6m_1);
|
|
851
|
-
}
|
|
852
|
-
tmp1_output.pr(tmp0_desc);
|
|
853
|
-
};
|
|
854
|
-
protoOf($serializer_1).co = function (encoder, value) {
|
|
855
|
-
return this.c6o(encoder, value instanceof OpenAIConfig ? value : THROW_CCE());
|
|
856
|
-
};
|
|
857
|
-
protoOf($serializer_1).do = function (decoder) {
|
|
858
|
-
var tmp0_desc = this.b6o_1;
|
|
859
|
-
var tmp1_flag = true;
|
|
860
|
-
var tmp2_index = 0;
|
|
861
|
-
var tmp3_bitMask0 = 0;
|
|
862
|
-
var tmp4_local0 = null;
|
|
863
|
-
var tmp5_local1 = null;
|
|
864
|
-
var tmp6_local2 = null;
|
|
865
|
-
var tmp7_local3 = 0.0;
|
|
866
|
-
var tmp8_local4 = 0;
|
|
867
|
-
var tmp9_local5 = new Long(0, 0);
|
|
868
|
-
var tmp10_input = decoder.or(tmp0_desc);
|
|
869
|
-
if (tmp10_input.es()) {
|
|
870
|
-
tmp4_local0 = tmp10_input.yr(tmp0_desc, 0);
|
|
871
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
872
|
-
tmp5_local1 = tmp10_input.yr(tmp0_desc, 1);
|
|
873
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
874
|
-
tmp6_local2 = tmp10_input.yr(tmp0_desc, 2);
|
|
875
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
876
|
-
tmp7_local3 = tmp10_input.wr(tmp0_desc, 3);
|
|
877
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
878
|
-
tmp8_local4 = tmp10_input.tr(tmp0_desc, 4);
|
|
879
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
880
|
-
tmp9_local5 = tmp10_input.ur(tmp0_desc, 5);
|
|
881
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
882
|
-
} else
|
|
883
|
-
while (tmp1_flag) {
|
|
884
|
-
tmp2_index = tmp10_input.fs(tmp0_desc);
|
|
885
|
-
switch (tmp2_index) {
|
|
886
|
-
case -1:
|
|
887
|
-
tmp1_flag = false;
|
|
888
|
-
break;
|
|
889
|
-
case 0:
|
|
890
|
-
tmp4_local0 = tmp10_input.yr(tmp0_desc, 0);
|
|
891
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
892
|
-
break;
|
|
893
|
-
case 1:
|
|
894
|
-
tmp5_local1 = tmp10_input.yr(tmp0_desc, 1);
|
|
895
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
896
|
-
break;
|
|
897
|
-
case 2:
|
|
898
|
-
tmp6_local2 = tmp10_input.yr(tmp0_desc, 2);
|
|
899
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
900
|
-
break;
|
|
901
|
-
case 3:
|
|
902
|
-
tmp7_local3 = tmp10_input.wr(tmp0_desc, 3);
|
|
903
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
904
|
-
break;
|
|
905
|
-
case 4:
|
|
906
|
-
tmp8_local4 = tmp10_input.tr(tmp0_desc, 4);
|
|
907
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
908
|
-
break;
|
|
909
|
-
case 5:
|
|
910
|
-
tmp9_local5 = tmp10_input.ur(tmp0_desc, 5);
|
|
911
|
-
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
912
|
-
break;
|
|
913
|
-
default:
|
|
914
|
-
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
tmp10_input.pr(tmp0_desc);
|
|
918
|
-
return OpenAIConfig_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
|
|
919
|
-
};
|
|
920
|
-
protoOf($serializer_1).bo = function () {
|
|
921
|
-
return this.b6o_1;
|
|
922
|
-
};
|
|
923
|
-
protoOf($serializer_1).vz = function () {
|
|
924
|
-
// Inline function 'kotlin.arrayOf' call
|
|
925
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
926
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
927
|
-
return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), DoubleSerializer_getInstance(), IntSerializer_getInstance(), LongSerializer_getInstance()];
|
|
928
|
-
};
|
|
929
|
-
var $serializer_instance_1;
|
|
930
|
-
function $serializer_getInstance_1() {
|
|
931
|
-
if ($serializer_instance_1 == null)
|
|
932
|
-
new $serializer_1();
|
|
933
|
-
return $serializer_instance_1;
|
|
934
|
-
}
|
|
935
|
-
function OpenAIConfig_init_$Init$(seen0, apiKey, model, baseUrl, temperature, maxTokens, timeout, serializationConstructorMarker, $this) {
|
|
936
|
-
if (!(1 === (1 & seen0))) {
|
|
937
|
-
throwMissingFieldException(seen0, 1, $serializer_getInstance_1().b6o_1);
|
|
938
|
-
}
|
|
939
|
-
$this.f6m_1 = apiKey;
|
|
940
|
-
if (0 === (seen0 & 2))
|
|
941
|
-
$this.g6m_1 = 'gpt-3.5-turbo';
|
|
942
|
-
else
|
|
943
|
-
$this.g6m_1 = model;
|
|
944
|
-
if (0 === (seen0 & 4))
|
|
945
|
-
$this.h6m_1 = 'https://api.openai.com/v1';
|
|
946
|
-
else
|
|
947
|
-
$this.h6m_1 = baseUrl;
|
|
948
|
-
if (0 === (seen0 & 8))
|
|
949
|
-
$this.i6m_1 = 0.7;
|
|
950
|
-
else
|
|
951
|
-
$this.i6m_1 = temperature;
|
|
952
|
-
if (0 === (seen0 & 16))
|
|
953
|
-
$this.j6m_1 = 150;
|
|
954
|
-
else
|
|
955
|
-
$this.j6m_1 = maxTokens;
|
|
956
|
-
if (0 === (seen0 & 32))
|
|
957
|
-
$this.k6m_1 = new Long(30000, 0);
|
|
958
|
-
else
|
|
959
|
-
$this.k6m_1 = timeout;
|
|
960
|
-
return $this;
|
|
961
|
-
}
|
|
962
|
-
function OpenAIConfig_init_$Create$(seen0, apiKey, model, baseUrl, temperature, maxTokens, timeout, serializationConstructorMarker) {
|
|
963
|
-
return OpenAIConfig_init_$Init$(seen0, apiKey, model, baseUrl, temperature, maxTokens, timeout, serializationConstructorMarker, objectCreate(protoOf(OpenAIConfig)));
|
|
964
|
-
}
|
|
965
812
|
function OpenAIConfig(apiKey, model, baseUrl, temperature, maxTokens, timeout) {
|
|
966
813
|
model = model === VOID ? 'gpt-3.5-turbo' : model;
|
|
967
814
|
baseUrl = baseUrl === VOID ? 'https://api.openai.com/v1' : baseUrl;
|
|
968
815
|
temperature = temperature === VOID ? 0.7 : temperature;
|
|
969
816
|
maxTokens = maxTokens === VOID ? 150 : maxTokens;
|
|
970
|
-
timeout = timeout === VOID ?
|
|
817
|
+
timeout = timeout === VOID ? 30000 : timeout;
|
|
971
818
|
this.f6m_1 = apiKey;
|
|
972
819
|
this.g6m_1 = model;
|
|
973
820
|
this.h6m_1 = baseUrl;
|
|
@@ -976,7 +823,7 @@
|
|
|
976
823
|
this.k6m_1 = timeout;
|
|
977
824
|
}
|
|
978
825
|
protoOf(OpenAIConfig).toString = function () {
|
|
979
|
-
return 'OpenAIConfig(apiKey=' + this.f6m_1 + ', model=' + this.g6m_1 + ', baseUrl=' + this.h6m_1 + ', temperature=' + this.i6m_1 + ', maxTokens=' + this.j6m_1 + ', timeout=' + this.k6m_1
|
|
826
|
+
return 'OpenAIConfig(apiKey=' + this.f6m_1 + ', model=' + this.g6m_1 + ', baseUrl=' + this.h6m_1 + ', temperature=' + this.i6m_1 + ', maxTokens=' + this.j6m_1 + ', timeout=' + this.k6m_1 + ')';
|
|
980
827
|
};
|
|
981
828
|
protoOf(OpenAIConfig).hashCode = function () {
|
|
982
829
|
var result = getStringHashCode(this.f6m_1);
|
|
@@ -984,7 +831,7 @@
|
|
|
984
831
|
result = imul(result, 31) + getStringHashCode(this.h6m_1) | 0;
|
|
985
832
|
result = imul(result, 31) + getNumberHashCode(this.i6m_1) | 0;
|
|
986
833
|
result = imul(result, 31) + this.j6m_1 | 0;
|
|
987
|
-
result = imul(result, 31) + this.k6m_1
|
|
834
|
+
result = imul(result, 31) + this.k6m_1 | 0;
|
|
988
835
|
return result;
|
|
989
836
|
};
|
|
990
837
|
protoOf(OpenAIConfig).equals = function (other) {
|
|
@@ -1002,52 +849,52 @@
|
|
|
1002
849
|
return false;
|
|
1003
850
|
if (!(this.j6m_1 === other.j6m_1))
|
|
1004
851
|
return false;
|
|
1005
|
-
if (!
|
|
852
|
+
if (!(this.k6m_1 === other.k6m_1))
|
|
1006
853
|
return false;
|
|
1007
854
|
return true;
|
|
1008
855
|
};
|
|
1009
856
|
function OpenAIRequest$Companion$$childSerializers$_anonymous__ff5rn1() {
|
|
1010
857
|
return new ArrayListSerializer($serializer_getInstance_0());
|
|
1011
858
|
}
|
|
1012
|
-
function
|
|
1013
|
-
|
|
859
|
+
function Companion_2() {
|
|
860
|
+
Companion_instance_4 = this;
|
|
1014
861
|
var tmp = this;
|
|
1015
862
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
1016
863
|
// Inline function 'kotlin.arrayOf' call
|
|
1017
864
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1018
865
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1019
|
-
tmp.
|
|
866
|
+
tmp.b6o_1 = [null, lazy(tmp_0, OpenAIRequest$Companion$$childSerializers$_anonymous__ff5rn1), null, null];
|
|
1020
867
|
}
|
|
1021
|
-
var
|
|
1022
|
-
function
|
|
1023
|
-
if (
|
|
1024
|
-
new
|
|
1025
|
-
return
|
|
868
|
+
var Companion_instance_4;
|
|
869
|
+
function Companion_getInstance_4() {
|
|
870
|
+
if (Companion_instance_4 == null)
|
|
871
|
+
new Companion_2();
|
|
872
|
+
return Companion_instance_4;
|
|
1026
873
|
}
|
|
1027
|
-
function $
|
|
1028
|
-
$
|
|
874
|
+
function $serializer_1() {
|
|
875
|
+
$serializer_instance_1 = this;
|
|
1029
876
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.OpenAIRequest', this, 4);
|
|
1030
877
|
tmp0_serialDesc.gz('model', false);
|
|
1031
878
|
tmp0_serialDesc.gz('messages', false);
|
|
1032
879
|
tmp0_serialDesc.gz('temperature', false);
|
|
1033
880
|
tmp0_serialDesc.gz('max_tokens', false);
|
|
1034
|
-
this.
|
|
881
|
+
this.c6o_1 = tmp0_serialDesc;
|
|
1035
882
|
}
|
|
1036
|
-
protoOf($
|
|
1037
|
-
var tmp0_desc = this.
|
|
883
|
+
protoOf($serializer_1).d6o = function (encoder, value) {
|
|
884
|
+
var tmp0_desc = this.c6o_1;
|
|
1038
885
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
1039
|
-
var tmp2_cached =
|
|
1040
|
-
tmp1_output.dt(tmp0_desc, 0, value.
|
|
1041
|
-
tmp1_output.ft(tmp0_desc, 1, tmp2_cached[1].x(), value.
|
|
1042
|
-
tmp1_output.bt(tmp0_desc, 2, value.
|
|
1043
|
-
tmp1_output.ys(tmp0_desc, 3, value.
|
|
886
|
+
var tmp2_cached = Companion_getInstance_4().b6o_1;
|
|
887
|
+
tmp1_output.dt(tmp0_desc, 0, value.e6o_1);
|
|
888
|
+
tmp1_output.ft(tmp0_desc, 1, tmp2_cached[1].x(), value.f6o_1);
|
|
889
|
+
tmp1_output.bt(tmp0_desc, 2, value.g6o_1);
|
|
890
|
+
tmp1_output.ys(tmp0_desc, 3, value.h6o_1);
|
|
1044
891
|
tmp1_output.pr(tmp0_desc);
|
|
1045
892
|
};
|
|
1046
|
-
protoOf($
|
|
1047
|
-
return this.
|
|
893
|
+
protoOf($serializer_1).co = function (encoder, value) {
|
|
894
|
+
return this.d6o(encoder, value instanceof OpenAIRequest ? value : THROW_CCE());
|
|
1048
895
|
};
|
|
1049
|
-
protoOf($
|
|
1050
|
-
var tmp0_desc = this.
|
|
896
|
+
protoOf($serializer_1).do = function (decoder) {
|
|
897
|
+
var tmp0_desc = this.c6o_1;
|
|
1051
898
|
var tmp1_flag = true;
|
|
1052
899
|
var tmp2_index = 0;
|
|
1053
900
|
var tmp3_bitMask0 = 0;
|
|
@@ -1056,7 +903,7 @@
|
|
|
1056
903
|
var tmp6_local2 = 0.0;
|
|
1057
904
|
var tmp7_local3 = 0;
|
|
1058
905
|
var tmp8_input = decoder.or(tmp0_desc);
|
|
1059
|
-
var tmp9_cached =
|
|
906
|
+
var tmp9_cached = Companion_getInstance_4().b6o_1;
|
|
1060
907
|
if (tmp8_input.es()) {
|
|
1061
908
|
tmp4_local0 = tmp8_input.yr(tmp0_desc, 0);
|
|
1062
909
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -1096,50 +943,50 @@
|
|
|
1096
943
|
tmp8_input.pr(tmp0_desc);
|
|
1097
944
|
return OpenAIRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
1098
945
|
};
|
|
1099
|
-
protoOf($
|
|
1100
|
-
return this.
|
|
946
|
+
protoOf($serializer_1).bo = function () {
|
|
947
|
+
return this.c6o_1;
|
|
1101
948
|
};
|
|
1102
|
-
protoOf($
|
|
1103
|
-
var tmp0_cached =
|
|
949
|
+
protoOf($serializer_1).vz = function () {
|
|
950
|
+
var tmp0_cached = Companion_getInstance_4().b6o_1;
|
|
1104
951
|
// Inline function 'kotlin.arrayOf' call
|
|
1105
952
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1106
953
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1107
954
|
return [StringSerializer_getInstance(), tmp0_cached[1].x(), DoubleSerializer_getInstance(), IntSerializer_getInstance()];
|
|
1108
955
|
};
|
|
1109
|
-
var $
|
|
1110
|
-
function $
|
|
1111
|
-
if ($
|
|
1112
|
-
new $
|
|
1113
|
-
return $
|
|
956
|
+
var $serializer_instance_1;
|
|
957
|
+
function $serializer_getInstance_1() {
|
|
958
|
+
if ($serializer_instance_1 == null)
|
|
959
|
+
new $serializer_1();
|
|
960
|
+
return $serializer_instance_1;
|
|
1114
961
|
}
|
|
1115
962
|
function OpenAIRequest_init_$Init$(seen0, model, messages, temperature, maxTokens, serializationConstructorMarker, $this) {
|
|
1116
963
|
if (!(15 === (15 & seen0))) {
|
|
1117
|
-
throwMissingFieldException(seen0, 15, $
|
|
964
|
+
throwMissingFieldException(seen0, 15, $serializer_getInstance_1().c6o_1);
|
|
1118
965
|
}
|
|
1119
|
-
$this.
|
|
1120
|
-
$this.
|
|
1121
|
-
$this.
|
|
1122
|
-
$this.
|
|
966
|
+
$this.e6o_1 = model;
|
|
967
|
+
$this.f6o_1 = messages;
|
|
968
|
+
$this.g6o_1 = temperature;
|
|
969
|
+
$this.h6o_1 = maxTokens;
|
|
1123
970
|
return $this;
|
|
1124
971
|
}
|
|
1125
972
|
function OpenAIRequest_init_$Create$(seen0, model, messages, temperature, maxTokens, serializationConstructorMarker) {
|
|
1126
973
|
return OpenAIRequest_init_$Init$(seen0, model, messages, temperature, maxTokens, serializationConstructorMarker, objectCreate(protoOf(OpenAIRequest)));
|
|
1127
974
|
}
|
|
1128
975
|
function OpenAIRequest(model, messages, temperature, maxTokens) {
|
|
1129
|
-
|
|
1130
|
-
this.
|
|
1131
|
-
this.
|
|
1132
|
-
this.
|
|
1133
|
-
this.
|
|
976
|
+
Companion_getInstance_4();
|
|
977
|
+
this.e6o_1 = model;
|
|
978
|
+
this.f6o_1 = messages;
|
|
979
|
+
this.g6o_1 = temperature;
|
|
980
|
+
this.h6o_1 = maxTokens;
|
|
1134
981
|
}
|
|
1135
982
|
protoOf(OpenAIRequest).toString = function () {
|
|
1136
|
-
return 'OpenAIRequest(model=' + this.
|
|
983
|
+
return 'OpenAIRequest(model=' + this.e6o_1 + ', messages=' + toString(this.f6o_1) + ', temperature=' + this.g6o_1 + ', maxTokens=' + this.h6o_1 + ')';
|
|
1137
984
|
};
|
|
1138
985
|
protoOf(OpenAIRequest).hashCode = function () {
|
|
1139
|
-
var result = getStringHashCode(this.
|
|
1140
|
-
result = imul(result, 31) + hashCode(this.
|
|
1141
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1142
|
-
result = imul(result, 31) + this.
|
|
986
|
+
var result = getStringHashCode(this.e6o_1);
|
|
987
|
+
result = imul(result, 31) + hashCode(this.f6o_1) | 0;
|
|
988
|
+
result = imul(result, 31) + getNumberHashCode(this.g6o_1) | 0;
|
|
989
|
+
result = imul(result, 31) + this.h6o_1 | 0;
|
|
1143
990
|
return result;
|
|
1144
991
|
};
|
|
1145
992
|
protoOf(OpenAIRequest).equals = function (other) {
|
|
@@ -1147,39 +994,39 @@
|
|
|
1147
994
|
return true;
|
|
1148
995
|
if (!(other instanceof OpenAIRequest))
|
|
1149
996
|
return false;
|
|
1150
|
-
if (!(this.
|
|
997
|
+
if (!(this.e6o_1 === other.e6o_1))
|
|
1151
998
|
return false;
|
|
1152
|
-
if (!equals(this.
|
|
999
|
+
if (!equals(this.f6o_1, other.f6o_1))
|
|
1153
1000
|
return false;
|
|
1154
|
-
if (!equals(this.
|
|
1001
|
+
if (!equals(this.g6o_1, other.g6o_1))
|
|
1155
1002
|
return false;
|
|
1156
|
-
if (!(this.
|
|
1003
|
+
if (!(this.h6o_1 === other.h6o_1))
|
|
1157
1004
|
return false;
|
|
1158
1005
|
return true;
|
|
1159
1006
|
};
|
|
1160
|
-
function $
|
|
1161
|
-
$
|
|
1007
|
+
function $serializer_2() {
|
|
1008
|
+
$serializer_instance_2 = this;
|
|
1162
1009
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.OpenAIResponse.Choice', this, 3);
|
|
1163
1010
|
tmp0_serialDesc.gz('index', false);
|
|
1164
1011
|
tmp0_serialDesc.gz('message', false);
|
|
1165
1012
|
tmp0_serialDesc.gz('finish_reason', true);
|
|
1166
|
-
this.
|
|
1013
|
+
this.i6o_1 = tmp0_serialDesc;
|
|
1167
1014
|
}
|
|
1168
|
-
protoOf($
|
|
1169
|
-
var tmp0_desc = this.
|
|
1015
|
+
protoOf($serializer_2).j6o = function (encoder, value) {
|
|
1016
|
+
var tmp0_desc = this.i6o_1;
|
|
1170
1017
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
1171
|
-
tmp1_output.ys(tmp0_desc, 0, value.
|
|
1172
|
-
tmp1_output.ft(tmp0_desc, 1, $serializer_getInstance_0(), value.
|
|
1173
|
-
if (tmp1_output.lt(tmp0_desc, 2) ? true : !(value.
|
|
1174
|
-
tmp1_output.ht(tmp0_desc, 2, StringSerializer_getInstance(), value.
|
|
1018
|
+
tmp1_output.ys(tmp0_desc, 0, value.k6o_1);
|
|
1019
|
+
tmp1_output.ft(tmp0_desc, 1, $serializer_getInstance_0(), value.l6o_1);
|
|
1020
|
+
if (tmp1_output.lt(tmp0_desc, 2) ? true : !(value.m6o_1 == null)) {
|
|
1021
|
+
tmp1_output.ht(tmp0_desc, 2, StringSerializer_getInstance(), value.m6o_1);
|
|
1175
1022
|
}
|
|
1176
1023
|
tmp1_output.pr(tmp0_desc);
|
|
1177
1024
|
};
|
|
1178
|
-
protoOf($
|
|
1179
|
-
return this.
|
|
1025
|
+
protoOf($serializer_2).co = function (encoder, value) {
|
|
1026
|
+
return this.j6o(encoder, value instanceof Choice ? value : THROW_CCE());
|
|
1180
1027
|
};
|
|
1181
|
-
protoOf($
|
|
1182
|
-
var tmp0_desc = this.
|
|
1028
|
+
protoOf($serializer_2).do = function (decoder) {
|
|
1029
|
+
var tmp0_desc = this.i6o_1;
|
|
1183
1030
|
var tmp1_flag = true;
|
|
1184
1031
|
var tmp2_index = 0;
|
|
1185
1032
|
var tmp3_bitMask0 = 0;
|
|
@@ -1220,57 +1067,57 @@
|
|
|
1220
1067
|
tmp7_input.pr(tmp0_desc);
|
|
1221
1068
|
return Choice_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
1222
1069
|
};
|
|
1223
|
-
protoOf($
|
|
1224
|
-
return this.
|
|
1070
|
+
protoOf($serializer_2).bo = function () {
|
|
1071
|
+
return this.i6o_1;
|
|
1225
1072
|
};
|
|
1226
|
-
protoOf($
|
|
1073
|
+
protoOf($serializer_2).vz = function () {
|
|
1227
1074
|
// Inline function 'kotlin.arrayOf' call
|
|
1228
1075
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1229
1076
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1230
1077
|
return [IntSerializer_getInstance(), $serializer_getInstance_0(), get_nullable(StringSerializer_getInstance())];
|
|
1231
1078
|
};
|
|
1232
|
-
var $
|
|
1233
|
-
function $
|
|
1234
|
-
if ($
|
|
1235
|
-
new $
|
|
1236
|
-
return $
|
|
1079
|
+
var $serializer_instance_2;
|
|
1080
|
+
function $serializer_getInstance_2() {
|
|
1081
|
+
if ($serializer_instance_2 == null)
|
|
1082
|
+
new $serializer_2();
|
|
1083
|
+
return $serializer_instance_2;
|
|
1237
1084
|
}
|
|
1238
1085
|
function Choice_init_$Init$(seen0, index, message, finishReason, serializationConstructorMarker, $this) {
|
|
1239
1086
|
if (!(3 === (3 & seen0))) {
|
|
1240
|
-
throwMissingFieldException(seen0, 3, $
|
|
1087
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_2().i6o_1);
|
|
1241
1088
|
}
|
|
1242
|
-
$this.
|
|
1243
|
-
$this.
|
|
1089
|
+
$this.k6o_1 = index;
|
|
1090
|
+
$this.l6o_1 = message;
|
|
1244
1091
|
if (0 === (seen0 & 4))
|
|
1245
|
-
$this.
|
|
1092
|
+
$this.m6o_1 = null;
|
|
1246
1093
|
else
|
|
1247
|
-
$this.
|
|
1094
|
+
$this.m6o_1 = finishReason;
|
|
1248
1095
|
return $this;
|
|
1249
1096
|
}
|
|
1250
1097
|
function Choice_init_$Create$(seen0, index, message, finishReason, serializationConstructorMarker) {
|
|
1251
1098
|
return Choice_init_$Init$(seen0, index, message, finishReason, serializationConstructorMarker, objectCreate(protoOf(Choice)));
|
|
1252
1099
|
}
|
|
1253
|
-
function $
|
|
1254
|
-
$
|
|
1100
|
+
function $serializer_3() {
|
|
1101
|
+
$serializer_instance_3 = this;
|
|
1255
1102
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.OpenAIResponse.Usage', this, 3);
|
|
1256
1103
|
tmp0_serialDesc.gz('prompt_tokens', false);
|
|
1257
1104
|
tmp0_serialDesc.gz('completion_tokens', false);
|
|
1258
1105
|
tmp0_serialDesc.gz('total_tokens', false);
|
|
1259
|
-
this.
|
|
1106
|
+
this.n6o_1 = tmp0_serialDesc;
|
|
1260
1107
|
}
|
|
1261
|
-
protoOf($
|
|
1262
|
-
var tmp0_desc = this.
|
|
1108
|
+
protoOf($serializer_3).o6o = function (encoder, value) {
|
|
1109
|
+
var tmp0_desc = this.n6o_1;
|
|
1263
1110
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
1264
|
-
tmp1_output.ys(tmp0_desc, 0, value.
|
|
1265
|
-
tmp1_output.ys(tmp0_desc, 1, value.
|
|
1266
|
-
tmp1_output.ys(tmp0_desc, 2, value.
|
|
1111
|
+
tmp1_output.ys(tmp0_desc, 0, value.p6o_1);
|
|
1112
|
+
tmp1_output.ys(tmp0_desc, 1, value.q6o_1);
|
|
1113
|
+
tmp1_output.ys(tmp0_desc, 2, value.r6o_1);
|
|
1267
1114
|
tmp1_output.pr(tmp0_desc);
|
|
1268
1115
|
};
|
|
1269
|
-
protoOf($
|
|
1270
|
-
return this.
|
|
1116
|
+
protoOf($serializer_3).co = function (encoder, value) {
|
|
1117
|
+
return this.o6o(encoder, value instanceof Usage ? value : THROW_CCE());
|
|
1271
1118
|
};
|
|
1272
|
-
protoOf($
|
|
1273
|
-
var tmp0_desc = this.
|
|
1119
|
+
protoOf($serializer_3).do = function (decoder) {
|
|
1120
|
+
var tmp0_desc = this.n6o_1;
|
|
1274
1121
|
var tmp1_flag = true;
|
|
1275
1122
|
var tmp2_index = 0;
|
|
1276
1123
|
var tmp3_bitMask0 = 0;
|
|
@@ -1311,45 +1158,45 @@
|
|
|
1311
1158
|
tmp7_input.pr(tmp0_desc);
|
|
1312
1159
|
return Usage_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
1313
1160
|
};
|
|
1314
|
-
protoOf($
|
|
1315
|
-
return this.
|
|
1161
|
+
protoOf($serializer_3).bo = function () {
|
|
1162
|
+
return this.n6o_1;
|
|
1316
1163
|
};
|
|
1317
|
-
protoOf($
|
|
1164
|
+
protoOf($serializer_3).vz = function () {
|
|
1318
1165
|
// Inline function 'kotlin.arrayOf' call
|
|
1319
1166
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1320
1167
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1321
1168
|
return [IntSerializer_getInstance(), IntSerializer_getInstance(), IntSerializer_getInstance()];
|
|
1322
1169
|
};
|
|
1323
|
-
var $
|
|
1324
|
-
function $
|
|
1325
|
-
if ($
|
|
1326
|
-
new $
|
|
1327
|
-
return $
|
|
1170
|
+
var $serializer_instance_3;
|
|
1171
|
+
function $serializer_getInstance_3() {
|
|
1172
|
+
if ($serializer_instance_3 == null)
|
|
1173
|
+
new $serializer_3();
|
|
1174
|
+
return $serializer_instance_3;
|
|
1328
1175
|
}
|
|
1329
1176
|
function Usage_init_$Init$(seen0, promptTokens, completionTokens, totalTokens, serializationConstructorMarker, $this) {
|
|
1330
1177
|
if (!(7 === (7 & seen0))) {
|
|
1331
|
-
throwMissingFieldException(seen0, 7, $
|
|
1178
|
+
throwMissingFieldException(seen0, 7, $serializer_getInstance_3().n6o_1);
|
|
1332
1179
|
}
|
|
1333
|
-
$this.
|
|
1334
|
-
$this.
|
|
1335
|
-
$this.
|
|
1180
|
+
$this.p6o_1 = promptTokens;
|
|
1181
|
+
$this.q6o_1 = completionTokens;
|
|
1182
|
+
$this.r6o_1 = totalTokens;
|
|
1336
1183
|
return $this;
|
|
1337
1184
|
}
|
|
1338
1185
|
function Usage_init_$Create$(seen0, promptTokens, completionTokens, totalTokens, serializationConstructorMarker) {
|
|
1339
1186
|
return Usage_init_$Init$(seen0, promptTokens, completionTokens, totalTokens, serializationConstructorMarker, objectCreate(protoOf(Usage)));
|
|
1340
1187
|
}
|
|
1341
1188
|
function OpenAIResponse$Companion$$childSerializers$_anonymous__z8nlex() {
|
|
1342
|
-
return new ArrayListSerializer($
|
|
1189
|
+
return new ArrayListSerializer($serializer_getInstance_2());
|
|
1343
1190
|
}
|
|
1344
1191
|
function Choice() {
|
|
1345
1192
|
}
|
|
1346
1193
|
protoOf(Choice).toString = function () {
|
|
1347
|
-
return 'Choice(index=' + this.
|
|
1194
|
+
return 'Choice(index=' + this.k6o_1 + ', message=' + this.l6o_1.toString() + ', finishReason=' + this.m6o_1 + ')';
|
|
1348
1195
|
};
|
|
1349
1196
|
protoOf(Choice).hashCode = function () {
|
|
1350
|
-
var result = this.
|
|
1351
|
-
result = imul(result, 31) + this.
|
|
1352
|
-
result = imul(result, 31) + (this.
|
|
1197
|
+
var result = this.k6o_1;
|
|
1198
|
+
result = imul(result, 31) + this.l6o_1.hashCode() | 0;
|
|
1199
|
+
result = imul(result, 31) + (this.m6o_1 == null ? 0 : getStringHashCode(this.m6o_1)) | 0;
|
|
1353
1200
|
return result;
|
|
1354
1201
|
};
|
|
1355
1202
|
protoOf(Choice).equals = function (other) {
|
|
@@ -1357,23 +1204,23 @@
|
|
|
1357
1204
|
return true;
|
|
1358
1205
|
if (!(other instanceof Choice))
|
|
1359
1206
|
return false;
|
|
1360
|
-
if (!(this.
|
|
1207
|
+
if (!(this.k6o_1 === other.k6o_1))
|
|
1361
1208
|
return false;
|
|
1362
|
-
if (!this.
|
|
1209
|
+
if (!this.l6o_1.equals(other.l6o_1))
|
|
1363
1210
|
return false;
|
|
1364
|
-
if (!(this.
|
|
1211
|
+
if (!(this.m6o_1 == other.m6o_1))
|
|
1365
1212
|
return false;
|
|
1366
1213
|
return true;
|
|
1367
1214
|
};
|
|
1368
1215
|
function Usage() {
|
|
1369
1216
|
}
|
|
1370
1217
|
protoOf(Usage).toString = function () {
|
|
1371
|
-
return 'Usage(promptTokens=' + this.
|
|
1218
|
+
return 'Usage(promptTokens=' + this.p6o_1 + ', completionTokens=' + this.q6o_1 + ', totalTokens=' + this.r6o_1 + ')';
|
|
1372
1219
|
};
|
|
1373
1220
|
protoOf(Usage).hashCode = function () {
|
|
1374
|
-
var result = this.
|
|
1375
|
-
result = imul(result, 31) + this.
|
|
1376
|
-
result = imul(result, 31) + this.
|
|
1221
|
+
var result = this.p6o_1;
|
|
1222
|
+
result = imul(result, 31) + this.q6o_1 | 0;
|
|
1223
|
+
result = imul(result, 31) + this.r6o_1 | 0;
|
|
1377
1224
|
return result;
|
|
1378
1225
|
};
|
|
1379
1226
|
protoOf(Usage).equals = function (other) {
|
|
@@ -1381,31 +1228,31 @@
|
|
|
1381
1228
|
return true;
|
|
1382
1229
|
if (!(other instanceof Usage))
|
|
1383
1230
|
return false;
|
|
1384
|
-
if (!(this.
|
|
1231
|
+
if (!(this.p6o_1 === other.p6o_1))
|
|
1385
1232
|
return false;
|
|
1386
|
-
if (!(this.
|
|
1233
|
+
if (!(this.q6o_1 === other.q6o_1))
|
|
1387
1234
|
return false;
|
|
1388
|
-
if (!(this.
|
|
1235
|
+
if (!(this.r6o_1 === other.r6o_1))
|
|
1389
1236
|
return false;
|
|
1390
1237
|
return true;
|
|
1391
1238
|
};
|
|
1392
|
-
function
|
|
1393
|
-
|
|
1239
|
+
function Companion_3() {
|
|
1240
|
+
Companion_instance_5 = this;
|
|
1394
1241
|
var tmp = this;
|
|
1395
1242
|
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
1396
1243
|
// Inline function 'kotlin.arrayOf' call
|
|
1397
1244
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1398
1245
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1399
|
-
tmp.
|
|
1246
|
+
tmp.s6o_1 = [null, null, null, null, lazy(tmp_0, OpenAIResponse$Companion$$childSerializers$_anonymous__z8nlex), null];
|
|
1400
1247
|
}
|
|
1401
|
-
var
|
|
1402
|
-
function
|
|
1403
|
-
if (
|
|
1404
|
-
new
|
|
1405
|
-
return
|
|
1248
|
+
var Companion_instance_5;
|
|
1249
|
+
function Companion_getInstance_5() {
|
|
1250
|
+
if (Companion_instance_5 == null)
|
|
1251
|
+
new Companion_3();
|
|
1252
|
+
return Companion_instance_5;
|
|
1406
1253
|
}
|
|
1407
|
-
function $
|
|
1408
|
-
$
|
|
1254
|
+
function $serializer_4() {
|
|
1255
|
+
$serializer_instance_4 = this;
|
|
1409
1256
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.logic.ai.data.models.OpenAIResponse', this, 6);
|
|
1410
1257
|
tmp0_serialDesc.gz('id', false);
|
|
1411
1258
|
tmp0_serialDesc.gz('object', false);
|
|
@@ -1413,27 +1260,27 @@
|
|
|
1413
1260
|
tmp0_serialDesc.gz('model', false);
|
|
1414
1261
|
tmp0_serialDesc.gz('choices', false);
|
|
1415
1262
|
tmp0_serialDesc.gz('usage', true);
|
|
1416
|
-
this.
|
|
1263
|
+
this.t6o_1 = tmp0_serialDesc;
|
|
1417
1264
|
}
|
|
1418
|
-
protoOf($
|
|
1419
|
-
var tmp0_desc = this.
|
|
1265
|
+
protoOf($serializer_4).u6o = function (encoder, value) {
|
|
1266
|
+
var tmp0_desc = this.t6o_1;
|
|
1420
1267
|
var tmp1_output = encoder.or(tmp0_desc);
|
|
1421
|
-
var tmp2_cached =
|
|
1422
|
-
tmp1_output.dt(tmp0_desc, 0, value.
|
|
1423
|
-
tmp1_output.dt(tmp0_desc, 1, value.
|
|
1424
|
-
tmp1_output.zs(tmp0_desc, 2, value.
|
|
1425
|
-
tmp1_output.dt(tmp0_desc, 3, value.
|
|
1426
|
-
tmp1_output.ft(tmp0_desc, 4, tmp2_cached[4].x(), value.
|
|
1427
|
-
if (tmp1_output.lt(tmp0_desc, 5) ? true : !(value.
|
|
1428
|
-
tmp1_output.ht(tmp0_desc, 5, $
|
|
1268
|
+
var tmp2_cached = Companion_getInstance_5().s6o_1;
|
|
1269
|
+
tmp1_output.dt(tmp0_desc, 0, value.v6o_1);
|
|
1270
|
+
tmp1_output.dt(tmp0_desc, 1, value.w6o_1);
|
|
1271
|
+
tmp1_output.zs(tmp0_desc, 2, value.x6o_1);
|
|
1272
|
+
tmp1_output.dt(tmp0_desc, 3, value.y6o_1);
|
|
1273
|
+
tmp1_output.ft(tmp0_desc, 4, tmp2_cached[4].x(), value.z6o_1);
|
|
1274
|
+
if (tmp1_output.lt(tmp0_desc, 5) ? true : !(value.a6p_1 == null)) {
|
|
1275
|
+
tmp1_output.ht(tmp0_desc, 5, $serializer_getInstance_3(), value.a6p_1);
|
|
1429
1276
|
}
|
|
1430
1277
|
tmp1_output.pr(tmp0_desc);
|
|
1431
1278
|
};
|
|
1432
|
-
protoOf($
|
|
1433
|
-
return this.
|
|
1279
|
+
protoOf($serializer_4).co = function (encoder, value) {
|
|
1280
|
+
return this.u6o(encoder, value instanceof OpenAIResponse ? value : THROW_CCE());
|
|
1434
1281
|
};
|
|
1435
|
-
protoOf($
|
|
1436
|
-
var tmp0_desc = this.
|
|
1282
|
+
protoOf($serializer_4).do = function (decoder) {
|
|
1283
|
+
var tmp0_desc = this.t6o_1;
|
|
1437
1284
|
var tmp1_flag = true;
|
|
1438
1285
|
var tmp2_index = 0;
|
|
1439
1286
|
var tmp3_bitMask0 = 0;
|
|
@@ -1444,7 +1291,7 @@
|
|
|
1444
1291
|
var tmp8_local4 = null;
|
|
1445
1292
|
var tmp9_local5 = null;
|
|
1446
1293
|
var tmp10_input = decoder.or(tmp0_desc);
|
|
1447
|
-
var tmp11_cached =
|
|
1294
|
+
var tmp11_cached = Companion_getInstance_5().s6o_1;
|
|
1448
1295
|
if (tmp10_input.es()) {
|
|
1449
1296
|
tmp4_local0 = tmp10_input.yr(tmp0_desc, 0);
|
|
1450
1297
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -1456,7 +1303,7 @@
|
|
|
1456
1303
|
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1457
1304
|
tmp8_local4 = tmp10_input.as(tmp0_desc, 4, tmp11_cached[4].x(), tmp8_local4);
|
|
1458
1305
|
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
1459
|
-
tmp9_local5 = tmp10_input.cs(tmp0_desc, 5, $
|
|
1306
|
+
tmp9_local5 = tmp10_input.cs(tmp0_desc, 5, $serializer_getInstance_3(), tmp9_local5);
|
|
1460
1307
|
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
1461
1308
|
} else
|
|
1462
1309
|
while (tmp1_flag) {
|
|
@@ -1486,7 +1333,7 @@
|
|
|
1486
1333
|
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
1487
1334
|
break;
|
|
1488
1335
|
case 5:
|
|
1489
|
-
tmp9_local5 = tmp10_input.cs(tmp0_desc, 5, $
|
|
1336
|
+
tmp9_local5 = tmp10_input.cs(tmp0_desc, 5, $serializer_getInstance_3(), tmp9_local5);
|
|
1490
1337
|
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
1491
1338
|
break;
|
|
1492
1339
|
default:
|
|
@@ -1496,60 +1343,60 @@
|
|
|
1496
1343
|
tmp10_input.pr(tmp0_desc);
|
|
1497
1344
|
return OpenAIResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
|
|
1498
1345
|
};
|
|
1499
|
-
protoOf($
|
|
1500
|
-
return this.
|
|
1346
|
+
protoOf($serializer_4).bo = function () {
|
|
1347
|
+
return this.t6o_1;
|
|
1501
1348
|
};
|
|
1502
|
-
protoOf($
|
|
1503
|
-
var tmp0_cached =
|
|
1349
|
+
protoOf($serializer_4).vz = function () {
|
|
1350
|
+
var tmp0_cached = Companion_getInstance_5().s6o_1;
|
|
1504
1351
|
// Inline function 'kotlin.arrayOf' call
|
|
1505
1352
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1506
1353
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1507
|
-
return [StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[4].x(), get_nullable($
|
|
1354
|
+
return [StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[4].x(), get_nullable($serializer_getInstance_3())];
|
|
1508
1355
|
};
|
|
1509
|
-
var $
|
|
1510
|
-
function $
|
|
1511
|
-
if ($
|
|
1512
|
-
new $
|
|
1513
|
-
return $
|
|
1356
|
+
var $serializer_instance_4;
|
|
1357
|
+
function $serializer_getInstance_4() {
|
|
1358
|
+
if ($serializer_instance_4 == null)
|
|
1359
|
+
new $serializer_4();
|
|
1360
|
+
return $serializer_instance_4;
|
|
1514
1361
|
}
|
|
1515
1362
|
function OpenAIResponse_init_$Init$(seen0, id, objectType, created, model, choices, usage, serializationConstructorMarker, $this) {
|
|
1516
1363
|
if (!(31 === (31 & seen0))) {
|
|
1517
|
-
throwMissingFieldException(seen0, 31, $
|
|
1364
|
+
throwMissingFieldException(seen0, 31, $serializer_getInstance_4().t6o_1);
|
|
1518
1365
|
}
|
|
1519
|
-
$this.
|
|
1520
|
-
$this.
|
|
1521
|
-
$this.
|
|
1522
|
-
$this.
|
|
1523
|
-
$this.
|
|
1366
|
+
$this.v6o_1 = id;
|
|
1367
|
+
$this.w6o_1 = objectType;
|
|
1368
|
+
$this.x6o_1 = created;
|
|
1369
|
+
$this.y6o_1 = model;
|
|
1370
|
+
$this.z6o_1 = choices;
|
|
1524
1371
|
if (0 === (seen0 & 32))
|
|
1525
|
-
$this.
|
|
1372
|
+
$this.a6p_1 = null;
|
|
1526
1373
|
else
|
|
1527
|
-
$this.
|
|
1374
|
+
$this.a6p_1 = usage;
|
|
1528
1375
|
return $this;
|
|
1529
1376
|
}
|
|
1530
1377
|
function OpenAIResponse_init_$Create$(seen0, id, objectType, created, model, choices, usage, serializationConstructorMarker) {
|
|
1531
1378
|
return OpenAIResponse_init_$Init$(seen0, id, objectType, created, model, choices, usage, serializationConstructorMarker, objectCreate(protoOf(OpenAIResponse)));
|
|
1532
1379
|
}
|
|
1533
1380
|
function OpenAIResponse(id, objectType, created, model, choices, usage) {
|
|
1534
|
-
|
|
1381
|
+
Companion_getInstance_5();
|
|
1535
1382
|
usage = usage === VOID ? null : usage;
|
|
1536
|
-
this.
|
|
1537
|
-
this.
|
|
1538
|
-
this.
|
|
1539
|
-
this.
|
|
1540
|
-
this.
|
|
1541
|
-
this.
|
|
1383
|
+
this.v6o_1 = id;
|
|
1384
|
+
this.w6o_1 = objectType;
|
|
1385
|
+
this.x6o_1 = created;
|
|
1386
|
+
this.y6o_1 = model;
|
|
1387
|
+
this.z6o_1 = choices;
|
|
1388
|
+
this.a6p_1 = usage;
|
|
1542
1389
|
}
|
|
1543
1390
|
protoOf(OpenAIResponse).toString = function () {
|
|
1544
|
-
return 'OpenAIResponse(id=' + this.
|
|
1391
|
+
return 'OpenAIResponse(id=' + this.v6o_1 + ', objectType=' + this.w6o_1 + ', created=' + this.x6o_1.toString() + ', model=' + this.y6o_1 + ', choices=' + toString(this.z6o_1) + ', usage=' + toString_0(this.a6p_1) + ')';
|
|
1545
1392
|
};
|
|
1546
1393
|
protoOf(OpenAIResponse).hashCode = function () {
|
|
1547
|
-
var result = getStringHashCode(this.
|
|
1394
|
+
var result = getStringHashCode(this.v6o_1);
|
|
1395
|
+
result = imul(result, 31) + getStringHashCode(this.w6o_1) | 0;
|
|
1396
|
+
result = imul(result, 31) + this.x6o_1.hashCode() | 0;
|
|
1548
1397
|
result = imul(result, 31) + getStringHashCode(this.y6o_1) | 0;
|
|
1549
|
-
result = imul(result, 31) + this.z6o_1
|
|
1550
|
-
result = imul(result, 31) +
|
|
1551
|
-
result = imul(result, 31) + hashCode(this.b6p_1) | 0;
|
|
1552
|
-
result = imul(result, 31) + (this.c6p_1 == null ? 0 : this.c6p_1.hashCode()) | 0;
|
|
1398
|
+
result = imul(result, 31) + hashCode(this.z6o_1) | 0;
|
|
1399
|
+
result = imul(result, 31) + (this.a6p_1 == null ? 0 : this.a6p_1.hashCode()) | 0;
|
|
1553
1400
|
return result;
|
|
1554
1401
|
};
|
|
1555
1402
|
protoOf(OpenAIResponse).equals = function (other) {
|
|
@@ -1557,24 +1404,24 @@
|
|
|
1557
1404
|
return true;
|
|
1558
1405
|
if (!(other instanceof OpenAIResponse))
|
|
1559
1406
|
return false;
|
|
1560
|
-
if (!(this.
|
|
1407
|
+
if (!(this.v6o_1 === other.v6o_1))
|
|
1561
1408
|
return false;
|
|
1562
|
-
if (!(this.
|
|
1409
|
+
if (!(this.w6o_1 === other.w6o_1))
|
|
1563
1410
|
return false;
|
|
1564
|
-
if (!equalsLong(this.
|
|
1411
|
+
if (!equalsLong(this.x6o_1, other.x6o_1))
|
|
1565
1412
|
return false;
|
|
1566
|
-
if (!(this.
|
|
1413
|
+
if (!(this.y6o_1 === other.y6o_1))
|
|
1567
1414
|
return false;
|
|
1568
|
-
if (!equals(this.
|
|
1415
|
+
if (!equals(this.z6o_1, other.z6o_1))
|
|
1569
1416
|
return false;
|
|
1570
|
-
if (!equals(this.
|
|
1417
|
+
if (!equals(this.a6p_1, other.a6p_1))
|
|
1571
1418
|
return false;
|
|
1572
1419
|
return true;
|
|
1573
1420
|
};
|
|
1574
1421
|
function $executeRequestCOROUTINE$(_this__u8e3s4, messages, resultContinuation) {
|
|
1575
1422
|
CoroutineImpl.call(this, resultContinuation);
|
|
1576
|
-
this.
|
|
1577
|
-
this.
|
|
1423
|
+
this.j6p_1 = _this__u8e3s4;
|
|
1424
|
+
this.k6p_1 = messages;
|
|
1578
1425
|
}
|
|
1579
1426
|
protoOf($executeRequestCOROUTINE$).a9 = function () {
|
|
1580
1427
|
var suspendResult = this.u8_1;
|
|
@@ -1585,7 +1432,7 @@
|
|
|
1585
1432
|
case 0:
|
|
1586
1433
|
this.t8_1 = 3;
|
|
1587
1434
|
this.s8_1 = 1;
|
|
1588
|
-
suspendResult = this.l6p_1.
|
|
1435
|
+
suspendResult = this.j6p_1.l6p_1.e6m(this.k6p_1, this);
|
|
1589
1436
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1590
1437
|
return suspendResult;
|
|
1591
1438
|
}
|
|
@@ -1607,8 +1454,8 @@
|
|
|
1607
1454
|
var $this$runCatching = this_1.tl_1;
|
|
1608
1455
|
var tmp_2 = _Result___get_value__impl__bjfvqg($this$runCatching);
|
|
1609
1456
|
var response = (tmp_2 == null ? true : !(tmp_2 == null)) ? tmp_2 : THROW_CCE();
|
|
1610
|
-
var tmp0_safe_receiver = firstOrNull(response.
|
|
1611
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1457
|
+
var tmp0_safe_receiver = firstOrNull(response.z6o_1);
|
|
1458
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l6o_1;
|
|
1612
1459
|
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.a6o_1;
|
|
1613
1460
|
var tmp_3;
|
|
1614
1461
|
if (tmp2_elvis_lhs == null) {
|
|
@@ -1649,9 +1496,9 @@
|
|
|
1649
1496
|
while (true);
|
|
1650
1497
|
};
|
|
1651
1498
|
function BaseOpenAIRepository(openAIApi) {
|
|
1652
|
-
this.
|
|
1499
|
+
this.l6p_1 = openAIApi;
|
|
1653
1500
|
}
|
|
1654
|
-
protoOf(BaseOpenAIRepository).
|
|
1501
|
+
protoOf(BaseOpenAIRepository).m6p = function (messages, $completion) {
|
|
1655
1502
|
var tmp = new $executeRequestCOROUTINE$(this, messages, $completion);
|
|
1656
1503
|
tmp.u8_1 = Unit_instance;
|
|
1657
1504
|
tmp.v8_1 = null;
|
|
@@ -1734,9 +1581,9 @@
|
|
|
1734
1581
|
}
|
|
1735
1582
|
function $executeRequestCOROUTINE$_0(_this__u8e3s4, messages, cacheKey, resultContinuation) {
|
|
1736
1583
|
CoroutineImpl.call(this, resultContinuation);
|
|
1737
|
-
this.
|
|
1738
|
-
this.
|
|
1739
|
-
this.
|
|
1584
|
+
this.x6p_1 = _this__u8e3s4;
|
|
1585
|
+
this.y6p_1 = messages;
|
|
1586
|
+
this.z6p_1 = cacheKey;
|
|
1740
1587
|
}
|
|
1741
1588
|
protoOf($executeRequestCOROUTINE$_0).a9 = function () {
|
|
1742
1589
|
var suspendResult = this.u8_1;
|
|
@@ -1747,7 +1594,7 @@
|
|
|
1747
1594
|
case 0:
|
|
1748
1595
|
this.t8_1 = 3;
|
|
1749
1596
|
this.s8_1 = 1;
|
|
1750
|
-
suspendResult = this.
|
|
1597
|
+
suspendResult = this.x6p_1.b6q_1.m6p(this.y6p_1, this);
|
|
1751
1598
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1752
1599
|
return suspendResult;
|
|
1753
1600
|
}
|
|
@@ -1769,7 +1616,7 @@
|
|
|
1769
1616
|
var $this$runCatching = this_1.tl_1;
|
|
1770
1617
|
var tmp_2 = _Result___get_value__impl__bjfvqg($this$runCatching);
|
|
1771
1618
|
var content = (tmp_2 == null ? true : !(tmp_2 == null)) ? tmp_2 : THROW_CCE();
|
|
1772
|
-
this.
|
|
1619
|
+
this.x6p_1.a6q_1.z6m(this.z6p_1, content);
|
|
1773
1620
|
tmp_1 = _Result___init__impl__xyqfz8(content);
|
|
1774
1621
|
} catch ($p) {
|
|
1775
1622
|
var tmp_3;
|
|
@@ -1802,12 +1649,12 @@
|
|
|
1802
1649
|
while (true);
|
|
1803
1650
|
};
|
|
1804
1651
|
function BotChatRepositoryImpl(openAIApi, cache) {
|
|
1805
|
-
this.
|
|
1806
|
-
this.
|
|
1652
|
+
this.a6q_1 = cache;
|
|
1653
|
+
this.b6q_1 = new BaseOpenAIRepository(openAIApi);
|
|
1807
1654
|
}
|
|
1808
|
-
protoOf(BotChatRepositoryImpl).
|
|
1655
|
+
protoOf(BotChatRepositoryImpl).n6p = function (playerMessage, context, $completion) {
|
|
1809
1656
|
var cacheKey = buildCacheKey(this, 'answer', playerMessage, context);
|
|
1810
|
-
var tmp0_safe_receiver = this.
|
|
1657
|
+
var tmp0_safe_receiver = this.a6q_1.t1b(cacheKey);
|
|
1811
1658
|
if (tmp0_safe_receiver == null)
|
|
1812
1659
|
null;
|
|
1813
1660
|
else {
|
|
@@ -1822,9 +1669,9 @@
|
|
|
1822
1669
|
return tmp;
|
|
1823
1670
|
return tmp;
|
|
1824
1671
|
};
|
|
1825
|
-
protoOf(BotChatRepositoryImpl).
|
|
1672
|
+
protoOf(BotChatRepositoryImpl).o6p = function (context, $completion) {
|
|
1826
1673
|
var cacheKey = buildCacheKey(this, 'random', null, context);
|
|
1827
|
-
var tmp0_safe_receiver = this.
|
|
1674
|
+
var tmp0_safe_receiver = this.a6q_1.t1b(cacheKey);
|
|
1828
1675
|
if (tmp0_safe_receiver == null)
|
|
1829
1676
|
null;
|
|
1830
1677
|
else {
|
|
@@ -1853,8 +1700,8 @@
|
|
|
1853
1700
|
tmp = json;
|
|
1854
1701
|
}
|
|
1855
1702
|
json = tmp;
|
|
1856
|
-
this.
|
|
1857
|
-
this.
|
|
1703
|
+
this.c6q_1 = json;
|
|
1704
|
+
this.d6q_1 = new BaseOpenAIRepository(openAIApi);
|
|
1858
1705
|
}
|
|
1859
1706
|
function aiModule(config) {
|
|
1860
1707
|
return Module_init_$Create$('AIModule', VOID, VOID, aiModule$lambda(config));
|
|
@@ -1931,15 +1778,6 @@
|
|
|
1931
1778
|
var tmp$ret$1 = tmp.n60(tmp$ret$0, null);
|
|
1932
1779
|
return new UserReportsResolverRepositoryImpl(tmp$ret$1);
|
|
1933
1780
|
}
|
|
1934
|
-
function aiModule$lambda$lambda_5($this$singleton) {
|
|
1935
|
-
// Inline function 'org.kodein.di.instance' call
|
|
1936
|
-
var tmp = $this$singleton.o60();
|
|
1937
|
-
// Inline function 'org.kodein.type.generic' call
|
|
1938
|
-
var tmp_0 = typeToken(createKType(getKClass(BotChatRepository), arrayOf([]), false));
|
|
1939
|
-
var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
|
|
1940
|
-
var tmp$ret$1 = tmp.n60(tmp$ret$0, null);
|
|
1941
|
-
return new BotChatInteractorImpl(tmp$ret$1);
|
|
1942
|
-
}
|
|
1943
1781
|
function aiModule$lambda($config) {
|
|
1944
1782
|
return function ($this$Module) {
|
|
1945
1783
|
// Inline function 'org.kodein.di.bind' call
|
|
@@ -2032,41 +1870,9 @@
|
|
|
2032
1870
|
var tmp$ret$22 = isInterface(tmp_34, TypeToken) ? tmp_34 : THROW_CCE();
|
|
2033
1871
|
var tmp$ret$23 = new Singleton(tmp_31, tmp_32, tmp_33, tmp$ret$22, null, true, creator_4);
|
|
2034
1872
|
tmp_30.z62(tmp$ret$23);
|
|
2035
|
-
// Inline function 'org.kodein.di.bind' call
|
|
2036
|
-
// Inline function 'org.kodein.type.generic' call
|
|
2037
|
-
var tmp_35 = typeToken(createKType(getKClass(BotChatInteractor), arrayOf([]), false));
|
|
2038
|
-
var tmp$ret$24 = isInterface(tmp_35, TypeToken) ? tmp_35 : THROW_CCE();
|
|
2039
|
-
var tmp_36 = $this$Module.b5z(tmp$ret$24, null, null);
|
|
2040
|
-
// Inline function 'org.kodein.di.singleton' call
|
|
2041
|
-
var creator_5 = aiModule$lambda$lambda_5;
|
|
2042
|
-
var tmp_37 = $this$Module.g5z();
|
|
2043
|
-
var tmp_38 = $this$Module.e5z();
|
|
2044
|
-
var tmp_39 = $this$Module.f5z();
|
|
2045
|
-
// Inline function 'org.kodein.type.generic' call
|
|
2046
|
-
var tmp_40 = typeToken(createKType(getKClass(BotChatInteractorImpl), arrayOf([]), false));
|
|
2047
|
-
var tmp$ret$26 = isInterface(tmp_40, TypeToken) ? tmp_40 : THROW_CCE();
|
|
2048
|
-
var tmp$ret$27 = new Singleton(tmp_37, tmp_38, tmp_39, tmp$ret$26, null, true, creator_5);
|
|
2049
|
-
tmp_36.z62(tmp$ret$27);
|
|
2050
1873
|
return Unit_instance;
|
|
2051
1874
|
};
|
|
2052
1875
|
}
|
|
2053
|
-
function BotChatInteractor() {
|
|
2054
|
-
}
|
|
2055
|
-
function BotChatInteractorImpl(repository) {
|
|
2056
|
-
this.g6q_1 = repository;
|
|
2057
|
-
}
|
|
2058
|
-
protoOf(BotChatInteractorImpl).p6p = function (playerMessage, context, $completion) {
|
|
2059
|
-
var tmp = this.g6q_1.p6p(playerMessage, context, $completion);
|
|
2060
|
-
if (tmp === get_COROUTINE_SUSPENDED())
|
|
2061
|
-
return tmp;
|
|
2062
|
-
return tmp;
|
|
2063
|
-
};
|
|
2064
|
-
protoOf(BotChatInteractorImpl).q6p = function (context, $completion) {
|
|
2065
|
-
var tmp = this.g6q_1.q6p(context, $completion);
|
|
2066
|
-
if (tmp === get_COROUTINE_SUSPENDED())
|
|
2067
|
-
return tmp;
|
|
2068
|
-
return tmp;
|
|
2069
|
-
};
|
|
2070
1876
|
//region block: post-declaration
|
|
2071
1877
|
protoOf($serializer).wz = typeParametersSerializers;
|
|
2072
1878
|
protoOf($serializer_0).wz = typeParametersSerializers;
|
|
@@ -2074,17 +1880,13 @@
|
|
|
2074
1880
|
protoOf($serializer_2).wz = typeParametersSerializers;
|
|
2075
1881
|
protoOf($serializer_3).wz = typeParametersSerializers;
|
|
2076
1882
|
protoOf($serializer_4).wz = typeParametersSerializers;
|
|
2077
|
-
protoOf($serializer_5).wz = typeParametersSerializers;
|
|
2078
|
-
//endregion
|
|
2079
|
-
//region block: init
|
|
2080
|
-
Companion_instance_4 = new Companion_2();
|
|
2081
1883
|
//endregion
|
|
2082
1884
|
//region block: exports
|
|
2083
1885
|
_.$_$ = _.$_$ || {};
|
|
2084
1886
|
_.$_$.a = BotChatContext;
|
|
2085
1887
|
_.$_$.b = OpenAIConfig;
|
|
2086
|
-
_.$_$.c =
|
|
2087
|
-
_.$_$.d =
|
|
1888
|
+
_.$_$.c = BotChatRepository;
|
|
1889
|
+
_.$_$.d = aiModule;
|
|
2088
1890
|
_.$_$.e = BotChatConfig_getInstance;
|
|
2089
1891
|
//endregion
|
|
2090
1892
|
return _;
|