@xiuper/mpp-core 0.0.2
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 +7836 -0
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -0
- package/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js +1241 -0
- package/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js.map +1 -0
- package/Xiuper-mpp-codegraph.js +1471 -0
- package/Xiuper-mpp-codegraph.js.map +1 -0
- package/annotations.js +15 -0
- package/annotations.js.map +1 -0
- package/autodev-mpp-core.d.ts +1312 -0
- package/autodev-mpp-core.js +86483 -0
- package/autodev-mpp-core.js.map +1 -0
- package/kaml.js +3387 -0
- package/kaml.js.map +1 -0
- package/koog-agents-agents-core.js +22927 -0
- package/koog-agents-agents-core.js.map +1 -0
- package/koog-agents-agents-ext.js +15 -0
- package/koog-agents-agents-ext.js.map +1 -0
- package/koog-agents-agents-features-agents-features-event-handler.js +15 -0
- package/koog-agents-agents-features-agents-features-event-handler.js.map +1 -0
- package/koog-agents-agents-features-agents-features-memory.js +15 -0
- package/koog-agents-agents-features-agents-features-memory.js.map +1 -0
- package/koog-agents-agents-features-agents-features-opentelemetry.js +15 -0
- package/koog-agents-agents-features-agents-features-opentelemetry.js.map +1 -0
- package/koog-agents-agents-features-agents-features-snapshot.js +15 -0
- package/koog-agents-agents-features-agents-features-snapshot.js.map +1 -0
- package/koog-agents-agents-features-agents-features-tokenizer.js +15 -0
- package/koog-agents-agents-features-agents-features-tokenizer.js.map +1 -0
- package/koog-agents-agents-features-agents-features-trace.js +15 -0
- package/koog-agents-agents-features-agents-features-trace.js.map +1 -0
- package/koog-agents-agents-mcp.js +15 -0
- package/koog-agents-agents-mcp.js.map +1 -0
- package/koog-agents-agents-tools.js +322 -0
- package/koog-agents-agents-tools.js.map +1 -0
- package/koog-agents-agents-utils.js +232 -0
- package/koog-agents-agents-utils.js.map +1 -0
- package/koog-embeddings-embeddings-base.js +15 -0
- package/koog-embeddings-embeddings-base.js.map +1 -0
- package/koog-embeddings-embeddings-llm.js +15 -0
- package/koog-embeddings-embeddings-llm.js.map +1 -0
- package/koog-http-client-http-client-core.js +57 -0
- package/koog-http-client-http-client-core.js.map +1 -0
- package/koog-http-client-http-client-ktor.js +703 -0
- package/koog-http-client-http-client-ktor.js.map +1 -0
- package/koog-koog-agents.js +15 -0
- package/koog-koog-agents.js.map +1 -0
- package/koog-prompt-prompt-cache-prompt-cache-files.js +15 -0
- package/koog-prompt-prompt-cache-prompt-cache-files.js.map +1 -0
- package/koog-prompt-prompt-cache-prompt-cache-model.js +15 -0
- package/koog-prompt-prompt-cache-prompt-cache-model.js.map +1 -0
- package/koog-prompt-prompt-cache-prompt-cache-redis.js +15 -0
- package/koog-prompt-prompt-cache-prompt-cache-redis.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-cached.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-cached.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-anthropic-client.js +4991 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-anthropic-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-bedrock-client.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-bedrock-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-dashscope-client.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-dashscope-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js +1249 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js +4675 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-mistralai-client.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-mistralai-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js +2343 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js +6613 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client.js +19901 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js +2313 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients.js +222 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms-all.js +70 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms-all.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms.js +134 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-model.js +42 -0
- package/koog-prompt-prompt-executor-prompt-executor-model.js.map +1 -0
- package/koog-prompt-prompt-llm.js +1710 -0
- package/koog-prompt-prompt-llm.js.map +1 -0
- package/koog-prompt-prompt-markdown.js +122 -0
- package/koog-prompt-prompt-markdown.js.map +1 -0
- package/koog-prompt-prompt-model.js +5848 -0
- package/koog-prompt-prompt-model.js.map +1 -0
- package/koog-prompt-prompt-structure.js +1513 -0
- package/koog-prompt-prompt-structure.js.map +1 -0
- package/koog-prompt-prompt-tokenizer.js +15 -0
- package/koog-prompt-prompt-tokenizer.js.map +1 -0
- package/koog-prompt-prompt-xml.js +15 -0
- package/koog-prompt-prompt-xml.js.map +1 -0
- package/koog-rag-rag-base.js +15 -0
- package/koog-rag-rag-base.js.map +1 -0
- package/koog-rag-vector-storage.js +15 -0
- package/koog-rag-vector-storage.js.map +1 -0
- package/koog-utils.js +63 -0
- package/koog-utils.js.map +1 -0
- package/kotlin-kotlin-stdlib.js +18965 -0
- package/kotlin-kotlin-stdlib.js.map +1 -0
- package/kotlin-logging.js +509 -0
- package/kotlin-logging.js.map +1 -0
- package/kotlin-sdk-kotlin-sdk-client.js +1340 -0
- package/kotlin-sdk-kotlin-sdk-client.js.map +1 -0
- package/kotlin-sdk-kotlin-sdk-core.js +15195 -0
- package/kotlin-sdk-kotlin-sdk-core.js.map +1 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
- package/kotlinx-atomicfu.js +259 -0
- package/kotlinx-atomicfu.js.map +1 -0
- package/kotlinx-coroutines-core.js +13742 -0
- package/kotlinx-coroutines-core.js.map +1 -0
- package/kotlinx-io-kotlinx-io-bytestring.js +214 -0
- package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -0
- package/kotlinx-io-kotlinx-io-core.js +2892 -0
- package/kotlinx-io-kotlinx-io-core.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-core.js +6563 -0
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json-io.js +15 -0
- package/kotlinx-serialization-kotlinx-serialization-json-io.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js +5927 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -0
- package/ktor-ktor-client-content-negotiation.js +775 -0
- package/ktor-ktor-client-content-negotiation.js.map +1 -0
- package/ktor-ktor-client-core.js +11110 -0
- package/ktor-ktor-client-core.js.map +1 -0
- package/ktor-ktor-client-logging.js +15 -0
- package/ktor-ktor-client-logging.js.map +1 -0
- package/ktor-ktor-events.js +126 -0
- package/ktor-ktor-events.js.map +1 -0
- package/ktor-ktor-http-cio.js +4257 -0
- package/ktor-ktor-http-cio.js.map +1 -0
- package/ktor-ktor-http.js +3671 -0
- package/ktor-ktor-http.js.map +1 -0
- package/ktor-ktor-io.js +4114 -0
- package/ktor-ktor-io.js.map +1 -0
- package/ktor-ktor-network.js +1399 -0
- package/ktor-ktor-network.js.map +1 -0
- package/ktor-ktor-serialization-kotlinx-json.js +67 -0
- package/ktor-ktor-serialization-kotlinx-json.js.map +1 -0
- package/ktor-ktor-serialization-kotlinx.js +881 -0
- package/ktor-ktor-serialization-kotlinx.js.map +1 -0
- package/ktor-ktor-serialization.js +388 -0
- package/ktor-ktor-serialization.js.map +1 -0
- package/ktor-ktor-server-cio.js +3735 -0
- package/ktor-ktor-server-cio.js.map +1 -0
- package/ktor-ktor-server-core.js +8696 -0
- package/ktor-ktor-server-core.js.map +1 -0
- package/ktor-ktor-server-sse.js +668 -0
- package/ktor-ktor-server-sse.js.map +1 -0
- package/ktor-ktor-server-websockets.js +15 -0
- package/ktor-ktor-server-websockets.js.map +1 -0
- package/ktor-ktor-sse.js +161 -0
- package/ktor-ktor-sse.js.map +1 -0
- package/ktor-ktor-utils.js +3589 -0
- package/ktor-ktor-utils.js.map +1 -0
- package/ktor-ktor-websocket-serialization.js +15 -0
- package/ktor-ktor-websocket-serialization.js.map +1 -0
- package/ktor-ktor-websockets.js +450 -0
- package/ktor-ktor-websockets.js.map +1 -0
- package/markdown.js +5174 -0
- package/markdown.js.map +1 -0
- package/okio-parent-okio.js +2628 -0
- package/okio-parent-okio.js.map +1 -0
- package/package.json +18 -0
- package/snakeyaml-engine-kmp.js +7079 -0
- package/snakeyaml-engine-kmp.js.map +1 -0
- package/urlencoder-urlencoder-lib.js +322 -0
- package/urlencoder-urlencoder-lib.js.map +1 -0
- package/xiuper-mpp-core.d.ts +1312 -0
- package/xiuper-mpp-core.js +86483 -0
- package/xiuper-mpp-core.js.map +1 -0
package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js
ADDED
|
@@ -0,0 +1,2313 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof define === 'function' && define.amd)
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './kotlin-logging.js', './koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js', './koog-prompt-prompt-llm.js', './ktor-ktor-client-core.js', './Kotlin-DateTime-library-kotlinx-datetime.js', './kotlinx-serialization-kotlinx-serialization-core.js', './koog-prompt-prompt-executor-prompt-executor-clients.js', './koog-prompt-prompt-model.js', './kotlinx-serialization-kotlinx-serialization-json.js'], factory);
|
|
4
|
+
else if (typeof exports === 'object')
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlin-logging.js'), require('./koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js'), require('./koog-prompt-prompt-llm.js'), require('./ktor-ktor-client-core.js'), require('./Kotlin-DateTime-library-kotlinx-datetime.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./koog-prompt-prompt-executor-prompt-executor-clients.js'), require('./koog-prompt-prompt-model.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'.");
|
|
9
|
+
}
|
|
10
|
+
if (typeof globalThis['kotlin-logging'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'. Its dependency 'kotlin-logging' was not found. Please, check whether 'kotlin-logging' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'.");
|
|
12
|
+
}
|
|
13
|
+
if (typeof globalThis['koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'. Its dependency 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base' was not found. Please, check whether 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'.");
|
|
15
|
+
}
|
|
16
|
+
if (typeof globalThis['koog-prompt-prompt-llm'] === 'undefined') {
|
|
17
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'. Its dependency 'koog-prompt-prompt-llm' was not found. Please, check whether 'koog-prompt-prompt-llm' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'.");
|
|
18
|
+
}
|
|
19
|
+
if (typeof globalThis['ktor-ktor-client-core'] === 'undefined') {
|
|
20
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'. Its dependency 'ktor-ktor-client-core' was not found. Please, check whether 'ktor-ktor-client-core' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'.");
|
|
21
|
+
}
|
|
22
|
+
if (typeof globalThis['Kotlin-DateTime-library-kotlinx-datetime'] === 'undefined') {
|
|
23
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'. Its dependency 'Kotlin-DateTime-library-kotlinx-datetime' was not found. Please, check whether 'Kotlin-DateTime-library-kotlinx-datetime' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'.");
|
|
24
|
+
}
|
|
25
|
+
if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {
|
|
26
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'.");
|
|
27
|
+
}
|
|
28
|
+
if (typeof globalThis['koog-prompt-prompt-executor-prompt-executor-clients'] === 'undefined') {
|
|
29
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'. Its dependency 'koog-prompt-prompt-executor-prompt-executor-clients' was not found. Please, check whether 'koog-prompt-prompt-executor-prompt-executor-clients' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'.");
|
|
30
|
+
}
|
|
31
|
+
if (typeof globalThis['koog-prompt-prompt-model'] === 'undefined') {
|
|
32
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'. Its dependency 'koog-prompt-prompt-model' was not found. Please, check whether 'koog-prompt-prompt-model' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'.");
|
|
33
|
+
}
|
|
34
|
+
if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-json'] === 'undefined') {
|
|
35
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'. Its dependency 'kotlinx-serialization-kotlinx-serialization-json' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-json' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'.");
|
|
36
|
+
}
|
|
37
|
+
globalThis['koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'] = factory(typeof globalThis['koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'] === 'undefined' ? {} : globalThis['koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlin-logging'], globalThis['koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base'], globalThis['koog-prompt-prompt-llm'], globalThis['ktor-ktor-client-core'], globalThis['Kotlin-DateTime-library-kotlinx-datetime'], globalThis['kotlinx-serialization-kotlinx-serialization-core'], globalThis['koog-prompt-prompt-executor-prompt-executor-clients'], globalThis['koog-prompt-prompt-model'], globalThis['kotlinx-serialization-kotlinx-serialization-json']);
|
|
38
|
+
}
|
|
39
|
+
}(function (_, kotlin_kotlin, kotlin_io_github_oshai_kotlin_logging, kotlin_ai_koog_prompt_executor_openai_client_base, kotlin_ai_koog_prompt_llm, kotlin_io_ktor_ktor_client_core, kotlin_org_jetbrains_kotlinx_kotlinx_datetime, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_ai_koog_prompt_executor_clients, kotlin_ai_koog_prompt_model, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json) {
|
|
40
|
+
'use strict';
|
|
41
|
+
//region block: imports
|
|
42
|
+
var imul = Math.imul;
|
|
43
|
+
var Unit_instance = kotlin_kotlin.$_$.h6;
|
|
44
|
+
var KotlinLogging_instance = kotlin_io_github_oshai_kotlin_logging.$_$.b;
|
|
45
|
+
var Companion_instance = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.d1;
|
|
46
|
+
var OpenRouter_getInstance = kotlin_ai_koog_prompt_llm.$_$.x;
|
|
47
|
+
var protoOf = kotlin_kotlin.$_$.we;
|
|
48
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.vd;
|
|
49
|
+
var CoroutineImpl = kotlin_kotlin.$_$.tc;
|
|
50
|
+
var firstOrNull = kotlin_kotlin.$_$.s8;
|
|
51
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.dc;
|
|
52
|
+
var checkIndexOverflow = kotlin_kotlin.$_$.n7;
|
|
53
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.wd;
|
|
54
|
+
var AbstractOpenAILLMClient = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.f;
|
|
55
|
+
var VOID = kotlin_kotlin.$_$.h;
|
|
56
|
+
var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.b1;
|
|
57
|
+
var System_instance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.b;
|
|
58
|
+
var _Text___init__impl__bp792k = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.l;
|
|
59
|
+
var Text = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.a;
|
|
60
|
+
var OpenAIStaticContent = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.d;
|
|
61
|
+
var toString = kotlin_kotlin.$_$.af;
|
|
62
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.e2;
|
|
63
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.p7;
|
|
64
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
65
|
+
var THROW_CCE = kotlin_kotlin.$_$.zk;
|
|
66
|
+
var getKClass = kotlin_kotlin.$_$.f;
|
|
67
|
+
var arrayOf = kotlin_kotlin.$_$.nl;
|
|
68
|
+
var createKType = kotlin_kotlin.$_$.c;
|
|
69
|
+
var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j4;
|
|
70
|
+
var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x3;
|
|
71
|
+
var isInterface = kotlin_kotlin.$_$.je;
|
|
72
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ud;
|
|
73
|
+
var OpenAIBasedSettings = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.g;
|
|
74
|
+
var ConnectionTimeoutConfig = kotlin_ai_koog_prompt_executor_clients.$_$.b;
|
|
75
|
+
var LLMParams = kotlin_ai_koog_prompt_model.$_$.w;
|
|
76
|
+
var rangeTo = kotlin_kotlin.$_$.mf;
|
|
77
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.re;
|
|
78
|
+
var Collection = kotlin_kotlin.$_$.n6;
|
|
79
|
+
var isBlank = kotlin_kotlin.$_$.eh;
|
|
80
|
+
var equals = kotlin_kotlin.$_$.md;
|
|
81
|
+
var listOf = kotlin_kotlin.$_$.u9;
|
|
82
|
+
var hashCode = kotlin_kotlin.$_$.td;
|
|
83
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
84
|
+
var toString_0 = kotlin_kotlin.$_$.gm;
|
|
85
|
+
var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z2;
|
|
86
|
+
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.o;
|
|
87
|
+
var lazy = kotlin_kotlin.$_$.xl;
|
|
88
|
+
var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i3;
|
|
89
|
+
var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e1;
|
|
90
|
+
var $serializer_getInstance = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.a1;
|
|
91
|
+
var Long = kotlin_kotlin.$_$.sk;
|
|
92
|
+
var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h;
|
|
93
|
+
var LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d1;
|
|
94
|
+
var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i1;
|
|
95
|
+
var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b3;
|
|
96
|
+
var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c3;
|
|
97
|
+
var initMetadataForObject = kotlin_kotlin.$_$.ae;
|
|
98
|
+
var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o3;
|
|
99
|
+
var objectCreate = kotlin_kotlin.$_$.ve;
|
|
100
|
+
var OpenAIBaseLLMStreamResponse = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.c;
|
|
101
|
+
var Companion_instance_0 = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.r;
|
|
102
|
+
var $serializer_getInstance_0 = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.x;
|
|
103
|
+
var Companion_instance_1 = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.t;
|
|
104
|
+
var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c1;
|
|
105
|
+
var DoubleSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z;
|
|
106
|
+
var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f3;
|
|
107
|
+
var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.e;
|
|
108
|
+
var emptyList = kotlin_kotlin.$_$.m8;
|
|
109
|
+
var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;
|
|
110
|
+
var OpenAIToolChoiceSerializer_getInstance = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.z;
|
|
111
|
+
var $serializer_getInstance_1 = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.u;
|
|
112
|
+
var AdditionalPropertiesFlatteningSerializer = kotlin_ai_koog_prompt_executor_clients.$_$.a;
|
|
113
|
+
var $serializer_getInstance_2 = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.y;
|
|
114
|
+
//endregion
|
|
115
|
+
//region block: pre-declaration
|
|
116
|
+
initMetadataForCompanion(Companion);
|
|
117
|
+
initMetadataForCoroutine($processStreamingChunkCOROUTINE$, CoroutineImpl);
|
|
118
|
+
initMetadataForClass(OpenRouterLLMClient, 'OpenRouterLLMClient', VOID, AbstractOpenAILLMClient, VOID, [2, 3]);
|
|
119
|
+
initMetadataForClass(OpenRouterClientSettings, 'OpenRouterClientSettings', OpenRouterClientSettings, OpenAIBasedSettings);
|
|
120
|
+
initMetadataForClass(OpenRouterParams, 'OpenRouterParams', OpenRouterParams, LLMParams);
|
|
121
|
+
initMetadataForCompanion(Companion_0);
|
|
122
|
+
initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
123
|
+
initMetadataForClass(OpenRouterChatCompletionResponse, 'OpenRouterChatCompletionResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_3});
|
|
124
|
+
initMetadataForCompanion(Companion_1);
|
|
125
|
+
initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
126
|
+
initMetadataForClass(OpenRouterChatCompletionStreamResponse, 'OpenRouterChatCompletionStreamResponse', VOID, VOID, [OpenAIBaseLLMStreamResponse], VOID, VOID, {0: $serializer_getInstance_4});
|
|
127
|
+
initMetadataForCompanion(Companion_2);
|
|
128
|
+
initMetadataForObject($serializer_1, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
129
|
+
initMetadataForClass(OpenRouterChatCompletionRequest, 'OpenRouterChatCompletionRequest', OpenRouterChatCompletionRequest, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_5});
|
|
130
|
+
initMetadataForCompanion(Companion_3);
|
|
131
|
+
initMetadataForObject($serializer_2, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
132
|
+
initMetadataForClass(ProviderPreferences, 'ProviderPreferences', ProviderPreferences, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_6});
|
|
133
|
+
initMetadataForObject(OpenRouterChatCompletionRequestSerializer, 'OpenRouterChatCompletionRequestSerializer', VOID, AdditionalPropertiesFlatteningSerializer);
|
|
134
|
+
initMetadataForCompanion(Companion_4);
|
|
135
|
+
initMetadataForObject($serializer_3, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
136
|
+
initMetadataForClass(OpenRouterChoice, 'OpenRouterChoice', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_7});
|
|
137
|
+
initMetadataForObject($serializer_4, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
138
|
+
initMetadataForClass(OpenRouterStreamChoice, 'OpenRouterStreamChoice', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_8});
|
|
139
|
+
initMetadataForCompanion(Companion_5);
|
|
140
|
+
initMetadataForObject($serializer_5, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
141
|
+
initMetadataForClass(OpenRouterStreamDelta, 'OpenRouterStreamDelta', OpenRouterStreamDelta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_9});
|
|
142
|
+
initMetadataForCompanion(Companion_6);
|
|
143
|
+
initMetadataForObject($serializer_6, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
144
|
+
initMetadataForClass(ErrorResponse, 'ErrorResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_10});
|
|
145
|
+
//endregion
|
|
146
|
+
function OpenRouterLLMClient$Companion$staticLogger$lambda() {
|
|
147
|
+
return Unit_instance;
|
|
148
|
+
}
|
|
149
|
+
function Companion() {
|
|
150
|
+
Companion_instance_2 = this;
|
|
151
|
+
var tmp = this;
|
|
152
|
+
var tmp_0 = KotlinLogging_instance;
|
|
153
|
+
tmp.rfs_1 = tmp_0.a3j(OpenRouterLLMClient$Companion$staticLogger$lambda);
|
|
154
|
+
Companion_instance.p8e(OpenRouter_getInstance());
|
|
155
|
+
}
|
|
156
|
+
var Companion_instance_2;
|
|
157
|
+
function Companion_getInstance() {
|
|
158
|
+
if (Companion_instance_2 == null)
|
|
159
|
+
new Companion();
|
|
160
|
+
return Companion_instance_2;
|
|
161
|
+
}
|
|
162
|
+
function $processStreamingChunkCOROUTINE$(_this__u8e3s4, _this__u8e3s4_0, chunk, resultContinuation) {
|
|
163
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
164
|
+
this.aft_1 = _this__u8e3s4;
|
|
165
|
+
this.bft_1 = _this__u8e3s4_0;
|
|
166
|
+
this.cft_1 = chunk;
|
|
167
|
+
}
|
|
168
|
+
protoOf($processStreamingChunkCOROUTINE$).fa = function () {
|
|
169
|
+
var suspendResult = this.z9_1;
|
|
170
|
+
$sm: do
|
|
171
|
+
try {
|
|
172
|
+
var tmp = this.x9_1;
|
|
173
|
+
switch (tmp) {
|
|
174
|
+
case 0:
|
|
175
|
+
this.y9_1 = 10;
|
|
176
|
+
this.dft_1 = firstOrNull(this.cft_1.jfu_1);
|
|
177
|
+
if (this.dft_1 == null) {
|
|
178
|
+
this.eft_1 = null;
|
|
179
|
+
this.x9_1 = 9;
|
|
180
|
+
continue $sm;
|
|
181
|
+
} else {
|
|
182
|
+
var tmp_0 = this;
|
|
183
|
+
tmp_0.fft_1 = this.dft_1;
|
|
184
|
+
this.gft_1 = this.fft_1;
|
|
185
|
+
var tmp_1 = this;
|
|
186
|
+
tmp_1.hft_1 = this.gft_1;
|
|
187
|
+
this.ift_1 = this.hft_1;
|
|
188
|
+
this.jft_1 = this.ift_1.vfu_1.qfu_1;
|
|
189
|
+
if (this.jft_1 == null) {
|
|
190
|
+
this.kft_1 = null;
|
|
191
|
+
this.x9_1 = 2;
|
|
192
|
+
continue $sm;
|
|
193
|
+
} else {
|
|
194
|
+
var tmp_2 = this;
|
|
195
|
+
tmp_2.lft_1 = this.jft_1;
|
|
196
|
+
this.mft_1 = this.lft_1;
|
|
197
|
+
var tmp_3 = this;
|
|
198
|
+
tmp_3.nft_1 = this.mft_1;
|
|
199
|
+
this.oft_1 = this.nft_1;
|
|
200
|
+
this.x9_1 = 1;
|
|
201
|
+
suspendResult = this.bft_1.k4d(this.oft_1, this);
|
|
202
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
203
|
+
return suspendResult;
|
|
204
|
+
}
|
|
205
|
+
continue $sm;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
case 1:
|
|
210
|
+
var tmp_4 = this;
|
|
211
|
+
tmp_4.kft_1 = Unit_instance;
|
|
212
|
+
this.x9_1 = 2;
|
|
213
|
+
continue $sm;
|
|
214
|
+
case 2:
|
|
215
|
+
this.pft_1 = this.ift_1.vfu_1.sfu_1;
|
|
216
|
+
if (this.pft_1 == null) {
|
|
217
|
+
this.qft_1 = null;
|
|
218
|
+
this.x9_1 = 6;
|
|
219
|
+
continue $sm;
|
|
220
|
+
} else {
|
|
221
|
+
var tmp_5 = this;
|
|
222
|
+
tmp_5.rft_1 = this.pft_1;
|
|
223
|
+
this.sft_1 = this.rft_1;
|
|
224
|
+
this.tft_1 = 0;
|
|
225
|
+
this.uft_1 = this.sft_1.p();
|
|
226
|
+
this.x9_1 = 3;
|
|
227
|
+
continue $sm;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
case 3:
|
|
231
|
+
if (!this.uft_1.q()) {
|
|
232
|
+
this.x9_1 = 5;
|
|
233
|
+
continue $sm;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
this.vft_1 = this.uft_1.r();
|
|
237
|
+
var tmp_6 = this;
|
|
238
|
+
var _unary__edvuaz = this.tft_1;
|
|
239
|
+
this.tft_1 = _unary__edvuaz + 1 | 0;
|
|
240
|
+
tmp_6.wft_1 = checkIndexOverflow(_unary__edvuaz);
|
|
241
|
+
var tmp_7 = this;
|
|
242
|
+
tmp_7.xft_1 = this.vft_1;
|
|
243
|
+
this.yft_1 = this.wft_1;
|
|
244
|
+
this.zft_1 = this.xft_1;
|
|
245
|
+
this.afu_1 = this.zft_1.l8h_1;
|
|
246
|
+
this.bfu_1 = this.zft_1.m8h_1.j8h_1;
|
|
247
|
+
this.cfu_1 = this.zft_1.m8h_1.k8h_1;
|
|
248
|
+
this.x9_1 = 4;
|
|
249
|
+
suspendResult = this.bft_1.m4d(this.yft_1, this.afu_1, this.bfu_1, this.cfu_1, this);
|
|
250
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
251
|
+
return suspendResult;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
continue $sm;
|
|
255
|
+
case 4:
|
|
256
|
+
this.x9_1 = 3;
|
|
257
|
+
continue $sm;
|
|
258
|
+
case 5:
|
|
259
|
+
this.qft_1 = Unit_instance;
|
|
260
|
+
this.x9_1 = 6;
|
|
261
|
+
continue $sm;
|
|
262
|
+
case 6:
|
|
263
|
+
this.dfu_1 = this.ift_1.tfu_1;
|
|
264
|
+
if (this.dfu_1 == null) {
|
|
265
|
+
this.efu_1 = null;
|
|
266
|
+
this.x9_1 = 8;
|
|
267
|
+
continue $sm;
|
|
268
|
+
} else {
|
|
269
|
+
var tmp_8 = this;
|
|
270
|
+
tmp_8.ffu_1 = this.dfu_1;
|
|
271
|
+
this.gfu_1 = this.ffu_1;
|
|
272
|
+
var tmp_9 = this;
|
|
273
|
+
tmp_9.hfu_1 = this.gfu_1;
|
|
274
|
+
this.ifu_1 = this.hfu_1;
|
|
275
|
+
this.x9_1 = 7;
|
|
276
|
+
suspendResult = this.bft_1.l4d(this.ifu_1, this.aft_1.p8h(this.cft_1.pfu_1), this);
|
|
277
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
278
|
+
return suspendResult;
|
|
279
|
+
}
|
|
280
|
+
continue $sm;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
case 7:
|
|
284
|
+
var tmp_10 = this;
|
|
285
|
+
tmp_10.efu_1 = Unit_instance;
|
|
286
|
+
this.x9_1 = 8;
|
|
287
|
+
continue $sm;
|
|
288
|
+
case 8:
|
|
289
|
+
this.eft_1 = this.efu_1;
|
|
290
|
+
this.x9_1 = 9;
|
|
291
|
+
continue $sm;
|
|
292
|
+
case 9:
|
|
293
|
+
return Unit_instance;
|
|
294
|
+
case 10:
|
|
295
|
+
throw this.aa_1;
|
|
296
|
+
}
|
|
297
|
+
} catch ($p) {
|
|
298
|
+
var e = $p;
|
|
299
|
+
if (this.y9_1 === 10) {
|
|
300
|
+
throw e;
|
|
301
|
+
} else {
|
|
302
|
+
this.x9_1 = this.y9_1;
|
|
303
|
+
this.aa_1 = e;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
while (true);
|
|
307
|
+
};
|
|
308
|
+
function OpenRouterLLMClient(apiKey, settings, baseClient, clock) {
|
|
309
|
+
Companion_getInstance();
|
|
310
|
+
settings = settings === VOID ? new OpenRouterClientSettings() : settings;
|
|
311
|
+
baseClient = baseClient === VOID ? HttpClient() : baseClient;
|
|
312
|
+
clock = clock === VOID ? System_instance : clock;
|
|
313
|
+
AbstractOpenAILLMClient.call(this, apiKey, settings, baseClient, clock, Companion_getInstance().rfs_1);
|
|
314
|
+
this.efv_1 = settings;
|
|
315
|
+
}
|
|
316
|
+
protoOf(OpenRouterLLMClient).q8g = function (messages, model, tools, toolChoice, params, stream) {
|
|
317
|
+
var openRouterParams = toOpenRouterParams(params);
|
|
318
|
+
var responseFormat = this.v8h(params.y43_1, model);
|
|
319
|
+
var tmp0_safe_receiver = openRouterParams.z43_1;
|
|
320
|
+
var tmp = tmp0_safe_receiver == null ? null : this.p8g(tmp0_safe_receiver);
|
|
321
|
+
var tmp1_safe_receiver = openRouterParams.x43_1;
|
|
322
|
+
var tmp_0;
|
|
323
|
+
if (tmp1_safe_receiver == null) {
|
|
324
|
+
tmp_0 = null;
|
|
325
|
+
} else {
|
|
326
|
+
// Inline function 'kotlin.let' call
|
|
327
|
+
tmp_0 = new OpenAIStaticContent(new Text(_Text___init__impl__bp792k(tmp1_safe_receiver)));
|
|
328
|
+
}
|
|
329
|
+
var request = new OpenRouterChatCompletionRequest(messages, VOID, model.c3i_1, stream, openRouterParams.u43_1, tools, tmp, openRouterParams.ufv_1, openRouterParams.tfv_1, openRouterParams.v43_1, openRouterParams.pfv_1, openRouterParams.qfv_1, responseFormat, openRouterParams.sfv_1, openRouterParams.rfv_1, VOID, openRouterParams.vfv_1, openRouterParams.wfv_1, VOID, openRouterParams.xfv_1, openRouterParams.yfv_1, tmp_0, openRouterParams.zfv_1, openRouterParams.afw_1, openRouterParams.bfw_1, openRouterParams.cfw_1, openRouterParams.a44_1, openRouterParams.d44_1);
|
|
330
|
+
return this.y8d_1.gw(OpenRouterChatCompletionRequestSerializer_getInstance(), request);
|
|
331
|
+
};
|
|
332
|
+
protoOf(OpenRouterLLMClient).dfw = function (response) {
|
|
333
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
334
|
+
// Inline function 'kotlin.require' call
|
|
335
|
+
if (!!response.efw_1.m()) {
|
|
336
|
+
var message = 'Empty choices in response';
|
|
337
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
338
|
+
}
|
|
339
|
+
// Inline function 'kotlin.collections.map' call
|
|
340
|
+
var this_0 = response.efw_1;
|
|
341
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
342
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
343
|
+
var _iterator__ex2g4s = this_0.p();
|
|
344
|
+
while (_iterator__ex2g4s.q()) {
|
|
345
|
+
var item = _iterator__ex2g4s.r();
|
|
346
|
+
var tmp$ret$3 = this.x8g(item.nfw_1, item.lfw_1, this.p8h(response.kfw_1));
|
|
347
|
+
destination.h(tmp$ret$3);
|
|
348
|
+
}
|
|
349
|
+
return destination;
|
|
350
|
+
};
|
|
351
|
+
protoOf(OpenRouterLLMClient).m8g = function (response) {
|
|
352
|
+
return this.dfw(response instanceof OpenRouterChatCompletionResponse ? response : THROW_CCE());
|
|
353
|
+
};
|
|
354
|
+
protoOf(OpenRouterLLMClient).a8e = function (data) {
|
|
355
|
+
// Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
|
|
356
|
+
var this_0 = this.y8d_1;
|
|
357
|
+
// Inline function 'kotlinx.serialization.serializer' call
|
|
358
|
+
var this_1 = this_0.lz();
|
|
359
|
+
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
360
|
+
var this_2 = serializer(this_1, createKType(getKClass(OpenRouterChatCompletionStreamResponse), arrayOf([]), false));
|
|
361
|
+
var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
|
|
362
|
+
return this_0.hw(tmp$ret$1, data);
|
|
363
|
+
};
|
|
364
|
+
protoOf(OpenRouterLLMClient).r8g = function (data) {
|
|
365
|
+
// Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
|
|
366
|
+
var this_0 = this.y8d_1;
|
|
367
|
+
// Inline function 'kotlinx.serialization.serializer' call
|
|
368
|
+
var this_1 = this_0.lz();
|
|
369
|
+
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
370
|
+
var this_2 = serializer(this_1, createKType(getKClass(OpenRouterChatCompletionResponse), arrayOf([]), false));
|
|
371
|
+
var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
|
|
372
|
+
return this_0.hw(tmp$ret$1, data);
|
|
373
|
+
};
|
|
374
|
+
protoOf(OpenRouterLLMClient).pfw = function (_this__u8e3s4, chunk, $completion) {
|
|
375
|
+
var tmp = new $processStreamingChunkCOROUTINE$(this, _this__u8e3s4, chunk, $completion);
|
|
376
|
+
tmp.z9_1 = Unit_instance;
|
|
377
|
+
tmp.aa_1 = null;
|
|
378
|
+
return tmp.fa();
|
|
379
|
+
};
|
|
380
|
+
protoOf(OpenRouterLLMClient).o8e = function (_this__u8e3s4, chunk, $completion) {
|
|
381
|
+
return this.pfw(_this__u8e3s4, chunk instanceof OpenRouterChatCompletionStreamResponse ? chunk : THROW_CCE(), $completion);
|
|
382
|
+
};
|
|
383
|
+
function OpenRouterClientSettings(baseUrl, chatCompletionsPath, timeoutConfig) {
|
|
384
|
+
baseUrl = baseUrl === VOID ? 'https://openrouter.ai' : baseUrl;
|
|
385
|
+
chatCompletionsPath = chatCompletionsPath === VOID ? 'api/v1/chat/completions' : chatCompletionsPath;
|
|
386
|
+
timeoutConfig = timeoutConfig === VOID ? new ConnectionTimeoutConfig() : timeoutConfig;
|
|
387
|
+
OpenAIBasedSettings.call(this, baseUrl, chatCompletionsPath, timeoutConfig);
|
|
388
|
+
}
|
|
389
|
+
function OpenRouterParams(temperature, maxTokens, numberOfChoices, speculation, schema, toolChoice, user, includeThoughts, thinkingBudget, additionalProperties, frequencyPenalty, presencePenalty, logprobs, stop, topLogprobs, topP, topK, repetitionPenalty, minP, topA, transforms, models, route, provider) {
|
|
390
|
+
temperature = temperature === VOID ? null : temperature;
|
|
391
|
+
maxTokens = maxTokens === VOID ? null : maxTokens;
|
|
392
|
+
numberOfChoices = numberOfChoices === VOID ? null : numberOfChoices;
|
|
393
|
+
speculation = speculation === VOID ? null : speculation;
|
|
394
|
+
schema = schema === VOID ? null : schema;
|
|
395
|
+
toolChoice = toolChoice === VOID ? null : toolChoice;
|
|
396
|
+
user = user === VOID ? null : user;
|
|
397
|
+
includeThoughts = includeThoughts === VOID ? null : includeThoughts;
|
|
398
|
+
thinkingBudget = thinkingBudget === VOID ? null : thinkingBudget;
|
|
399
|
+
additionalProperties = additionalProperties === VOID ? null : additionalProperties;
|
|
400
|
+
frequencyPenalty = frequencyPenalty === VOID ? null : frequencyPenalty;
|
|
401
|
+
presencePenalty = presencePenalty === VOID ? null : presencePenalty;
|
|
402
|
+
logprobs = logprobs === VOID ? null : logprobs;
|
|
403
|
+
stop = stop === VOID ? null : stop;
|
|
404
|
+
topLogprobs = topLogprobs === VOID ? null : topLogprobs;
|
|
405
|
+
topP = topP === VOID ? null : topP;
|
|
406
|
+
topK = topK === VOID ? null : topK;
|
|
407
|
+
repetitionPenalty = repetitionPenalty === VOID ? null : repetitionPenalty;
|
|
408
|
+
minP = minP === VOID ? null : minP;
|
|
409
|
+
topA = topA === VOID ? null : topA;
|
|
410
|
+
transforms = transforms === VOID ? null : transforms;
|
|
411
|
+
models = models === VOID ? null : models;
|
|
412
|
+
route = route === VOID ? null : route;
|
|
413
|
+
provider = provider === VOID ? null : provider;
|
|
414
|
+
LLMParams.call(this, temperature, maxTokens, numberOfChoices, speculation, schema, toolChoice, user, includeThoughts, thinkingBudget, additionalProperties);
|
|
415
|
+
this.pfv_1 = frequencyPenalty;
|
|
416
|
+
this.qfv_1 = presencePenalty;
|
|
417
|
+
this.rfv_1 = logprobs;
|
|
418
|
+
this.sfv_1 = stop;
|
|
419
|
+
this.tfv_1 = topLogprobs;
|
|
420
|
+
this.ufv_1 = topP;
|
|
421
|
+
this.vfv_1 = topK;
|
|
422
|
+
this.wfv_1 = repetitionPenalty;
|
|
423
|
+
this.xfv_1 = minP;
|
|
424
|
+
this.yfv_1 = topA;
|
|
425
|
+
this.zfv_1 = transforms;
|
|
426
|
+
this.afw_1 = models;
|
|
427
|
+
this.bfw_1 = route;
|
|
428
|
+
this.cfw_1 = provider;
|
|
429
|
+
// Inline function 'kotlin.require' call
|
|
430
|
+
if (!(this.ufv_1 == null || rangeTo(0.0, 1.0).k1(this.ufv_1))) {
|
|
431
|
+
var message = 'topP must be in (0.0, 1.0], but was ' + this.ufv_1;
|
|
432
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
433
|
+
}
|
|
434
|
+
if (!(this.tfv_1 == null)) {
|
|
435
|
+
// Inline function 'kotlin.require' call
|
|
436
|
+
if (!(this.rfv_1 === true)) {
|
|
437
|
+
var message_0 = '`topLogprobs` requires `logprobs=true`.';
|
|
438
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
439
|
+
}
|
|
440
|
+
// Inline function 'kotlin.require' call
|
|
441
|
+
if (!numberRangeToNumber(0, 20).go(this.tfv_1)) {
|
|
442
|
+
var message_1 = 'topLogprobs must be in [0, 20], but was ' + this.tfv_1;
|
|
443
|
+
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
// Inline function 'kotlin.require' call
|
|
447
|
+
if (!(this.pfv_1 == null || rangeTo(-2.0, 2.0).k1(this.pfv_1))) {
|
|
448
|
+
var message_2 = 'frequencyPenalty must be in [-2.0, 2.0], but was ' + this.pfv_1;
|
|
449
|
+
throw IllegalArgumentException_init_$Create$(toString(message_2));
|
|
450
|
+
}
|
|
451
|
+
// Inline function 'kotlin.require' call
|
|
452
|
+
if (!(this.qfv_1 == null || rangeTo(-2.0, 2.0).k1(this.qfv_1))) {
|
|
453
|
+
var message_3 = 'presencePenalty must be in [-2.0, 2.0], but was ' + this.qfv_1;
|
|
454
|
+
throw IllegalArgumentException_init_$Create$(toString(message_3));
|
|
455
|
+
}
|
|
456
|
+
// Inline function 'kotlin.require' call
|
|
457
|
+
if (!(this.wfv_1 == null || rangeTo(0.0, 2.0).k1(this.wfv_1))) {
|
|
458
|
+
var message_4 = 'repetitionPenalty must be in (0.0, 2.0], but was ' + this.wfv_1;
|
|
459
|
+
throw IllegalArgumentException_init_$Create$(toString(message_4));
|
|
460
|
+
}
|
|
461
|
+
// Inline function 'kotlin.require' call
|
|
462
|
+
if (!(this.vfv_1 == null || this.vfv_1 >= 1)) {
|
|
463
|
+
var message_5 = 'topK must be in [1, Infinity], but was ' + this.vfv_1;
|
|
464
|
+
throw IllegalArgumentException_init_$Create$(toString(message_5));
|
|
465
|
+
}
|
|
466
|
+
// Inline function 'kotlin.require' call
|
|
467
|
+
if (!(this.xfv_1 == null || rangeTo(0.0, 1.0).k1(this.xfv_1))) {
|
|
468
|
+
var message_6 = 'minP must be in [0.0, 1.0], but was ' + this.xfv_1;
|
|
469
|
+
throw IllegalArgumentException_init_$Create$(toString(message_6));
|
|
470
|
+
}
|
|
471
|
+
// Inline function 'kotlin.require' call
|
|
472
|
+
if (!(this.yfv_1 == null || rangeTo(0.0, 1.0).k1(this.yfv_1))) {
|
|
473
|
+
var message_7 = 'topA must be in [0.0, 1.0], but was ' + this.yfv_1;
|
|
474
|
+
throw IllegalArgumentException_init_$Create$(toString(message_7));
|
|
475
|
+
}
|
|
476
|
+
if (!(this.sfv_1 == null)) {
|
|
477
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
478
|
+
// Inline function 'kotlin.require' call
|
|
479
|
+
if (!!this.sfv_1.m()) {
|
|
480
|
+
var message_8 = 'stop must not be empty when provided.';
|
|
481
|
+
throw IllegalArgumentException_init_$Create$(toString(message_8));
|
|
482
|
+
}
|
|
483
|
+
// Inline function 'kotlin.require' call
|
|
484
|
+
if (!(this.sfv_1.s() <= 4)) {
|
|
485
|
+
var message_9 = 'stop supports at most 4 sequences, but was ' + this.sfv_1.s();
|
|
486
|
+
throw IllegalArgumentException_init_$Create$(toString(message_9));
|
|
487
|
+
}
|
|
488
|
+
var tmp0 = this.sfv_1;
|
|
489
|
+
var tmp$ret$23;
|
|
490
|
+
$l$block_0: {
|
|
491
|
+
// Inline function 'kotlin.collections.all' call
|
|
492
|
+
var tmp;
|
|
493
|
+
if (isInterface(tmp0, Collection)) {
|
|
494
|
+
tmp = tmp0.m();
|
|
495
|
+
} else {
|
|
496
|
+
tmp = false;
|
|
497
|
+
}
|
|
498
|
+
if (tmp) {
|
|
499
|
+
tmp$ret$23 = true;
|
|
500
|
+
break $l$block_0;
|
|
501
|
+
}
|
|
502
|
+
var _iterator__ex2g4s = tmp0.p();
|
|
503
|
+
while (_iterator__ex2g4s.q()) {
|
|
504
|
+
var element = _iterator__ex2g4s.r();
|
|
505
|
+
// Inline function 'kotlin.text.isNotBlank' call
|
|
506
|
+
if (!!isBlank(element)) {
|
|
507
|
+
tmp$ret$23 = false;
|
|
508
|
+
break $l$block_0;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
tmp$ret$23 = true;
|
|
512
|
+
}
|
|
513
|
+
// Inline function 'kotlin.require' call
|
|
514
|
+
if (!tmp$ret$23) {
|
|
515
|
+
var message_10 = 'stop sequences must not be blank.';
|
|
516
|
+
throw IllegalArgumentException_init_$Create$(toString(message_10));
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
protoOf(OpenRouterParams).equals = function (other) {
|
|
521
|
+
var tmp;
|
|
522
|
+
if (this === other) {
|
|
523
|
+
tmp = true;
|
|
524
|
+
} else {
|
|
525
|
+
if (!(other instanceof OpenRouterParams)) {
|
|
526
|
+
tmp = false;
|
|
527
|
+
} else {
|
|
528
|
+
tmp = (this.u43_1 == other.u43_1 && this.v43_1 == other.v43_1 && this.w43_1 == other.w43_1 && this.x43_1 == other.x43_1 && equals(this.y43_1, other.y43_1) && equals(this.z43_1, other.z43_1) && this.a44_1 == other.a44_1 && this.b44_1 == other.b44_1 && this.c44_1 == other.c44_1 && equals(this.d44_1, other.d44_1) && this.pfv_1 == other.pfv_1 && this.qfv_1 == other.qfv_1 && this.rfv_1 == other.rfv_1 && equals(this.sfv_1, other.sfv_1) && this.tfv_1 == other.tfv_1 && this.ufv_1 == other.ufv_1 && this.vfv_1 == other.vfv_1 && this.wfv_1 == other.wfv_1 && this.xfv_1 == other.xfv_1 && this.yfv_1 == other.yfv_1 && equals(this.zfv_1, other.zfv_1) && equals(this.afw_1, other.afw_1) && this.bfw_1 == other.bfw_1 && equals(this.cfw_1, other.cfw_1));
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
return tmp;
|
|
532
|
+
};
|
|
533
|
+
protoOf(OpenRouterParams).hashCode = function () {
|
|
534
|
+
// Inline function 'kotlin.collections.fold' call
|
|
535
|
+
var accumulator = 0;
|
|
536
|
+
var _iterator__ex2g4s = listOf([this.u43_1, this.v43_1, this.w43_1, this.x43_1, this.y43_1, this.z43_1, this.a44_1, this.b44_1, this.c44_1, this.d44_1, this.pfv_1, this.qfv_1, this.rfv_1, this.sfv_1, this.tfv_1, this.ufv_1, this.vfv_1, this.wfv_1, this.xfv_1, this.yfv_1, this.zfv_1, this.afw_1, this.bfw_1, this.cfw_1]).p();
|
|
537
|
+
while (_iterator__ex2g4s.q()) {
|
|
538
|
+
var element = _iterator__ex2g4s.r();
|
|
539
|
+
var acc = accumulator;
|
|
540
|
+
var tmp = imul(31, acc);
|
|
541
|
+
var tmp1_elvis_lhs = element == null ? null : hashCode(element);
|
|
542
|
+
accumulator = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
|
|
543
|
+
}
|
|
544
|
+
return accumulator;
|
|
545
|
+
};
|
|
546
|
+
protoOf(OpenRouterParams).toString = function () {
|
|
547
|
+
// Inline function 'kotlin.text.buildString' call
|
|
548
|
+
// Inline function 'kotlin.apply' call
|
|
549
|
+
var this_0 = StringBuilder_init_$Create$();
|
|
550
|
+
this_0.z8('OpenRouterParams(');
|
|
551
|
+
this_0.z8('temperature=' + this.u43_1);
|
|
552
|
+
this_0.z8(', maxTokens=' + this.v43_1);
|
|
553
|
+
this_0.z8(', numberOfChoices=' + this.w43_1);
|
|
554
|
+
this_0.z8(', speculation=' + this.x43_1);
|
|
555
|
+
this_0.z8(', schema=' + toString_0(this.y43_1));
|
|
556
|
+
this_0.z8(', toolChoice=' + toString_0(this.z43_1));
|
|
557
|
+
this_0.z8(', user=' + this.a44_1);
|
|
558
|
+
this_0.z8(', includeThoughts=' + this.b44_1);
|
|
559
|
+
this_0.z8(', thinkingBudget=' + this.c44_1);
|
|
560
|
+
this_0.z8(', additionalProperties=' + toString_0(this.d44_1));
|
|
561
|
+
this_0.z8(', frequencyPenalty=' + this.pfv_1);
|
|
562
|
+
this_0.z8(', presencePenalty=' + this.qfv_1);
|
|
563
|
+
this_0.z8(', logprobs=' + this.rfv_1);
|
|
564
|
+
this_0.z8(', stop=' + toString_0(this.sfv_1));
|
|
565
|
+
this_0.z8(', topLogprobs=' + this.tfv_1);
|
|
566
|
+
this_0.z8(', topP=' + this.ufv_1);
|
|
567
|
+
this_0.z8(', topK=' + this.vfv_1);
|
|
568
|
+
this_0.z8(', repetitionPenalty=' + this.wfv_1);
|
|
569
|
+
this_0.z8(', minP=' + this.xfv_1);
|
|
570
|
+
this_0.z8(', topA=' + this.yfv_1);
|
|
571
|
+
this_0.z8(', transforms=' + toString_0(this.zfv_1));
|
|
572
|
+
this_0.z8(', models=' + toString_0(this.afw_1));
|
|
573
|
+
this_0.z8(', route=' + this.bfw_1);
|
|
574
|
+
this_0.z8(', provider=' + toString_0(this.cfw_1));
|
|
575
|
+
this_0.z8(')');
|
|
576
|
+
return this_0.toString();
|
|
577
|
+
};
|
|
578
|
+
function toOpenRouterParams(_this__u8e3s4) {
|
|
579
|
+
if (_this__u8e3s4 instanceof OpenRouterParams)
|
|
580
|
+
return _this__u8e3s4;
|
|
581
|
+
return new OpenRouterParams(_this__u8e3s4.u43_1, _this__u8e3s4.v43_1, _this__u8e3s4.w43_1, _this__u8e3s4.x43_1, _this__u8e3s4.y43_1, _this__u8e3s4.z43_1, _this__u8e3s4.a44_1, _this__u8e3s4.b44_1, VOID, _this__u8e3s4.d44_1);
|
|
582
|
+
}
|
|
583
|
+
function OpenRouterChatCompletionResponse$Companion$$childSerializers$_anonymous__y1hhni() {
|
|
584
|
+
return new ArrayListSerializer($serializer_getInstance_7());
|
|
585
|
+
}
|
|
586
|
+
function Companion_0() {
|
|
587
|
+
Companion_instance_3 = this;
|
|
588
|
+
var tmp = this;
|
|
589
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
590
|
+
// Inline function 'kotlin.arrayOf' call
|
|
591
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
592
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
593
|
+
tmp.qfw_1 = [lazy(tmp_0, OpenRouterChatCompletionResponse$Companion$$childSerializers$_anonymous__y1hhni), null, null, null, null, null, null];
|
|
594
|
+
}
|
|
595
|
+
var Companion_instance_3;
|
|
596
|
+
function Companion_getInstance_0() {
|
|
597
|
+
if (Companion_instance_3 == null)
|
|
598
|
+
new Companion_0();
|
|
599
|
+
return Companion_instance_3;
|
|
600
|
+
}
|
|
601
|
+
function $serializer() {
|
|
602
|
+
$serializer_instance = this;
|
|
603
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.openrouter.models.OpenRouterChatCompletionResponse', this, 7);
|
|
604
|
+
tmp0_serialDesc.m16('choices', false);
|
|
605
|
+
tmp0_serialDesc.m16('created', false);
|
|
606
|
+
tmp0_serialDesc.m16('id', false);
|
|
607
|
+
tmp0_serialDesc.m16('model', false);
|
|
608
|
+
tmp0_serialDesc.m16('systemFingerprint', true);
|
|
609
|
+
tmp0_serialDesc.m16('object', true);
|
|
610
|
+
tmp0_serialDesc.m16('usage', true);
|
|
611
|
+
this.rfw_1 = tmp0_serialDesc;
|
|
612
|
+
}
|
|
613
|
+
protoOf($serializer).sfw = function (encoder, value) {
|
|
614
|
+
var tmp0_desc = this.rfw_1;
|
|
615
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
616
|
+
var tmp2_cached = Companion_getInstance_0().qfw_1;
|
|
617
|
+
tmp1_output.n10(tmp0_desc, 0, tmp2_cached[0].b1(), value.efw_1);
|
|
618
|
+
tmp1_output.h10(tmp0_desc, 1, value.ffw_1);
|
|
619
|
+
tmp1_output.l10(tmp0_desc, 2, value.gfw_1);
|
|
620
|
+
tmp1_output.l10(tmp0_desc, 3, value.hfw_1);
|
|
621
|
+
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.ifw_1 == null)) {
|
|
622
|
+
tmp1_output.p10(tmp0_desc, 4, StringSerializer_getInstance(), value.ifw_1);
|
|
623
|
+
}
|
|
624
|
+
if (tmp1_output.t10(tmp0_desc, 5) ? true : !(value.jfw_1 === 'chat.completion')) {
|
|
625
|
+
tmp1_output.l10(tmp0_desc, 5, value.jfw_1);
|
|
626
|
+
}
|
|
627
|
+
if (tmp1_output.t10(tmp0_desc, 6) ? true : !(value.kfw_1 == null)) {
|
|
628
|
+
tmp1_output.p10(tmp0_desc, 6, $serializer_getInstance(), value.kfw_1);
|
|
629
|
+
}
|
|
630
|
+
tmp1_output.xy(tmp0_desc);
|
|
631
|
+
};
|
|
632
|
+
protoOf($serializer).gv = function (encoder, value) {
|
|
633
|
+
return this.sfw(encoder, value instanceof OpenRouterChatCompletionResponse ? value : THROW_CCE());
|
|
634
|
+
};
|
|
635
|
+
protoOf($serializer).hv = function (decoder) {
|
|
636
|
+
var tmp0_desc = this.rfw_1;
|
|
637
|
+
var tmp1_flag = true;
|
|
638
|
+
var tmp2_index = 0;
|
|
639
|
+
var tmp3_bitMask0 = 0;
|
|
640
|
+
var tmp4_local0 = null;
|
|
641
|
+
var tmp5_local1 = new Long(0, 0);
|
|
642
|
+
var tmp6_local2 = null;
|
|
643
|
+
var tmp7_local3 = null;
|
|
644
|
+
var tmp8_local4 = null;
|
|
645
|
+
var tmp9_local5 = null;
|
|
646
|
+
var tmp10_local6 = null;
|
|
647
|
+
var tmp11_input = decoder.wy(tmp0_desc);
|
|
648
|
+
var tmp12_cached = Companion_getInstance_0().qfw_1;
|
|
649
|
+
if (tmp11_input.mz()) {
|
|
650
|
+
tmp4_local0 = tmp11_input.iz(tmp0_desc, 0, tmp12_cached[0].b1(), tmp4_local0);
|
|
651
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
652
|
+
tmp5_local1 = tmp11_input.cz(tmp0_desc, 1);
|
|
653
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
654
|
+
tmp6_local2 = tmp11_input.gz(tmp0_desc, 2);
|
|
655
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
656
|
+
tmp7_local3 = tmp11_input.gz(tmp0_desc, 3);
|
|
657
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
658
|
+
tmp8_local4 = tmp11_input.kz(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
|
|
659
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
660
|
+
tmp9_local5 = tmp11_input.gz(tmp0_desc, 5);
|
|
661
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
662
|
+
tmp10_local6 = tmp11_input.kz(tmp0_desc, 6, $serializer_getInstance(), tmp10_local6);
|
|
663
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
664
|
+
} else
|
|
665
|
+
while (tmp1_flag) {
|
|
666
|
+
tmp2_index = tmp11_input.nz(tmp0_desc);
|
|
667
|
+
switch (tmp2_index) {
|
|
668
|
+
case -1:
|
|
669
|
+
tmp1_flag = false;
|
|
670
|
+
break;
|
|
671
|
+
case 0:
|
|
672
|
+
tmp4_local0 = tmp11_input.iz(tmp0_desc, 0, tmp12_cached[0].b1(), tmp4_local0);
|
|
673
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
674
|
+
break;
|
|
675
|
+
case 1:
|
|
676
|
+
tmp5_local1 = tmp11_input.cz(tmp0_desc, 1);
|
|
677
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
678
|
+
break;
|
|
679
|
+
case 2:
|
|
680
|
+
tmp6_local2 = tmp11_input.gz(tmp0_desc, 2);
|
|
681
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
682
|
+
break;
|
|
683
|
+
case 3:
|
|
684
|
+
tmp7_local3 = tmp11_input.gz(tmp0_desc, 3);
|
|
685
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
686
|
+
break;
|
|
687
|
+
case 4:
|
|
688
|
+
tmp8_local4 = tmp11_input.kz(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
|
|
689
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
690
|
+
break;
|
|
691
|
+
case 5:
|
|
692
|
+
tmp9_local5 = tmp11_input.gz(tmp0_desc, 5);
|
|
693
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
694
|
+
break;
|
|
695
|
+
case 6:
|
|
696
|
+
tmp10_local6 = tmp11_input.kz(tmp0_desc, 6, $serializer_getInstance(), tmp10_local6);
|
|
697
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
698
|
+
break;
|
|
699
|
+
default:
|
|
700
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
tmp11_input.xy(tmp0_desc);
|
|
704
|
+
return OpenRouterChatCompletionResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, null);
|
|
705
|
+
};
|
|
706
|
+
protoOf($serializer).fv = function () {
|
|
707
|
+
return this.rfw_1;
|
|
708
|
+
};
|
|
709
|
+
protoOf($serializer).d17 = function () {
|
|
710
|
+
// Inline function 'kotlin.arrayOf' call
|
|
711
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
712
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
713
|
+
return [Companion_getInstance_0().qfw_1[0].b1(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), get_nullable($serializer_getInstance())];
|
|
714
|
+
};
|
|
715
|
+
var $serializer_instance;
|
|
716
|
+
function $serializer_getInstance_3() {
|
|
717
|
+
if ($serializer_instance == null)
|
|
718
|
+
new $serializer();
|
|
719
|
+
return $serializer_instance;
|
|
720
|
+
}
|
|
721
|
+
function OpenRouterChatCompletionResponse_init_$Init$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker, $this) {
|
|
722
|
+
if (!(15 === (15 & seen0))) {
|
|
723
|
+
throwMissingFieldException(seen0, 15, $serializer_getInstance_3().rfw_1);
|
|
724
|
+
}
|
|
725
|
+
$this.efw_1 = choices;
|
|
726
|
+
$this.ffw_1 = created;
|
|
727
|
+
$this.gfw_1 = id;
|
|
728
|
+
$this.hfw_1 = model;
|
|
729
|
+
if (0 === (seen0 & 16))
|
|
730
|
+
$this.ifw_1 = null;
|
|
731
|
+
else
|
|
732
|
+
$this.ifw_1 = systemFingerprint;
|
|
733
|
+
if (0 === (seen0 & 32))
|
|
734
|
+
$this.jfw_1 = 'chat.completion';
|
|
735
|
+
else
|
|
736
|
+
$this.jfw_1 = objectType;
|
|
737
|
+
if (0 === (seen0 & 64))
|
|
738
|
+
$this.kfw_1 = null;
|
|
739
|
+
else
|
|
740
|
+
$this.kfw_1 = usage;
|
|
741
|
+
return $this;
|
|
742
|
+
}
|
|
743
|
+
function OpenRouterChatCompletionResponse_init_$Create$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker) {
|
|
744
|
+
return OpenRouterChatCompletionResponse_init_$Init$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker, objectCreate(protoOf(OpenRouterChatCompletionResponse)));
|
|
745
|
+
}
|
|
746
|
+
function OpenRouterChatCompletionResponse(choices, created, id, model, systemFingerprint, objectType, usage) {
|
|
747
|
+
Companion_getInstance_0();
|
|
748
|
+
systemFingerprint = systemFingerprint === VOID ? null : systemFingerprint;
|
|
749
|
+
objectType = objectType === VOID ? 'chat.completion' : objectType;
|
|
750
|
+
usage = usage === VOID ? null : usage;
|
|
751
|
+
this.efw_1 = choices;
|
|
752
|
+
this.ffw_1 = created;
|
|
753
|
+
this.gfw_1 = id;
|
|
754
|
+
this.hfw_1 = model;
|
|
755
|
+
this.ifw_1 = systemFingerprint;
|
|
756
|
+
this.jfw_1 = objectType;
|
|
757
|
+
this.kfw_1 = usage;
|
|
758
|
+
}
|
|
759
|
+
function OpenRouterChatCompletionStreamResponse$Companion$$childSerializers$_anonymous__wqf30e() {
|
|
760
|
+
return new ArrayListSerializer($serializer_getInstance_8());
|
|
761
|
+
}
|
|
762
|
+
function Companion_1() {
|
|
763
|
+
Companion_instance_4 = this;
|
|
764
|
+
var tmp = this;
|
|
765
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
766
|
+
// Inline function 'kotlin.arrayOf' call
|
|
767
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
768
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
769
|
+
tmp.tfw_1 = [lazy(tmp_0, OpenRouterChatCompletionStreamResponse$Companion$$childSerializers$_anonymous__wqf30e), null, null, null, null, null, null];
|
|
770
|
+
}
|
|
771
|
+
var Companion_instance_4;
|
|
772
|
+
function Companion_getInstance_1() {
|
|
773
|
+
if (Companion_instance_4 == null)
|
|
774
|
+
new Companion_1();
|
|
775
|
+
return Companion_instance_4;
|
|
776
|
+
}
|
|
777
|
+
function $serializer_0() {
|
|
778
|
+
$serializer_instance_0 = this;
|
|
779
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.openrouter.models.OpenRouterChatCompletionStreamResponse', this, 7);
|
|
780
|
+
tmp0_serialDesc.m16('choices', false);
|
|
781
|
+
tmp0_serialDesc.m16('created', false);
|
|
782
|
+
tmp0_serialDesc.m16('id', false);
|
|
783
|
+
tmp0_serialDesc.m16('model', false);
|
|
784
|
+
tmp0_serialDesc.m16('systemFingerprint', true);
|
|
785
|
+
tmp0_serialDesc.m16('object', true);
|
|
786
|
+
tmp0_serialDesc.m16('usage', true);
|
|
787
|
+
this.ufw_1 = tmp0_serialDesc;
|
|
788
|
+
}
|
|
789
|
+
protoOf($serializer_0).vfw = function (encoder, value) {
|
|
790
|
+
var tmp0_desc = this.ufw_1;
|
|
791
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
792
|
+
var tmp2_cached = Companion_getInstance_1().tfw_1;
|
|
793
|
+
tmp1_output.n10(tmp0_desc, 0, tmp2_cached[0].b1(), value.jfu_1);
|
|
794
|
+
tmp1_output.h10(tmp0_desc, 1, value.kfu_1);
|
|
795
|
+
tmp1_output.l10(tmp0_desc, 2, value.lfu_1);
|
|
796
|
+
tmp1_output.l10(tmp0_desc, 3, value.mfu_1);
|
|
797
|
+
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.nfu_1 == null)) {
|
|
798
|
+
tmp1_output.p10(tmp0_desc, 4, StringSerializer_getInstance(), value.nfu_1);
|
|
799
|
+
}
|
|
800
|
+
if (tmp1_output.t10(tmp0_desc, 5) ? true : !(value.ofu_1 === 'chat.completion.chunk')) {
|
|
801
|
+
tmp1_output.l10(tmp0_desc, 5, value.ofu_1);
|
|
802
|
+
}
|
|
803
|
+
if (tmp1_output.t10(tmp0_desc, 6) ? true : !(value.pfu_1 == null)) {
|
|
804
|
+
tmp1_output.p10(tmp0_desc, 6, $serializer_getInstance(), value.pfu_1);
|
|
805
|
+
}
|
|
806
|
+
tmp1_output.xy(tmp0_desc);
|
|
807
|
+
};
|
|
808
|
+
protoOf($serializer_0).gv = function (encoder, value) {
|
|
809
|
+
return this.vfw(encoder, value instanceof OpenRouterChatCompletionStreamResponse ? value : THROW_CCE());
|
|
810
|
+
};
|
|
811
|
+
protoOf($serializer_0).hv = function (decoder) {
|
|
812
|
+
var tmp0_desc = this.ufw_1;
|
|
813
|
+
var tmp1_flag = true;
|
|
814
|
+
var tmp2_index = 0;
|
|
815
|
+
var tmp3_bitMask0 = 0;
|
|
816
|
+
var tmp4_local0 = null;
|
|
817
|
+
var tmp5_local1 = new Long(0, 0);
|
|
818
|
+
var tmp6_local2 = null;
|
|
819
|
+
var tmp7_local3 = null;
|
|
820
|
+
var tmp8_local4 = null;
|
|
821
|
+
var tmp9_local5 = null;
|
|
822
|
+
var tmp10_local6 = null;
|
|
823
|
+
var tmp11_input = decoder.wy(tmp0_desc);
|
|
824
|
+
var tmp12_cached = Companion_getInstance_1().tfw_1;
|
|
825
|
+
if (tmp11_input.mz()) {
|
|
826
|
+
tmp4_local0 = tmp11_input.iz(tmp0_desc, 0, tmp12_cached[0].b1(), tmp4_local0);
|
|
827
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
828
|
+
tmp5_local1 = tmp11_input.cz(tmp0_desc, 1);
|
|
829
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
830
|
+
tmp6_local2 = tmp11_input.gz(tmp0_desc, 2);
|
|
831
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
832
|
+
tmp7_local3 = tmp11_input.gz(tmp0_desc, 3);
|
|
833
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
834
|
+
tmp8_local4 = tmp11_input.kz(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
|
|
835
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
836
|
+
tmp9_local5 = tmp11_input.gz(tmp0_desc, 5);
|
|
837
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
838
|
+
tmp10_local6 = tmp11_input.kz(tmp0_desc, 6, $serializer_getInstance(), tmp10_local6);
|
|
839
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
840
|
+
} else
|
|
841
|
+
while (tmp1_flag) {
|
|
842
|
+
tmp2_index = tmp11_input.nz(tmp0_desc);
|
|
843
|
+
switch (tmp2_index) {
|
|
844
|
+
case -1:
|
|
845
|
+
tmp1_flag = false;
|
|
846
|
+
break;
|
|
847
|
+
case 0:
|
|
848
|
+
tmp4_local0 = tmp11_input.iz(tmp0_desc, 0, tmp12_cached[0].b1(), tmp4_local0);
|
|
849
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
850
|
+
break;
|
|
851
|
+
case 1:
|
|
852
|
+
tmp5_local1 = tmp11_input.cz(tmp0_desc, 1);
|
|
853
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
854
|
+
break;
|
|
855
|
+
case 2:
|
|
856
|
+
tmp6_local2 = tmp11_input.gz(tmp0_desc, 2);
|
|
857
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
858
|
+
break;
|
|
859
|
+
case 3:
|
|
860
|
+
tmp7_local3 = tmp11_input.gz(tmp0_desc, 3);
|
|
861
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
862
|
+
break;
|
|
863
|
+
case 4:
|
|
864
|
+
tmp8_local4 = tmp11_input.kz(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
|
|
865
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
866
|
+
break;
|
|
867
|
+
case 5:
|
|
868
|
+
tmp9_local5 = tmp11_input.gz(tmp0_desc, 5);
|
|
869
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
870
|
+
break;
|
|
871
|
+
case 6:
|
|
872
|
+
tmp10_local6 = tmp11_input.kz(tmp0_desc, 6, $serializer_getInstance(), tmp10_local6);
|
|
873
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
874
|
+
break;
|
|
875
|
+
default:
|
|
876
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
tmp11_input.xy(tmp0_desc);
|
|
880
|
+
return OpenRouterChatCompletionStreamResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, null);
|
|
881
|
+
};
|
|
882
|
+
protoOf($serializer_0).fv = function () {
|
|
883
|
+
return this.ufw_1;
|
|
884
|
+
};
|
|
885
|
+
protoOf($serializer_0).d17 = function () {
|
|
886
|
+
// Inline function 'kotlin.arrayOf' call
|
|
887
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
888
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
889
|
+
return [Companion_getInstance_1().tfw_1[0].b1(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), get_nullable($serializer_getInstance())];
|
|
890
|
+
};
|
|
891
|
+
var $serializer_instance_0;
|
|
892
|
+
function $serializer_getInstance_4() {
|
|
893
|
+
if ($serializer_instance_0 == null)
|
|
894
|
+
new $serializer_0();
|
|
895
|
+
return $serializer_instance_0;
|
|
896
|
+
}
|
|
897
|
+
function OpenRouterChatCompletionStreamResponse_init_$Init$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker, $this) {
|
|
898
|
+
if (!(15 === (15 & seen0))) {
|
|
899
|
+
throwMissingFieldException(seen0, 15, $serializer_getInstance_4().ufw_1);
|
|
900
|
+
}
|
|
901
|
+
$this.jfu_1 = choices;
|
|
902
|
+
$this.kfu_1 = created;
|
|
903
|
+
$this.lfu_1 = id;
|
|
904
|
+
$this.mfu_1 = model;
|
|
905
|
+
if (0 === (seen0 & 16))
|
|
906
|
+
$this.nfu_1 = null;
|
|
907
|
+
else
|
|
908
|
+
$this.nfu_1 = systemFingerprint;
|
|
909
|
+
if (0 === (seen0 & 32))
|
|
910
|
+
$this.ofu_1 = 'chat.completion.chunk';
|
|
911
|
+
else
|
|
912
|
+
$this.ofu_1 = objectType;
|
|
913
|
+
if (0 === (seen0 & 64))
|
|
914
|
+
$this.pfu_1 = null;
|
|
915
|
+
else
|
|
916
|
+
$this.pfu_1 = usage;
|
|
917
|
+
return $this;
|
|
918
|
+
}
|
|
919
|
+
function OpenRouterChatCompletionStreamResponse_init_$Create$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker) {
|
|
920
|
+
return OpenRouterChatCompletionStreamResponse_init_$Init$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker, objectCreate(protoOf(OpenRouterChatCompletionStreamResponse)));
|
|
921
|
+
}
|
|
922
|
+
function OpenRouterChatCompletionStreamResponse(choices, created, id, model, systemFingerprint, objectType, usage) {
|
|
923
|
+
Companion_getInstance_1();
|
|
924
|
+
systemFingerprint = systemFingerprint === VOID ? null : systemFingerprint;
|
|
925
|
+
objectType = objectType === VOID ? 'chat.completion.chunk' : objectType;
|
|
926
|
+
usage = usage === VOID ? null : usage;
|
|
927
|
+
this.jfu_1 = choices;
|
|
928
|
+
this.kfu_1 = created;
|
|
929
|
+
this.lfu_1 = id;
|
|
930
|
+
this.mfu_1 = model;
|
|
931
|
+
this.nfu_1 = systemFingerprint;
|
|
932
|
+
this.ofu_1 = objectType;
|
|
933
|
+
this.pfu_1 = usage;
|
|
934
|
+
}
|
|
935
|
+
function OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm() {
|
|
936
|
+
return new ArrayListSerializer(Companion_instance_0.q1j());
|
|
937
|
+
}
|
|
938
|
+
function OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_0() {
|
|
939
|
+
return new ArrayListSerializer($serializer_getInstance_0());
|
|
940
|
+
}
|
|
941
|
+
function OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_1() {
|
|
942
|
+
return Companion_instance_1.q1j();
|
|
943
|
+
}
|
|
944
|
+
function OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_2() {
|
|
945
|
+
return new ArrayListSerializer(StringSerializer_getInstance());
|
|
946
|
+
}
|
|
947
|
+
function OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_3() {
|
|
948
|
+
return new LinkedHashMapSerializer(IntSerializer_getInstance(), DoubleSerializer_getInstance());
|
|
949
|
+
}
|
|
950
|
+
function OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_4() {
|
|
951
|
+
return new ArrayListSerializer(StringSerializer_getInstance());
|
|
952
|
+
}
|
|
953
|
+
function OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_5() {
|
|
954
|
+
return new ArrayListSerializer(StringSerializer_getInstance());
|
|
955
|
+
}
|
|
956
|
+
function OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_6() {
|
|
957
|
+
return new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance());
|
|
958
|
+
}
|
|
959
|
+
function Companion_2() {
|
|
960
|
+
Companion_instance_5 = this;
|
|
961
|
+
var tmp = this;
|
|
962
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
963
|
+
var tmp_1 = lazy(tmp_0, OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm);
|
|
964
|
+
var tmp_2 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
965
|
+
var tmp_3 = lazy(tmp_2, OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_0);
|
|
966
|
+
var tmp_4 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
967
|
+
var tmp_5 = lazy(tmp_4, OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_1);
|
|
968
|
+
var tmp_6 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
969
|
+
var tmp_7 = lazy(tmp_6, OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_2);
|
|
970
|
+
var tmp_8 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
971
|
+
var tmp_9 = lazy(tmp_8, OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_3);
|
|
972
|
+
var tmp_10 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
973
|
+
var tmp_11 = lazy(tmp_10, OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_4);
|
|
974
|
+
var tmp_12 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
975
|
+
var tmp_13 = lazy(tmp_12, OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_5);
|
|
976
|
+
var tmp_14 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
977
|
+
// Inline function 'kotlin.arrayOf' call
|
|
978
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
979
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
980
|
+
tmp.wfw_1 = [tmp_1, null, null, null, null, tmp_3, null, null, null, null, null, null, tmp_5, tmp_7, null, null, null, null, tmp_9, null, null, null, tmp_11, tmp_13, null, null, null, lazy(tmp_14, OpenRouterChatCompletionRequest$Companion$$childSerializers$_anonymous__8l38zm_6)];
|
|
981
|
+
}
|
|
982
|
+
protoOf(Companion_2).q1j = function () {
|
|
983
|
+
return $serializer_getInstance_5();
|
|
984
|
+
};
|
|
985
|
+
var Companion_instance_5;
|
|
986
|
+
function Companion_getInstance_2() {
|
|
987
|
+
if (Companion_instance_5 == null)
|
|
988
|
+
new Companion_2();
|
|
989
|
+
return Companion_instance_5;
|
|
990
|
+
}
|
|
991
|
+
function $serializer_1() {
|
|
992
|
+
$serializer_instance_1 = this;
|
|
993
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.openrouter.models.OpenRouterChatCompletionRequest', this, 28);
|
|
994
|
+
tmp0_serialDesc.m16('messages', true);
|
|
995
|
+
tmp0_serialDesc.m16('prompt', true);
|
|
996
|
+
tmp0_serialDesc.m16('model', true);
|
|
997
|
+
tmp0_serialDesc.m16('stream', true);
|
|
998
|
+
tmp0_serialDesc.m16('temperature', true);
|
|
999
|
+
tmp0_serialDesc.m16('tools', true);
|
|
1000
|
+
tmp0_serialDesc.m16('toolChoice', true);
|
|
1001
|
+
tmp0_serialDesc.m16('topP', true);
|
|
1002
|
+
tmp0_serialDesc.m16('topLogprobs', true);
|
|
1003
|
+
tmp0_serialDesc.m16('maxTokens', true);
|
|
1004
|
+
tmp0_serialDesc.m16('frequencyPenalty', true);
|
|
1005
|
+
tmp0_serialDesc.m16('presencePenalty', true);
|
|
1006
|
+
tmp0_serialDesc.m16('responseFormat', true);
|
|
1007
|
+
tmp0_serialDesc.m16('stop', true);
|
|
1008
|
+
tmp0_serialDesc.m16('logprobs', true);
|
|
1009
|
+
tmp0_serialDesc.m16('seed', true);
|
|
1010
|
+
tmp0_serialDesc.m16('topK', true);
|
|
1011
|
+
tmp0_serialDesc.m16('repetitionPenalty', true);
|
|
1012
|
+
tmp0_serialDesc.m16('logitBias', true);
|
|
1013
|
+
tmp0_serialDesc.m16('minP', true);
|
|
1014
|
+
tmp0_serialDesc.m16('topA', true);
|
|
1015
|
+
tmp0_serialDesc.m16('prediction', true);
|
|
1016
|
+
tmp0_serialDesc.m16('transforms', true);
|
|
1017
|
+
tmp0_serialDesc.m16('models', true);
|
|
1018
|
+
tmp0_serialDesc.m16('route', true);
|
|
1019
|
+
tmp0_serialDesc.m16('provider', true);
|
|
1020
|
+
tmp0_serialDesc.m16('user', true);
|
|
1021
|
+
tmp0_serialDesc.m16('additionalProperties', true);
|
|
1022
|
+
this.xfw_1 = tmp0_serialDesc;
|
|
1023
|
+
}
|
|
1024
|
+
protoOf($serializer_1).yfw = function (encoder, value) {
|
|
1025
|
+
var tmp0_desc = this.xfw_1;
|
|
1026
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1027
|
+
var tmp2_cached = Companion_getInstance_2().wfw_1;
|
|
1028
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !equals(value.zfw_1, emptyList())) {
|
|
1029
|
+
tmp1_output.n10(tmp0_desc, 0, tmp2_cached[0].b1(), value.zfw_1);
|
|
1030
|
+
}
|
|
1031
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.afx_1 == null)) {
|
|
1032
|
+
tmp1_output.p10(tmp0_desc, 1, StringSerializer_getInstance(), value.afx_1);
|
|
1033
|
+
}
|
|
1034
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.bfx_1 == null)) {
|
|
1035
|
+
tmp1_output.p10(tmp0_desc, 2, StringSerializer_getInstance(), value.bfx_1);
|
|
1036
|
+
}
|
|
1037
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.cfx_1 == null)) {
|
|
1038
|
+
tmp1_output.p10(tmp0_desc, 3, BooleanSerializer_getInstance(), value.cfx_1);
|
|
1039
|
+
}
|
|
1040
|
+
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.dfx_1 == null)) {
|
|
1041
|
+
tmp1_output.p10(tmp0_desc, 4, DoubleSerializer_getInstance(), value.dfx_1);
|
|
1042
|
+
}
|
|
1043
|
+
if (tmp1_output.t10(tmp0_desc, 5) ? true : !(value.efx_1 == null)) {
|
|
1044
|
+
tmp1_output.p10(tmp0_desc, 5, tmp2_cached[5].b1(), value.efx_1);
|
|
1045
|
+
}
|
|
1046
|
+
if (tmp1_output.t10(tmp0_desc, 6) ? true : !(value.ffx_1 == null)) {
|
|
1047
|
+
tmp1_output.p10(tmp0_desc, 6, OpenAIToolChoiceSerializer_getInstance(), value.ffx_1);
|
|
1048
|
+
}
|
|
1049
|
+
if (tmp1_output.t10(tmp0_desc, 7) ? true : !(value.gfx_1 == null)) {
|
|
1050
|
+
tmp1_output.p10(tmp0_desc, 7, DoubleSerializer_getInstance(), value.gfx_1);
|
|
1051
|
+
}
|
|
1052
|
+
if (tmp1_output.t10(tmp0_desc, 8) ? true : !(value.hfx_1 == null)) {
|
|
1053
|
+
tmp1_output.p10(tmp0_desc, 8, IntSerializer_getInstance(), value.hfx_1);
|
|
1054
|
+
}
|
|
1055
|
+
if (tmp1_output.t10(tmp0_desc, 9) ? true : !(value.ifx_1 == null)) {
|
|
1056
|
+
tmp1_output.p10(tmp0_desc, 9, IntSerializer_getInstance(), value.ifx_1);
|
|
1057
|
+
}
|
|
1058
|
+
if (tmp1_output.t10(tmp0_desc, 10) ? true : !(value.jfx_1 == null)) {
|
|
1059
|
+
tmp1_output.p10(tmp0_desc, 10, DoubleSerializer_getInstance(), value.jfx_1);
|
|
1060
|
+
}
|
|
1061
|
+
if (tmp1_output.t10(tmp0_desc, 11) ? true : !(value.kfx_1 == null)) {
|
|
1062
|
+
tmp1_output.p10(tmp0_desc, 11, DoubleSerializer_getInstance(), value.kfx_1);
|
|
1063
|
+
}
|
|
1064
|
+
if (tmp1_output.t10(tmp0_desc, 12) ? true : !(value.lfx_1 == null)) {
|
|
1065
|
+
tmp1_output.p10(tmp0_desc, 12, tmp2_cached[12].b1(), value.lfx_1);
|
|
1066
|
+
}
|
|
1067
|
+
if (tmp1_output.t10(tmp0_desc, 13) ? true : !(value.mfx_1 == null)) {
|
|
1068
|
+
tmp1_output.p10(tmp0_desc, 13, tmp2_cached[13].b1(), value.mfx_1);
|
|
1069
|
+
}
|
|
1070
|
+
if (tmp1_output.t10(tmp0_desc, 14) ? true : !(value.nfx_1 == null)) {
|
|
1071
|
+
tmp1_output.p10(tmp0_desc, 14, BooleanSerializer_getInstance(), value.nfx_1);
|
|
1072
|
+
}
|
|
1073
|
+
if (tmp1_output.t10(tmp0_desc, 15) ? true : !(value.ofx_1 == null)) {
|
|
1074
|
+
tmp1_output.p10(tmp0_desc, 15, IntSerializer_getInstance(), value.ofx_1);
|
|
1075
|
+
}
|
|
1076
|
+
if (tmp1_output.t10(tmp0_desc, 16) ? true : !(value.pfx_1 == null)) {
|
|
1077
|
+
tmp1_output.p10(tmp0_desc, 16, IntSerializer_getInstance(), value.pfx_1);
|
|
1078
|
+
}
|
|
1079
|
+
if (tmp1_output.t10(tmp0_desc, 17) ? true : !(value.qfx_1 == null)) {
|
|
1080
|
+
tmp1_output.p10(tmp0_desc, 17, DoubleSerializer_getInstance(), value.qfx_1);
|
|
1081
|
+
}
|
|
1082
|
+
if (tmp1_output.t10(tmp0_desc, 18) ? true : !(value.rfx_1 == null)) {
|
|
1083
|
+
tmp1_output.p10(tmp0_desc, 18, tmp2_cached[18].b1(), value.rfx_1);
|
|
1084
|
+
}
|
|
1085
|
+
if (tmp1_output.t10(tmp0_desc, 19) ? true : !(value.sfx_1 == null)) {
|
|
1086
|
+
tmp1_output.p10(tmp0_desc, 19, DoubleSerializer_getInstance(), value.sfx_1);
|
|
1087
|
+
}
|
|
1088
|
+
if (tmp1_output.t10(tmp0_desc, 20) ? true : !(value.tfx_1 == null)) {
|
|
1089
|
+
tmp1_output.p10(tmp0_desc, 20, DoubleSerializer_getInstance(), value.tfx_1);
|
|
1090
|
+
}
|
|
1091
|
+
if (tmp1_output.t10(tmp0_desc, 21) ? true : !(value.ufx_1 == null)) {
|
|
1092
|
+
tmp1_output.p10(tmp0_desc, 21, $serializer_getInstance_1(), value.ufx_1);
|
|
1093
|
+
}
|
|
1094
|
+
if (tmp1_output.t10(tmp0_desc, 22) ? true : !(value.vfx_1 == null)) {
|
|
1095
|
+
tmp1_output.p10(tmp0_desc, 22, tmp2_cached[22].b1(), value.vfx_1);
|
|
1096
|
+
}
|
|
1097
|
+
if (tmp1_output.t10(tmp0_desc, 23) ? true : !(value.wfx_1 == null)) {
|
|
1098
|
+
tmp1_output.p10(tmp0_desc, 23, tmp2_cached[23].b1(), value.wfx_1);
|
|
1099
|
+
}
|
|
1100
|
+
if (tmp1_output.t10(tmp0_desc, 24) ? true : !(value.xfx_1 == null)) {
|
|
1101
|
+
tmp1_output.p10(tmp0_desc, 24, StringSerializer_getInstance(), value.xfx_1);
|
|
1102
|
+
}
|
|
1103
|
+
if (tmp1_output.t10(tmp0_desc, 25) ? true : !(value.yfx_1 == null)) {
|
|
1104
|
+
tmp1_output.p10(tmp0_desc, 25, $serializer_getInstance_6(), value.yfx_1);
|
|
1105
|
+
}
|
|
1106
|
+
if (tmp1_output.t10(tmp0_desc, 26) ? true : !(value.zfx_1 == null)) {
|
|
1107
|
+
tmp1_output.p10(tmp0_desc, 26, StringSerializer_getInstance(), value.zfx_1);
|
|
1108
|
+
}
|
|
1109
|
+
if (tmp1_output.t10(tmp0_desc, 27) ? true : !(value.afy_1 == null)) {
|
|
1110
|
+
tmp1_output.p10(tmp0_desc, 27, tmp2_cached[27].b1(), value.afy_1);
|
|
1111
|
+
}
|
|
1112
|
+
tmp1_output.xy(tmp0_desc);
|
|
1113
|
+
};
|
|
1114
|
+
protoOf($serializer_1).gv = function (encoder, value) {
|
|
1115
|
+
return this.yfw(encoder, value instanceof OpenRouterChatCompletionRequest ? value : THROW_CCE());
|
|
1116
|
+
};
|
|
1117
|
+
protoOf($serializer_1).hv = function (decoder) {
|
|
1118
|
+
var tmp0_desc = this.xfw_1;
|
|
1119
|
+
var tmp1_flag = true;
|
|
1120
|
+
var tmp2_index = 0;
|
|
1121
|
+
var tmp3_bitMask0 = 0;
|
|
1122
|
+
var tmp4_local0 = null;
|
|
1123
|
+
var tmp5_local1 = null;
|
|
1124
|
+
var tmp6_local2 = null;
|
|
1125
|
+
var tmp7_local3 = null;
|
|
1126
|
+
var tmp8_local4 = null;
|
|
1127
|
+
var tmp9_local5 = null;
|
|
1128
|
+
var tmp10_local6 = null;
|
|
1129
|
+
var tmp11_local7 = null;
|
|
1130
|
+
var tmp12_local8 = null;
|
|
1131
|
+
var tmp13_local9 = null;
|
|
1132
|
+
var tmp14_local10 = null;
|
|
1133
|
+
var tmp15_local11 = null;
|
|
1134
|
+
var tmp16_local12 = null;
|
|
1135
|
+
var tmp17_local13 = null;
|
|
1136
|
+
var tmp18_local14 = null;
|
|
1137
|
+
var tmp19_local15 = null;
|
|
1138
|
+
var tmp20_local16 = null;
|
|
1139
|
+
var tmp21_local17 = null;
|
|
1140
|
+
var tmp22_local18 = null;
|
|
1141
|
+
var tmp23_local19 = null;
|
|
1142
|
+
var tmp24_local20 = null;
|
|
1143
|
+
var tmp25_local21 = null;
|
|
1144
|
+
var tmp26_local22 = null;
|
|
1145
|
+
var tmp27_local23 = null;
|
|
1146
|
+
var tmp28_local24 = null;
|
|
1147
|
+
var tmp29_local25 = null;
|
|
1148
|
+
var tmp30_local26 = null;
|
|
1149
|
+
var tmp31_local27 = null;
|
|
1150
|
+
var tmp32_input = decoder.wy(tmp0_desc);
|
|
1151
|
+
var tmp33_cached = Companion_getInstance_2().wfw_1;
|
|
1152
|
+
if (tmp32_input.mz()) {
|
|
1153
|
+
tmp4_local0 = tmp32_input.iz(tmp0_desc, 0, tmp33_cached[0].b1(), tmp4_local0);
|
|
1154
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1155
|
+
tmp5_local1 = tmp32_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
1156
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1157
|
+
tmp6_local2 = tmp32_input.kz(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
|
|
1158
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1159
|
+
tmp7_local3 = tmp32_input.kz(tmp0_desc, 3, BooleanSerializer_getInstance(), tmp7_local3);
|
|
1160
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1161
|
+
tmp8_local4 = tmp32_input.kz(tmp0_desc, 4, DoubleSerializer_getInstance(), tmp8_local4);
|
|
1162
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
1163
|
+
tmp9_local5 = tmp32_input.kz(tmp0_desc, 5, tmp33_cached[5].b1(), tmp9_local5);
|
|
1164
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
1165
|
+
tmp10_local6 = tmp32_input.kz(tmp0_desc, 6, OpenAIToolChoiceSerializer_getInstance(), tmp10_local6);
|
|
1166
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
1167
|
+
tmp11_local7 = tmp32_input.kz(tmp0_desc, 7, DoubleSerializer_getInstance(), tmp11_local7);
|
|
1168
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 128;
|
|
1169
|
+
tmp12_local8 = tmp32_input.kz(tmp0_desc, 8, IntSerializer_getInstance(), tmp12_local8);
|
|
1170
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 256;
|
|
1171
|
+
tmp13_local9 = tmp32_input.kz(tmp0_desc, 9, IntSerializer_getInstance(), tmp13_local9);
|
|
1172
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 512;
|
|
1173
|
+
tmp14_local10 = tmp32_input.kz(tmp0_desc, 10, DoubleSerializer_getInstance(), tmp14_local10);
|
|
1174
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1024;
|
|
1175
|
+
tmp15_local11 = tmp32_input.kz(tmp0_desc, 11, DoubleSerializer_getInstance(), tmp15_local11);
|
|
1176
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2048;
|
|
1177
|
+
tmp16_local12 = tmp32_input.kz(tmp0_desc, 12, tmp33_cached[12].b1(), tmp16_local12);
|
|
1178
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4096;
|
|
1179
|
+
tmp17_local13 = tmp32_input.kz(tmp0_desc, 13, tmp33_cached[13].b1(), tmp17_local13);
|
|
1180
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8192;
|
|
1181
|
+
tmp18_local14 = tmp32_input.kz(tmp0_desc, 14, BooleanSerializer_getInstance(), tmp18_local14);
|
|
1182
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16384;
|
|
1183
|
+
tmp19_local15 = tmp32_input.kz(tmp0_desc, 15, IntSerializer_getInstance(), tmp19_local15);
|
|
1184
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32768;
|
|
1185
|
+
tmp20_local16 = tmp32_input.kz(tmp0_desc, 16, IntSerializer_getInstance(), tmp20_local16);
|
|
1186
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 65536;
|
|
1187
|
+
tmp21_local17 = tmp32_input.kz(tmp0_desc, 17, DoubleSerializer_getInstance(), tmp21_local17);
|
|
1188
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 131072;
|
|
1189
|
+
tmp22_local18 = tmp32_input.kz(tmp0_desc, 18, tmp33_cached[18].b1(), tmp22_local18);
|
|
1190
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 262144;
|
|
1191
|
+
tmp23_local19 = tmp32_input.kz(tmp0_desc, 19, DoubleSerializer_getInstance(), tmp23_local19);
|
|
1192
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 524288;
|
|
1193
|
+
tmp24_local20 = tmp32_input.kz(tmp0_desc, 20, DoubleSerializer_getInstance(), tmp24_local20);
|
|
1194
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1048576;
|
|
1195
|
+
tmp25_local21 = tmp32_input.kz(tmp0_desc, 21, $serializer_getInstance_1(), tmp25_local21);
|
|
1196
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2097152;
|
|
1197
|
+
tmp26_local22 = tmp32_input.kz(tmp0_desc, 22, tmp33_cached[22].b1(), tmp26_local22);
|
|
1198
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4194304;
|
|
1199
|
+
tmp27_local23 = tmp32_input.kz(tmp0_desc, 23, tmp33_cached[23].b1(), tmp27_local23);
|
|
1200
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8388608;
|
|
1201
|
+
tmp28_local24 = tmp32_input.kz(tmp0_desc, 24, StringSerializer_getInstance(), tmp28_local24);
|
|
1202
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16777216;
|
|
1203
|
+
tmp29_local25 = tmp32_input.kz(tmp0_desc, 25, $serializer_getInstance_6(), tmp29_local25);
|
|
1204
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 33554432;
|
|
1205
|
+
tmp30_local26 = tmp32_input.kz(tmp0_desc, 26, StringSerializer_getInstance(), tmp30_local26);
|
|
1206
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 67108864;
|
|
1207
|
+
tmp31_local27 = tmp32_input.kz(tmp0_desc, 27, tmp33_cached[27].b1(), tmp31_local27);
|
|
1208
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 134217728;
|
|
1209
|
+
} else
|
|
1210
|
+
while (tmp1_flag) {
|
|
1211
|
+
tmp2_index = tmp32_input.nz(tmp0_desc);
|
|
1212
|
+
switch (tmp2_index) {
|
|
1213
|
+
case -1:
|
|
1214
|
+
tmp1_flag = false;
|
|
1215
|
+
break;
|
|
1216
|
+
case 0:
|
|
1217
|
+
tmp4_local0 = tmp32_input.iz(tmp0_desc, 0, tmp33_cached[0].b1(), tmp4_local0);
|
|
1218
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1219
|
+
break;
|
|
1220
|
+
case 1:
|
|
1221
|
+
tmp5_local1 = tmp32_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
1222
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1223
|
+
break;
|
|
1224
|
+
case 2:
|
|
1225
|
+
tmp6_local2 = tmp32_input.kz(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
|
|
1226
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1227
|
+
break;
|
|
1228
|
+
case 3:
|
|
1229
|
+
tmp7_local3 = tmp32_input.kz(tmp0_desc, 3, BooleanSerializer_getInstance(), tmp7_local3);
|
|
1230
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1231
|
+
break;
|
|
1232
|
+
case 4:
|
|
1233
|
+
tmp8_local4 = tmp32_input.kz(tmp0_desc, 4, DoubleSerializer_getInstance(), tmp8_local4);
|
|
1234
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
1235
|
+
break;
|
|
1236
|
+
case 5:
|
|
1237
|
+
tmp9_local5 = tmp32_input.kz(tmp0_desc, 5, tmp33_cached[5].b1(), tmp9_local5);
|
|
1238
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
1239
|
+
break;
|
|
1240
|
+
case 6:
|
|
1241
|
+
tmp10_local6 = tmp32_input.kz(tmp0_desc, 6, OpenAIToolChoiceSerializer_getInstance(), tmp10_local6);
|
|
1242
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
1243
|
+
break;
|
|
1244
|
+
case 7:
|
|
1245
|
+
tmp11_local7 = tmp32_input.kz(tmp0_desc, 7, DoubleSerializer_getInstance(), tmp11_local7);
|
|
1246
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 128;
|
|
1247
|
+
break;
|
|
1248
|
+
case 8:
|
|
1249
|
+
tmp12_local8 = tmp32_input.kz(tmp0_desc, 8, IntSerializer_getInstance(), tmp12_local8);
|
|
1250
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 256;
|
|
1251
|
+
break;
|
|
1252
|
+
case 9:
|
|
1253
|
+
tmp13_local9 = tmp32_input.kz(tmp0_desc, 9, IntSerializer_getInstance(), tmp13_local9);
|
|
1254
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 512;
|
|
1255
|
+
break;
|
|
1256
|
+
case 10:
|
|
1257
|
+
tmp14_local10 = tmp32_input.kz(tmp0_desc, 10, DoubleSerializer_getInstance(), tmp14_local10);
|
|
1258
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1024;
|
|
1259
|
+
break;
|
|
1260
|
+
case 11:
|
|
1261
|
+
tmp15_local11 = tmp32_input.kz(tmp0_desc, 11, DoubleSerializer_getInstance(), tmp15_local11);
|
|
1262
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2048;
|
|
1263
|
+
break;
|
|
1264
|
+
case 12:
|
|
1265
|
+
tmp16_local12 = tmp32_input.kz(tmp0_desc, 12, tmp33_cached[12].b1(), tmp16_local12);
|
|
1266
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4096;
|
|
1267
|
+
break;
|
|
1268
|
+
case 13:
|
|
1269
|
+
tmp17_local13 = tmp32_input.kz(tmp0_desc, 13, tmp33_cached[13].b1(), tmp17_local13);
|
|
1270
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8192;
|
|
1271
|
+
break;
|
|
1272
|
+
case 14:
|
|
1273
|
+
tmp18_local14 = tmp32_input.kz(tmp0_desc, 14, BooleanSerializer_getInstance(), tmp18_local14);
|
|
1274
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16384;
|
|
1275
|
+
break;
|
|
1276
|
+
case 15:
|
|
1277
|
+
tmp19_local15 = tmp32_input.kz(tmp0_desc, 15, IntSerializer_getInstance(), tmp19_local15);
|
|
1278
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32768;
|
|
1279
|
+
break;
|
|
1280
|
+
case 16:
|
|
1281
|
+
tmp20_local16 = tmp32_input.kz(tmp0_desc, 16, IntSerializer_getInstance(), tmp20_local16);
|
|
1282
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 65536;
|
|
1283
|
+
break;
|
|
1284
|
+
case 17:
|
|
1285
|
+
tmp21_local17 = tmp32_input.kz(tmp0_desc, 17, DoubleSerializer_getInstance(), tmp21_local17);
|
|
1286
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 131072;
|
|
1287
|
+
break;
|
|
1288
|
+
case 18:
|
|
1289
|
+
tmp22_local18 = tmp32_input.kz(tmp0_desc, 18, tmp33_cached[18].b1(), tmp22_local18);
|
|
1290
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 262144;
|
|
1291
|
+
break;
|
|
1292
|
+
case 19:
|
|
1293
|
+
tmp23_local19 = tmp32_input.kz(tmp0_desc, 19, DoubleSerializer_getInstance(), tmp23_local19);
|
|
1294
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 524288;
|
|
1295
|
+
break;
|
|
1296
|
+
case 20:
|
|
1297
|
+
tmp24_local20 = tmp32_input.kz(tmp0_desc, 20, DoubleSerializer_getInstance(), tmp24_local20);
|
|
1298
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1048576;
|
|
1299
|
+
break;
|
|
1300
|
+
case 21:
|
|
1301
|
+
tmp25_local21 = tmp32_input.kz(tmp0_desc, 21, $serializer_getInstance_1(), tmp25_local21);
|
|
1302
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2097152;
|
|
1303
|
+
break;
|
|
1304
|
+
case 22:
|
|
1305
|
+
tmp26_local22 = tmp32_input.kz(tmp0_desc, 22, tmp33_cached[22].b1(), tmp26_local22);
|
|
1306
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4194304;
|
|
1307
|
+
break;
|
|
1308
|
+
case 23:
|
|
1309
|
+
tmp27_local23 = tmp32_input.kz(tmp0_desc, 23, tmp33_cached[23].b1(), tmp27_local23);
|
|
1310
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8388608;
|
|
1311
|
+
break;
|
|
1312
|
+
case 24:
|
|
1313
|
+
tmp28_local24 = tmp32_input.kz(tmp0_desc, 24, StringSerializer_getInstance(), tmp28_local24);
|
|
1314
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16777216;
|
|
1315
|
+
break;
|
|
1316
|
+
case 25:
|
|
1317
|
+
tmp29_local25 = tmp32_input.kz(tmp0_desc, 25, $serializer_getInstance_6(), tmp29_local25);
|
|
1318
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 33554432;
|
|
1319
|
+
break;
|
|
1320
|
+
case 26:
|
|
1321
|
+
tmp30_local26 = tmp32_input.kz(tmp0_desc, 26, StringSerializer_getInstance(), tmp30_local26);
|
|
1322
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 67108864;
|
|
1323
|
+
break;
|
|
1324
|
+
case 27:
|
|
1325
|
+
tmp31_local27 = tmp32_input.kz(tmp0_desc, 27, tmp33_cached[27].b1(), tmp31_local27);
|
|
1326
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 134217728;
|
|
1327
|
+
break;
|
|
1328
|
+
default:
|
|
1329
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
tmp32_input.xy(tmp0_desc);
|
|
1333
|
+
return OpenRouterChatCompletionRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, tmp16_local12, tmp17_local13, tmp18_local14, tmp19_local15, tmp20_local16, tmp21_local17, tmp22_local18, tmp23_local19, tmp24_local20, tmp25_local21, tmp26_local22, tmp27_local23, tmp28_local24, tmp29_local25, tmp30_local26, tmp31_local27, null);
|
|
1334
|
+
};
|
|
1335
|
+
protoOf($serializer_1).fv = function () {
|
|
1336
|
+
return this.xfw_1;
|
|
1337
|
+
};
|
|
1338
|
+
protoOf($serializer_1).d17 = function () {
|
|
1339
|
+
var tmp0_cached = Companion_getInstance_2().wfw_1;
|
|
1340
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1341
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1342
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1343
|
+
return [tmp0_cached[0].b1(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(DoubleSerializer_getInstance()), get_nullable(tmp0_cached[5].b1()), get_nullable(OpenAIToolChoiceSerializer_getInstance()), get_nullable(DoubleSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(DoubleSerializer_getInstance()), get_nullable(DoubleSerializer_getInstance()), get_nullable(tmp0_cached[12].b1()), get_nullable(tmp0_cached[13].b1()), get_nullable(BooleanSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(DoubleSerializer_getInstance()), get_nullable(tmp0_cached[18].b1()), get_nullable(DoubleSerializer_getInstance()), get_nullable(DoubleSerializer_getInstance()), get_nullable($serializer_getInstance_1()), get_nullable(tmp0_cached[22].b1()), get_nullable(tmp0_cached[23].b1()), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_6()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[27].b1())];
|
|
1344
|
+
};
|
|
1345
|
+
var $serializer_instance_1;
|
|
1346
|
+
function $serializer_getInstance_5() {
|
|
1347
|
+
if ($serializer_instance_1 == null)
|
|
1348
|
+
new $serializer_1();
|
|
1349
|
+
return $serializer_instance_1;
|
|
1350
|
+
}
|
|
1351
|
+
function OpenRouterChatCompletionRequest_init_$Init$(seen0, messages, prompt, model, stream, temperature, tools, toolChoice, topP, topLogprobs, maxTokens, frequencyPenalty, presencePenalty, responseFormat, stop, logprobs, seed, topK, repetitionPenalty, logitBias, minP, topA, prediction, transforms, models, route, provider, user, additionalProperties, serializationConstructorMarker, $this) {
|
|
1352
|
+
if (!(0 === (0 & seen0))) {
|
|
1353
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_5().xfw_1);
|
|
1354
|
+
}
|
|
1355
|
+
if (0 === (seen0 & 1))
|
|
1356
|
+
$this.zfw_1 = emptyList();
|
|
1357
|
+
else
|
|
1358
|
+
$this.zfw_1 = messages;
|
|
1359
|
+
if (0 === (seen0 & 2))
|
|
1360
|
+
$this.afx_1 = null;
|
|
1361
|
+
else
|
|
1362
|
+
$this.afx_1 = prompt;
|
|
1363
|
+
if (0 === (seen0 & 4))
|
|
1364
|
+
$this.bfx_1 = null;
|
|
1365
|
+
else
|
|
1366
|
+
$this.bfx_1 = model;
|
|
1367
|
+
if (0 === (seen0 & 8))
|
|
1368
|
+
$this.cfx_1 = null;
|
|
1369
|
+
else
|
|
1370
|
+
$this.cfx_1 = stream;
|
|
1371
|
+
if (0 === (seen0 & 16))
|
|
1372
|
+
$this.dfx_1 = null;
|
|
1373
|
+
else
|
|
1374
|
+
$this.dfx_1 = temperature;
|
|
1375
|
+
if (0 === (seen0 & 32))
|
|
1376
|
+
$this.efx_1 = null;
|
|
1377
|
+
else
|
|
1378
|
+
$this.efx_1 = tools;
|
|
1379
|
+
if (0 === (seen0 & 64))
|
|
1380
|
+
$this.ffx_1 = null;
|
|
1381
|
+
else
|
|
1382
|
+
$this.ffx_1 = toolChoice;
|
|
1383
|
+
if (0 === (seen0 & 128))
|
|
1384
|
+
$this.gfx_1 = null;
|
|
1385
|
+
else
|
|
1386
|
+
$this.gfx_1 = topP;
|
|
1387
|
+
if (0 === (seen0 & 256))
|
|
1388
|
+
$this.hfx_1 = null;
|
|
1389
|
+
else
|
|
1390
|
+
$this.hfx_1 = topLogprobs;
|
|
1391
|
+
if (0 === (seen0 & 512))
|
|
1392
|
+
$this.ifx_1 = null;
|
|
1393
|
+
else
|
|
1394
|
+
$this.ifx_1 = maxTokens;
|
|
1395
|
+
if (0 === (seen0 & 1024))
|
|
1396
|
+
$this.jfx_1 = null;
|
|
1397
|
+
else
|
|
1398
|
+
$this.jfx_1 = frequencyPenalty;
|
|
1399
|
+
if (0 === (seen0 & 2048))
|
|
1400
|
+
$this.kfx_1 = null;
|
|
1401
|
+
else
|
|
1402
|
+
$this.kfx_1 = presencePenalty;
|
|
1403
|
+
if (0 === (seen0 & 4096))
|
|
1404
|
+
$this.lfx_1 = null;
|
|
1405
|
+
else
|
|
1406
|
+
$this.lfx_1 = responseFormat;
|
|
1407
|
+
if (0 === (seen0 & 8192))
|
|
1408
|
+
$this.mfx_1 = null;
|
|
1409
|
+
else
|
|
1410
|
+
$this.mfx_1 = stop;
|
|
1411
|
+
if (0 === (seen0 & 16384))
|
|
1412
|
+
$this.nfx_1 = null;
|
|
1413
|
+
else
|
|
1414
|
+
$this.nfx_1 = logprobs;
|
|
1415
|
+
if (0 === (seen0 & 32768))
|
|
1416
|
+
$this.ofx_1 = null;
|
|
1417
|
+
else
|
|
1418
|
+
$this.ofx_1 = seed;
|
|
1419
|
+
if (0 === (seen0 & 65536))
|
|
1420
|
+
$this.pfx_1 = null;
|
|
1421
|
+
else
|
|
1422
|
+
$this.pfx_1 = topK;
|
|
1423
|
+
if (0 === (seen0 & 131072))
|
|
1424
|
+
$this.qfx_1 = null;
|
|
1425
|
+
else
|
|
1426
|
+
$this.qfx_1 = repetitionPenalty;
|
|
1427
|
+
if (0 === (seen0 & 262144))
|
|
1428
|
+
$this.rfx_1 = null;
|
|
1429
|
+
else
|
|
1430
|
+
$this.rfx_1 = logitBias;
|
|
1431
|
+
if (0 === (seen0 & 524288))
|
|
1432
|
+
$this.sfx_1 = null;
|
|
1433
|
+
else
|
|
1434
|
+
$this.sfx_1 = minP;
|
|
1435
|
+
if (0 === (seen0 & 1048576))
|
|
1436
|
+
$this.tfx_1 = null;
|
|
1437
|
+
else
|
|
1438
|
+
$this.tfx_1 = topA;
|
|
1439
|
+
if (0 === (seen0 & 2097152))
|
|
1440
|
+
$this.ufx_1 = null;
|
|
1441
|
+
else
|
|
1442
|
+
$this.ufx_1 = prediction;
|
|
1443
|
+
if (0 === (seen0 & 4194304))
|
|
1444
|
+
$this.vfx_1 = null;
|
|
1445
|
+
else
|
|
1446
|
+
$this.vfx_1 = transforms;
|
|
1447
|
+
if (0 === (seen0 & 8388608))
|
|
1448
|
+
$this.wfx_1 = null;
|
|
1449
|
+
else
|
|
1450
|
+
$this.wfx_1 = models;
|
|
1451
|
+
if (0 === (seen0 & 16777216))
|
|
1452
|
+
$this.xfx_1 = null;
|
|
1453
|
+
else
|
|
1454
|
+
$this.xfx_1 = route;
|
|
1455
|
+
if (0 === (seen0 & 33554432))
|
|
1456
|
+
$this.yfx_1 = null;
|
|
1457
|
+
else
|
|
1458
|
+
$this.yfx_1 = provider;
|
|
1459
|
+
if (0 === (seen0 & 67108864))
|
|
1460
|
+
$this.zfx_1 = null;
|
|
1461
|
+
else
|
|
1462
|
+
$this.zfx_1 = user;
|
|
1463
|
+
if (0 === (seen0 & 134217728))
|
|
1464
|
+
$this.afy_1 = null;
|
|
1465
|
+
else
|
|
1466
|
+
$this.afy_1 = additionalProperties;
|
|
1467
|
+
return $this;
|
|
1468
|
+
}
|
|
1469
|
+
function OpenRouterChatCompletionRequest_init_$Create$(seen0, messages, prompt, model, stream, temperature, tools, toolChoice, topP, topLogprobs, maxTokens, frequencyPenalty, presencePenalty, responseFormat, stop, logprobs, seed, topK, repetitionPenalty, logitBias, minP, topA, prediction, transforms, models, route, provider, user, additionalProperties, serializationConstructorMarker) {
|
|
1470
|
+
return OpenRouterChatCompletionRequest_init_$Init$(seen0, messages, prompt, model, stream, temperature, tools, toolChoice, topP, topLogprobs, maxTokens, frequencyPenalty, presencePenalty, responseFormat, stop, logprobs, seed, topK, repetitionPenalty, logitBias, minP, topA, prediction, transforms, models, route, provider, user, additionalProperties, serializationConstructorMarker, objectCreate(protoOf(OpenRouterChatCompletionRequest)));
|
|
1471
|
+
}
|
|
1472
|
+
function OpenRouterChatCompletionRequest(messages, prompt, model, stream, temperature, tools, toolChoice, topP, topLogprobs, maxTokens, frequencyPenalty, presencePenalty, responseFormat, stop, logprobs, seed, topK, repetitionPenalty, logitBias, minP, topA, prediction, transforms, models, route, provider, user, additionalProperties) {
|
|
1473
|
+
Companion_getInstance_2();
|
|
1474
|
+
messages = messages === VOID ? emptyList() : messages;
|
|
1475
|
+
prompt = prompt === VOID ? null : prompt;
|
|
1476
|
+
model = model === VOID ? null : model;
|
|
1477
|
+
stream = stream === VOID ? null : stream;
|
|
1478
|
+
temperature = temperature === VOID ? null : temperature;
|
|
1479
|
+
tools = tools === VOID ? null : tools;
|
|
1480
|
+
toolChoice = toolChoice === VOID ? null : toolChoice;
|
|
1481
|
+
topP = topP === VOID ? null : topP;
|
|
1482
|
+
topLogprobs = topLogprobs === VOID ? null : topLogprobs;
|
|
1483
|
+
maxTokens = maxTokens === VOID ? null : maxTokens;
|
|
1484
|
+
frequencyPenalty = frequencyPenalty === VOID ? null : frequencyPenalty;
|
|
1485
|
+
presencePenalty = presencePenalty === VOID ? null : presencePenalty;
|
|
1486
|
+
responseFormat = responseFormat === VOID ? null : responseFormat;
|
|
1487
|
+
stop = stop === VOID ? null : stop;
|
|
1488
|
+
logprobs = logprobs === VOID ? null : logprobs;
|
|
1489
|
+
seed = seed === VOID ? null : seed;
|
|
1490
|
+
topK = topK === VOID ? null : topK;
|
|
1491
|
+
repetitionPenalty = repetitionPenalty === VOID ? null : repetitionPenalty;
|
|
1492
|
+
logitBias = logitBias === VOID ? null : logitBias;
|
|
1493
|
+
minP = minP === VOID ? null : minP;
|
|
1494
|
+
topA = topA === VOID ? null : topA;
|
|
1495
|
+
prediction = prediction === VOID ? null : prediction;
|
|
1496
|
+
transforms = transforms === VOID ? null : transforms;
|
|
1497
|
+
models = models === VOID ? null : models;
|
|
1498
|
+
route = route === VOID ? null : route;
|
|
1499
|
+
provider = provider === VOID ? null : provider;
|
|
1500
|
+
user = user === VOID ? null : user;
|
|
1501
|
+
additionalProperties = additionalProperties === VOID ? null : additionalProperties;
|
|
1502
|
+
this.zfw_1 = messages;
|
|
1503
|
+
this.afx_1 = prompt;
|
|
1504
|
+
this.bfx_1 = model;
|
|
1505
|
+
this.cfx_1 = stream;
|
|
1506
|
+
this.dfx_1 = temperature;
|
|
1507
|
+
this.efx_1 = tools;
|
|
1508
|
+
this.ffx_1 = toolChoice;
|
|
1509
|
+
this.gfx_1 = topP;
|
|
1510
|
+
this.hfx_1 = topLogprobs;
|
|
1511
|
+
this.ifx_1 = maxTokens;
|
|
1512
|
+
this.jfx_1 = frequencyPenalty;
|
|
1513
|
+
this.kfx_1 = presencePenalty;
|
|
1514
|
+
this.lfx_1 = responseFormat;
|
|
1515
|
+
this.mfx_1 = stop;
|
|
1516
|
+
this.nfx_1 = logprobs;
|
|
1517
|
+
this.ofx_1 = seed;
|
|
1518
|
+
this.pfx_1 = topK;
|
|
1519
|
+
this.qfx_1 = repetitionPenalty;
|
|
1520
|
+
this.rfx_1 = logitBias;
|
|
1521
|
+
this.sfx_1 = minP;
|
|
1522
|
+
this.tfx_1 = topA;
|
|
1523
|
+
this.ufx_1 = prediction;
|
|
1524
|
+
this.vfx_1 = transforms;
|
|
1525
|
+
this.wfx_1 = models;
|
|
1526
|
+
this.xfx_1 = route;
|
|
1527
|
+
this.yfx_1 = provider;
|
|
1528
|
+
this.zfx_1 = user;
|
|
1529
|
+
this.afy_1 = additionalProperties;
|
|
1530
|
+
}
|
|
1531
|
+
function ProviderPreferences$Companion$$childSerializers$_anonymous__ey8tnn() {
|
|
1532
|
+
return new ArrayListSerializer(StringSerializer_getInstance());
|
|
1533
|
+
}
|
|
1534
|
+
function ProviderPreferences$Companion$$childSerializers$_anonymous__ey8tnn_0() {
|
|
1535
|
+
return new ArrayListSerializer(StringSerializer_getInstance());
|
|
1536
|
+
}
|
|
1537
|
+
function ProviderPreferences$Companion$$childSerializers$_anonymous__ey8tnn_1() {
|
|
1538
|
+
return new ArrayListSerializer(StringSerializer_getInstance());
|
|
1539
|
+
}
|
|
1540
|
+
function ProviderPreferences$Companion$$childSerializers$_anonymous__ey8tnn_2() {
|
|
1541
|
+
return new ArrayListSerializer(StringSerializer_getInstance());
|
|
1542
|
+
}
|
|
1543
|
+
function ProviderPreferences$Companion$$childSerializers$_anonymous__ey8tnn_3() {
|
|
1544
|
+
return new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance());
|
|
1545
|
+
}
|
|
1546
|
+
function Companion_3() {
|
|
1547
|
+
Companion_instance_6 = this;
|
|
1548
|
+
var tmp = this;
|
|
1549
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
1550
|
+
var tmp_1 = lazy(tmp_0, ProviderPreferences$Companion$$childSerializers$_anonymous__ey8tnn);
|
|
1551
|
+
var tmp_2 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
1552
|
+
var tmp_3 = lazy(tmp_2, ProviderPreferences$Companion$$childSerializers$_anonymous__ey8tnn_0);
|
|
1553
|
+
var tmp_4 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
1554
|
+
var tmp_5 = lazy(tmp_4, ProviderPreferences$Companion$$childSerializers$_anonymous__ey8tnn_1);
|
|
1555
|
+
var tmp_6 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
1556
|
+
var tmp_7 = lazy(tmp_6, ProviderPreferences$Companion$$childSerializers$_anonymous__ey8tnn_2);
|
|
1557
|
+
var tmp_8 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
1558
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1559
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1560
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1561
|
+
tmp.bfy_1 = [tmp_1, null, null, null, tmp_3, tmp_5, tmp_7, null, lazy(tmp_8, ProviderPreferences$Companion$$childSerializers$_anonymous__ey8tnn_3)];
|
|
1562
|
+
}
|
|
1563
|
+
var Companion_instance_6;
|
|
1564
|
+
function Companion_getInstance_3() {
|
|
1565
|
+
if (Companion_instance_6 == null)
|
|
1566
|
+
new Companion_3();
|
|
1567
|
+
return Companion_instance_6;
|
|
1568
|
+
}
|
|
1569
|
+
function $serializer_2() {
|
|
1570
|
+
$serializer_instance_2 = this;
|
|
1571
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.openrouter.models.ProviderPreferences', this, 9);
|
|
1572
|
+
tmp0_serialDesc.m16('order', true);
|
|
1573
|
+
tmp0_serialDesc.m16('allowFallbacks', true);
|
|
1574
|
+
tmp0_serialDesc.m16('requireParameters', true);
|
|
1575
|
+
tmp0_serialDesc.m16('dataCollection', true);
|
|
1576
|
+
tmp0_serialDesc.m16('only', true);
|
|
1577
|
+
tmp0_serialDesc.m16('ignore', true);
|
|
1578
|
+
tmp0_serialDesc.m16('quantizations', true);
|
|
1579
|
+
tmp0_serialDesc.m16('sort', true);
|
|
1580
|
+
tmp0_serialDesc.m16('maxPrice', true);
|
|
1581
|
+
this.cfy_1 = tmp0_serialDesc;
|
|
1582
|
+
}
|
|
1583
|
+
protoOf($serializer_2).dfy = function (encoder, value) {
|
|
1584
|
+
var tmp0_desc = this.cfy_1;
|
|
1585
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1586
|
+
var tmp2_cached = Companion_getInstance_3().bfy_1;
|
|
1587
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.efy_1 == null)) {
|
|
1588
|
+
tmp1_output.p10(tmp0_desc, 0, tmp2_cached[0].b1(), value.efy_1);
|
|
1589
|
+
}
|
|
1590
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.ffy_1 == null)) {
|
|
1591
|
+
tmp1_output.p10(tmp0_desc, 1, BooleanSerializer_getInstance(), value.ffy_1);
|
|
1592
|
+
}
|
|
1593
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.gfy_1 == null)) {
|
|
1594
|
+
tmp1_output.p10(tmp0_desc, 2, BooleanSerializer_getInstance(), value.gfy_1);
|
|
1595
|
+
}
|
|
1596
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.hfy_1 == null)) {
|
|
1597
|
+
tmp1_output.p10(tmp0_desc, 3, StringSerializer_getInstance(), value.hfy_1);
|
|
1598
|
+
}
|
|
1599
|
+
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.ify_1 == null)) {
|
|
1600
|
+
tmp1_output.p10(tmp0_desc, 4, tmp2_cached[4].b1(), value.ify_1);
|
|
1601
|
+
}
|
|
1602
|
+
if (tmp1_output.t10(tmp0_desc, 5) ? true : !(value.jfy_1 == null)) {
|
|
1603
|
+
tmp1_output.p10(tmp0_desc, 5, tmp2_cached[5].b1(), value.jfy_1);
|
|
1604
|
+
}
|
|
1605
|
+
if (tmp1_output.t10(tmp0_desc, 6) ? true : !(value.kfy_1 == null)) {
|
|
1606
|
+
tmp1_output.p10(tmp0_desc, 6, tmp2_cached[6].b1(), value.kfy_1);
|
|
1607
|
+
}
|
|
1608
|
+
if (tmp1_output.t10(tmp0_desc, 7) ? true : !(value.lfy_1 == null)) {
|
|
1609
|
+
tmp1_output.p10(tmp0_desc, 7, StringSerializer_getInstance(), value.lfy_1);
|
|
1610
|
+
}
|
|
1611
|
+
if (tmp1_output.t10(tmp0_desc, 8) ? true : !(value.mfy_1 == null)) {
|
|
1612
|
+
tmp1_output.p10(tmp0_desc, 8, tmp2_cached[8].b1(), value.mfy_1);
|
|
1613
|
+
}
|
|
1614
|
+
tmp1_output.xy(tmp0_desc);
|
|
1615
|
+
};
|
|
1616
|
+
protoOf($serializer_2).gv = function (encoder, value) {
|
|
1617
|
+
return this.dfy(encoder, value instanceof ProviderPreferences ? value : THROW_CCE());
|
|
1618
|
+
};
|
|
1619
|
+
protoOf($serializer_2).hv = function (decoder) {
|
|
1620
|
+
var tmp0_desc = this.cfy_1;
|
|
1621
|
+
var tmp1_flag = true;
|
|
1622
|
+
var tmp2_index = 0;
|
|
1623
|
+
var tmp3_bitMask0 = 0;
|
|
1624
|
+
var tmp4_local0 = null;
|
|
1625
|
+
var tmp5_local1 = null;
|
|
1626
|
+
var tmp6_local2 = null;
|
|
1627
|
+
var tmp7_local3 = null;
|
|
1628
|
+
var tmp8_local4 = null;
|
|
1629
|
+
var tmp9_local5 = null;
|
|
1630
|
+
var tmp10_local6 = null;
|
|
1631
|
+
var tmp11_local7 = null;
|
|
1632
|
+
var tmp12_local8 = null;
|
|
1633
|
+
var tmp13_input = decoder.wy(tmp0_desc);
|
|
1634
|
+
var tmp14_cached = Companion_getInstance_3().bfy_1;
|
|
1635
|
+
if (tmp13_input.mz()) {
|
|
1636
|
+
tmp4_local0 = tmp13_input.kz(tmp0_desc, 0, tmp14_cached[0].b1(), tmp4_local0);
|
|
1637
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1638
|
+
tmp5_local1 = tmp13_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
1639
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1640
|
+
tmp6_local2 = tmp13_input.kz(tmp0_desc, 2, BooleanSerializer_getInstance(), tmp6_local2);
|
|
1641
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1642
|
+
tmp7_local3 = tmp13_input.kz(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
|
|
1643
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1644
|
+
tmp8_local4 = tmp13_input.kz(tmp0_desc, 4, tmp14_cached[4].b1(), tmp8_local4);
|
|
1645
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
1646
|
+
tmp9_local5 = tmp13_input.kz(tmp0_desc, 5, tmp14_cached[5].b1(), tmp9_local5);
|
|
1647
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
1648
|
+
tmp10_local6 = tmp13_input.kz(tmp0_desc, 6, tmp14_cached[6].b1(), tmp10_local6);
|
|
1649
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
1650
|
+
tmp11_local7 = tmp13_input.kz(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
|
|
1651
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 128;
|
|
1652
|
+
tmp12_local8 = tmp13_input.kz(tmp0_desc, 8, tmp14_cached[8].b1(), tmp12_local8);
|
|
1653
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 256;
|
|
1654
|
+
} else
|
|
1655
|
+
while (tmp1_flag) {
|
|
1656
|
+
tmp2_index = tmp13_input.nz(tmp0_desc);
|
|
1657
|
+
switch (tmp2_index) {
|
|
1658
|
+
case -1:
|
|
1659
|
+
tmp1_flag = false;
|
|
1660
|
+
break;
|
|
1661
|
+
case 0:
|
|
1662
|
+
tmp4_local0 = tmp13_input.kz(tmp0_desc, 0, tmp14_cached[0].b1(), tmp4_local0);
|
|
1663
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1664
|
+
break;
|
|
1665
|
+
case 1:
|
|
1666
|
+
tmp5_local1 = tmp13_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
1667
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1668
|
+
break;
|
|
1669
|
+
case 2:
|
|
1670
|
+
tmp6_local2 = tmp13_input.kz(tmp0_desc, 2, BooleanSerializer_getInstance(), tmp6_local2);
|
|
1671
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1672
|
+
break;
|
|
1673
|
+
case 3:
|
|
1674
|
+
tmp7_local3 = tmp13_input.kz(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
|
|
1675
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1676
|
+
break;
|
|
1677
|
+
case 4:
|
|
1678
|
+
tmp8_local4 = tmp13_input.kz(tmp0_desc, 4, tmp14_cached[4].b1(), tmp8_local4);
|
|
1679
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
1680
|
+
break;
|
|
1681
|
+
case 5:
|
|
1682
|
+
tmp9_local5 = tmp13_input.kz(tmp0_desc, 5, tmp14_cached[5].b1(), tmp9_local5);
|
|
1683
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
1684
|
+
break;
|
|
1685
|
+
case 6:
|
|
1686
|
+
tmp10_local6 = tmp13_input.kz(tmp0_desc, 6, tmp14_cached[6].b1(), tmp10_local6);
|
|
1687
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
1688
|
+
break;
|
|
1689
|
+
case 7:
|
|
1690
|
+
tmp11_local7 = tmp13_input.kz(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
|
|
1691
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 128;
|
|
1692
|
+
break;
|
|
1693
|
+
case 8:
|
|
1694
|
+
tmp12_local8 = tmp13_input.kz(tmp0_desc, 8, tmp14_cached[8].b1(), tmp12_local8);
|
|
1695
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 256;
|
|
1696
|
+
break;
|
|
1697
|
+
default:
|
|
1698
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
tmp13_input.xy(tmp0_desc);
|
|
1702
|
+
return ProviderPreferences_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, null);
|
|
1703
|
+
};
|
|
1704
|
+
protoOf($serializer_2).fv = function () {
|
|
1705
|
+
return this.cfy_1;
|
|
1706
|
+
};
|
|
1707
|
+
protoOf($serializer_2).d17 = function () {
|
|
1708
|
+
var tmp0_cached = Companion_getInstance_3().bfy_1;
|
|
1709
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1710
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1711
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1712
|
+
return [get_nullable(tmp0_cached[0].b1()), get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[4].b1()), get_nullable(tmp0_cached[5].b1()), get_nullable(tmp0_cached[6].b1()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[8].b1())];
|
|
1713
|
+
};
|
|
1714
|
+
var $serializer_instance_2;
|
|
1715
|
+
function $serializer_getInstance_6() {
|
|
1716
|
+
if ($serializer_instance_2 == null)
|
|
1717
|
+
new $serializer_2();
|
|
1718
|
+
return $serializer_instance_2;
|
|
1719
|
+
}
|
|
1720
|
+
function ProviderPreferences_init_$Init$(seen0, order, allowFallbacks, requireParameters, dataCollection, only, ignore, quantizations, sort, maxPrice, serializationConstructorMarker, $this) {
|
|
1721
|
+
if (!(0 === (0 & seen0))) {
|
|
1722
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_6().cfy_1);
|
|
1723
|
+
}
|
|
1724
|
+
if (0 === (seen0 & 1))
|
|
1725
|
+
$this.efy_1 = null;
|
|
1726
|
+
else
|
|
1727
|
+
$this.efy_1 = order;
|
|
1728
|
+
if (0 === (seen0 & 2))
|
|
1729
|
+
$this.ffy_1 = null;
|
|
1730
|
+
else
|
|
1731
|
+
$this.ffy_1 = allowFallbacks;
|
|
1732
|
+
if (0 === (seen0 & 4))
|
|
1733
|
+
$this.gfy_1 = null;
|
|
1734
|
+
else
|
|
1735
|
+
$this.gfy_1 = requireParameters;
|
|
1736
|
+
if (0 === (seen0 & 8))
|
|
1737
|
+
$this.hfy_1 = null;
|
|
1738
|
+
else
|
|
1739
|
+
$this.hfy_1 = dataCollection;
|
|
1740
|
+
if (0 === (seen0 & 16))
|
|
1741
|
+
$this.ify_1 = null;
|
|
1742
|
+
else
|
|
1743
|
+
$this.ify_1 = only;
|
|
1744
|
+
if (0 === (seen0 & 32))
|
|
1745
|
+
$this.jfy_1 = null;
|
|
1746
|
+
else
|
|
1747
|
+
$this.jfy_1 = ignore;
|
|
1748
|
+
if (0 === (seen0 & 64))
|
|
1749
|
+
$this.kfy_1 = null;
|
|
1750
|
+
else
|
|
1751
|
+
$this.kfy_1 = quantizations;
|
|
1752
|
+
if (0 === (seen0 & 128))
|
|
1753
|
+
$this.lfy_1 = null;
|
|
1754
|
+
else
|
|
1755
|
+
$this.lfy_1 = sort;
|
|
1756
|
+
if (0 === (seen0 & 256))
|
|
1757
|
+
$this.mfy_1 = null;
|
|
1758
|
+
else
|
|
1759
|
+
$this.mfy_1 = maxPrice;
|
|
1760
|
+
return $this;
|
|
1761
|
+
}
|
|
1762
|
+
function ProviderPreferences_init_$Create$(seen0, order, allowFallbacks, requireParameters, dataCollection, only, ignore, quantizations, sort, maxPrice, serializationConstructorMarker) {
|
|
1763
|
+
return ProviderPreferences_init_$Init$(seen0, order, allowFallbacks, requireParameters, dataCollection, only, ignore, quantizations, sort, maxPrice, serializationConstructorMarker, objectCreate(protoOf(ProviderPreferences)));
|
|
1764
|
+
}
|
|
1765
|
+
function ProviderPreferences(order, allowFallbacks, requireParameters, dataCollection, only, ignore, quantizations, sort, maxPrice) {
|
|
1766
|
+
Companion_getInstance_3();
|
|
1767
|
+
order = order === VOID ? null : order;
|
|
1768
|
+
allowFallbacks = allowFallbacks === VOID ? null : allowFallbacks;
|
|
1769
|
+
requireParameters = requireParameters === VOID ? null : requireParameters;
|
|
1770
|
+
dataCollection = dataCollection === VOID ? null : dataCollection;
|
|
1771
|
+
only = only === VOID ? null : only;
|
|
1772
|
+
ignore = ignore === VOID ? null : ignore;
|
|
1773
|
+
quantizations = quantizations === VOID ? null : quantizations;
|
|
1774
|
+
sort = sort === VOID ? null : sort;
|
|
1775
|
+
maxPrice = maxPrice === VOID ? null : maxPrice;
|
|
1776
|
+
this.efy_1 = order;
|
|
1777
|
+
this.ffy_1 = allowFallbacks;
|
|
1778
|
+
this.gfy_1 = requireParameters;
|
|
1779
|
+
this.hfy_1 = dataCollection;
|
|
1780
|
+
this.ify_1 = only;
|
|
1781
|
+
this.jfy_1 = ignore;
|
|
1782
|
+
this.kfy_1 = quantizations;
|
|
1783
|
+
this.lfy_1 = sort;
|
|
1784
|
+
this.mfy_1 = maxPrice;
|
|
1785
|
+
}
|
|
1786
|
+
function OpenRouterChatCompletionRequestSerializer() {
|
|
1787
|
+
OpenRouterChatCompletionRequestSerializer_instance = this;
|
|
1788
|
+
AdditionalPropertiesFlatteningSerializer.call(this, Companion_getInstance_2().q1j());
|
|
1789
|
+
}
|
|
1790
|
+
var OpenRouterChatCompletionRequestSerializer_instance;
|
|
1791
|
+
function OpenRouterChatCompletionRequestSerializer_getInstance() {
|
|
1792
|
+
if (OpenRouterChatCompletionRequestSerializer_instance == null)
|
|
1793
|
+
new OpenRouterChatCompletionRequestSerializer();
|
|
1794
|
+
return OpenRouterChatCompletionRequestSerializer_instance;
|
|
1795
|
+
}
|
|
1796
|
+
function OpenRouterChoice$Companion$$childSerializers$_anonymous__ncxp4m() {
|
|
1797
|
+
return Companion_instance_0.q1j();
|
|
1798
|
+
}
|
|
1799
|
+
function Companion_4() {
|
|
1800
|
+
Companion_instance_7 = this;
|
|
1801
|
+
var tmp = this;
|
|
1802
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
1803
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1804
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1805
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1806
|
+
tmp.nfy_1 = [null, null, lazy(tmp_0, OpenRouterChoice$Companion$$childSerializers$_anonymous__ncxp4m), null];
|
|
1807
|
+
}
|
|
1808
|
+
var Companion_instance_7;
|
|
1809
|
+
function Companion_getInstance_4() {
|
|
1810
|
+
if (Companion_instance_7 == null)
|
|
1811
|
+
new Companion_4();
|
|
1812
|
+
return Companion_instance_7;
|
|
1813
|
+
}
|
|
1814
|
+
function $serializer_3() {
|
|
1815
|
+
$serializer_instance_3 = this;
|
|
1816
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.openrouter.models.OpenRouterChoice', this, 4);
|
|
1817
|
+
tmp0_serialDesc.m16('finishReason', true);
|
|
1818
|
+
tmp0_serialDesc.m16('nativeFinishReason', true);
|
|
1819
|
+
tmp0_serialDesc.m16('message', false);
|
|
1820
|
+
tmp0_serialDesc.m16('error', true);
|
|
1821
|
+
this.ofy_1 = tmp0_serialDesc;
|
|
1822
|
+
}
|
|
1823
|
+
protoOf($serializer_3).pfy = function (encoder, value) {
|
|
1824
|
+
var tmp0_desc = this.ofy_1;
|
|
1825
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1826
|
+
var tmp2_cached = Companion_getInstance_4().nfy_1;
|
|
1827
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.lfw_1 == null)) {
|
|
1828
|
+
tmp1_output.p10(tmp0_desc, 0, StringSerializer_getInstance(), value.lfw_1);
|
|
1829
|
+
}
|
|
1830
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.mfw_1 == null)) {
|
|
1831
|
+
tmp1_output.p10(tmp0_desc, 1, StringSerializer_getInstance(), value.mfw_1);
|
|
1832
|
+
}
|
|
1833
|
+
tmp1_output.n10(tmp0_desc, 2, tmp2_cached[2].b1(), value.nfw_1);
|
|
1834
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.ofw_1 == null)) {
|
|
1835
|
+
tmp1_output.p10(tmp0_desc, 3, $serializer_getInstance_10(), value.ofw_1);
|
|
1836
|
+
}
|
|
1837
|
+
tmp1_output.xy(tmp0_desc);
|
|
1838
|
+
};
|
|
1839
|
+
protoOf($serializer_3).gv = function (encoder, value) {
|
|
1840
|
+
return this.pfy(encoder, value instanceof OpenRouterChoice ? value : THROW_CCE());
|
|
1841
|
+
};
|
|
1842
|
+
protoOf($serializer_3).hv = function (decoder) {
|
|
1843
|
+
var tmp0_desc = this.ofy_1;
|
|
1844
|
+
var tmp1_flag = true;
|
|
1845
|
+
var tmp2_index = 0;
|
|
1846
|
+
var tmp3_bitMask0 = 0;
|
|
1847
|
+
var tmp4_local0 = null;
|
|
1848
|
+
var tmp5_local1 = null;
|
|
1849
|
+
var tmp6_local2 = null;
|
|
1850
|
+
var tmp7_local3 = null;
|
|
1851
|
+
var tmp8_input = decoder.wy(tmp0_desc);
|
|
1852
|
+
var tmp9_cached = Companion_getInstance_4().nfy_1;
|
|
1853
|
+
if (tmp8_input.mz()) {
|
|
1854
|
+
tmp4_local0 = tmp8_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
1855
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1856
|
+
tmp5_local1 = tmp8_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
1857
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1858
|
+
tmp6_local2 = tmp8_input.iz(tmp0_desc, 2, tmp9_cached[2].b1(), tmp6_local2);
|
|
1859
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1860
|
+
tmp7_local3 = tmp8_input.kz(tmp0_desc, 3, $serializer_getInstance_10(), tmp7_local3);
|
|
1861
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1862
|
+
} else
|
|
1863
|
+
while (tmp1_flag) {
|
|
1864
|
+
tmp2_index = tmp8_input.nz(tmp0_desc);
|
|
1865
|
+
switch (tmp2_index) {
|
|
1866
|
+
case -1:
|
|
1867
|
+
tmp1_flag = false;
|
|
1868
|
+
break;
|
|
1869
|
+
case 0:
|
|
1870
|
+
tmp4_local0 = tmp8_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
1871
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1872
|
+
break;
|
|
1873
|
+
case 1:
|
|
1874
|
+
tmp5_local1 = tmp8_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
1875
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1876
|
+
break;
|
|
1877
|
+
case 2:
|
|
1878
|
+
tmp6_local2 = tmp8_input.iz(tmp0_desc, 2, tmp9_cached[2].b1(), tmp6_local2);
|
|
1879
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1880
|
+
break;
|
|
1881
|
+
case 3:
|
|
1882
|
+
tmp7_local3 = tmp8_input.kz(tmp0_desc, 3, $serializer_getInstance_10(), tmp7_local3);
|
|
1883
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1884
|
+
break;
|
|
1885
|
+
default:
|
|
1886
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
tmp8_input.xy(tmp0_desc);
|
|
1890
|
+
return OpenRouterChoice_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
1891
|
+
};
|
|
1892
|
+
protoOf($serializer_3).fv = function () {
|
|
1893
|
+
return this.ofy_1;
|
|
1894
|
+
};
|
|
1895
|
+
protoOf($serializer_3).d17 = function () {
|
|
1896
|
+
var tmp0_cached = Companion_getInstance_4().nfy_1;
|
|
1897
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1898
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1899
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1900
|
+
return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), tmp0_cached[2].b1(), get_nullable($serializer_getInstance_10())];
|
|
1901
|
+
};
|
|
1902
|
+
var $serializer_instance_3;
|
|
1903
|
+
function $serializer_getInstance_7() {
|
|
1904
|
+
if ($serializer_instance_3 == null)
|
|
1905
|
+
new $serializer_3();
|
|
1906
|
+
return $serializer_instance_3;
|
|
1907
|
+
}
|
|
1908
|
+
function OpenRouterChoice_init_$Init$(seen0, finishReason, nativeFinishReason, message, error, serializationConstructorMarker, $this) {
|
|
1909
|
+
if (!(4 === (4 & seen0))) {
|
|
1910
|
+
throwMissingFieldException(seen0, 4, $serializer_getInstance_7().ofy_1);
|
|
1911
|
+
}
|
|
1912
|
+
if (0 === (seen0 & 1))
|
|
1913
|
+
$this.lfw_1 = null;
|
|
1914
|
+
else
|
|
1915
|
+
$this.lfw_1 = finishReason;
|
|
1916
|
+
if (0 === (seen0 & 2))
|
|
1917
|
+
$this.mfw_1 = null;
|
|
1918
|
+
else
|
|
1919
|
+
$this.mfw_1 = nativeFinishReason;
|
|
1920
|
+
$this.nfw_1 = message;
|
|
1921
|
+
if (0 === (seen0 & 8))
|
|
1922
|
+
$this.ofw_1 = null;
|
|
1923
|
+
else
|
|
1924
|
+
$this.ofw_1 = error;
|
|
1925
|
+
return $this;
|
|
1926
|
+
}
|
|
1927
|
+
function OpenRouterChoice_init_$Create$(seen0, finishReason, nativeFinishReason, message, error, serializationConstructorMarker) {
|
|
1928
|
+
return OpenRouterChoice_init_$Init$(seen0, finishReason, nativeFinishReason, message, error, serializationConstructorMarker, objectCreate(protoOf(OpenRouterChoice)));
|
|
1929
|
+
}
|
|
1930
|
+
function OpenRouterChoice() {
|
|
1931
|
+
}
|
|
1932
|
+
function $serializer_4() {
|
|
1933
|
+
$serializer_instance_4 = this;
|
|
1934
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.openrouter.models.OpenRouterStreamChoice', this, 4);
|
|
1935
|
+
tmp0_serialDesc.m16('finishReason', true);
|
|
1936
|
+
tmp0_serialDesc.m16('nativeFinishReason', true);
|
|
1937
|
+
tmp0_serialDesc.m16('delta', false);
|
|
1938
|
+
tmp0_serialDesc.m16('error', true);
|
|
1939
|
+
this.qfy_1 = tmp0_serialDesc;
|
|
1940
|
+
}
|
|
1941
|
+
protoOf($serializer_4).rfy = function (encoder, value) {
|
|
1942
|
+
var tmp0_desc = this.qfy_1;
|
|
1943
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1944
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.tfu_1 == null)) {
|
|
1945
|
+
tmp1_output.p10(tmp0_desc, 0, StringSerializer_getInstance(), value.tfu_1);
|
|
1946
|
+
}
|
|
1947
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.ufu_1 == null)) {
|
|
1948
|
+
tmp1_output.p10(tmp0_desc, 1, StringSerializer_getInstance(), value.ufu_1);
|
|
1949
|
+
}
|
|
1950
|
+
tmp1_output.n10(tmp0_desc, 2, $serializer_getInstance_9(), value.vfu_1);
|
|
1951
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.wfu_1 == null)) {
|
|
1952
|
+
tmp1_output.p10(tmp0_desc, 3, $serializer_getInstance_10(), value.wfu_1);
|
|
1953
|
+
}
|
|
1954
|
+
tmp1_output.xy(tmp0_desc);
|
|
1955
|
+
};
|
|
1956
|
+
protoOf($serializer_4).gv = function (encoder, value) {
|
|
1957
|
+
return this.rfy(encoder, value instanceof OpenRouterStreamChoice ? value : THROW_CCE());
|
|
1958
|
+
};
|
|
1959
|
+
protoOf($serializer_4).hv = function (decoder) {
|
|
1960
|
+
var tmp0_desc = this.qfy_1;
|
|
1961
|
+
var tmp1_flag = true;
|
|
1962
|
+
var tmp2_index = 0;
|
|
1963
|
+
var tmp3_bitMask0 = 0;
|
|
1964
|
+
var tmp4_local0 = null;
|
|
1965
|
+
var tmp5_local1 = null;
|
|
1966
|
+
var tmp6_local2 = null;
|
|
1967
|
+
var tmp7_local3 = null;
|
|
1968
|
+
var tmp8_input = decoder.wy(tmp0_desc);
|
|
1969
|
+
if (tmp8_input.mz()) {
|
|
1970
|
+
tmp4_local0 = tmp8_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
1971
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1972
|
+
tmp5_local1 = tmp8_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
1973
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1974
|
+
tmp6_local2 = tmp8_input.iz(tmp0_desc, 2, $serializer_getInstance_9(), tmp6_local2);
|
|
1975
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1976
|
+
tmp7_local3 = tmp8_input.kz(tmp0_desc, 3, $serializer_getInstance_10(), tmp7_local3);
|
|
1977
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1978
|
+
} else
|
|
1979
|
+
while (tmp1_flag) {
|
|
1980
|
+
tmp2_index = tmp8_input.nz(tmp0_desc);
|
|
1981
|
+
switch (tmp2_index) {
|
|
1982
|
+
case -1:
|
|
1983
|
+
tmp1_flag = false;
|
|
1984
|
+
break;
|
|
1985
|
+
case 0:
|
|
1986
|
+
tmp4_local0 = tmp8_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
1987
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1988
|
+
break;
|
|
1989
|
+
case 1:
|
|
1990
|
+
tmp5_local1 = tmp8_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
1991
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1992
|
+
break;
|
|
1993
|
+
case 2:
|
|
1994
|
+
tmp6_local2 = tmp8_input.iz(tmp0_desc, 2, $serializer_getInstance_9(), tmp6_local2);
|
|
1995
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1996
|
+
break;
|
|
1997
|
+
case 3:
|
|
1998
|
+
tmp7_local3 = tmp8_input.kz(tmp0_desc, 3, $serializer_getInstance_10(), tmp7_local3);
|
|
1999
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
2000
|
+
break;
|
|
2001
|
+
default:
|
|
2002
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
tmp8_input.xy(tmp0_desc);
|
|
2006
|
+
return OpenRouterStreamChoice_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
2007
|
+
};
|
|
2008
|
+
protoOf($serializer_4).fv = function () {
|
|
2009
|
+
return this.qfy_1;
|
|
2010
|
+
};
|
|
2011
|
+
protoOf($serializer_4).d17 = function () {
|
|
2012
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2013
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2014
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2015
|
+
return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), $serializer_getInstance_9(), get_nullable($serializer_getInstance_10())];
|
|
2016
|
+
};
|
|
2017
|
+
var $serializer_instance_4;
|
|
2018
|
+
function $serializer_getInstance_8() {
|
|
2019
|
+
if ($serializer_instance_4 == null)
|
|
2020
|
+
new $serializer_4();
|
|
2021
|
+
return $serializer_instance_4;
|
|
2022
|
+
}
|
|
2023
|
+
function OpenRouterStreamChoice_init_$Init$(seen0, finishReason, nativeFinishReason, delta, error, serializationConstructorMarker, $this) {
|
|
2024
|
+
if (!(4 === (4 & seen0))) {
|
|
2025
|
+
throwMissingFieldException(seen0, 4, $serializer_getInstance_8().qfy_1);
|
|
2026
|
+
}
|
|
2027
|
+
if (0 === (seen0 & 1))
|
|
2028
|
+
$this.tfu_1 = null;
|
|
2029
|
+
else
|
|
2030
|
+
$this.tfu_1 = finishReason;
|
|
2031
|
+
if (0 === (seen0 & 2))
|
|
2032
|
+
$this.ufu_1 = null;
|
|
2033
|
+
else
|
|
2034
|
+
$this.ufu_1 = nativeFinishReason;
|
|
2035
|
+
$this.vfu_1 = delta;
|
|
2036
|
+
if (0 === (seen0 & 8))
|
|
2037
|
+
$this.wfu_1 = null;
|
|
2038
|
+
else
|
|
2039
|
+
$this.wfu_1 = error;
|
|
2040
|
+
return $this;
|
|
2041
|
+
}
|
|
2042
|
+
function OpenRouterStreamChoice_init_$Create$(seen0, finishReason, nativeFinishReason, delta, error, serializationConstructorMarker) {
|
|
2043
|
+
return OpenRouterStreamChoice_init_$Init$(seen0, finishReason, nativeFinishReason, delta, error, serializationConstructorMarker, objectCreate(protoOf(OpenRouterStreamChoice)));
|
|
2044
|
+
}
|
|
2045
|
+
function OpenRouterStreamChoice() {
|
|
2046
|
+
}
|
|
2047
|
+
function OpenRouterStreamDelta$Companion$$childSerializers$_anonymous__eatzln() {
|
|
2048
|
+
return new ArrayListSerializer($serializer_getInstance_2());
|
|
2049
|
+
}
|
|
2050
|
+
function Companion_5() {
|
|
2051
|
+
Companion_instance_8 = this;
|
|
2052
|
+
var tmp = this;
|
|
2053
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
2054
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2055
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2056
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2057
|
+
tmp.sfy_1 = [null, null, lazy(tmp_0, OpenRouterStreamDelta$Companion$$childSerializers$_anonymous__eatzln)];
|
|
2058
|
+
}
|
|
2059
|
+
var Companion_instance_8;
|
|
2060
|
+
function Companion_getInstance_5() {
|
|
2061
|
+
if (Companion_instance_8 == null)
|
|
2062
|
+
new Companion_5();
|
|
2063
|
+
return Companion_instance_8;
|
|
2064
|
+
}
|
|
2065
|
+
function $serializer_5() {
|
|
2066
|
+
$serializer_instance_5 = this;
|
|
2067
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.openrouter.models.OpenRouterStreamDelta', this, 3);
|
|
2068
|
+
tmp0_serialDesc.m16('content', true);
|
|
2069
|
+
tmp0_serialDesc.m16('role', true);
|
|
2070
|
+
tmp0_serialDesc.m16('toolCalls', true);
|
|
2071
|
+
this.tfy_1 = tmp0_serialDesc;
|
|
2072
|
+
}
|
|
2073
|
+
protoOf($serializer_5).ufy = function (encoder, value) {
|
|
2074
|
+
var tmp0_desc = this.tfy_1;
|
|
2075
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
2076
|
+
var tmp2_cached = Companion_getInstance_5().sfy_1;
|
|
2077
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.qfu_1 == null)) {
|
|
2078
|
+
tmp1_output.p10(tmp0_desc, 0, StringSerializer_getInstance(), value.qfu_1);
|
|
2079
|
+
}
|
|
2080
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.rfu_1 == null)) {
|
|
2081
|
+
tmp1_output.p10(tmp0_desc, 1, StringSerializer_getInstance(), value.rfu_1);
|
|
2082
|
+
}
|
|
2083
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.sfu_1 == null)) {
|
|
2084
|
+
tmp1_output.p10(tmp0_desc, 2, tmp2_cached[2].b1(), value.sfu_1);
|
|
2085
|
+
}
|
|
2086
|
+
tmp1_output.xy(tmp0_desc);
|
|
2087
|
+
};
|
|
2088
|
+
protoOf($serializer_5).gv = function (encoder, value) {
|
|
2089
|
+
return this.ufy(encoder, value instanceof OpenRouterStreamDelta ? value : THROW_CCE());
|
|
2090
|
+
};
|
|
2091
|
+
protoOf($serializer_5).hv = function (decoder) {
|
|
2092
|
+
var tmp0_desc = this.tfy_1;
|
|
2093
|
+
var tmp1_flag = true;
|
|
2094
|
+
var tmp2_index = 0;
|
|
2095
|
+
var tmp3_bitMask0 = 0;
|
|
2096
|
+
var tmp4_local0 = null;
|
|
2097
|
+
var tmp5_local1 = null;
|
|
2098
|
+
var tmp6_local2 = null;
|
|
2099
|
+
var tmp7_input = decoder.wy(tmp0_desc);
|
|
2100
|
+
var tmp8_cached = Companion_getInstance_5().sfy_1;
|
|
2101
|
+
if (tmp7_input.mz()) {
|
|
2102
|
+
tmp4_local0 = tmp7_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
2103
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2104
|
+
tmp5_local1 = tmp7_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
2105
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2106
|
+
tmp6_local2 = tmp7_input.kz(tmp0_desc, 2, tmp8_cached[2].b1(), tmp6_local2);
|
|
2107
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
2108
|
+
} else
|
|
2109
|
+
while (tmp1_flag) {
|
|
2110
|
+
tmp2_index = tmp7_input.nz(tmp0_desc);
|
|
2111
|
+
switch (tmp2_index) {
|
|
2112
|
+
case -1:
|
|
2113
|
+
tmp1_flag = false;
|
|
2114
|
+
break;
|
|
2115
|
+
case 0:
|
|
2116
|
+
tmp4_local0 = tmp7_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
2117
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2118
|
+
break;
|
|
2119
|
+
case 1:
|
|
2120
|
+
tmp5_local1 = tmp7_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
2121
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2122
|
+
break;
|
|
2123
|
+
case 2:
|
|
2124
|
+
tmp6_local2 = tmp7_input.kz(tmp0_desc, 2, tmp8_cached[2].b1(), tmp6_local2);
|
|
2125
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
2126
|
+
break;
|
|
2127
|
+
default:
|
|
2128
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
tmp7_input.xy(tmp0_desc);
|
|
2132
|
+
return OpenRouterStreamDelta_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
2133
|
+
};
|
|
2134
|
+
protoOf($serializer_5).fv = function () {
|
|
2135
|
+
return this.tfy_1;
|
|
2136
|
+
};
|
|
2137
|
+
protoOf($serializer_5).d17 = function () {
|
|
2138
|
+
var tmp0_cached = Companion_getInstance_5().sfy_1;
|
|
2139
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2140
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2141
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2142
|
+
return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[2].b1())];
|
|
2143
|
+
};
|
|
2144
|
+
var $serializer_instance_5;
|
|
2145
|
+
function $serializer_getInstance_9() {
|
|
2146
|
+
if ($serializer_instance_5 == null)
|
|
2147
|
+
new $serializer_5();
|
|
2148
|
+
return $serializer_instance_5;
|
|
2149
|
+
}
|
|
2150
|
+
function OpenRouterStreamDelta_init_$Init$(seen0, content, role, toolCalls, serializationConstructorMarker, $this) {
|
|
2151
|
+
if (!(0 === (0 & seen0))) {
|
|
2152
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_9().tfy_1);
|
|
2153
|
+
}
|
|
2154
|
+
if (0 === (seen0 & 1))
|
|
2155
|
+
$this.qfu_1 = null;
|
|
2156
|
+
else
|
|
2157
|
+
$this.qfu_1 = content;
|
|
2158
|
+
if (0 === (seen0 & 2))
|
|
2159
|
+
$this.rfu_1 = null;
|
|
2160
|
+
else
|
|
2161
|
+
$this.rfu_1 = role;
|
|
2162
|
+
if (0 === (seen0 & 4))
|
|
2163
|
+
$this.sfu_1 = null;
|
|
2164
|
+
else
|
|
2165
|
+
$this.sfu_1 = toolCalls;
|
|
2166
|
+
return $this;
|
|
2167
|
+
}
|
|
2168
|
+
function OpenRouterStreamDelta_init_$Create$(seen0, content, role, toolCalls, serializationConstructorMarker) {
|
|
2169
|
+
return OpenRouterStreamDelta_init_$Init$(seen0, content, role, toolCalls, serializationConstructorMarker, objectCreate(protoOf(OpenRouterStreamDelta)));
|
|
2170
|
+
}
|
|
2171
|
+
function OpenRouterStreamDelta(content, role, toolCalls) {
|
|
2172
|
+
Companion_getInstance_5();
|
|
2173
|
+
content = content === VOID ? null : content;
|
|
2174
|
+
role = role === VOID ? null : role;
|
|
2175
|
+
toolCalls = toolCalls === VOID ? null : toolCalls;
|
|
2176
|
+
this.qfu_1 = content;
|
|
2177
|
+
this.rfu_1 = role;
|
|
2178
|
+
this.sfu_1 = toolCalls;
|
|
2179
|
+
}
|
|
2180
|
+
function ErrorResponse$Companion$$childSerializers$_anonymous__w0ascf() {
|
|
2181
|
+
return new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance());
|
|
2182
|
+
}
|
|
2183
|
+
function Companion_6() {
|
|
2184
|
+
Companion_instance_9 = this;
|
|
2185
|
+
var tmp = this;
|
|
2186
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
2187
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2188
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2189
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2190
|
+
tmp.vfy_1 = [null, null, lazy(tmp_0, ErrorResponse$Companion$$childSerializers$_anonymous__w0ascf)];
|
|
2191
|
+
}
|
|
2192
|
+
var Companion_instance_9;
|
|
2193
|
+
function Companion_getInstance_6() {
|
|
2194
|
+
if (Companion_instance_9 == null)
|
|
2195
|
+
new Companion_6();
|
|
2196
|
+
return Companion_instance_9;
|
|
2197
|
+
}
|
|
2198
|
+
function $serializer_6() {
|
|
2199
|
+
$serializer_instance_6 = this;
|
|
2200
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.openrouter.models.ErrorResponse', this, 3);
|
|
2201
|
+
tmp0_serialDesc.m16('code', false);
|
|
2202
|
+
tmp0_serialDesc.m16('message', false);
|
|
2203
|
+
tmp0_serialDesc.m16('metadata', true);
|
|
2204
|
+
this.wfy_1 = tmp0_serialDesc;
|
|
2205
|
+
}
|
|
2206
|
+
protoOf($serializer_6).xfy = function (encoder, value) {
|
|
2207
|
+
var tmp0_desc = this.wfy_1;
|
|
2208
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
2209
|
+
var tmp2_cached = Companion_getInstance_6().vfy_1;
|
|
2210
|
+
tmp1_output.g10(tmp0_desc, 0, value.yfy_1);
|
|
2211
|
+
tmp1_output.l10(tmp0_desc, 1, value.zfy_1);
|
|
2212
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.afz_1 == null)) {
|
|
2213
|
+
tmp1_output.p10(tmp0_desc, 2, tmp2_cached[2].b1(), value.afz_1);
|
|
2214
|
+
}
|
|
2215
|
+
tmp1_output.xy(tmp0_desc);
|
|
2216
|
+
};
|
|
2217
|
+
protoOf($serializer_6).gv = function (encoder, value) {
|
|
2218
|
+
return this.xfy(encoder, value instanceof ErrorResponse ? value : THROW_CCE());
|
|
2219
|
+
};
|
|
2220
|
+
protoOf($serializer_6).hv = function (decoder) {
|
|
2221
|
+
var tmp0_desc = this.wfy_1;
|
|
2222
|
+
var tmp1_flag = true;
|
|
2223
|
+
var tmp2_index = 0;
|
|
2224
|
+
var tmp3_bitMask0 = 0;
|
|
2225
|
+
var tmp4_local0 = 0;
|
|
2226
|
+
var tmp5_local1 = null;
|
|
2227
|
+
var tmp6_local2 = null;
|
|
2228
|
+
var tmp7_input = decoder.wy(tmp0_desc);
|
|
2229
|
+
var tmp8_cached = Companion_getInstance_6().vfy_1;
|
|
2230
|
+
if (tmp7_input.mz()) {
|
|
2231
|
+
tmp4_local0 = tmp7_input.bz(tmp0_desc, 0);
|
|
2232
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2233
|
+
tmp5_local1 = tmp7_input.gz(tmp0_desc, 1);
|
|
2234
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2235
|
+
tmp6_local2 = tmp7_input.kz(tmp0_desc, 2, tmp8_cached[2].b1(), tmp6_local2);
|
|
2236
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
2237
|
+
} else
|
|
2238
|
+
while (tmp1_flag) {
|
|
2239
|
+
tmp2_index = tmp7_input.nz(tmp0_desc);
|
|
2240
|
+
switch (tmp2_index) {
|
|
2241
|
+
case -1:
|
|
2242
|
+
tmp1_flag = false;
|
|
2243
|
+
break;
|
|
2244
|
+
case 0:
|
|
2245
|
+
tmp4_local0 = tmp7_input.bz(tmp0_desc, 0);
|
|
2246
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2247
|
+
break;
|
|
2248
|
+
case 1:
|
|
2249
|
+
tmp5_local1 = tmp7_input.gz(tmp0_desc, 1);
|
|
2250
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2251
|
+
break;
|
|
2252
|
+
case 2:
|
|
2253
|
+
tmp6_local2 = tmp7_input.kz(tmp0_desc, 2, tmp8_cached[2].b1(), tmp6_local2);
|
|
2254
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
2255
|
+
break;
|
|
2256
|
+
default:
|
|
2257
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
tmp7_input.xy(tmp0_desc);
|
|
2261
|
+
return ErrorResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
2262
|
+
};
|
|
2263
|
+
protoOf($serializer_6).fv = function () {
|
|
2264
|
+
return this.wfy_1;
|
|
2265
|
+
};
|
|
2266
|
+
protoOf($serializer_6).d17 = function () {
|
|
2267
|
+
var tmp0_cached = Companion_getInstance_6().vfy_1;
|
|
2268
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2269
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2270
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2271
|
+
return [IntSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(tmp0_cached[2].b1())];
|
|
2272
|
+
};
|
|
2273
|
+
var $serializer_instance_6;
|
|
2274
|
+
function $serializer_getInstance_10() {
|
|
2275
|
+
if ($serializer_instance_6 == null)
|
|
2276
|
+
new $serializer_6();
|
|
2277
|
+
return $serializer_instance_6;
|
|
2278
|
+
}
|
|
2279
|
+
function ErrorResponse_init_$Init$(seen0, code, message, metadata, serializationConstructorMarker, $this) {
|
|
2280
|
+
if (!(3 === (3 & seen0))) {
|
|
2281
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_10().wfy_1);
|
|
2282
|
+
}
|
|
2283
|
+
$this.yfy_1 = code;
|
|
2284
|
+
$this.zfy_1 = message;
|
|
2285
|
+
if (0 === (seen0 & 4))
|
|
2286
|
+
$this.afz_1 = null;
|
|
2287
|
+
else
|
|
2288
|
+
$this.afz_1 = metadata;
|
|
2289
|
+
return $this;
|
|
2290
|
+
}
|
|
2291
|
+
function ErrorResponse_init_$Create$(seen0, code, message, metadata, serializationConstructorMarker) {
|
|
2292
|
+
return ErrorResponse_init_$Init$(seen0, code, message, metadata, serializationConstructorMarker, objectCreate(protoOf(ErrorResponse)));
|
|
2293
|
+
}
|
|
2294
|
+
function ErrorResponse() {
|
|
2295
|
+
}
|
|
2296
|
+
//region block: post-declaration
|
|
2297
|
+
protoOf($serializer).e17 = typeParametersSerializers;
|
|
2298
|
+
protoOf($serializer_0).e17 = typeParametersSerializers;
|
|
2299
|
+
protoOf($serializer_1).e17 = typeParametersSerializers;
|
|
2300
|
+
protoOf($serializer_2).e17 = typeParametersSerializers;
|
|
2301
|
+
protoOf($serializer_3).e17 = typeParametersSerializers;
|
|
2302
|
+
protoOf($serializer_4).e17 = typeParametersSerializers;
|
|
2303
|
+
protoOf($serializer_5).e17 = typeParametersSerializers;
|
|
2304
|
+
protoOf($serializer_6).e17 = typeParametersSerializers;
|
|
2305
|
+
//endregion
|
|
2306
|
+
//region block: exports
|
|
2307
|
+
_.$_$ = _.$_$ || {};
|
|
2308
|
+
_.$_$.a = OpenRouterLLMClient;
|
|
2309
|
+
//endregion
|
|
2310
|
+
return _;
|
|
2311
|
+
}));
|
|
2312
|
+
|
|
2313
|
+
//# sourceMappingURL=koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js.map
|