@xiuper/mpp-core 0.0.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Kotlin-DateTime-library-kotlinx-datetime.js +1796 -1796
- package/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js +278 -278
- package/Xiuper-mpp-codegraph.js +240 -240
- package/kaml.js +639 -639
- package/koog-agents-agents-core.js +4606 -4606
- package/koog-agents-agents-tools.js +41 -41
- package/koog-agents-agents-utils.js +52 -52
- package/koog-http-client-http-client-core.js +4 -4
- package/koog-http-client-http-client-ktor.js +166 -166
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-anthropic-client.js +906 -906
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js +299 -299
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js +838 -838
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js +452 -452
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js +1002 -1002
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client.js +3358 -3358
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js +532 -532
- package/koog-prompt-prompt-executor-prompt-executor-clients.js +29 -29
- package/koog-prompt-prompt-executor-prompt-executor-llms.js +25 -25
- package/koog-prompt-prompt-executor-prompt-executor-model.js +4 -4
- package/koog-prompt-prompt-llm.js +120 -120
- package/koog-prompt-prompt-markdown.js +30 -30
- package/koog-prompt-prompt-model.js +1055 -1055
- package/koog-prompt-prompt-structure.js +342 -342
- package/koog-utils.js +10 -10
- package/kotlin-kotlin-stdlib.js +453 -411
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-logging.js +116 -116
- package/kotlin-sdk-kotlin-sdk-client.js +260 -260
- package/kotlin-sdk-kotlin-sdk-core.js +2568 -2568
- package/kotlinx-atomicfu.js +5 -5
- package/kotlinx-coroutines-core.js +532 -654
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.js +40 -40
- package/kotlinx-io-kotlinx-io-core.js +605 -605
- package/kotlinx-serialization-kotlinx-serialization-core.js +75 -75
- package/kotlinx-serialization-kotlinx-serialization-json.js +95 -95
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +163 -163
- package/ktor-ktor-client-core.js +2237 -2235
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-events.js +15 -15
- package/ktor-ktor-http-cio.js +725 -725
- package/ktor-ktor-http.js +805 -805
- package/ktor-ktor-io.js +766 -766
- package/ktor-ktor-network.js +285 -285
- package/ktor-ktor-serialization-kotlinx-json.js +1 -1
- package/ktor-ktor-serialization-kotlinx.js +130 -130
- package/ktor-ktor-serialization.js +68 -68
- package/ktor-ktor-server-cio.js +724 -724
- package/ktor-ktor-server-core.js +1793 -1793
- package/ktor-ktor-server-sse.js +125 -125
- package/ktor-ktor-sse.js +40 -40
- package/ktor-ktor-utils.js +690 -690
- package/ktor-ktor-websockets.js +49 -49
- package/markdown.js +1561 -1561
- package/okio-parent-okio.js +368 -368
- package/package.json +1 -1
- package/snakeyaml-engine-kmp.js +2005 -2005
- package/urlencoder-urlencoder-lib.js +43 -43
- package/xiuper-mpp-core.d.ts +45 -7
- package/xiuper-mpp-core.js +22405 -18664
- package/xiuper-mpp-core.js.map +1 -1
- package/autodev-mpp-core.d.ts +0 -1312
- package/autodev-mpp-core.js +0 -86483
- package/autodev-mpp-core.js.map +0 -1
package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js
CHANGED
|
@@ -58,15 +58,15 @@
|
|
|
58
58
|
'use strict';
|
|
59
59
|
//region block: imports
|
|
60
60
|
var imul = Math.imul;
|
|
61
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
62
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
63
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
61
|
+
var protoOf = kotlin_kotlin.$_$.ze;
|
|
62
|
+
var THROW_CCE = kotlin_kotlin.$_$.dl;
|
|
63
|
+
var initMetadataForObject = kotlin_kotlin.$_$.de;
|
|
64
64
|
var Unit_instance = kotlin_kotlin.$_$.h6;
|
|
65
65
|
var KotlinLogging_instance = kotlin_io_github_oshai_kotlin_logging.$_$.b;
|
|
66
66
|
var IllicitViolent_getInstance = kotlin_ai_koog_prompt_model.$_$.q1;
|
|
67
67
|
var Violence_getInstance = kotlin_ai_koog_prompt_model.$_$.y1;
|
|
68
68
|
var listOf = kotlin_kotlin.$_$.u9;
|
|
69
|
-
var to = kotlin_kotlin.$_$.
|
|
69
|
+
var to = kotlin_kotlin.$_$.lm;
|
|
70
70
|
var Illicit_getInstance = kotlin_ai_koog_prompt_model.$_$.r1;
|
|
71
71
|
var listOf_0 = kotlin_kotlin.$_$.t9;
|
|
72
72
|
var Sexual_getInstance = kotlin_ai_koog_prompt_model.$_$.w1;
|
|
@@ -81,61 +81,61 @@
|
|
|
81
81
|
var mapOf = kotlin_kotlin.$_$.x9;
|
|
82
82
|
var flatten = kotlin_kotlin.$_$.x8;
|
|
83
83
|
var distinct = kotlin_kotlin.$_$.i8;
|
|
84
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
84
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.yd;
|
|
85
85
|
var emptyList = kotlin_kotlin.$_$.m8;
|
|
86
86
|
var Companion_getInstance = kotlin_ai_koog_prompt_model.$_$.d2;
|
|
87
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
87
|
+
var charSequenceLength = kotlin_kotlin.$_$.ld;
|
|
88
88
|
var Assistant_init_$Create$ = kotlin_ai_koog_prompt_model.$_$.j1;
|
|
89
|
-
var plus = kotlin_kotlin.$_$.
|
|
89
|
+
var plus = kotlin_kotlin.$_$.ja;
|
|
90
90
|
var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.d;
|
|
91
91
|
var contentType = kotlin_io_ktor_ktor_http.$_$.w1;
|
|
92
92
|
var json = kotlin_io_ktor_ktor_serialization_kotlinx_json.$_$.a;
|
|
93
|
-
var defaultRequest = kotlin_io_ktor_ktor_client_core.$_$.
|
|
93
|
+
var defaultRequest = kotlin_io_ktor_ktor_client_core.$_$.r;
|
|
94
94
|
var get_ContentNegotiation = kotlin_io_ktor_ktor_client_content_negotiation.$_$.a;
|
|
95
|
-
var get_HttpTimeout = kotlin_io_ktor_ktor_client_core.$_$.
|
|
96
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
97
|
-
var FlowCollector = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
98
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
95
|
+
var get_HttpTimeout = kotlin_io_ktor_ktor_client_core.$_$.q;
|
|
96
|
+
var CoroutineImpl = kotlin_kotlin.$_$.wc;
|
|
97
|
+
var FlowCollector = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d1;
|
|
98
|
+
var isInterface = kotlin_kotlin.$_$.me;
|
|
99
99
|
var Ollama_getInstance = kotlin_ai_koog_prompt_llm.$_$.v;
|
|
100
|
-
var equals = kotlin_kotlin.$_$.
|
|
101
|
-
var toString = kotlin_kotlin.$_$.
|
|
100
|
+
var equals = kotlin_kotlin.$_$.pd;
|
|
101
|
+
var toString = kotlin_kotlin.$_$.df;
|
|
102
102
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.e2;
|
|
103
103
|
var VOID = kotlin_kotlin.$_$.h;
|
|
104
|
-
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.
|
|
104
|
+
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.s;
|
|
105
105
|
var Companion_getInstance_0 = kotlin_io_ktor_ktor_http.$_$.j;
|
|
106
|
-
var url = kotlin_io_ktor_ktor_client_core.$_$.
|
|
106
|
+
var url = kotlin_io_ktor_ktor_client_core.$_$.y;
|
|
107
107
|
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.t5;
|
|
108
|
-
var arrayOf = kotlin_kotlin.$_$.
|
|
108
|
+
var arrayOf = kotlin_kotlin.$_$.rl;
|
|
109
109
|
var createKType = kotlin_kotlin.$_$.c;
|
|
110
110
|
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.c1;
|
|
111
111
|
var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.x;
|
|
112
112
|
var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.b;
|
|
113
|
-
var HttpStatement = kotlin_io_ktor_ktor_client_core.$_$.
|
|
114
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
113
|
+
var HttpStatement = kotlin_io_ktor_ktor_client_core.$_$.a1;
|
|
114
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.gc;
|
|
115
115
|
var bodyAsChannel = kotlin_io_ktor_ktor_client_core.$_$.e;
|
|
116
116
|
var readUTF8Line = kotlin_io_ktor_ktor_io.$_$.j;
|
|
117
|
-
var isBlank = kotlin_kotlin.$_$.
|
|
117
|
+
var isBlank = kotlin_kotlin.$_$.hh;
|
|
118
118
|
var getKClass = kotlin_kotlin.$_$.f;
|
|
119
119
|
var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j4;
|
|
120
120
|
var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x3;
|
|
121
121
|
var emitAppend = kotlin_ai_koog_prompt_model.$_$.g1;
|
|
122
122
|
var emitToolCall = kotlin_ai_koog_prompt_model.$_$.i1;
|
|
123
|
-
var Exception = kotlin_kotlin.$_$.
|
|
124
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
123
|
+
var Exception = kotlin_kotlin.$_$.sk;
|
|
124
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.ce;
|
|
125
125
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.p7;
|
|
126
126
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
127
127
|
var isSuccess = kotlin_io_ktor_ktor_http.$_$.d2;
|
|
128
128
|
var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.x2;
|
|
129
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
130
|
-
var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.
|
|
129
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.zd;
|
|
130
|
+
var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.d1;
|
|
131
131
|
var ConnectionTimeoutConfig = kotlin_ai_koog_prompt_executor_clients.$_$.b;
|
|
132
132
|
var System_instance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.b;
|
|
133
133
|
var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.x;
|
|
134
134
|
var streamFrameFlow = kotlin_ai_koog_prompt_model.$_$.d1;
|
|
135
135
|
var LLMClient = kotlin_ai_koog_prompt_executor_clients.$_$.c;
|
|
136
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
136
|
+
var initMetadataForClass = kotlin_kotlin.$_$.xd;
|
|
137
137
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.t;
|
|
138
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
138
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.dm;
|
|
139
139
|
var Result = kotlin_ai_koog_prompt_model.$_$.p;
|
|
140
140
|
var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.d;
|
|
141
141
|
var Call = kotlin_ai_koog_prompt_model.$_$.o;
|
|
@@ -151,9 +151,9 @@
|
|
|
151
151
|
var Binary = kotlin_ai_koog_prompt_model.$_$.d;
|
|
152
152
|
var Image = kotlin_ai_koog_prompt_model.$_$.i;
|
|
153
153
|
var Text = kotlin_ai_koog_prompt_model.$_$.j;
|
|
154
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
154
|
+
var getStringHashCode = kotlin_kotlin.$_$.vd;
|
|
155
155
|
var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.g4;
|
|
156
|
-
var UInt = kotlin_kotlin.$_$.
|
|
156
|
+
var UInt = kotlin_kotlin.$_$.jl;
|
|
157
157
|
var AdditionalPropertiesFlatteningSerializer = kotlin_ai_koog_prompt_executor_clients.$_$.a;
|
|
158
158
|
var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i3;
|
|
159
159
|
var DoubleSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z;
|
|
@@ -163,18 +163,18 @@
|
|
|
163
163
|
var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b3;
|
|
164
164
|
var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c3;
|
|
165
165
|
var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o3;
|
|
166
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
166
|
+
var objectCreate = kotlin_kotlin.$_$.ye;
|
|
167
167
|
var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z2;
|
|
168
168
|
var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e1;
|
|
169
169
|
var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.e;
|
|
170
170
|
var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f3;
|
|
171
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
172
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
171
|
+
var toString_0 = kotlin_kotlin.$_$.km;
|
|
172
|
+
var getNumberHashCode = kotlin_kotlin.$_$.td;
|
|
173
173
|
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.o;
|
|
174
|
-
var lazy = kotlin_kotlin.$_$.
|
|
174
|
+
var lazy = kotlin_kotlin.$_$.bm;
|
|
175
175
|
var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;
|
|
176
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
177
|
-
var getBooleanHashCode = kotlin_kotlin.$_$.
|
|
176
|
+
var hashCode = kotlin_kotlin.$_$.wd;
|
|
177
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.rd;
|
|
178
178
|
var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c1;
|
|
179
179
|
var JsonObjectBuilder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.q;
|
|
180
180
|
var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.s;
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
//endregion
|
|
227
227
|
function None() {
|
|
228
228
|
}
|
|
229
|
-
protoOf(None).
|
|
229
|
+
protoOf(None).b93 = function (prompt, model) {
|
|
230
230
|
return null;
|
|
231
231
|
};
|
|
232
232
|
protoOf(None).toString = function () {
|
|
@@ -254,14 +254,14 @@
|
|
|
254
254
|
Companion_instance = this;
|
|
255
255
|
var tmp = this;
|
|
256
256
|
var tmp_0 = KotlinLogging_instance;
|
|
257
|
-
tmp.
|
|
258
|
-
this.
|
|
259
|
-
this.
|
|
260
|
-
this.
|
|
261
|
-
this.
|
|
262
|
-
this.
|
|
263
|
-
this.
|
|
264
|
-
this.
|
|
257
|
+
tmp.c93_1 = tmp_0.f3i(OllamaClient$Companion$logger$lambda);
|
|
258
|
+
this.d93_1 = 'api/chat';
|
|
259
|
+
this.e93_1 = 'api/embeddings';
|
|
260
|
+
this.f93_1 = 'api/tags';
|
|
261
|
+
this.g93_1 = 'api/show';
|
|
262
|
+
this.h93_1 = 'api/pull';
|
|
263
|
+
this.i93_1 = mapOf([to('S1', listOf([IllicitViolent_getInstance(), Violence_getInstance()])), to('S2', listOf_0(Illicit_getInstance())), to('S3', listOf([IllicitViolent_getInstance(), Sexual_getInstance()])), to('S4', listOf_0(SexualMinors_getInstance())), to('S5', listOf_0(Defamation_getInstance())), to('S6', listOf_0(SpecializedAdvice_getInstance())), to('S7', listOf_0(Privacy_getInstance())), to('S8', listOf_0(IntellectualProperty_getInstance())), to('S9', listOf_0(IllicitViolent_getInstance())), to('S10', listOf_0(Hate_getInstance())), to('S11', listOf_0(SelfHarm_getInstance())), to('S12', listOf_0(Sexual_getInstance())), to('S13', listOf_0(ElectionsMisinformation_getInstance()))]);
|
|
264
|
+
this.j93_1 = distinct(flatten(this.i93_1.l2()));
|
|
265
265
|
}
|
|
266
266
|
var Companion_instance;
|
|
267
267
|
function Companion_getInstance_1() {
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
return Companion_instance;
|
|
271
271
|
}
|
|
272
272
|
function parseResponse($this, response) {
|
|
273
|
-
var tmp0_elvis_lhs = response.
|
|
273
|
+
var tmp0_elvis_lhs = response.l93_1;
|
|
274
274
|
var tmp;
|
|
275
275
|
if (tmp0_elvis_lhs == null) {
|
|
276
276
|
return emptyList();
|
|
@@ -278,13 +278,13 @@
|
|
|
278
278
|
tmp = tmp0_elvis_lhs;
|
|
279
279
|
}
|
|
280
280
|
var messages = tmp;
|
|
281
|
-
var content = messages.
|
|
282
|
-
var tmp1_elvis_lhs = messages.
|
|
281
|
+
var content = messages.q93_1;
|
|
282
|
+
var tmp1_elvis_lhs = messages.s93_1;
|
|
283
283
|
var toolCalls = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
|
|
284
|
-
var promptTokenCount = response.
|
|
285
|
-
var responseTokenCount = response.
|
|
284
|
+
var promptTokenCount = response.n93_1;
|
|
285
|
+
var responseTokenCount = response.o93_1;
|
|
286
286
|
var totalTokensCount = !(promptTokenCount == null) && !(responseTokenCount == null) ? promptTokenCount + responseTokenCount | 0 : !(promptTokenCount == null) ? promptTokenCount : !(responseTokenCount == null) ? responseTokenCount : null;
|
|
287
|
-
var responseMetadata = Companion_getInstance().
|
|
287
|
+
var responseMetadata = Companion_getInstance().i45($this.u93_1, totalTokensCount, promptTokenCount, responseTokenCount);
|
|
288
288
|
var tmp_0;
|
|
289
289
|
var tmp_1;
|
|
290
290
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
@@ -321,22 +321,22 @@
|
|
|
321
321
|
}
|
|
322
322
|
function OllamaClient$client$lambda$lambda(this$0) {
|
|
323
323
|
return function ($this$defaultRequest) {
|
|
324
|
-
$this$defaultRequest.
|
|
325
|
-
contentType($this$defaultRequest, Application_getInstance().
|
|
324
|
+
$this$defaultRequest.u6f(this$0.t93_1);
|
|
325
|
+
contentType($this$defaultRequest, Application_getInstance().m56_1);
|
|
326
326
|
return Unit_instance;
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
329
|
function OllamaClient$client$lambda$lambda_0(this$0) {
|
|
330
330
|
return function ($this$install) {
|
|
331
|
-
json($this$install, this$0.
|
|
331
|
+
json($this$install, this$0.w93_1);
|
|
332
332
|
return Unit_instance;
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
335
|
function OllamaClient$client$lambda$lambda_1($timeoutConfig) {
|
|
336
336
|
return function ($this$install) {
|
|
337
|
-
$this$install.
|
|
338
|
-
$this$install.
|
|
339
|
-
$this$install.
|
|
337
|
+
$this$install.l6u($timeoutConfig.u4e_1);
|
|
338
|
+
$this$install.m6u($timeoutConfig.v4e_1);
|
|
339
|
+
$this$install.n6u($timeoutConfig.w4e_1);
|
|
340
340
|
return Unit_instance;
|
|
341
341
|
};
|
|
342
342
|
}
|
|
@@ -344,31 +344,31 @@
|
|
|
344
344
|
return function ($this$config) {
|
|
345
345
|
defaultRequest($this$config, OllamaClient$client$lambda$lambda(this$0));
|
|
346
346
|
var tmp = get_ContentNegotiation();
|
|
347
|
-
$this$config.
|
|
347
|
+
$this$config.j66(tmp, OllamaClient$client$lambda$lambda_0(this$0));
|
|
348
348
|
var tmp_0 = get_HttpTimeout();
|
|
349
|
-
$this$config.
|
|
349
|
+
$this$config.j66(tmp_0, OllamaClient$client$lambda$lambda_1($timeoutConfig));
|
|
350
350
|
return Unit_instance;
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
353
|
function OllamaClient$execute$lambda($errorResponse) {
|
|
354
354
|
return function () {
|
|
355
|
-
return 'Ollama error: ' + $errorResponse.
|
|
355
|
+
return 'Ollama error: ' + $errorResponse.y93_1;
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
358
|
function OllamaClient$executeStreaming$slambda($model, this$0, $prompt, resultContinuation) {
|
|
359
|
-
this.
|
|
360
|
-
this.
|
|
361
|
-
this.
|
|
359
|
+
this.h94_1 = $model;
|
|
360
|
+
this.i94_1 = this$0;
|
|
361
|
+
this.j94_1 = $prompt;
|
|
362
362
|
CoroutineImpl.call(this, resultContinuation);
|
|
363
363
|
}
|
|
364
|
-
protoOf(OllamaClient$executeStreaming$slambda).
|
|
365
|
-
var tmp = this.
|
|
364
|
+
protoOf(OllamaClient$executeStreaming$slambda).e4d = function ($this$streamFrameFlow, $completion) {
|
|
365
|
+
var tmp = this.f4d($this$streamFrameFlow, $completion);
|
|
366
366
|
tmp.z9_1 = Unit_instance;
|
|
367
367
|
tmp.aa_1 = null;
|
|
368
368
|
return tmp.fa();
|
|
369
369
|
};
|
|
370
370
|
protoOf(OllamaClient$executeStreaming$slambda).ra = function (p1, $completion) {
|
|
371
|
-
return this.
|
|
371
|
+
return this.e4d((!(p1 == null) ? isInterface(p1, FlowCollector) : false) ? p1 : THROW_CCE(), $completion);
|
|
372
372
|
};
|
|
373
373
|
protoOf(OllamaClient$executeStreaming$slambda).fa = function () {
|
|
374
374
|
var suspendResult = this.z9_1;
|
|
@@ -378,28 +378,28 @@
|
|
|
378
378
|
switch (tmp) {
|
|
379
379
|
case 0:
|
|
380
380
|
this.y9_1 = 16;
|
|
381
|
-
if (!equals(this.
|
|
381
|
+
if (!equals(this.h94_1.g3h_1, Ollama_getInstance())) {
|
|
382
382
|
var message = 'Model not supported by Ollama';
|
|
383
383
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
this.
|
|
386
|
+
this.l94_1 = this.i94_1.w93_1.gw(OllamaChatRequestDTOSerializer_getInstance(), new OllamaChatRequestDTO(this.h94_1.h3h_1, toOllamaChatMessages(this.j94_1, this.h94_1), VOID, VOID, this.i94_1.s95(this.j94_1, this.h94_1), true, VOID, this.j94_1.g44_1.i43_1));
|
|
387
387
|
var tmp_0 = this;
|
|
388
|
-
tmp_0.
|
|
388
|
+
tmp_0.m94_1 = this.i94_1.x93_1;
|
|
389
389
|
var tmp_1 = this;
|
|
390
|
-
tmp_1.
|
|
391
|
-
this.
|
|
392
|
-
this.
|
|
390
|
+
tmp_1.n94_1 = 'api/chat';
|
|
391
|
+
this.o94_1 = this.m94_1;
|
|
392
|
+
this.p94_1 = this.n94_1;
|
|
393
393
|
var tmp_2 = this;
|
|
394
|
-
tmp_2.
|
|
395
|
-
this.
|
|
396
|
-
this.
|
|
397
|
-
this.
|
|
398
|
-
var $this$post = this.
|
|
399
|
-
url($this$post, this.
|
|
400
|
-
var body = this.
|
|
394
|
+
tmp_2.q94_1 = this.o94_1;
|
|
395
|
+
this.r94_1 = this.q94_1;
|
|
396
|
+
this.s94_1 = new HttpRequestBuilder();
|
|
397
|
+
this.s94_1.c65_1 = Companion_getInstance_0().r5c_1;
|
|
398
|
+
var $this$post = this.s94_1;
|
|
399
|
+
url($this$post, this.p94_1);
|
|
400
|
+
var body = this.l94_1;
|
|
401
401
|
if (body == null) {
|
|
402
|
-
$this$post.
|
|
402
|
+
$this$post.e65_1 = NullBody_instance;
|
|
403
403
|
var tmp_3 = PrimitiveClasses_getInstance().fd();
|
|
404
404
|
var tmp_4;
|
|
405
405
|
try {
|
|
@@ -414,13 +414,13 @@
|
|
|
414
414
|
}
|
|
415
415
|
tmp_4 = tmp_5;
|
|
416
416
|
}
|
|
417
|
-
$this$post.
|
|
417
|
+
$this$post.o6b(new TypeInfo(tmp_3, tmp_4));
|
|
418
418
|
} else {
|
|
419
419
|
if (body instanceof OutgoingContent) {
|
|
420
|
-
$this$post.
|
|
421
|
-
$this$post.
|
|
420
|
+
$this$post.e65_1 = body;
|
|
421
|
+
$this$post.o6b(null);
|
|
422
422
|
} else {
|
|
423
|
-
$this$post.
|
|
423
|
+
$this$post.e65_1 = body;
|
|
424
424
|
var tmp_6 = PrimitiveClasses_getInstance().fd();
|
|
425
425
|
var tmp_7;
|
|
426
426
|
try {
|
|
@@ -435,65 +435,65 @@
|
|
|
435
435
|
}
|
|
436
436
|
tmp_7 = tmp_8;
|
|
437
437
|
}
|
|
438
|
-
$this$post.
|
|
438
|
+
$this$post.o6b(new TypeInfo(tmp_6, tmp_7));
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
-
this.
|
|
442
|
+
this.s94_1.c65_1 = Companion_getInstance_0().r5c_1;
|
|
443
443
|
var tmp_9 = this;
|
|
444
|
-
tmp_9.
|
|
444
|
+
tmp_9.t94_1 = this.r94_1;
|
|
445
445
|
var tmp_10 = this;
|
|
446
|
-
tmp_10.
|
|
447
|
-
this.
|
|
448
|
-
this.
|
|
446
|
+
tmp_10.u94_1 = this.s94_1;
|
|
447
|
+
this.v94_1 = this.t94_1;
|
|
448
|
+
this.w94_1 = this.u94_1;
|
|
449
449
|
this.x9_1 = 1;
|
|
450
|
-
suspendResult = (new HttpStatement(this.
|
|
450
|
+
suspendResult = (new HttpStatement(this.w94_1, this.v94_1)).i7f(this);
|
|
451
451
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
452
452
|
return suspendResult;
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
continue $sm;
|
|
456
456
|
case 1:
|
|
457
|
-
this.
|
|
457
|
+
this.x94_1 = suspendResult;
|
|
458
458
|
this.x9_1 = 2;
|
|
459
|
-
suspendResult = bodyAsChannel(this.
|
|
459
|
+
suspendResult = bodyAsChannel(this.x94_1, this);
|
|
460
460
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
461
461
|
return suspendResult;
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
continue $sm;
|
|
465
465
|
case 2:
|
|
466
|
-
this.
|
|
466
|
+
this.y94_1 = suspendResult;
|
|
467
467
|
this.x9_1 = 3;
|
|
468
468
|
continue $sm;
|
|
469
469
|
case 3:
|
|
470
|
-
if (!!this.
|
|
470
|
+
if (!!this.y94_1.q4h()) {
|
|
471
471
|
this.x9_1 = 15;
|
|
472
472
|
continue $sm;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
475
|
this.x9_1 = 4;
|
|
476
|
-
suspendResult = readUTF8Line(this.
|
|
476
|
+
suspendResult = readUTF8Line(this.y94_1, VOID, this);
|
|
477
477
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
478
478
|
return suspendResult;
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
continue $sm;
|
|
482
482
|
case 4:
|
|
483
|
-
this.
|
|
484
|
-
if (this.
|
|
483
|
+
this.z94_1 = suspendResult;
|
|
484
|
+
if (this.z94_1 == null) {
|
|
485
485
|
this.x9_1 = 15;
|
|
486
486
|
var tmp_11 = this;
|
|
487
487
|
continue $sm;
|
|
488
488
|
} else {
|
|
489
|
-
this.
|
|
489
|
+
this.a95_1 = this.z94_1;
|
|
490
490
|
this.x9_1 = 5;
|
|
491
491
|
continue $sm;
|
|
492
492
|
}
|
|
493
493
|
|
|
494
494
|
case 5:
|
|
495
|
-
this.
|
|
496
|
-
if (isBlank(this.
|
|
495
|
+
this.b95_1 = this.a95_1;
|
|
496
|
+
if (isBlank(this.b95_1)) {
|
|
497
497
|
this.x9_1 = 3;
|
|
498
498
|
continue $sm;
|
|
499
499
|
} else {
|
|
@@ -504,25 +504,25 @@
|
|
|
504
504
|
case 6:
|
|
505
505
|
this.y9_1 = 13;
|
|
506
506
|
var tmp_12 = this;
|
|
507
|
-
var tmp0 = this.
|
|
508
|
-
var string = this.
|
|
507
|
+
var tmp0 = this.i94_1.w93_1;
|
|
508
|
+
var string = this.b95_1;
|
|
509
509
|
var this_0 = tmp0.lz();
|
|
510
510
|
var this_1 = serializer(this_0, createKType(getKClass(OllamaChatResponseDTO), arrayOf([]), false));
|
|
511
|
-
tmp_12.
|
|
512
|
-
this.
|
|
513
|
-
if (this.
|
|
514
|
-
this.
|
|
511
|
+
tmp_12.d95_1 = tmp0.hw(isInterface(this_1, KSerializer) ? this_1 : THROW_CCE(), string);
|
|
512
|
+
this.e95_1 = this.d95_1.l93_1;
|
|
513
|
+
if (this.e95_1 == null) {
|
|
514
|
+
this.f95_1 = null;
|
|
515
515
|
this.x9_1 = 12;
|
|
516
516
|
continue $sm;
|
|
517
517
|
} else {
|
|
518
518
|
var tmp_13 = this;
|
|
519
|
-
tmp_13.
|
|
520
|
-
this.
|
|
519
|
+
tmp_13.g95_1 = this.e95_1;
|
|
520
|
+
this.h95_1 = this.g95_1;
|
|
521
521
|
var tmp_14 = this;
|
|
522
|
-
tmp_14.
|
|
523
|
-
this.
|
|
522
|
+
tmp_14.i95_1 = this.h95_1;
|
|
523
|
+
this.j95_1 = this.i95_1;
|
|
524
524
|
this.x9_1 = 7;
|
|
525
|
-
suspendResult = emitAppend(this.
|
|
525
|
+
suspendResult = emitAppend(this.k94_1, this.j95_1.q93_1, this);
|
|
526
526
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
527
527
|
return suspendResult;
|
|
528
528
|
}
|
|
@@ -530,32 +530,32 @@
|
|
|
530
530
|
}
|
|
531
531
|
|
|
532
532
|
case 7:
|
|
533
|
-
this.
|
|
534
|
-
if (this.
|
|
535
|
-
this.
|
|
533
|
+
this.k95_1 = this.j95_1.s93_1;
|
|
534
|
+
if (this.k95_1 == null) {
|
|
535
|
+
this.l95_1 = null;
|
|
536
536
|
this.x9_1 = 11;
|
|
537
537
|
continue $sm;
|
|
538
538
|
} else {
|
|
539
539
|
var tmp_15 = this;
|
|
540
|
-
tmp_15.
|
|
541
|
-
this.
|
|
542
|
-
this.
|
|
540
|
+
tmp_15.m95_1 = this.k95_1;
|
|
541
|
+
this.n95_1 = this.m95_1;
|
|
542
|
+
this.o95_1 = this.n95_1.p();
|
|
543
543
|
this.x9_1 = 8;
|
|
544
544
|
continue $sm;
|
|
545
545
|
}
|
|
546
546
|
|
|
547
547
|
case 8:
|
|
548
|
-
if (!this.
|
|
548
|
+
if (!this.o95_1.q()) {
|
|
549
549
|
this.x9_1 = 10;
|
|
550
550
|
continue $sm;
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
-
this.
|
|
553
|
+
this.p95_1 = this.o95_1.r();
|
|
554
554
|
var tmp_16 = this;
|
|
555
|
-
tmp_16.
|
|
556
|
-
this.
|
|
555
|
+
tmp_16.q95_1 = this.p95_1;
|
|
556
|
+
this.r95_1 = this.q95_1;
|
|
557
557
|
this.x9_1 = 9;
|
|
558
|
-
suspendResult = emitToolCall(this.
|
|
558
|
+
suspendResult = emitToolCall(this.k94_1, null, this.r95_1.v95_1.t95_1, toString(this.r95_1.v95_1.u95_1), this);
|
|
559
559
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
560
560
|
return suspendResult;
|
|
561
561
|
}
|
|
@@ -565,15 +565,15 @@
|
|
|
565
565
|
this.x9_1 = 8;
|
|
566
566
|
continue $sm;
|
|
567
567
|
case 10:
|
|
568
|
-
this.
|
|
568
|
+
this.l95_1 = Unit_instance;
|
|
569
569
|
this.x9_1 = 11;
|
|
570
570
|
continue $sm;
|
|
571
571
|
case 11:
|
|
572
|
-
this.
|
|
572
|
+
this.f95_1 = this.l95_1;
|
|
573
573
|
this.x9_1 = 12;
|
|
574
574
|
continue $sm;
|
|
575
575
|
case 12:
|
|
576
|
-
this.
|
|
576
|
+
this.c95_1 = this.f95_1;
|
|
577
577
|
this.y9_1 = 16;
|
|
578
578
|
this.x9_1 = 14;
|
|
579
579
|
continue $sm;
|
|
@@ -609,25 +609,25 @@
|
|
|
609
609
|
}
|
|
610
610
|
while (true);
|
|
611
611
|
};
|
|
612
|
-
protoOf(OllamaClient$executeStreaming$slambda).
|
|
613
|
-
var i = new OllamaClient$executeStreaming$slambda(this.
|
|
614
|
-
i.
|
|
612
|
+
protoOf(OllamaClient$executeStreaming$slambda).f4d = function ($this$streamFrameFlow, completion) {
|
|
613
|
+
var i = new OllamaClient$executeStreaming$slambda(this.h94_1, this.i94_1, this.j94_1, completion);
|
|
614
|
+
i.k94_1 = $this$streamFrameFlow;
|
|
615
615
|
return i;
|
|
616
616
|
};
|
|
617
617
|
function OllamaClient$executeStreaming$slambda_0($model, this$0, $prompt, resultContinuation) {
|
|
618
618
|
var i = new OllamaClient$executeStreaming$slambda($model, this$0, $prompt, resultContinuation);
|
|
619
619
|
var l = function ($this$streamFrameFlow, $completion) {
|
|
620
|
-
return i.
|
|
620
|
+
return i.e4d($this$streamFrameFlow, $completion);
|
|
621
621
|
};
|
|
622
622
|
l.$arity = 1;
|
|
623
623
|
return l;
|
|
624
624
|
}
|
|
625
625
|
function $executeCOROUTINE$(_this__u8e3s4, prompt, model, tools, resultContinuation) {
|
|
626
626
|
CoroutineImpl.call(this, resultContinuation);
|
|
627
|
-
this.
|
|
628
|
-
this.
|
|
629
|
-
this.
|
|
630
|
-
this.
|
|
627
|
+
this.e96_1 = _this__u8e3s4;
|
|
628
|
+
this.f96_1 = prompt;
|
|
629
|
+
this.g96_1 = model;
|
|
630
|
+
this.h96_1 = tools;
|
|
631
631
|
}
|
|
632
632
|
protoOf($executeCOROUTINE$).fa = function () {
|
|
633
633
|
var suspendResult = this.z9_1;
|
|
@@ -637,17 +637,17 @@
|
|
|
637
637
|
switch (tmp) {
|
|
638
638
|
case 0:
|
|
639
639
|
this.y9_1 = 4;
|
|
640
|
-
if (!equals(this.
|
|
640
|
+
if (!equals(this.g96_1.g3h_1, Ollama_getInstance())) {
|
|
641
641
|
var message = 'Model not supported by Ollama';
|
|
642
642
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
643
643
|
}
|
|
644
644
|
|
|
645
645
|
var tmp_0 = this;
|
|
646
646
|
var tmp_1 = OllamaChatRequestDTOSerializer_getInstance();
|
|
647
|
-
var tmp_2 = toOllamaChatMessages(this.
|
|
647
|
+
var tmp_2 = toOllamaChatMessages(this.f96_1, this.g96_1);
|
|
648
648
|
var tmp_3;
|
|
649
|
-
if (!this.
|
|
650
|
-
var this_0 = this.
|
|
649
|
+
if (!this.h96_1.m()) {
|
|
650
|
+
var this_0 = this.h96_1;
|
|
651
651
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
652
652
|
var _iterator__ex2g4s = this_0.p();
|
|
653
653
|
while (_iterator__ex2g4s.q()) {
|
|
@@ -659,23 +659,23 @@
|
|
|
659
659
|
tmp_3 = null;
|
|
660
660
|
}
|
|
661
661
|
|
|
662
|
-
tmp_0.
|
|
662
|
+
tmp_0.i96_1 = this.e96_1.w93_1.gw(tmp_1, new OllamaChatRequestDTO(this.g96_1.h3h_1, tmp_2, tmp_3, extractOllamaJsonFormat(this.f96_1), this.e96_1.s95(this.f96_1, this.g96_1), false, VOID, this.f96_1.g44_1.i43_1));
|
|
663
663
|
var tmp_4 = this;
|
|
664
|
-
tmp_4.
|
|
664
|
+
tmp_4.j96_1 = this.e96_1.x93_1;
|
|
665
665
|
var tmp_5 = this;
|
|
666
|
-
tmp_5.
|
|
667
|
-
this.
|
|
668
|
-
this.
|
|
666
|
+
tmp_5.k96_1 = 'api/chat';
|
|
667
|
+
this.l96_1 = this.j96_1;
|
|
668
|
+
this.m96_1 = this.k96_1;
|
|
669
669
|
var tmp_6 = this;
|
|
670
|
-
tmp_6.
|
|
671
|
-
this.
|
|
672
|
-
this.
|
|
673
|
-
this.
|
|
674
|
-
var $this$post = this.
|
|
675
|
-
url($this$post, this.
|
|
676
|
-
var body = this.
|
|
670
|
+
tmp_6.n96_1 = this.l96_1;
|
|
671
|
+
this.o96_1 = this.n96_1;
|
|
672
|
+
this.p96_1 = new HttpRequestBuilder();
|
|
673
|
+
this.p96_1.c65_1 = Companion_getInstance_0().r5c_1;
|
|
674
|
+
var $this$post = this.p96_1;
|
|
675
|
+
url($this$post, this.m96_1);
|
|
676
|
+
var body = this.i96_1;
|
|
677
677
|
if (body == null) {
|
|
678
|
-
$this$post.
|
|
678
|
+
$this$post.e65_1 = NullBody_instance;
|
|
679
679
|
var tmp_7 = PrimitiveClasses_getInstance().fd();
|
|
680
680
|
var tmp_8;
|
|
681
681
|
try {
|
|
@@ -690,13 +690,13 @@
|
|
|
690
690
|
}
|
|
691
691
|
tmp_8 = tmp_9;
|
|
692
692
|
}
|
|
693
|
-
$this$post.
|
|
693
|
+
$this$post.o6b(new TypeInfo(tmp_7, tmp_8));
|
|
694
694
|
} else {
|
|
695
695
|
if (body instanceof OutgoingContent) {
|
|
696
|
-
$this$post.
|
|
697
|
-
$this$post.
|
|
696
|
+
$this$post.e65_1 = body;
|
|
697
|
+
$this$post.o6b(null);
|
|
698
698
|
} else {
|
|
699
|
-
$this$post.
|
|
699
|
+
$this$post.e65_1 = body;
|
|
700
700
|
var tmp_10 = PrimitiveClasses_getInstance().fd();
|
|
701
701
|
var tmp_11;
|
|
702
702
|
try {
|
|
@@ -711,32 +711,32 @@
|
|
|
711
711
|
}
|
|
712
712
|
tmp_11 = tmp_12;
|
|
713
713
|
}
|
|
714
|
-
$this$post.
|
|
714
|
+
$this$post.o6b(new TypeInfo(tmp_10, tmp_11));
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
717
|
|
|
718
|
-
this.
|
|
718
|
+
this.p96_1.c65_1 = Companion_getInstance_0().r5c_1;
|
|
719
719
|
var tmp_13 = this;
|
|
720
|
-
tmp_13.
|
|
720
|
+
tmp_13.q96_1 = this.o96_1;
|
|
721
721
|
var tmp_14 = this;
|
|
722
|
-
tmp_14.
|
|
723
|
-
this.
|
|
724
|
-
this.
|
|
722
|
+
tmp_14.r96_1 = this.p96_1;
|
|
723
|
+
this.s96_1 = this.q96_1;
|
|
724
|
+
this.t96_1 = this.r96_1;
|
|
725
725
|
this.x9_1 = 1;
|
|
726
|
-
suspendResult = (new HttpStatement(this.
|
|
726
|
+
suspendResult = (new HttpStatement(this.t96_1, this.s96_1)).i7f(this);
|
|
727
727
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
728
728
|
return suspendResult;
|
|
729
729
|
}
|
|
730
730
|
|
|
731
731
|
continue $sm;
|
|
732
732
|
case 1:
|
|
733
|
-
this.
|
|
734
|
-
if (isSuccess(this.
|
|
733
|
+
this.u96_1 = suspendResult;
|
|
734
|
+
if (isSuccess(this.u96_1.f5i())) {
|
|
735
735
|
var tmp_15 = this;
|
|
736
|
-
tmp_15.
|
|
737
|
-
this.
|
|
736
|
+
tmp_15.v96_1 = this.u96_1;
|
|
737
|
+
this.w96_1 = this.v96_1;
|
|
738
738
|
this.x9_1 = 3;
|
|
739
|
-
var tmp_16 = this.
|
|
739
|
+
var tmp_16 = this.w96_1.r66();
|
|
740
740
|
var tmp_17 = getKClass(OllamaChatResponseDTO);
|
|
741
741
|
var tmp_18;
|
|
742
742
|
try {
|
|
@@ -751,17 +751,17 @@
|
|
|
751
751
|
}
|
|
752
752
|
tmp_18 = tmp_19;
|
|
753
753
|
}
|
|
754
|
-
suspendResult = tmp_16.
|
|
754
|
+
suspendResult = tmp_16.o66(new TypeInfo(tmp_17, tmp_18), this);
|
|
755
755
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
756
756
|
return suspendResult;
|
|
757
757
|
}
|
|
758
758
|
continue $sm;
|
|
759
759
|
} else {
|
|
760
760
|
var tmp_20 = this;
|
|
761
|
-
tmp_20.
|
|
762
|
-
this.
|
|
761
|
+
tmp_20.x96_1 = this.u96_1;
|
|
762
|
+
this.y96_1 = this.x96_1;
|
|
763
763
|
this.x9_1 = 2;
|
|
764
|
-
var tmp_21 = this.
|
|
764
|
+
var tmp_21 = this.y96_1.r66();
|
|
765
765
|
var tmp_22 = getKClass(OllamaErrorResponseDTO);
|
|
766
766
|
var tmp_23;
|
|
767
767
|
try {
|
|
@@ -776,7 +776,7 @@
|
|
|
776
776
|
}
|
|
777
777
|
tmp_23 = tmp_24;
|
|
778
778
|
}
|
|
779
|
-
suspendResult = tmp_21.
|
|
779
|
+
suspendResult = tmp_21.o66(new TypeInfo(tmp_22, tmp_23), this);
|
|
780
780
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
781
781
|
return suspendResult;
|
|
782
782
|
}
|
|
@@ -785,12 +785,12 @@
|
|
|
785
785
|
|
|
786
786
|
case 2:
|
|
787
787
|
var errorResponse = suspendResult instanceof OllamaErrorResponseDTO ? suspendResult : THROW_CCE();
|
|
788
|
-
var tmp_25 = Companion_getInstance_1().
|
|
789
|
-
tmp_25.
|
|
790
|
-
throw RuntimeException_init_$Create$('Ollama API error: ' + errorResponse.
|
|
788
|
+
var tmp_25 = Companion_getInstance_1().c93_1;
|
|
789
|
+
tmp_25.w3h(OllamaClient$execute$lambda(errorResponse));
|
|
790
|
+
throw RuntimeException_init_$Create$('Ollama API error: ' + errorResponse.y93_1);
|
|
791
791
|
case 3:
|
|
792
792
|
var ARGUMENT = suspendResult instanceof OllamaChatResponseDTO ? suspendResult : THROW_CCE();
|
|
793
|
-
return parseResponse(this.
|
|
793
|
+
return parseResponse(this.e96_1, ARGUMENT);
|
|
794
794
|
case 4:
|
|
795
795
|
throw this.aa_1;
|
|
796
796
|
}
|
|
@@ -812,30 +812,30 @@
|
|
|
812
812
|
timeoutConfig = timeoutConfig === VOID ? new ConnectionTimeoutConfig() : timeoutConfig;
|
|
813
813
|
clock = clock === VOID ? System_instance : clock;
|
|
814
814
|
contextWindowStrategy = contextWindowStrategy === VOID ? None_instance : contextWindowStrategy;
|
|
815
|
-
this.
|
|
816
|
-
this.
|
|
817
|
-
this.
|
|
815
|
+
this.t93_1 = baseUrl;
|
|
816
|
+
this.u93_1 = clock;
|
|
817
|
+
this.v93_1 = contextWindowStrategy;
|
|
818
818
|
var tmp = this;
|
|
819
|
-
tmp.
|
|
819
|
+
tmp.w93_1 = Json(VOID, OllamaClient$ollamaJson$lambda);
|
|
820
820
|
var tmp_0 = this;
|
|
821
|
-
tmp_0.
|
|
821
|
+
tmp_0.x93_1 = baseClient.f66(OllamaClient$client$lambda(this, timeoutConfig));
|
|
822
822
|
}
|
|
823
|
-
protoOf(OllamaClient).
|
|
823
|
+
protoOf(OllamaClient).o4e = function (prompt, model, tools, $completion) {
|
|
824
824
|
var tmp = new $executeCOROUTINE$(this, prompt, model, tools, $completion);
|
|
825
825
|
tmp.z9_1 = Unit_instance;
|
|
826
826
|
tmp.aa_1 = null;
|
|
827
827
|
return tmp.fa();
|
|
828
828
|
};
|
|
829
|
-
protoOf(OllamaClient).
|
|
829
|
+
protoOf(OllamaClient).q4e = function (prompt, model, tools) {
|
|
830
830
|
return streamFrameFlow(OllamaClient$executeStreaming$slambda_0(model, this, prompt, null));
|
|
831
831
|
};
|
|
832
|
-
protoOf(OllamaClient).
|
|
833
|
-
return new Options(prompt.
|
|
832
|
+
protoOf(OllamaClient).s95 = function (prompt, model) {
|
|
833
|
+
return new Options(prompt.g44_1.z42_1, this.v93_1.b93(prompt, model));
|
|
834
834
|
};
|
|
835
835
|
function toOllamaChatMessages(_this__u8e3s4, model) {
|
|
836
836
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
837
837
|
var messages = ArrayList_init_$Create$_0();
|
|
838
|
-
var _iterator__ex2g4s = _this__u8e3s4.
|
|
838
|
+
var _iterator__ex2g4s = _this__u8e3s4.e44_1.p();
|
|
839
839
|
while (_iterator__ex2g4s.q()) {
|
|
840
840
|
var message = _iterator__ex2g4s.r();
|
|
841
841
|
var tmp;
|
|
@@ -849,7 +849,7 @@
|
|
|
849
849
|
tmp = new OllamaChatMessageDTO('assistant', message.v1j());
|
|
850
850
|
} else {
|
|
851
851
|
if (message instanceof Call) {
|
|
852
|
-
tmp = new OllamaChatMessageDTO('assistant', '', VOID, listOf_0(new OllamaToolCallDTO(new Call_0(message.
|
|
852
|
+
tmp = new OllamaChatMessageDTO('assistant', '', VOID, listOf_0(new OllamaToolCallDTO(new Call_0(message.p44_1, Default_getInstance().k1h(message.v1j())))));
|
|
853
853
|
} else {
|
|
854
854
|
if (message instanceof Result) {
|
|
855
855
|
tmp = new OllamaChatMessageDTO('tool', message.v1j());
|
|
@@ -867,13 +867,13 @@
|
|
|
867
867
|
}
|
|
868
868
|
function toOllamaTool(_this__u8e3s4) {
|
|
869
869
|
var jsonSchema = toJSONSchema(_this__u8e3s4);
|
|
870
|
-
return new OllamaToolDTO('function', new Definition(_this__u8e3s4.
|
|
870
|
+
return new OllamaToolDTO('function', new Definition(_this__u8e3s4.w7x_1, _this__u8e3s4.x7x_1, jsonSchema));
|
|
871
871
|
}
|
|
872
872
|
function extractOllamaJsonFormat(_this__u8e3s4) {
|
|
873
|
-
var schema = _this__u8e3s4.
|
|
873
|
+
var schema = _this__u8e3s4.g44_1.d43_1;
|
|
874
874
|
var tmp;
|
|
875
875
|
if (!(schema == null) ? isInterface(schema, JSON_0) : false) {
|
|
876
|
-
tmp = schema.
|
|
876
|
+
tmp = schema.l49();
|
|
877
877
|
} else {
|
|
878
878
|
tmp = null;
|
|
879
879
|
}
|
|
@@ -881,12 +881,12 @@
|
|
|
881
881
|
}
|
|
882
882
|
function getToolCalls(_this__u8e3s4, responseMetadata) {
|
|
883
883
|
// Inline function 'kotlin.collections.isNullOrEmpty' call
|
|
884
|
-
var this_0 = _this__u8e3s4.
|
|
884
|
+
var this_0 = _this__u8e3s4.s93_1;
|
|
885
885
|
if (this_0 == null || this_0.m()) {
|
|
886
886
|
return emptyList();
|
|
887
887
|
}
|
|
888
888
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
889
|
-
var this_1 = _this__u8e3s4.
|
|
889
|
+
var this_1 = _this__u8e3s4.s93_1;
|
|
890
890
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
891
891
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
892
892
|
var index = 0;
|
|
@@ -896,10 +896,10 @@
|
|
|
896
896
|
var _unary__edvuaz = index;
|
|
897
897
|
index = _unary__edvuaz + 1 | 0;
|
|
898
898
|
var index_0 = checkIndexOverflow(_unary__edvuaz);
|
|
899
|
-
var name = item.
|
|
899
|
+
var name = item.v95_1.t95_1;
|
|
900
900
|
var tmp0 = Default_getInstance();
|
|
901
901
|
// Inline function 'kotlinx.serialization.json.Json.encodeToString' call
|
|
902
|
-
var value = item.
|
|
902
|
+
var value = item.v95_1.u95_1;
|
|
903
903
|
// Inline function 'kotlinx.serialization.serializer' call
|
|
904
904
|
var this_2 = tmp0.lz();
|
|
905
905
|
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
@@ -917,20 +917,20 @@
|
|
|
917
917
|
// Inline function 'kotlin.apply' call
|
|
918
918
|
var this_0 = ArrayList_init_$Create$_0();
|
|
919
919
|
// Inline function 'kotlin.collections.forEach' call
|
|
920
|
-
var _iterator__ex2g4s = _this__u8e3s4.
|
|
920
|
+
var _iterator__ex2g4s = _this__u8e3s4.j47_1.p();
|
|
921
921
|
while (_iterator__ex2g4s.q()) {
|
|
922
922
|
var element = _iterator__ex2g4s.r();
|
|
923
923
|
if (!(element instanceof Text)) {
|
|
924
924
|
if (element instanceof Image) {
|
|
925
925
|
// Inline function 'kotlin.require' call
|
|
926
|
-
if (!model.
|
|
927
|
-
var message = 'Model ' + model.
|
|
926
|
+
if (!model.i3h_1.w(Image_getInstance())) {
|
|
927
|
+
var message = 'Model ' + model.h3h_1 + " doesn't support images";
|
|
928
928
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
929
929
|
}
|
|
930
|
-
var content = element.
|
|
930
|
+
var content = element.g46_1;
|
|
931
931
|
var tmp;
|
|
932
932
|
if (isInterface(content, Binary)) {
|
|
933
|
-
tmp = content.
|
|
933
|
+
tmp = content.y45();
|
|
934
934
|
} else {
|
|
935
935
|
throw IllegalArgumentException_init_$Create$('Unsupported image attachment content: ' + toString(getKClassFromExpression(content)));
|
|
936
936
|
}
|
|
@@ -983,24 +983,24 @@
|
|
|
983
983
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.ollama.client.dto.OllamaChatRequestDTO.Options', this, 2);
|
|
984
984
|
tmp0_serialDesc.m16('temperature', true);
|
|
985
985
|
tmp0_serialDesc.m16('num_ctx', true);
|
|
986
|
-
this.
|
|
986
|
+
this.a97_1 = tmp0_serialDesc;
|
|
987
987
|
}
|
|
988
|
-
protoOf($serializer).
|
|
989
|
-
var tmp0_desc = this.
|
|
988
|
+
protoOf($serializer).b97 = function (encoder, value) {
|
|
989
|
+
var tmp0_desc = this.a97_1;
|
|
990
990
|
var tmp1_output = encoder.wy(tmp0_desc);
|
|
991
|
-
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.
|
|
992
|
-
tmp1_output.p10(tmp0_desc, 0, DoubleSerializer_getInstance(), value.
|
|
991
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.c97_1 == null)) {
|
|
992
|
+
tmp1_output.p10(tmp0_desc, 0, DoubleSerializer_getInstance(), value.c97_1);
|
|
993
993
|
}
|
|
994
|
-
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.
|
|
995
|
-
tmp1_output.p10(tmp0_desc, 1, LongSerializer_getInstance(), value.
|
|
994
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.d97_1 == null)) {
|
|
995
|
+
tmp1_output.p10(tmp0_desc, 1, LongSerializer_getInstance(), value.d97_1);
|
|
996
996
|
}
|
|
997
997
|
tmp1_output.xy(tmp0_desc);
|
|
998
998
|
};
|
|
999
999
|
protoOf($serializer).gv = function (encoder, value) {
|
|
1000
|
-
return this.
|
|
1000
|
+
return this.b97(encoder, value instanceof Options ? value : THROW_CCE());
|
|
1001
1001
|
};
|
|
1002
1002
|
protoOf($serializer).hv = function (decoder) {
|
|
1003
|
-
var tmp0_desc = this.
|
|
1003
|
+
var tmp0_desc = this.a97_1;
|
|
1004
1004
|
var tmp1_flag = true;
|
|
1005
1005
|
var tmp2_index = 0;
|
|
1006
1006
|
var tmp3_bitMask0 = 0;
|
|
@@ -1035,7 +1035,7 @@
|
|
|
1035
1035
|
return Options_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
1036
1036
|
};
|
|
1037
1037
|
protoOf($serializer).fv = function () {
|
|
1038
|
-
return this.
|
|
1038
|
+
return this.a97_1;
|
|
1039
1039
|
};
|
|
1040
1040
|
protoOf($serializer).d17 = function () {
|
|
1041
1041
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -1051,16 +1051,16 @@
|
|
|
1051
1051
|
}
|
|
1052
1052
|
function Options_init_$Init$(seen0, temperature, numCtx, serializationConstructorMarker, $this) {
|
|
1053
1053
|
if (!(0 === (0 & seen0))) {
|
|
1054
|
-
throwMissingFieldException(seen0, 0, $serializer_getInstance().
|
|
1054
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance().a97_1);
|
|
1055
1055
|
}
|
|
1056
1056
|
if (0 === (seen0 & 1))
|
|
1057
|
-
$this.
|
|
1057
|
+
$this.c97_1 = null;
|
|
1058
1058
|
else
|
|
1059
|
-
$this.
|
|
1059
|
+
$this.c97_1 = temperature;
|
|
1060
1060
|
if (0 === (seen0 & 2))
|
|
1061
|
-
$this.
|
|
1061
|
+
$this.d97_1 = null;
|
|
1062
1062
|
else
|
|
1063
|
-
$this.
|
|
1063
|
+
$this.d97_1 = numCtx;
|
|
1064
1064
|
return $this;
|
|
1065
1065
|
}
|
|
1066
1066
|
function Options_init_$Create$(seen0, temperature, numCtx, serializationConstructorMarker) {
|
|
@@ -1078,15 +1078,15 @@
|
|
|
1078
1078
|
function Options(temperature, numCtx) {
|
|
1079
1079
|
temperature = temperature === VOID ? null : temperature;
|
|
1080
1080
|
numCtx = numCtx === VOID ? null : numCtx;
|
|
1081
|
-
this.
|
|
1082
|
-
this.
|
|
1081
|
+
this.c97_1 = temperature;
|
|
1082
|
+
this.d97_1 = numCtx;
|
|
1083
1083
|
}
|
|
1084
1084
|
protoOf(Options).toString = function () {
|
|
1085
|
-
return 'Options(temperature=' + this.
|
|
1085
|
+
return 'Options(temperature=' + this.c97_1 + ', numCtx=' + toString_0(this.d97_1) + ')';
|
|
1086
1086
|
};
|
|
1087
1087
|
protoOf(Options).hashCode = function () {
|
|
1088
|
-
var result = this.
|
|
1089
|
-
result = imul(result, 31) + (this.
|
|
1088
|
+
var result = this.c97_1 == null ? 0 : getNumberHashCode(this.c97_1);
|
|
1089
|
+
result = imul(result, 31) + (this.d97_1 == null ? 0 : this.d97_1.hashCode()) | 0;
|
|
1090
1090
|
return result;
|
|
1091
1091
|
};
|
|
1092
1092
|
protoOf(Options).equals = function (other) {
|
|
@@ -1095,9 +1095,9 @@
|
|
|
1095
1095
|
if (!(other instanceof Options))
|
|
1096
1096
|
return false;
|
|
1097
1097
|
var tmp0_other_with_cast = other instanceof Options ? other : THROW_CCE();
|
|
1098
|
-
if (!equals(this.
|
|
1098
|
+
if (!equals(this.c97_1, tmp0_other_with_cast.c97_1))
|
|
1099
1099
|
return false;
|
|
1100
|
-
if (!equals(this.
|
|
1100
|
+
if (!equals(this.d97_1, tmp0_other_with_cast.d97_1))
|
|
1101
1101
|
return false;
|
|
1102
1102
|
return true;
|
|
1103
1103
|
};
|
|
@@ -1112,7 +1112,7 @@
|
|
|
1112
1112
|
// Inline function 'kotlin.arrayOf' call
|
|
1113
1113
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1114
1114
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1115
|
-
tmp.
|
|
1115
|
+
tmp.z96_1 = [null, tmp_1, tmp_3, null, null, null, null, lazy(tmp_4, OllamaChatRequestDTO$Companion$$childSerializers$_anonymous__jtydy4_1)];
|
|
1116
1116
|
}
|
|
1117
1117
|
protoOf(Companion_1).q1j = function () {
|
|
1118
1118
|
return $serializer_getInstance_0();
|
|
@@ -1134,37 +1134,37 @@
|
|
|
1134
1134
|
tmp0_serialDesc.m16('stream', false);
|
|
1135
1135
|
tmp0_serialDesc.m16('keep_alive', true);
|
|
1136
1136
|
tmp0_serialDesc.m16('additionalProperties', true);
|
|
1137
|
-
this.
|
|
1137
|
+
this.e97_1 = tmp0_serialDesc;
|
|
1138
1138
|
}
|
|
1139
|
-
protoOf($serializer_0).
|
|
1140
|
-
var tmp0_desc = this.
|
|
1139
|
+
protoOf($serializer_0).f97 = function (encoder, value) {
|
|
1140
|
+
var tmp0_desc = this.e97_1;
|
|
1141
1141
|
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1142
|
-
var tmp2_cached = Companion_getInstance_3().
|
|
1143
|
-
tmp1_output.l10(tmp0_desc, 0, value.
|
|
1144
|
-
tmp1_output.n10(tmp0_desc, 1, tmp2_cached[1].b1(), value.
|
|
1145
|
-
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.
|
|
1146
|
-
tmp1_output.p10(tmp0_desc, 2, tmp2_cached[2].b1(), value.
|
|
1142
|
+
var tmp2_cached = Companion_getInstance_3().z96_1;
|
|
1143
|
+
tmp1_output.l10(tmp0_desc, 0, value.g97_1);
|
|
1144
|
+
tmp1_output.n10(tmp0_desc, 1, tmp2_cached[1].b1(), value.h97_1);
|
|
1145
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.i97_1 == null)) {
|
|
1146
|
+
tmp1_output.p10(tmp0_desc, 2, tmp2_cached[2].b1(), value.i97_1);
|
|
1147
1147
|
}
|
|
1148
|
-
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.
|
|
1149
|
-
tmp1_output.p10(tmp0_desc, 3, JsonElementSerializer_getInstance(), value.
|
|
1148
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.j97_1 == null)) {
|
|
1149
|
+
tmp1_output.p10(tmp0_desc, 3, JsonElementSerializer_getInstance(), value.j97_1);
|
|
1150
1150
|
}
|
|
1151
|
-
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.
|
|
1152
|
-
tmp1_output.p10(tmp0_desc, 4, $serializer_getInstance(), value.
|
|
1151
|
+
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.k97_1 == null)) {
|
|
1152
|
+
tmp1_output.p10(tmp0_desc, 4, $serializer_getInstance(), value.k97_1);
|
|
1153
1153
|
}
|
|
1154
|
-
tmp1_output.d10(tmp0_desc, 5, value.
|
|
1155
|
-
if (tmp1_output.t10(tmp0_desc, 6) ? true : !(value.
|
|
1156
|
-
tmp1_output.p10(tmp0_desc, 6, StringSerializer_getInstance(), value.
|
|
1154
|
+
tmp1_output.d10(tmp0_desc, 5, value.l97_1);
|
|
1155
|
+
if (tmp1_output.t10(tmp0_desc, 6) ? true : !(value.m97_1 == null)) {
|
|
1156
|
+
tmp1_output.p10(tmp0_desc, 6, StringSerializer_getInstance(), value.m97_1);
|
|
1157
1157
|
}
|
|
1158
|
-
if (tmp1_output.t10(tmp0_desc, 7) ? true : !(value.
|
|
1159
|
-
tmp1_output.p10(tmp0_desc, 7, tmp2_cached[7].b1(), value.
|
|
1158
|
+
if (tmp1_output.t10(tmp0_desc, 7) ? true : !(value.n97_1 == null)) {
|
|
1159
|
+
tmp1_output.p10(tmp0_desc, 7, tmp2_cached[7].b1(), value.n97_1);
|
|
1160
1160
|
}
|
|
1161
1161
|
tmp1_output.xy(tmp0_desc);
|
|
1162
1162
|
};
|
|
1163
1163
|
protoOf($serializer_0).gv = function (encoder, value) {
|
|
1164
|
-
return this.
|
|
1164
|
+
return this.f97(encoder, value instanceof OllamaChatRequestDTO ? value : THROW_CCE());
|
|
1165
1165
|
};
|
|
1166
1166
|
protoOf($serializer_0).hv = function (decoder) {
|
|
1167
|
-
var tmp0_desc = this.
|
|
1167
|
+
var tmp0_desc = this.e97_1;
|
|
1168
1168
|
var tmp1_flag = true;
|
|
1169
1169
|
var tmp2_index = 0;
|
|
1170
1170
|
var tmp3_bitMask0 = 0;
|
|
@@ -1177,7 +1177,7 @@
|
|
|
1177
1177
|
var tmp10_local6 = null;
|
|
1178
1178
|
var tmp11_local7 = null;
|
|
1179
1179
|
var tmp12_input = decoder.wy(tmp0_desc);
|
|
1180
|
-
var tmp13_cached = Companion_getInstance_3().
|
|
1180
|
+
var tmp13_cached = Companion_getInstance_3().z96_1;
|
|
1181
1181
|
if (tmp12_input.mz()) {
|
|
1182
1182
|
tmp4_local0 = tmp12_input.gz(tmp0_desc, 0);
|
|
1183
1183
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -1242,10 +1242,10 @@
|
|
|
1242
1242
|
return OllamaChatRequestDTO_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, null);
|
|
1243
1243
|
};
|
|
1244
1244
|
protoOf($serializer_0).fv = function () {
|
|
1245
|
-
return this.
|
|
1245
|
+
return this.e97_1;
|
|
1246
1246
|
};
|
|
1247
1247
|
protoOf($serializer_0).d17 = function () {
|
|
1248
|
-
var tmp0_cached = Companion_getInstance_3().
|
|
1248
|
+
var tmp0_cached = Companion_getInstance_3().z96_1;
|
|
1249
1249
|
// Inline function 'kotlin.arrayOf' call
|
|
1250
1250
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1251
1251
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -1259,31 +1259,31 @@
|
|
|
1259
1259
|
}
|
|
1260
1260
|
function OllamaChatRequestDTO_init_$Init$(seen0, model, messages, tools, format, options, stream, keepAlive, additionalProperties, serializationConstructorMarker, $this) {
|
|
1261
1261
|
if (!(35 === (35 & seen0))) {
|
|
1262
|
-
throwMissingFieldException(seen0, 35, $serializer_getInstance_0().
|
|
1262
|
+
throwMissingFieldException(seen0, 35, $serializer_getInstance_0().e97_1);
|
|
1263
1263
|
}
|
|
1264
|
-
$this.
|
|
1265
|
-
$this.
|
|
1264
|
+
$this.g97_1 = model;
|
|
1265
|
+
$this.h97_1 = messages;
|
|
1266
1266
|
if (0 === (seen0 & 4))
|
|
1267
|
-
$this.
|
|
1267
|
+
$this.i97_1 = null;
|
|
1268
1268
|
else
|
|
1269
|
-
$this.
|
|
1269
|
+
$this.i97_1 = tools;
|
|
1270
1270
|
if (0 === (seen0 & 8))
|
|
1271
|
-
$this.
|
|
1271
|
+
$this.j97_1 = null;
|
|
1272
1272
|
else
|
|
1273
|
-
$this.
|
|
1273
|
+
$this.j97_1 = format;
|
|
1274
1274
|
if (0 === (seen0 & 16))
|
|
1275
|
-
$this.
|
|
1275
|
+
$this.k97_1 = null;
|
|
1276
1276
|
else
|
|
1277
|
-
$this.
|
|
1278
|
-
$this.
|
|
1277
|
+
$this.k97_1 = options;
|
|
1278
|
+
$this.l97_1 = stream;
|
|
1279
1279
|
if (0 === (seen0 & 64))
|
|
1280
|
-
$this.
|
|
1280
|
+
$this.m97_1 = null;
|
|
1281
1281
|
else
|
|
1282
|
-
$this.
|
|
1282
|
+
$this.m97_1 = keepAlive;
|
|
1283
1283
|
if (0 === (seen0 & 128))
|
|
1284
|
-
$this.
|
|
1284
|
+
$this.n97_1 = null;
|
|
1285
1285
|
else
|
|
1286
|
-
$this.
|
|
1286
|
+
$this.n97_1 = additionalProperties;
|
|
1287
1287
|
return $this;
|
|
1288
1288
|
}
|
|
1289
1289
|
function OllamaChatRequestDTO_init_$Create$(seen0, model, messages, tools, format, options, stream, keepAlive, additionalProperties, serializationConstructorMarker) {
|
|
@@ -1296,27 +1296,27 @@
|
|
|
1296
1296
|
options = options === VOID ? null : options;
|
|
1297
1297
|
keepAlive = keepAlive === VOID ? null : keepAlive;
|
|
1298
1298
|
additionalProperties = additionalProperties === VOID ? null : additionalProperties;
|
|
1299
|
-
this.
|
|
1300
|
-
this.
|
|
1301
|
-
this.
|
|
1302
|
-
this.
|
|
1303
|
-
this.
|
|
1304
|
-
this.
|
|
1305
|
-
this.
|
|
1306
|
-
this.
|
|
1299
|
+
this.g97_1 = model;
|
|
1300
|
+
this.h97_1 = messages;
|
|
1301
|
+
this.i97_1 = tools;
|
|
1302
|
+
this.j97_1 = format;
|
|
1303
|
+
this.k97_1 = options;
|
|
1304
|
+
this.l97_1 = stream;
|
|
1305
|
+
this.m97_1 = keepAlive;
|
|
1306
|
+
this.n97_1 = additionalProperties;
|
|
1307
1307
|
}
|
|
1308
1308
|
protoOf(OllamaChatRequestDTO).toString = function () {
|
|
1309
|
-
return 'OllamaChatRequestDTO(model=' + this.
|
|
1309
|
+
return 'OllamaChatRequestDTO(model=' + this.g97_1 + ', messages=' + toString(this.h97_1) + ', tools=' + toString_0(this.i97_1) + ', format=' + toString_0(this.j97_1) + ', options=' + toString_0(this.k97_1) + ', stream=' + this.l97_1 + ', keepAlive=' + this.m97_1 + ', additionalProperties=' + toString_0(this.n97_1) + ')';
|
|
1310
1310
|
};
|
|
1311
1311
|
protoOf(OllamaChatRequestDTO).hashCode = function () {
|
|
1312
|
-
var result = getStringHashCode(this.
|
|
1313
|
-
result = imul(result, 31) + hashCode(this.
|
|
1314
|
-
result = imul(result, 31) + (this.
|
|
1315
|
-
result = imul(result, 31) + (this.
|
|
1316
|
-
result = imul(result, 31) + (this.
|
|
1317
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
1318
|
-
result = imul(result, 31) + (this.
|
|
1319
|
-
result = imul(result, 31) + (this.
|
|
1312
|
+
var result = getStringHashCode(this.g97_1);
|
|
1313
|
+
result = imul(result, 31) + hashCode(this.h97_1) | 0;
|
|
1314
|
+
result = imul(result, 31) + (this.i97_1 == null ? 0 : hashCode(this.i97_1)) | 0;
|
|
1315
|
+
result = imul(result, 31) + (this.j97_1 == null ? 0 : hashCode(this.j97_1)) | 0;
|
|
1316
|
+
result = imul(result, 31) + (this.k97_1 == null ? 0 : this.k97_1.hashCode()) | 0;
|
|
1317
|
+
result = imul(result, 31) + getBooleanHashCode(this.l97_1) | 0;
|
|
1318
|
+
result = imul(result, 31) + (this.m97_1 == null ? 0 : getStringHashCode(this.m97_1)) | 0;
|
|
1319
|
+
result = imul(result, 31) + (this.n97_1 == null ? 0 : hashCode(this.n97_1)) | 0;
|
|
1320
1320
|
return result;
|
|
1321
1321
|
};
|
|
1322
1322
|
protoOf(OllamaChatRequestDTO).equals = function (other) {
|
|
@@ -1325,21 +1325,21 @@
|
|
|
1325
1325
|
if (!(other instanceof OllamaChatRequestDTO))
|
|
1326
1326
|
return false;
|
|
1327
1327
|
var tmp0_other_with_cast = other instanceof OllamaChatRequestDTO ? other : THROW_CCE();
|
|
1328
|
-
if (!(this.
|
|
1328
|
+
if (!(this.g97_1 === tmp0_other_with_cast.g97_1))
|
|
1329
1329
|
return false;
|
|
1330
|
-
if (!equals(this.
|
|
1330
|
+
if (!equals(this.h97_1, tmp0_other_with_cast.h97_1))
|
|
1331
1331
|
return false;
|
|
1332
|
-
if (!equals(this.
|
|
1332
|
+
if (!equals(this.i97_1, tmp0_other_with_cast.i97_1))
|
|
1333
1333
|
return false;
|
|
1334
|
-
if (!equals(this.
|
|
1334
|
+
if (!equals(this.j97_1, tmp0_other_with_cast.j97_1))
|
|
1335
1335
|
return false;
|
|
1336
|
-
if (!equals(this.
|
|
1336
|
+
if (!equals(this.k97_1, tmp0_other_with_cast.k97_1))
|
|
1337
1337
|
return false;
|
|
1338
|
-
if (!(this.
|
|
1338
|
+
if (!(this.l97_1 === tmp0_other_with_cast.l97_1))
|
|
1339
1339
|
return false;
|
|
1340
|
-
if (!(this.
|
|
1340
|
+
if (!(this.m97_1 == tmp0_other_with_cast.m97_1))
|
|
1341
1341
|
return false;
|
|
1342
|
-
if (!equals(this.
|
|
1342
|
+
if (!equals(this.n97_1, tmp0_other_with_cast.n97_1))
|
|
1343
1343
|
return false;
|
|
1344
1344
|
return true;
|
|
1345
1345
|
};
|
|
@@ -1358,7 +1358,7 @@
|
|
|
1358
1358
|
// Inline function 'kotlin.arrayOf' call
|
|
1359
1359
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1360
1360
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1361
|
-
tmp.
|
|
1361
|
+
tmp.o97_1 = [null, null, tmp_1, lazy(tmp_2, OllamaChatMessageDTO$Companion$$childSerializers$_anonymous__2c2lck_0)];
|
|
1362
1362
|
}
|
|
1363
1363
|
var Companion_instance_2;
|
|
1364
1364
|
function Companion_getInstance_4() {
|
|
@@ -1373,27 +1373,27 @@
|
|
|
1373
1373
|
tmp0_serialDesc.m16('content', false);
|
|
1374
1374
|
tmp0_serialDesc.m16('images', true);
|
|
1375
1375
|
tmp0_serialDesc.m16('tool_calls', true);
|
|
1376
|
-
this.
|
|
1376
|
+
this.p97_1 = tmp0_serialDesc;
|
|
1377
1377
|
}
|
|
1378
|
-
protoOf($serializer_1).
|
|
1379
|
-
var tmp0_desc = this.
|
|
1378
|
+
protoOf($serializer_1).q97 = function (encoder, value) {
|
|
1379
|
+
var tmp0_desc = this.p97_1;
|
|
1380
1380
|
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1381
|
-
var tmp2_cached = Companion_getInstance_4().
|
|
1382
|
-
tmp1_output.l10(tmp0_desc, 0, value.
|
|
1383
|
-
tmp1_output.l10(tmp0_desc, 1, value.
|
|
1384
|
-
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.
|
|
1385
|
-
tmp1_output.p10(tmp0_desc, 2, tmp2_cached[2].b1(), value.
|
|
1381
|
+
var tmp2_cached = Companion_getInstance_4().o97_1;
|
|
1382
|
+
tmp1_output.l10(tmp0_desc, 0, value.p93_1);
|
|
1383
|
+
tmp1_output.l10(tmp0_desc, 1, value.q93_1);
|
|
1384
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.r93_1 == null)) {
|
|
1385
|
+
tmp1_output.p10(tmp0_desc, 2, tmp2_cached[2].b1(), value.r93_1);
|
|
1386
1386
|
}
|
|
1387
|
-
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.
|
|
1388
|
-
tmp1_output.p10(tmp0_desc, 3, tmp2_cached[3].b1(), value.
|
|
1387
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.s93_1 == null)) {
|
|
1388
|
+
tmp1_output.p10(tmp0_desc, 3, tmp2_cached[3].b1(), value.s93_1);
|
|
1389
1389
|
}
|
|
1390
1390
|
tmp1_output.xy(tmp0_desc);
|
|
1391
1391
|
};
|
|
1392
1392
|
protoOf($serializer_1).gv = function (encoder, value) {
|
|
1393
|
-
return this.
|
|
1393
|
+
return this.q97(encoder, value instanceof OllamaChatMessageDTO ? value : THROW_CCE());
|
|
1394
1394
|
};
|
|
1395
1395
|
protoOf($serializer_1).hv = function (decoder) {
|
|
1396
|
-
var tmp0_desc = this.
|
|
1396
|
+
var tmp0_desc = this.p97_1;
|
|
1397
1397
|
var tmp1_flag = true;
|
|
1398
1398
|
var tmp2_index = 0;
|
|
1399
1399
|
var tmp3_bitMask0 = 0;
|
|
@@ -1402,7 +1402,7 @@
|
|
|
1402
1402
|
var tmp6_local2 = null;
|
|
1403
1403
|
var tmp7_local3 = null;
|
|
1404
1404
|
var tmp8_input = decoder.wy(tmp0_desc);
|
|
1405
|
-
var tmp9_cached = Companion_getInstance_4().
|
|
1405
|
+
var tmp9_cached = Companion_getInstance_4().o97_1;
|
|
1406
1406
|
if (tmp8_input.mz()) {
|
|
1407
1407
|
tmp4_local0 = tmp8_input.gz(tmp0_desc, 0);
|
|
1408
1408
|
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
@@ -1443,10 +1443,10 @@
|
|
|
1443
1443
|
return OllamaChatMessageDTO_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
1444
1444
|
};
|
|
1445
1445
|
protoOf($serializer_1).fv = function () {
|
|
1446
|
-
return this.
|
|
1446
|
+
return this.p97_1;
|
|
1447
1447
|
};
|
|
1448
1448
|
protoOf($serializer_1).d17 = function () {
|
|
1449
|
-
var tmp0_cached = Companion_getInstance_4().
|
|
1449
|
+
var tmp0_cached = Companion_getInstance_4().o97_1;
|
|
1450
1450
|
// Inline function 'kotlin.arrayOf' call
|
|
1451
1451
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1452
1452
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -1460,18 +1460,18 @@
|
|
|
1460
1460
|
}
|
|
1461
1461
|
function OllamaChatMessageDTO_init_$Init$(seen0, role, content, images, toolCalls, serializationConstructorMarker, $this) {
|
|
1462
1462
|
if (!(3 === (3 & seen0))) {
|
|
1463
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance_1().
|
|
1463
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_1().p97_1);
|
|
1464
1464
|
}
|
|
1465
|
-
$this.
|
|
1466
|
-
$this.
|
|
1465
|
+
$this.p93_1 = role;
|
|
1466
|
+
$this.q93_1 = content;
|
|
1467
1467
|
if (0 === (seen0 & 4))
|
|
1468
|
-
$this.
|
|
1468
|
+
$this.r93_1 = null;
|
|
1469
1469
|
else
|
|
1470
|
-
$this.
|
|
1470
|
+
$this.r93_1 = images;
|
|
1471
1471
|
if (0 === (seen0 & 8))
|
|
1472
|
-
$this.
|
|
1472
|
+
$this.s93_1 = null;
|
|
1473
1473
|
else
|
|
1474
|
-
$this.
|
|
1474
|
+
$this.s93_1 = toolCalls;
|
|
1475
1475
|
return $this;
|
|
1476
1476
|
}
|
|
1477
1477
|
function OllamaChatMessageDTO_init_$Create$(seen0, role, content, images, toolCalls, serializationConstructorMarker) {
|
|
@@ -1481,19 +1481,19 @@
|
|
|
1481
1481
|
Companion_getInstance_4();
|
|
1482
1482
|
images = images === VOID ? null : images;
|
|
1483
1483
|
toolCalls = toolCalls === VOID ? null : toolCalls;
|
|
1484
|
-
this.
|
|
1485
|
-
this.
|
|
1486
|
-
this.
|
|
1487
|
-
this.
|
|
1484
|
+
this.p93_1 = role;
|
|
1485
|
+
this.q93_1 = content;
|
|
1486
|
+
this.r93_1 = images;
|
|
1487
|
+
this.s93_1 = toolCalls;
|
|
1488
1488
|
}
|
|
1489
1489
|
protoOf(OllamaChatMessageDTO).toString = function () {
|
|
1490
|
-
return 'OllamaChatMessageDTO(role=' + this.
|
|
1490
|
+
return 'OllamaChatMessageDTO(role=' + this.p93_1 + ', content=' + this.q93_1 + ', images=' + toString_0(this.r93_1) + ', toolCalls=' + toString_0(this.s93_1) + ')';
|
|
1491
1491
|
};
|
|
1492
1492
|
protoOf(OllamaChatMessageDTO).hashCode = function () {
|
|
1493
|
-
var result = getStringHashCode(this.
|
|
1494
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
1495
|
-
result = imul(result, 31) + (this.
|
|
1496
|
-
result = imul(result, 31) + (this.
|
|
1493
|
+
var result = getStringHashCode(this.p93_1);
|
|
1494
|
+
result = imul(result, 31) + getStringHashCode(this.q93_1) | 0;
|
|
1495
|
+
result = imul(result, 31) + (this.r93_1 == null ? 0 : hashCode(this.r93_1)) | 0;
|
|
1496
|
+
result = imul(result, 31) + (this.s93_1 == null ? 0 : hashCode(this.s93_1)) | 0;
|
|
1497
1497
|
return result;
|
|
1498
1498
|
};
|
|
1499
1499
|
protoOf(OllamaChatMessageDTO).equals = function (other) {
|
|
@@ -1502,13 +1502,13 @@
|
|
|
1502
1502
|
if (!(other instanceof OllamaChatMessageDTO))
|
|
1503
1503
|
return false;
|
|
1504
1504
|
var tmp0_other_with_cast = other instanceof OllamaChatMessageDTO ? other : THROW_CCE();
|
|
1505
|
-
if (!(this.
|
|
1505
|
+
if (!(this.p93_1 === tmp0_other_with_cast.p93_1))
|
|
1506
1506
|
return false;
|
|
1507
|
-
if (!(this.
|
|
1507
|
+
if (!(this.q93_1 === tmp0_other_with_cast.q93_1))
|
|
1508
1508
|
return false;
|
|
1509
|
-
if (!equals(this.
|
|
1509
|
+
if (!equals(this.r93_1, tmp0_other_with_cast.r93_1))
|
|
1510
1510
|
return false;
|
|
1511
|
-
if (!equals(this.
|
|
1511
|
+
if (!equals(this.s93_1, tmp0_other_with_cast.s93_1))
|
|
1512
1512
|
return false;
|
|
1513
1513
|
return true;
|
|
1514
1514
|
};
|
|
@@ -1524,21 +1524,21 @@
|
|
|
1524
1524
|
tmp0_serialDesc.m16('name', false);
|
|
1525
1525
|
tmp0_serialDesc.m16('description', false);
|
|
1526
1526
|
tmp0_serialDesc.m16('parameters', false);
|
|
1527
|
-
this.
|
|
1527
|
+
this.r97_1 = tmp0_serialDesc;
|
|
1528
1528
|
}
|
|
1529
|
-
protoOf($serializer_2).
|
|
1530
|
-
var tmp0_desc = this.
|
|
1529
|
+
protoOf($serializer_2).s97 = function (encoder, value) {
|
|
1530
|
+
var tmp0_desc = this.r97_1;
|
|
1531
1531
|
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1532
|
-
tmp1_output.l10(tmp0_desc, 0, value.
|
|
1533
|
-
tmp1_output.l10(tmp0_desc, 1, value.
|
|
1534
|
-
tmp1_output.n10(tmp0_desc, 2, JsonElementSerializer_getInstance(), value.
|
|
1532
|
+
tmp1_output.l10(tmp0_desc, 0, value.t97_1);
|
|
1533
|
+
tmp1_output.l10(tmp0_desc, 1, value.u97_1);
|
|
1534
|
+
tmp1_output.n10(tmp0_desc, 2, JsonElementSerializer_getInstance(), value.v97_1);
|
|
1535
1535
|
tmp1_output.xy(tmp0_desc);
|
|
1536
1536
|
};
|
|
1537
1537
|
protoOf($serializer_2).gv = function (encoder, value) {
|
|
1538
|
-
return this.
|
|
1538
|
+
return this.s97(encoder, value instanceof Definition ? value : THROW_CCE());
|
|
1539
1539
|
};
|
|
1540
1540
|
protoOf($serializer_2).hv = function (decoder) {
|
|
1541
|
-
var tmp0_desc = this.
|
|
1541
|
+
var tmp0_desc = this.r97_1;
|
|
1542
1542
|
var tmp1_flag = true;
|
|
1543
1543
|
var tmp2_index = 0;
|
|
1544
1544
|
var tmp3_bitMask0 = 0;
|
|
@@ -1580,7 +1580,7 @@
|
|
|
1580
1580
|
return Definition_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
1581
1581
|
};
|
|
1582
1582
|
protoOf($serializer_2).fv = function () {
|
|
1583
|
-
return this.
|
|
1583
|
+
return this.r97_1;
|
|
1584
1584
|
};
|
|
1585
1585
|
protoOf($serializer_2).d17 = function () {
|
|
1586
1586
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -1596,28 +1596,28 @@
|
|
|
1596
1596
|
}
|
|
1597
1597
|
function Definition_init_$Init$(seen0, name, description, parameters, serializationConstructorMarker, $this) {
|
|
1598
1598
|
if (!(7 === (7 & seen0))) {
|
|
1599
|
-
throwMissingFieldException(seen0, 7, $serializer_getInstance_2().
|
|
1599
|
+
throwMissingFieldException(seen0, 7, $serializer_getInstance_2().r97_1);
|
|
1600
1600
|
}
|
|
1601
|
-
$this.
|
|
1602
|
-
$this.
|
|
1603
|
-
$this.
|
|
1601
|
+
$this.t97_1 = name;
|
|
1602
|
+
$this.u97_1 = description;
|
|
1603
|
+
$this.v97_1 = parameters;
|
|
1604
1604
|
return $this;
|
|
1605
1605
|
}
|
|
1606
1606
|
function Definition_init_$Create$(seen0, name, description, parameters, serializationConstructorMarker) {
|
|
1607
1607
|
return Definition_init_$Init$(seen0, name, description, parameters, serializationConstructorMarker, objectCreate(protoOf(Definition)));
|
|
1608
1608
|
}
|
|
1609
1609
|
function Definition(name, description, parameters) {
|
|
1610
|
-
this.
|
|
1611
|
-
this.
|
|
1612
|
-
this.
|
|
1610
|
+
this.t97_1 = name;
|
|
1611
|
+
this.u97_1 = description;
|
|
1612
|
+
this.v97_1 = parameters;
|
|
1613
1613
|
}
|
|
1614
1614
|
protoOf(Definition).toString = function () {
|
|
1615
|
-
return 'Definition(name=' + this.
|
|
1615
|
+
return 'Definition(name=' + this.t97_1 + ', description=' + this.u97_1 + ', parameters=' + toString(this.v97_1) + ')';
|
|
1616
1616
|
};
|
|
1617
1617
|
protoOf(Definition).hashCode = function () {
|
|
1618
|
-
var result = getStringHashCode(this.
|
|
1619
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
1620
|
-
result = imul(result, 31) + hashCode(this.
|
|
1618
|
+
var result = getStringHashCode(this.t97_1);
|
|
1619
|
+
result = imul(result, 31) + getStringHashCode(this.u97_1) | 0;
|
|
1620
|
+
result = imul(result, 31) + hashCode(this.v97_1) | 0;
|
|
1621
1621
|
return result;
|
|
1622
1622
|
};
|
|
1623
1623
|
protoOf(Definition).equals = function (other) {
|
|
@@ -1626,11 +1626,11 @@
|
|
|
1626
1626
|
if (!(other instanceof Definition))
|
|
1627
1627
|
return false;
|
|
1628
1628
|
var tmp0_other_with_cast = other instanceof Definition ? other : THROW_CCE();
|
|
1629
|
-
if (!(this.
|
|
1629
|
+
if (!(this.t97_1 === tmp0_other_with_cast.t97_1))
|
|
1630
1630
|
return false;
|
|
1631
|
-
if (!(this.
|
|
1631
|
+
if (!(this.u97_1 === tmp0_other_with_cast.u97_1))
|
|
1632
1632
|
return false;
|
|
1633
|
-
if (!equals(this.
|
|
1633
|
+
if (!equals(this.v97_1, tmp0_other_with_cast.v97_1))
|
|
1634
1634
|
return false;
|
|
1635
1635
|
return true;
|
|
1636
1636
|
};
|
|
@@ -1645,20 +1645,20 @@
|
|
|
1645
1645
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.ollama.client.dto.OllamaToolDTO', this, 2);
|
|
1646
1646
|
tmp0_serialDesc.m16('type', false);
|
|
1647
1647
|
tmp0_serialDesc.m16('function', false);
|
|
1648
|
-
this.
|
|
1648
|
+
this.w97_1 = tmp0_serialDesc;
|
|
1649
1649
|
}
|
|
1650
|
-
protoOf($serializer_3).
|
|
1651
|
-
var tmp0_desc = this.
|
|
1650
|
+
protoOf($serializer_3).x97 = function (encoder, value) {
|
|
1651
|
+
var tmp0_desc = this.w97_1;
|
|
1652
1652
|
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1653
|
-
tmp1_output.l10(tmp0_desc, 0, value.
|
|
1654
|
-
tmp1_output.n10(tmp0_desc, 1, $serializer_getInstance_2(), value.
|
|
1653
|
+
tmp1_output.l10(tmp0_desc, 0, value.y97_1);
|
|
1654
|
+
tmp1_output.n10(tmp0_desc, 1, $serializer_getInstance_2(), value.z97_1);
|
|
1655
1655
|
tmp1_output.xy(tmp0_desc);
|
|
1656
1656
|
};
|
|
1657
1657
|
protoOf($serializer_3).gv = function (encoder, value) {
|
|
1658
|
-
return this.
|
|
1658
|
+
return this.x97(encoder, value instanceof OllamaToolDTO ? value : THROW_CCE());
|
|
1659
1659
|
};
|
|
1660
1660
|
protoOf($serializer_3).hv = function (decoder) {
|
|
1661
|
-
var tmp0_desc = this.
|
|
1661
|
+
var tmp0_desc = this.w97_1;
|
|
1662
1662
|
var tmp1_flag = true;
|
|
1663
1663
|
var tmp2_index = 0;
|
|
1664
1664
|
var tmp3_bitMask0 = 0;
|
|
@@ -1693,7 +1693,7 @@
|
|
|
1693
1693
|
return OllamaToolDTO_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
1694
1694
|
};
|
|
1695
1695
|
protoOf($serializer_3).fv = function () {
|
|
1696
|
-
return this.
|
|
1696
|
+
return this.w97_1;
|
|
1697
1697
|
};
|
|
1698
1698
|
protoOf($serializer_3).d17 = function () {
|
|
1699
1699
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -1709,25 +1709,25 @@
|
|
|
1709
1709
|
}
|
|
1710
1710
|
function OllamaToolDTO_init_$Init$(seen0, type, function_0, serializationConstructorMarker, $this) {
|
|
1711
1711
|
if (!(3 === (3 & seen0))) {
|
|
1712
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance_3().
|
|
1712
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_3().w97_1);
|
|
1713
1713
|
}
|
|
1714
|
-
$this.
|
|
1715
|
-
$this.
|
|
1714
|
+
$this.y97_1 = type;
|
|
1715
|
+
$this.z97_1 = function_0;
|
|
1716
1716
|
return $this;
|
|
1717
1717
|
}
|
|
1718
1718
|
function OllamaToolDTO_init_$Create$(seen0, type, function_0, serializationConstructorMarker) {
|
|
1719
1719
|
return OllamaToolDTO_init_$Init$(seen0, type, function_0, serializationConstructorMarker, objectCreate(protoOf(OllamaToolDTO)));
|
|
1720
1720
|
}
|
|
1721
1721
|
function OllamaToolDTO(type, function_0) {
|
|
1722
|
-
this.
|
|
1723
|
-
this.
|
|
1722
|
+
this.y97_1 = type;
|
|
1723
|
+
this.z97_1 = function_0;
|
|
1724
1724
|
}
|
|
1725
1725
|
protoOf(OllamaToolDTO).toString = function () {
|
|
1726
|
-
return 'OllamaToolDTO(type=' + this.
|
|
1726
|
+
return 'OllamaToolDTO(type=' + this.y97_1 + ', function=' + this.z97_1.toString() + ')';
|
|
1727
1727
|
};
|
|
1728
1728
|
protoOf(OllamaToolDTO).hashCode = function () {
|
|
1729
|
-
var result = getStringHashCode(this.
|
|
1730
|
-
result = imul(result, 31) + this.
|
|
1729
|
+
var result = getStringHashCode(this.y97_1);
|
|
1730
|
+
result = imul(result, 31) + this.z97_1.hashCode() | 0;
|
|
1731
1731
|
return result;
|
|
1732
1732
|
};
|
|
1733
1733
|
protoOf(OllamaToolDTO).equals = function (other) {
|
|
@@ -1736,9 +1736,9 @@
|
|
|
1736
1736
|
if (!(other instanceof OllamaToolDTO))
|
|
1737
1737
|
return false;
|
|
1738
1738
|
var tmp0_other_with_cast = other instanceof OllamaToolDTO ? other : THROW_CCE();
|
|
1739
|
-
if (!(this.
|
|
1739
|
+
if (!(this.y97_1 === tmp0_other_with_cast.y97_1))
|
|
1740
1740
|
return false;
|
|
1741
|
-
if (!this.
|
|
1741
|
+
if (!this.z97_1.equals(tmp0_other_with_cast.z97_1))
|
|
1742
1742
|
return false;
|
|
1743
1743
|
return true;
|
|
1744
1744
|
};
|
|
@@ -1756,29 +1756,29 @@
|
|
|
1756
1756
|
tmp0_serialDesc.m16('done', false);
|
|
1757
1757
|
tmp0_serialDesc.m16('prompt_eval_count', true);
|
|
1758
1758
|
tmp0_serialDesc.m16('eval_count', true);
|
|
1759
|
-
this.
|
|
1759
|
+
this.a98_1 = tmp0_serialDesc;
|
|
1760
1760
|
}
|
|
1761
|
-
protoOf($serializer_4).
|
|
1762
|
-
var tmp0_desc = this.
|
|
1761
|
+
protoOf($serializer_4).b98 = function (encoder, value) {
|
|
1762
|
+
var tmp0_desc = this.a98_1;
|
|
1763
1763
|
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1764
|
-
tmp1_output.l10(tmp0_desc, 0, value.
|
|
1765
|
-
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.
|
|
1766
|
-
tmp1_output.p10(tmp0_desc, 1, $serializer_getInstance_1(), value.
|
|
1764
|
+
tmp1_output.l10(tmp0_desc, 0, value.k93_1);
|
|
1765
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.l93_1 == null)) {
|
|
1766
|
+
tmp1_output.p10(tmp0_desc, 1, $serializer_getInstance_1(), value.l93_1);
|
|
1767
1767
|
}
|
|
1768
|
-
tmp1_output.d10(tmp0_desc, 2, value.
|
|
1769
|
-
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.
|
|
1770
|
-
tmp1_output.p10(tmp0_desc, 3, IntSerializer_getInstance(), value.
|
|
1768
|
+
tmp1_output.d10(tmp0_desc, 2, value.m93_1);
|
|
1769
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.n93_1 == null)) {
|
|
1770
|
+
tmp1_output.p10(tmp0_desc, 3, IntSerializer_getInstance(), value.n93_1);
|
|
1771
1771
|
}
|
|
1772
|
-
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.
|
|
1773
|
-
tmp1_output.p10(tmp0_desc, 4, IntSerializer_getInstance(), value.
|
|
1772
|
+
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.o93_1 == null)) {
|
|
1773
|
+
tmp1_output.p10(tmp0_desc, 4, IntSerializer_getInstance(), value.o93_1);
|
|
1774
1774
|
}
|
|
1775
1775
|
tmp1_output.xy(tmp0_desc);
|
|
1776
1776
|
};
|
|
1777
1777
|
protoOf($serializer_4).gv = function (encoder, value) {
|
|
1778
|
-
return this.
|
|
1778
|
+
return this.b98(encoder, value instanceof OllamaChatResponseDTO ? value : THROW_CCE());
|
|
1779
1779
|
};
|
|
1780
1780
|
protoOf($serializer_4).hv = function (decoder) {
|
|
1781
|
-
var tmp0_desc = this.
|
|
1781
|
+
var tmp0_desc = this.a98_1;
|
|
1782
1782
|
var tmp1_flag = true;
|
|
1783
1783
|
var tmp2_index = 0;
|
|
1784
1784
|
var tmp3_bitMask0 = 0;
|
|
@@ -1834,7 +1834,7 @@
|
|
|
1834
1834
|
return OllamaChatResponseDTO_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
|
|
1835
1835
|
};
|
|
1836
1836
|
protoOf($serializer_4).fv = function () {
|
|
1837
|
-
return this.
|
|
1837
|
+
return this.a98_1;
|
|
1838
1838
|
};
|
|
1839
1839
|
protoOf($serializer_4).d17 = function () {
|
|
1840
1840
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -1850,22 +1850,22 @@
|
|
|
1850
1850
|
}
|
|
1851
1851
|
function OllamaChatResponseDTO_init_$Init$(seen0, model, message, done, promptEvalCount, evalCount, serializationConstructorMarker, $this) {
|
|
1852
1852
|
if (!(5 === (5 & seen0))) {
|
|
1853
|
-
throwMissingFieldException(seen0, 5, $serializer_getInstance_4().
|
|
1853
|
+
throwMissingFieldException(seen0, 5, $serializer_getInstance_4().a98_1);
|
|
1854
1854
|
}
|
|
1855
|
-
$this.
|
|
1855
|
+
$this.k93_1 = model;
|
|
1856
1856
|
if (0 === (seen0 & 2))
|
|
1857
|
-
$this.
|
|
1857
|
+
$this.l93_1 = null;
|
|
1858
1858
|
else
|
|
1859
|
-
$this.
|
|
1860
|
-
$this.
|
|
1859
|
+
$this.l93_1 = message;
|
|
1860
|
+
$this.m93_1 = done;
|
|
1861
1861
|
if (0 === (seen0 & 8))
|
|
1862
|
-
$this.
|
|
1862
|
+
$this.n93_1 = null;
|
|
1863
1863
|
else
|
|
1864
|
-
$this.
|
|
1864
|
+
$this.n93_1 = promptEvalCount;
|
|
1865
1865
|
if (0 === (seen0 & 16))
|
|
1866
|
-
$this.
|
|
1866
|
+
$this.o93_1 = null;
|
|
1867
1867
|
else
|
|
1868
|
-
$this.
|
|
1868
|
+
$this.o93_1 = evalCount;
|
|
1869
1869
|
return $this;
|
|
1870
1870
|
}
|
|
1871
1871
|
function OllamaChatResponseDTO_init_$Create$(seen0, model, message, done, promptEvalCount, evalCount, serializationConstructorMarker) {
|
|
@@ -1875,21 +1875,21 @@
|
|
|
1875
1875
|
message = message === VOID ? null : message;
|
|
1876
1876
|
promptEvalCount = promptEvalCount === VOID ? null : promptEvalCount;
|
|
1877
1877
|
evalCount = evalCount === VOID ? null : evalCount;
|
|
1878
|
-
this.
|
|
1879
|
-
this.
|
|
1880
|
-
this.
|
|
1881
|
-
this.
|
|
1882
|
-
this.
|
|
1878
|
+
this.k93_1 = model;
|
|
1879
|
+
this.l93_1 = message;
|
|
1880
|
+
this.m93_1 = done;
|
|
1881
|
+
this.n93_1 = promptEvalCount;
|
|
1882
|
+
this.o93_1 = evalCount;
|
|
1883
1883
|
}
|
|
1884
1884
|
protoOf(OllamaChatResponseDTO).toString = function () {
|
|
1885
|
-
return 'OllamaChatResponseDTO(model=' + this.
|
|
1885
|
+
return 'OllamaChatResponseDTO(model=' + this.k93_1 + ', message=' + toString_0(this.l93_1) + ', done=' + this.m93_1 + ', promptEvalCount=' + this.n93_1 + ', evalCount=' + this.o93_1 + ')';
|
|
1886
1886
|
};
|
|
1887
1887
|
protoOf(OllamaChatResponseDTO).hashCode = function () {
|
|
1888
|
-
var result = getStringHashCode(this.
|
|
1889
|
-
result = imul(result, 31) + (this.
|
|
1890
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
1891
|
-
result = imul(result, 31) + (this.
|
|
1892
|
-
result = imul(result, 31) + (this.
|
|
1888
|
+
var result = getStringHashCode(this.k93_1);
|
|
1889
|
+
result = imul(result, 31) + (this.l93_1 == null ? 0 : this.l93_1.hashCode()) | 0;
|
|
1890
|
+
result = imul(result, 31) + getBooleanHashCode(this.m93_1) | 0;
|
|
1891
|
+
result = imul(result, 31) + (this.n93_1 == null ? 0 : this.n93_1) | 0;
|
|
1892
|
+
result = imul(result, 31) + (this.o93_1 == null ? 0 : this.o93_1) | 0;
|
|
1893
1893
|
return result;
|
|
1894
1894
|
};
|
|
1895
1895
|
protoOf(OllamaChatResponseDTO).equals = function (other) {
|
|
@@ -1898,15 +1898,15 @@
|
|
|
1898
1898
|
if (!(other instanceof OllamaChatResponseDTO))
|
|
1899
1899
|
return false;
|
|
1900
1900
|
var tmp0_other_with_cast = other instanceof OllamaChatResponseDTO ? other : THROW_CCE();
|
|
1901
|
-
if (!(this.
|
|
1901
|
+
if (!(this.k93_1 === tmp0_other_with_cast.k93_1))
|
|
1902
1902
|
return false;
|
|
1903
|
-
if (!equals(this.
|
|
1903
|
+
if (!equals(this.l93_1, tmp0_other_with_cast.l93_1))
|
|
1904
1904
|
return false;
|
|
1905
|
-
if (!(this.
|
|
1905
|
+
if (!(this.m93_1 === tmp0_other_with_cast.m93_1))
|
|
1906
1906
|
return false;
|
|
1907
|
-
if (!(this.
|
|
1907
|
+
if (!(this.n93_1 == tmp0_other_with_cast.n93_1))
|
|
1908
1908
|
return false;
|
|
1909
|
-
if (!(this.
|
|
1909
|
+
if (!(this.o93_1 == tmp0_other_with_cast.o93_1))
|
|
1910
1910
|
return false;
|
|
1911
1911
|
return true;
|
|
1912
1912
|
};
|
|
@@ -1920,19 +1920,19 @@
|
|
|
1920
1920
|
$serializer_instance_5 = this;
|
|
1921
1921
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.ollama.client.dto.OllamaErrorResponseDTO', this, 1);
|
|
1922
1922
|
tmp0_serialDesc.m16('error', false);
|
|
1923
|
-
this.
|
|
1923
|
+
this.c98_1 = tmp0_serialDesc;
|
|
1924
1924
|
}
|
|
1925
|
-
protoOf($serializer_5).
|
|
1926
|
-
var tmp0_desc = this.
|
|
1925
|
+
protoOf($serializer_5).d98 = function (encoder, value) {
|
|
1926
|
+
var tmp0_desc = this.c98_1;
|
|
1927
1927
|
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1928
|
-
tmp1_output.l10(tmp0_desc, 0, value.
|
|
1928
|
+
tmp1_output.l10(tmp0_desc, 0, value.y93_1);
|
|
1929
1929
|
tmp1_output.xy(tmp0_desc);
|
|
1930
1930
|
};
|
|
1931
1931
|
protoOf($serializer_5).gv = function (encoder, value) {
|
|
1932
|
-
return this.
|
|
1932
|
+
return this.d98(encoder, value instanceof OllamaErrorResponseDTO ? value : THROW_CCE());
|
|
1933
1933
|
};
|
|
1934
1934
|
protoOf($serializer_5).hv = function (decoder) {
|
|
1935
|
-
var tmp0_desc = this.
|
|
1935
|
+
var tmp0_desc = this.c98_1;
|
|
1936
1936
|
var tmp1_flag = true;
|
|
1937
1937
|
var tmp2_index = 0;
|
|
1938
1938
|
var tmp3_bitMask0 = 0;
|
|
@@ -1960,7 +1960,7 @@
|
|
|
1960
1960
|
return OllamaErrorResponseDTO_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
|
|
1961
1961
|
};
|
|
1962
1962
|
protoOf($serializer_5).fv = function () {
|
|
1963
|
-
return this.
|
|
1963
|
+
return this.c98_1;
|
|
1964
1964
|
};
|
|
1965
1965
|
protoOf($serializer_5).d17 = function () {
|
|
1966
1966
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -1976,22 +1976,22 @@
|
|
|
1976
1976
|
}
|
|
1977
1977
|
function OllamaErrorResponseDTO_init_$Init$(seen0, error, serializationConstructorMarker, $this) {
|
|
1978
1978
|
if (!(1 === (1 & seen0))) {
|
|
1979
|
-
throwMissingFieldException(seen0, 1, $serializer_getInstance_5().
|
|
1979
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_5().c98_1);
|
|
1980
1980
|
}
|
|
1981
|
-
$this.
|
|
1981
|
+
$this.y93_1 = error;
|
|
1982
1982
|
return $this;
|
|
1983
1983
|
}
|
|
1984
1984
|
function OllamaErrorResponseDTO_init_$Create$(seen0, error, serializationConstructorMarker) {
|
|
1985
1985
|
return OllamaErrorResponseDTO_init_$Init$(seen0, error, serializationConstructorMarker, objectCreate(protoOf(OllamaErrorResponseDTO)));
|
|
1986
1986
|
}
|
|
1987
1987
|
function OllamaErrorResponseDTO(error) {
|
|
1988
|
-
this.
|
|
1988
|
+
this.y93_1 = error;
|
|
1989
1989
|
}
|
|
1990
1990
|
protoOf(OllamaErrorResponseDTO).toString = function () {
|
|
1991
|
-
return 'OllamaErrorResponseDTO(error=' + this.
|
|
1991
|
+
return 'OllamaErrorResponseDTO(error=' + this.y93_1 + ')';
|
|
1992
1992
|
};
|
|
1993
1993
|
protoOf(OllamaErrorResponseDTO).hashCode = function () {
|
|
1994
|
-
return getStringHashCode(this.
|
|
1994
|
+
return getStringHashCode(this.y93_1);
|
|
1995
1995
|
};
|
|
1996
1996
|
protoOf(OllamaErrorResponseDTO).equals = function (other) {
|
|
1997
1997
|
if (this === other)
|
|
@@ -1999,7 +1999,7 @@
|
|
|
1999
1999
|
if (!(other instanceof OllamaErrorResponseDTO))
|
|
2000
2000
|
return false;
|
|
2001
2001
|
var tmp0_other_with_cast = other instanceof OllamaErrorResponseDTO ? other : THROW_CCE();
|
|
2002
|
-
if (!(this.
|
|
2002
|
+
if (!(this.y93_1 === tmp0_other_with_cast.y93_1))
|
|
2003
2003
|
return false;
|
|
2004
2004
|
return true;
|
|
2005
2005
|
};
|
|
@@ -2014,20 +2014,20 @@
|
|
|
2014
2014
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.ollama.client.dto.OllamaToolCallDTO.Call', this, 2);
|
|
2015
2015
|
tmp0_serialDesc.m16('name', false);
|
|
2016
2016
|
tmp0_serialDesc.m16('arguments', false);
|
|
2017
|
-
this.
|
|
2017
|
+
this.e98_1 = tmp0_serialDesc;
|
|
2018
2018
|
}
|
|
2019
|
-
protoOf($serializer_6).
|
|
2020
|
-
var tmp0_desc = this.
|
|
2019
|
+
protoOf($serializer_6).f98 = function (encoder, value) {
|
|
2020
|
+
var tmp0_desc = this.e98_1;
|
|
2021
2021
|
var tmp1_output = encoder.wy(tmp0_desc);
|
|
2022
|
-
tmp1_output.l10(tmp0_desc, 0, value.
|
|
2023
|
-
tmp1_output.n10(tmp0_desc, 1, JsonElementSerializer_getInstance(), value.
|
|
2022
|
+
tmp1_output.l10(tmp0_desc, 0, value.t95_1);
|
|
2023
|
+
tmp1_output.n10(tmp0_desc, 1, JsonElementSerializer_getInstance(), value.u95_1);
|
|
2024
2024
|
tmp1_output.xy(tmp0_desc);
|
|
2025
2025
|
};
|
|
2026
2026
|
protoOf($serializer_6).gv = function (encoder, value) {
|
|
2027
|
-
return this.
|
|
2027
|
+
return this.f98(encoder, value instanceof Call_0 ? value : THROW_CCE());
|
|
2028
2028
|
};
|
|
2029
2029
|
protoOf($serializer_6).hv = function (decoder) {
|
|
2030
|
-
var tmp0_desc = this.
|
|
2030
|
+
var tmp0_desc = this.e98_1;
|
|
2031
2031
|
var tmp1_flag = true;
|
|
2032
2032
|
var tmp2_index = 0;
|
|
2033
2033
|
var tmp3_bitMask0 = 0;
|
|
@@ -2062,7 +2062,7 @@
|
|
|
2062
2062
|
return Call_init_$Create$_0(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
2063
2063
|
};
|
|
2064
2064
|
protoOf($serializer_6).fv = function () {
|
|
2065
|
-
return this.
|
|
2065
|
+
return this.e98_1;
|
|
2066
2066
|
};
|
|
2067
2067
|
protoOf($serializer_6).d17 = function () {
|
|
2068
2068
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -2078,25 +2078,25 @@
|
|
|
2078
2078
|
}
|
|
2079
2079
|
function Call_init_$Init$(seen0, name, arguments_0, serializationConstructorMarker, $this) {
|
|
2080
2080
|
if (!(3 === (3 & seen0))) {
|
|
2081
|
-
throwMissingFieldException(seen0, 3, $serializer_getInstance_6().
|
|
2081
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_6().e98_1);
|
|
2082
2082
|
}
|
|
2083
|
-
$this.
|
|
2084
|
-
$this.
|
|
2083
|
+
$this.t95_1 = name;
|
|
2084
|
+
$this.u95_1 = arguments_0;
|
|
2085
2085
|
return $this;
|
|
2086
2086
|
}
|
|
2087
2087
|
function Call_init_$Create$_0(seen0, name, arguments_0, serializationConstructorMarker) {
|
|
2088
2088
|
return Call_init_$Init$(seen0, name, arguments_0, serializationConstructorMarker, objectCreate(protoOf(Call_0)));
|
|
2089
2089
|
}
|
|
2090
2090
|
function Call_0(name, arguments_0) {
|
|
2091
|
-
this.
|
|
2092
|
-
this.
|
|
2091
|
+
this.t95_1 = name;
|
|
2092
|
+
this.u95_1 = arguments_0;
|
|
2093
2093
|
}
|
|
2094
2094
|
protoOf(Call_0).toString = function () {
|
|
2095
|
-
return 'Call(name=' + this.
|
|
2095
|
+
return 'Call(name=' + this.t95_1 + ', arguments=' + toString(this.u95_1) + ')';
|
|
2096
2096
|
};
|
|
2097
2097
|
protoOf(Call_0).hashCode = function () {
|
|
2098
|
-
var result = getStringHashCode(this.
|
|
2099
|
-
result = imul(result, 31) + hashCode(this.
|
|
2098
|
+
var result = getStringHashCode(this.t95_1);
|
|
2099
|
+
result = imul(result, 31) + hashCode(this.u95_1) | 0;
|
|
2100
2100
|
return result;
|
|
2101
2101
|
};
|
|
2102
2102
|
protoOf(Call_0).equals = function (other) {
|
|
@@ -2105,9 +2105,9 @@
|
|
|
2105
2105
|
if (!(other instanceof Call_0))
|
|
2106
2106
|
return false;
|
|
2107
2107
|
var tmp0_other_with_cast = other instanceof Call_0 ? other : THROW_CCE();
|
|
2108
|
-
if (!(this.
|
|
2108
|
+
if (!(this.t95_1 === tmp0_other_with_cast.t95_1))
|
|
2109
2109
|
return false;
|
|
2110
|
-
if (!equals(this.
|
|
2110
|
+
if (!equals(this.u95_1, tmp0_other_with_cast.u95_1))
|
|
2111
2111
|
return false;
|
|
2112
2112
|
return true;
|
|
2113
2113
|
};
|
|
@@ -2121,19 +2121,19 @@
|
|
|
2121
2121
|
$serializer_instance_7 = this;
|
|
2122
2122
|
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.ollama.client.dto.OllamaToolCallDTO', this, 1);
|
|
2123
2123
|
tmp0_serialDesc.m16('function', false);
|
|
2124
|
-
this.
|
|
2124
|
+
this.g98_1 = tmp0_serialDesc;
|
|
2125
2125
|
}
|
|
2126
|
-
protoOf($serializer_7).
|
|
2127
|
-
var tmp0_desc = this.
|
|
2126
|
+
protoOf($serializer_7).h98 = function (encoder, value) {
|
|
2127
|
+
var tmp0_desc = this.g98_1;
|
|
2128
2128
|
var tmp1_output = encoder.wy(tmp0_desc);
|
|
2129
|
-
tmp1_output.n10(tmp0_desc, 0, $serializer_getInstance_6(), value.
|
|
2129
|
+
tmp1_output.n10(tmp0_desc, 0, $serializer_getInstance_6(), value.v95_1);
|
|
2130
2130
|
tmp1_output.xy(tmp0_desc);
|
|
2131
2131
|
};
|
|
2132
2132
|
protoOf($serializer_7).gv = function (encoder, value) {
|
|
2133
|
-
return this.
|
|
2133
|
+
return this.h98(encoder, value instanceof OllamaToolCallDTO ? value : THROW_CCE());
|
|
2134
2134
|
};
|
|
2135
2135
|
protoOf($serializer_7).hv = function (decoder) {
|
|
2136
|
-
var tmp0_desc = this.
|
|
2136
|
+
var tmp0_desc = this.g98_1;
|
|
2137
2137
|
var tmp1_flag = true;
|
|
2138
2138
|
var tmp2_index = 0;
|
|
2139
2139
|
var tmp3_bitMask0 = 0;
|
|
@@ -2161,7 +2161,7 @@
|
|
|
2161
2161
|
return OllamaToolCallDTO_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
|
|
2162
2162
|
};
|
|
2163
2163
|
protoOf($serializer_7).fv = function () {
|
|
2164
|
-
return this.
|
|
2164
|
+
return this.g98_1;
|
|
2165
2165
|
};
|
|
2166
2166
|
protoOf($serializer_7).d17 = function () {
|
|
2167
2167
|
// Inline function 'kotlin.arrayOf' call
|
|
@@ -2177,22 +2177,22 @@
|
|
|
2177
2177
|
}
|
|
2178
2178
|
function OllamaToolCallDTO_init_$Init$(seen0, function_0, serializationConstructorMarker, $this) {
|
|
2179
2179
|
if (!(1 === (1 & seen0))) {
|
|
2180
|
-
throwMissingFieldException(seen0, 1, $serializer_getInstance_7().
|
|
2180
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_7().g98_1);
|
|
2181
2181
|
}
|
|
2182
|
-
$this.
|
|
2182
|
+
$this.v95_1 = function_0;
|
|
2183
2183
|
return $this;
|
|
2184
2184
|
}
|
|
2185
2185
|
function OllamaToolCallDTO_init_$Create$(seen0, function_0, serializationConstructorMarker) {
|
|
2186
2186
|
return OllamaToolCallDTO_init_$Init$(seen0, function_0, serializationConstructorMarker, objectCreate(protoOf(OllamaToolCallDTO)));
|
|
2187
2187
|
}
|
|
2188
2188
|
function OllamaToolCallDTO(function_0) {
|
|
2189
|
-
this.
|
|
2189
|
+
this.v95_1 = function_0;
|
|
2190
2190
|
}
|
|
2191
2191
|
protoOf(OllamaToolCallDTO).toString = function () {
|
|
2192
|
-
return 'OllamaToolCallDTO(function=' + this.
|
|
2192
|
+
return 'OllamaToolCallDTO(function=' + this.v95_1.toString() + ')';
|
|
2193
2193
|
};
|
|
2194
2194
|
protoOf(OllamaToolCallDTO).hashCode = function () {
|
|
2195
|
-
return this.
|
|
2195
|
+
return this.v95_1.hashCode();
|
|
2196
2196
|
};
|
|
2197
2197
|
protoOf(OllamaToolCallDTO).equals = function (other) {
|
|
2198
2198
|
if (this === other)
|
|
@@ -2200,7 +2200,7 @@
|
|
|
2200
2200
|
if (!(other instanceof OllamaToolCallDTO))
|
|
2201
2201
|
return false;
|
|
2202
2202
|
var tmp0_other_with_cast = other instanceof OllamaToolCallDTO ? other : THROW_CCE();
|
|
2203
|
-
if (!this.
|
|
2203
|
+
if (!this.v95_1.equals(tmp0_other_with_cast.v95_1))
|
|
2204
2204
|
return false;
|
|
2205
2205
|
return true;
|
|
2206
2206
|
};
|
|
@@ -2208,30 +2208,30 @@
|
|
|
2208
2208
|
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
2209
2209
|
var builder = new JsonObjectBuilder();
|
|
2210
2210
|
// Inline function 'kotlin.collections.map' call
|
|
2211
|
-
var this_0 = plus(_this__u8e3s4.
|
|
2211
|
+
var this_0 = plus(_this__u8e3s4.y7x_1, _this__u8e3s4.z7x_1);
|
|
2212
2212
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2213
2213
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2214
2214
|
var _iterator__ex2g4s = this_0.p();
|
|
2215
2215
|
while (_iterator__ex2g4s.q()) {
|
|
2216
2216
|
var item = _iterator__ex2g4s.r();
|
|
2217
|
-
var tmp$ret$0 = builder.g1k(item.
|
|
2217
|
+
var tmp$ret$0 = builder.g1k(item.a7y_1, toJSONSchema$toolParameterToSchema(item.c7y_1, item.b7y_1));
|
|
2218
2218
|
destination.h(tmp$ret$0);
|
|
2219
2219
|
}
|
|
2220
2220
|
var properties = builder.s1i();
|
|
2221
2221
|
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
2222
2222
|
var builder_0 = new JsonObjectBuilder();
|
|
2223
|
-
builder_0.g1k('title', JsonPrimitive(_this__u8e3s4.
|
|
2224
|
-
builder_0.g1k('description', JsonPrimitive(_this__u8e3s4.
|
|
2223
|
+
builder_0.g1k('title', JsonPrimitive(_this__u8e3s4.w7x_1));
|
|
2224
|
+
builder_0.g1k('description', JsonPrimitive(_this__u8e3s4.x7x_1));
|
|
2225
2225
|
builder_0.g1k('type', JsonPrimitive('object'));
|
|
2226
2226
|
builder_0.g1k('properties', new JsonObject(properties));
|
|
2227
2227
|
// Inline function 'kotlin.collections.map' call
|
|
2228
|
-
var this_1 = _this__u8e3s4.
|
|
2228
|
+
var this_1 = _this__u8e3s4.y7x_1;
|
|
2229
2229
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2230
2230
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
2231
2231
|
var _iterator__ex2g4s_0 = this_1.p();
|
|
2232
2232
|
while (_iterator__ex2g4s_0.q()) {
|
|
2233
2233
|
var item_0 = _iterator__ex2g4s_0.r();
|
|
2234
|
-
var tmp$ret$5 = JsonPrimitive(item_0.
|
|
2234
|
+
var tmp$ret$5 = JsonPrimitive(item_0.a7y_1);
|
|
2235
2235
|
destination_0.h(tmp$ret$5);
|
|
2236
2236
|
}
|
|
2237
2237
|
builder_0.g1k('required', new JsonArray(destination_0));
|
|
@@ -2256,7 +2256,7 @@
|
|
|
2256
2256
|
else {
|
|
2257
2257
|
if (type instanceof Enum) {
|
|
2258
2258
|
// Inline function 'kotlin.collections.map' call
|
|
2259
|
-
var this_0 = type.
|
|
2259
|
+
var this_0 = type.s7y_1;
|
|
2260
2260
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2261
2261
|
var destination = ArrayList_init_$Create$(this_0.length);
|
|
2262
2262
|
var inductionVariable = 0;
|
|
@@ -2273,22 +2273,22 @@
|
|
|
2273
2273
|
} else {
|
|
2274
2274
|
if (type instanceof List) {
|
|
2275
2275
|
put(builder, 'type', 'array');
|
|
2276
|
-
builder.g1k('items', toJSONSchema$toolParameterToSchema(type.
|
|
2276
|
+
builder.g1k('items', toJSONSchema$toolParameterToSchema(type.q7y_1));
|
|
2277
2277
|
} else {
|
|
2278
2278
|
if (type instanceof Object_0) {
|
|
2279
2279
|
builder.g1k('type', JsonPrimitive('object'));
|
|
2280
2280
|
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
2281
2281
|
var builder_0 = new JsonObjectBuilder();
|
|
2282
2282
|
// Inline function 'kotlin.collections.forEach' call
|
|
2283
|
-
var _iterator__ex2g4s = type.
|
|
2283
|
+
var _iterator__ex2g4s = type.m7y_1.p();
|
|
2284
2284
|
while (_iterator__ex2g4s.q()) {
|
|
2285
2285
|
var element = _iterator__ex2g4s.r();
|
|
2286
|
-
builder_0.g1k(element.
|
|
2286
|
+
builder_0.g1k(element.a7y_1, toJSONSchema$toolParameterToSchema(element.c7y_1, element.b7y_1));
|
|
2287
2287
|
}
|
|
2288
2288
|
var tmp$ret$6 = builder_0.s1i();
|
|
2289
2289
|
builder.g1k('properties', tmp$ret$6);
|
|
2290
2290
|
// Inline function 'kotlin.collections.map' call
|
|
2291
|
-
var this_1 = type.
|
|
2291
|
+
var this_1 = type.n7y_1;
|
|
2292
2292
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2293
2293
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
2294
2294
|
var _iterator__ex2g4s_0 = this_1.p();
|