@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-deepseek-client.js
ADDED
|
@@ -0,0 +1,1249 @@
|
|
|
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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-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-deepseek-client'.");
|
|
36
|
+
}
|
|
37
|
+
globalThis['koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client'] = factory(typeof globalThis['koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client'] === 'undefined' ? {} : globalThis['koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-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 DeepSeek_getInstance = kotlin_ai_koog_prompt_llm.$_$.t;
|
|
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 initMetadataForCoroutine = kotlin_kotlin.$_$.wd;
|
|
53
|
+
var AbstractOpenAILLMClient = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.f;
|
|
54
|
+
var VOID = kotlin_kotlin.$_$.h;
|
|
55
|
+
var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.b1;
|
|
56
|
+
var System_instance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.b;
|
|
57
|
+
var toString = kotlin_kotlin.$_$.af;
|
|
58
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.e2;
|
|
59
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.p7;
|
|
60
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
61
|
+
var THROW_CCE = kotlin_kotlin.$_$.zk;
|
|
62
|
+
var getKClass = kotlin_kotlin.$_$.f;
|
|
63
|
+
var arrayOf = kotlin_kotlin.$_$.nl;
|
|
64
|
+
var createKType = kotlin_kotlin.$_$.c;
|
|
65
|
+
var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j4;
|
|
66
|
+
var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x3;
|
|
67
|
+
var isInterface = kotlin_kotlin.$_$.je;
|
|
68
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ud;
|
|
69
|
+
var OpenAIBasedSettings = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.g;
|
|
70
|
+
var ConnectionTimeoutConfig = kotlin_ai_koog_prompt_executor_clients.$_$.b;
|
|
71
|
+
var LLMParams = kotlin_ai_koog_prompt_model.$_$.w;
|
|
72
|
+
var rangeTo = kotlin_kotlin.$_$.mf;
|
|
73
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.re;
|
|
74
|
+
var Collection = kotlin_kotlin.$_$.n6;
|
|
75
|
+
var isBlank = kotlin_kotlin.$_$.eh;
|
|
76
|
+
var equals = kotlin_kotlin.$_$.md;
|
|
77
|
+
var listOf = kotlin_kotlin.$_$.u9;
|
|
78
|
+
var hashCode = kotlin_kotlin.$_$.td;
|
|
79
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
80
|
+
var toString_0 = kotlin_kotlin.$_$.gm;
|
|
81
|
+
var $serializer_getInstance = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.n;
|
|
82
|
+
var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z2;
|
|
83
|
+
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.o;
|
|
84
|
+
var lazy = kotlin_kotlin.$_$.xl;
|
|
85
|
+
var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i3;
|
|
86
|
+
var $serializer_getInstance_0 = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.a1;
|
|
87
|
+
var Long = kotlin_kotlin.$_$.sk;
|
|
88
|
+
var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h;
|
|
89
|
+
var LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d1;
|
|
90
|
+
var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e1;
|
|
91
|
+
var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i1;
|
|
92
|
+
var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b3;
|
|
93
|
+
var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c3;
|
|
94
|
+
var initMetadataForObject = kotlin_kotlin.$_$.ae;
|
|
95
|
+
var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o3;
|
|
96
|
+
var objectCreate = kotlin_kotlin.$_$.ve;
|
|
97
|
+
var $serializer_getInstance_1 = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.v;
|
|
98
|
+
var OpenAIBaseLLMStreamResponse = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.c;
|
|
99
|
+
var Companion_instance_0 = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.r;
|
|
100
|
+
var $serializer_getInstance_2 = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.x;
|
|
101
|
+
var Companion_instance_1 = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.t;
|
|
102
|
+
var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.e;
|
|
103
|
+
var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f3;
|
|
104
|
+
var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;
|
|
105
|
+
var DoubleSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z;
|
|
106
|
+
var OpenAIToolChoiceSerializer_getInstance = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.z;
|
|
107
|
+
var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c1;
|
|
108
|
+
var $serializer_getInstance_3 = kotlin_ai_koog_prompt_executor_openai_client_base.$_$.w;
|
|
109
|
+
var AdditionalPropertiesFlatteningSerializer = kotlin_ai_koog_prompt_executor_clients.$_$.a;
|
|
110
|
+
//endregion
|
|
111
|
+
//region block: pre-declaration
|
|
112
|
+
initMetadataForCompanion(Companion);
|
|
113
|
+
initMetadataForCoroutine($processStreamingChunkCOROUTINE$, CoroutineImpl);
|
|
114
|
+
initMetadataForClass(DeepSeekLLMClient, 'DeepSeekLLMClient', VOID, AbstractOpenAILLMClient, VOID, [2, 3]);
|
|
115
|
+
initMetadataForClass(DeepSeekClientSettings, 'DeepSeekClientSettings', DeepSeekClientSettings, OpenAIBasedSettings);
|
|
116
|
+
initMetadataForClass(DeepSeekParams, 'DeepSeekParams', DeepSeekParams, LLMParams);
|
|
117
|
+
initMetadataForCompanion(Companion_0);
|
|
118
|
+
initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
119
|
+
initMetadataForClass(DeepSeekChatCompletionResponse, 'DeepSeekChatCompletionResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_4});
|
|
120
|
+
initMetadataForCompanion(Companion_1);
|
|
121
|
+
initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
122
|
+
initMetadataForClass(DeepSeekChatCompletionStreamResponse, 'DeepSeekChatCompletionStreamResponse', VOID, VOID, [OpenAIBaseLLMStreamResponse], VOID, VOID, {0: $serializer_getInstance_5});
|
|
123
|
+
initMetadataForCompanion(Companion_2);
|
|
124
|
+
initMetadataForObject($serializer_1, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
125
|
+
initMetadataForClass(DeepSeekChatCompletionRequest, 'DeepSeekChatCompletionRequest', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_6});
|
|
126
|
+
initMetadataForObject(DeepSeekChatCompletionRequestSerializer, 'DeepSeekChatCompletionRequestSerializer', VOID, AdditionalPropertiesFlatteningSerializer);
|
|
127
|
+
//endregion
|
|
128
|
+
function DeepSeekLLMClient$Companion$staticLogger$lambda() {
|
|
129
|
+
return Unit_instance;
|
|
130
|
+
}
|
|
131
|
+
function Companion() {
|
|
132
|
+
Companion_instance_2 = this;
|
|
133
|
+
var tmp = this;
|
|
134
|
+
var tmp_0 = KotlinLogging_instance;
|
|
135
|
+
tmp.l8p_1 = tmp_0.a3j(DeepSeekLLMClient$Companion$staticLogger$lambda);
|
|
136
|
+
Companion_instance.p8e(DeepSeek_getInstance());
|
|
137
|
+
}
|
|
138
|
+
var Companion_instance_2;
|
|
139
|
+
function Companion_getInstance() {
|
|
140
|
+
if (Companion_instance_2 == null)
|
|
141
|
+
new Companion();
|
|
142
|
+
return Companion_instance_2;
|
|
143
|
+
}
|
|
144
|
+
function $processStreamingChunkCOROUTINE$(_this__u8e3s4, _this__u8e3s4_0, chunk, resultContinuation) {
|
|
145
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
146
|
+
this.u8p_1 = _this__u8e3s4;
|
|
147
|
+
this.v8p_1 = _this__u8e3s4_0;
|
|
148
|
+
this.w8p_1 = chunk;
|
|
149
|
+
}
|
|
150
|
+
protoOf($processStreamingChunkCOROUTINE$).fa = function () {
|
|
151
|
+
var suspendResult = this.z9_1;
|
|
152
|
+
$sm: do
|
|
153
|
+
try {
|
|
154
|
+
var tmp = this.x9_1;
|
|
155
|
+
switch (tmp) {
|
|
156
|
+
case 0:
|
|
157
|
+
this.y9_1 = 10;
|
|
158
|
+
this.x8p_1 = firstOrNull(this.w8p_1.b8r_1);
|
|
159
|
+
if (this.x8p_1 == null) {
|
|
160
|
+
this.y8p_1 = null;
|
|
161
|
+
this.x9_1 = 9;
|
|
162
|
+
continue $sm;
|
|
163
|
+
} else {
|
|
164
|
+
var tmp_0 = this;
|
|
165
|
+
tmp_0.z8p_1 = this.x8p_1;
|
|
166
|
+
this.a8q_1 = this.z8p_1;
|
|
167
|
+
var tmp_1 = this;
|
|
168
|
+
tmp_1.b8q_1 = this.a8q_1;
|
|
169
|
+
this.c8q_1 = this.b8q_1;
|
|
170
|
+
this.d8q_1 = this.c8q_1.c8k_1.j8k_1;
|
|
171
|
+
if (this.d8q_1 == null) {
|
|
172
|
+
this.e8q_1 = null;
|
|
173
|
+
this.x9_1 = 2;
|
|
174
|
+
continue $sm;
|
|
175
|
+
} else {
|
|
176
|
+
var tmp_2 = this;
|
|
177
|
+
tmp_2.f8q_1 = this.d8q_1;
|
|
178
|
+
this.g8q_1 = this.f8q_1;
|
|
179
|
+
var tmp_3 = this;
|
|
180
|
+
tmp_3.h8q_1 = this.g8q_1;
|
|
181
|
+
this.i8q_1 = this.h8q_1;
|
|
182
|
+
this.x9_1 = 1;
|
|
183
|
+
suspendResult = this.v8p_1.k4d(this.i8q_1, this);
|
|
184
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
185
|
+
return suspendResult;
|
|
186
|
+
}
|
|
187
|
+
continue $sm;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
case 1:
|
|
192
|
+
var tmp_4 = this;
|
|
193
|
+
tmp_4.e8q_1 = Unit_instance;
|
|
194
|
+
this.x9_1 = 2;
|
|
195
|
+
continue $sm;
|
|
196
|
+
case 2:
|
|
197
|
+
this.j8q_1 = this.c8q_1.c8k_1.m8k_1;
|
|
198
|
+
if (this.j8q_1 == null) {
|
|
199
|
+
this.k8q_1 = null;
|
|
200
|
+
this.x9_1 = 6;
|
|
201
|
+
continue $sm;
|
|
202
|
+
} else {
|
|
203
|
+
var tmp_5 = this;
|
|
204
|
+
tmp_5.l8q_1 = this.j8q_1;
|
|
205
|
+
this.m8q_1 = this.l8q_1;
|
|
206
|
+
this.n8q_1 = this.m8q_1.p();
|
|
207
|
+
this.x9_1 = 3;
|
|
208
|
+
continue $sm;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
case 3:
|
|
212
|
+
if (!this.n8q_1.q()) {
|
|
213
|
+
this.x9_1 = 5;
|
|
214
|
+
continue $sm;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
this.o8q_1 = this.n8q_1.r();
|
|
218
|
+
var tmp_6 = this;
|
|
219
|
+
tmp_6.p8q_1 = this.o8q_1;
|
|
220
|
+
this.q8q_1 = this.p8q_1;
|
|
221
|
+
this.r8q_1 = this.q8q_1.p8k_1;
|
|
222
|
+
this.s8q_1 = this.q8q_1.q8k_1;
|
|
223
|
+
var tmp_7 = this;
|
|
224
|
+
var tmp0_safe_receiver = this.q8q_1.r8k_1;
|
|
225
|
+
tmp_7.t8q_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v8k_1;
|
|
226
|
+
var tmp_8 = this;
|
|
227
|
+
var tmp1_safe_receiver = this.q8q_1.r8k_1;
|
|
228
|
+
tmp_8.u8q_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.w8k_1;
|
|
229
|
+
this.x9_1 = 4;
|
|
230
|
+
suspendResult = this.v8p_1.m4d(this.r8q_1, this.s8q_1, this.t8q_1, this.u8q_1, this);
|
|
231
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
232
|
+
return suspendResult;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
continue $sm;
|
|
236
|
+
case 4:
|
|
237
|
+
this.x9_1 = 3;
|
|
238
|
+
continue $sm;
|
|
239
|
+
case 5:
|
|
240
|
+
this.k8q_1 = Unit_instance;
|
|
241
|
+
this.x9_1 = 6;
|
|
242
|
+
continue $sm;
|
|
243
|
+
case 6:
|
|
244
|
+
this.v8q_1 = this.c8q_1.d8k_1;
|
|
245
|
+
if (this.v8q_1 == null) {
|
|
246
|
+
this.w8q_1 = null;
|
|
247
|
+
this.x9_1 = 8;
|
|
248
|
+
continue $sm;
|
|
249
|
+
} else {
|
|
250
|
+
var tmp_9 = this;
|
|
251
|
+
tmp_9.x8q_1 = this.v8q_1;
|
|
252
|
+
this.y8q_1 = this.x8q_1;
|
|
253
|
+
var tmp_10 = this;
|
|
254
|
+
tmp_10.z8q_1 = this.y8q_1;
|
|
255
|
+
this.a8r_1 = this.z8q_1;
|
|
256
|
+
this.x9_1 = 7;
|
|
257
|
+
suspendResult = this.v8p_1.l4d(this.a8r_1, this.u8p_1.p8h(this.w8p_1.h8r_1), this);
|
|
258
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
259
|
+
return suspendResult;
|
|
260
|
+
}
|
|
261
|
+
continue $sm;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
case 7:
|
|
265
|
+
var tmp_11 = this;
|
|
266
|
+
tmp_11.w8q_1 = Unit_instance;
|
|
267
|
+
this.x9_1 = 8;
|
|
268
|
+
continue $sm;
|
|
269
|
+
case 8:
|
|
270
|
+
this.y8p_1 = this.w8q_1;
|
|
271
|
+
this.x9_1 = 9;
|
|
272
|
+
continue $sm;
|
|
273
|
+
case 9:
|
|
274
|
+
return Unit_instance;
|
|
275
|
+
case 10:
|
|
276
|
+
throw this.aa_1;
|
|
277
|
+
}
|
|
278
|
+
} catch ($p) {
|
|
279
|
+
var e = $p;
|
|
280
|
+
if (this.y9_1 === 10) {
|
|
281
|
+
throw e;
|
|
282
|
+
} else {
|
|
283
|
+
this.x9_1 = this.y9_1;
|
|
284
|
+
this.aa_1 = e;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
while (true);
|
|
288
|
+
};
|
|
289
|
+
function DeepSeekLLMClient(apiKey, settings, baseClient, clock) {
|
|
290
|
+
Companion_getInstance();
|
|
291
|
+
settings = settings === VOID ? new DeepSeekClientSettings() : settings;
|
|
292
|
+
baseClient = baseClient === VOID ? HttpClient() : baseClient;
|
|
293
|
+
clock = clock === VOID ? System_instance : clock;
|
|
294
|
+
AbstractOpenAILLMClient.call(this, apiKey, settings, baseClient, clock, Companion_getInstance().l8p_1);
|
|
295
|
+
this.p8r_1 = settings;
|
|
296
|
+
}
|
|
297
|
+
protoOf(DeepSeekLLMClient).q8g = function (messages, model, tools, toolChoice, params, stream) {
|
|
298
|
+
var deepSeekParams = toDeepSeekParams(params);
|
|
299
|
+
var responseFormat = this.v8h(params.y43_1, model);
|
|
300
|
+
var tmp1_model = model.c3i_1;
|
|
301
|
+
var tmp2_frequencyPenalty = deepSeekParams.a8s_1;
|
|
302
|
+
var tmp3_logprobs = deepSeekParams.c8s_1;
|
|
303
|
+
var tmp4_maxTokens = deepSeekParams.v43_1;
|
|
304
|
+
var tmp5_presencePenalty = deepSeekParams.b8s_1;
|
|
305
|
+
var tmp6_stop = deepSeekParams.d8s_1;
|
|
306
|
+
var tmp7_temperature = deepSeekParams.u43_1;
|
|
307
|
+
var tmp0_safe_receiver = deepSeekParams.z43_1;
|
|
308
|
+
var tmp8_toolChoice = tmp0_safe_receiver == null ? null : this.p8g(tmp0_safe_receiver);
|
|
309
|
+
var tmp9_topLogprobs = deepSeekParams.e8s_1;
|
|
310
|
+
var tmp10_topP = deepSeekParams.f8s_1;
|
|
311
|
+
var tmp11_additionalProperties = deepSeekParams.d44_1;
|
|
312
|
+
var request = new DeepSeekChatCompletionRequest(messages, tmp1_model, stream, tmp7_temperature, tools, tmp8_toolChoice, tmp10_topP, tmp9_topLogprobs, tmp4_maxTokens, tmp2_frequencyPenalty, tmp5_presencePenalty, responseFormat, tmp6_stop, tmp3_logprobs, VOID, tmp11_additionalProperties);
|
|
313
|
+
return this.y8d_1.gw(DeepSeekChatCompletionRequestSerializer_getInstance(), request);
|
|
314
|
+
};
|
|
315
|
+
protoOf(DeepSeekLLMClient).g8s = function (response) {
|
|
316
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
317
|
+
// Inline function 'kotlin.require' call
|
|
318
|
+
if (!!response.h8s_1.m()) {
|
|
319
|
+
var message = 'Empty choices in response';
|
|
320
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
321
|
+
}
|
|
322
|
+
// Inline function 'kotlin.collections.map' call
|
|
323
|
+
var this_0 = response.h8s_1;
|
|
324
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
325
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
326
|
+
var _iterator__ex2g4s = this_0.p();
|
|
327
|
+
while (_iterator__ex2g4s.q()) {
|
|
328
|
+
var item = _iterator__ex2g4s.r();
|
|
329
|
+
var tmp$ret$3 = this.x8g(item.z8j_1, item.w8j_1, this.p8h(response.n8s_1));
|
|
330
|
+
destination.h(tmp$ret$3);
|
|
331
|
+
}
|
|
332
|
+
return destination;
|
|
333
|
+
};
|
|
334
|
+
protoOf(DeepSeekLLMClient).m8g = function (response) {
|
|
335
|
+
return this.g8s(response instanceof DeepSeekChatCompletionResponse ? response : THROW_CCE());
|
|
336
|
+
};
|
|
337
|
+
protoOf(DeepSeekLLMClient).a8e = function (data) {
|
|
338
|
+
// Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
|
|
339
|
+
var this_0 = this.y8d_1;
|
|
340
|
+
// Inline function 'kotlinx.serialization.serializer' call
|
|
341
|
+
var this_1 = this_0.lz();
|
|
342
|
+
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
343
|
+
var this_2 = serializer(this_1, createKType(getKClass(DeepSeekChatCompletionStreamResponse), arrayOf([]), false));
|
|
344
|
+
var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
|
|
345
|
+
return this_0.hw(tmp$ret$1, data);
|
|
346
|
+
};
|
|
347
|
+
protoOf(DeepSeekLLMClient).r8g = function (data) {
|
|
348
|
+
// Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
|
|
349
|
+
var this_0 = this.y8d_1;
|
|
350
|
+
// Inline function 'kotlinx.serialization.serializer' call
|
|
351
|
+
var this_1 = this_0.lz();
|
|
352
|
+
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
353
|
+
var this_2 = serializer(this_1, createKType(getKClass(DeepSeekChatCompletionResponse), arrayOf([]), false));
|
|
354
|
+
var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
|
|
355
|
+
return this_0.hw(tmp$ret$1, data);
|
|
356
|
+
};
|
|
357
|
+
protoOf(DeepSeekLLMClient).o8s = function (_this__u8e3s4, chunk, $completion) {
|
|
358
|
+
var tmp = new $processStreamingChunkCOROUTINE$(this, _this__u8e3s4, chunk, $completion);
|
|
359
|
+
tmp.z9_1 = Unit_instance;
|
|
360
|
+
tmp.aa_1 = null;
|
|
361
|
+
return tmp.fa();
|
|
362
|
+
};
|
|
363
|
+
protoOf(DeepSeekLLMClient).o8e = function (_this__u8e3s4, chunk, $completion) {
|
|
364
|
+
return this.o8s(_this__u8e3s4, chunk instanceof DeepSeekChatCompletionStreamResponse ? chunk : THROW_CCE(), $completion);
|
|
365
|
+
};
|
|
366
|
+
function DeepSeekClientSettings(baseUrl, chatCompletionsPath, timeoutConfig) {
|
|
367
|
+
baseUrl = baseUrl === VOID ? 'https://api.deepseek.com' : baseUrl;
|
|
368
|
+
chatCompletionsPath = chatCompletionsPath === VOID ? 'chat/completions' : chatCompletionsPath;
|
|
369
|
+
timeoutConfig = timeoutConfig === VOID ? new ConnectionTimeoutConfig() : timeoutConfig;
|
|
370
|
+
OpenAIBasedSettings.call(this, baseUrl, chatCompletionsPath, timeoutConfig);
|
|
371
|
+
}
|
|
372
|
+
function DeepSeekParams(temperature, maxTokens, numberOfChoices, speculation, schema, toolChoice, user, includeThoughts, thinkingBudget, additionalProperties, frequencyPenalty, presencePenalty, logprobs, stop, topLogprobs, topP) {
|
|
373
|
+
temperature = temperature === VOID ? null : temperature;
|
|
374
|
+
maxTokens = maxTokens === VOID ? null : maxTokens;
|
|
375
|
+
numberOfChoices = numberOfChoices === VOID ? null : numberOfChoices;
|
|
376
|
+
speculation = speculation === VOID ? null : speculation;
|
|
377
|
+
schema = schema === VOID ? null : schema;
|
|
378
|
+
toolChoice = toolChoice === VOID ? null : toolChoice;
|
|
379
|
+
user = user === VOID ? null : user;
|
|
380
|
+
includeThoughts = includeThoughts === VOID ? null : includeThoughts;
|
|
381
|
+
thinkingBudget = thinkingBudget === VOID ? null : thinkingBudget;
|
|
382
|
+
additionalProperties = additionalProperties === VOID ? null : additionalProperties;
|
|
383
|
+
frequencyPenalty = frequencyPenalty === VOID ? null : frequencyPenalty;
|
|
384
|
+
presencePenalty = presencePenalty === VOID ? null : presencePenalty;
|
|
385
|
+
logprobs = logprobs === VOID ? null : logprobs;
|
|
386
|
+
stop = stop === VOID ? null : stop;
|
|
387
|
+
topLogprobs = topLogprobs === VOID ? null : topLogprobs;
|
|
388
|
+
topP = topP === VOID ? null : topP;
|
|
389
|
+
LLMParams.call(this, temperature, maxTokens, numberOfChoices, speculation, schema, toolChoice, user, includeThoughts, thinkingBudget, additionalProperties);
|
|
390
|
+
this.a8s_1 = frequencyPenalty;
|
|
391
|
+
this.b8s_1 = presencePenalty;
|
|
392
|
+
this.c8s_1 = logprobs;
|
|
393
|
+
this.d8s_1 = stop;
|
|
394
|
+
this.e8s_1 = topLogprobs;
|
|
395
|
+
this.f8s_1 = topP;
|
|
396
|
+
// Inline function 'kotlin.require' call
|
|
397
|
+
if (!(this.f8s_1 == null || rangeTo(0.0, 1.0).k1(this.f8s_1))) {
|
|
398
|
+
var message = 'topP must be in (0.0, 1.0], but was ' + this.f8s_1;
|
|
399
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
400
|
+
}
|
|
401
|
+
if (!(this.e8s_1 == null)) {
|
|
402
|
+
// Inline function 'kotlin.require' call
|
|
403
|
+
if (!(this.c8s_1 === true)) {
|
|
404
|
+
var message_0 = '`topLogprobs` requires `logprobs=true`.';
|
|
405
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
406
|
+
}
|
|
407
|
+
// Inline function 'kotlin.require' call
|
|
408
|
+
if (!numberRangeToNumber(0, 20).go(this.e8s_1)) {
|
|
409
|
+
var message_1 = 'topLogprobs must be in [0, 20], but was ' + this.e8s_1;
|
|
410
|
+
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
// Inline function 'kotlin.require' call
|
|
414
|
+
if (!(this.a8s_1 == null || rangeTo(-2.0, 2.0).k1(this.a8s_1))) {
|
|
415
|
+
var message_2 = 'frequencyPenalty must be in [-2.0, 2.0], but was ' + this.a8s_1;
|
|
416
|
+
throw IllegalArgumentException_init_$Create$(toString(message_2));
|
|
417
|
+
}
|
|
418
|
+
// Inline function 'kotlin.require' call
|
|
419
|
+
if (!(this.b8s_1 == null || rangeTo(-2.0, 2.0).k1(this.b8s_1))) {
|
|
420
|
+
var message_3 = 'presencePenalty must be in [-2.0, 2.0], but was ' + this.b8s_1;
|
|
421
|
+
throw IllegalArgumentException_init_$Create$(toString(message_3));
|
|
422
|
+
}
|
|
423
|
+
if (!(this.d8s_1 == null)) {
|
|
424
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
425
|
+
// Inline function 'kotlin.require' call
|
|
426
|
+
if (!!this.d8s_1.m()) {
|
|
427
|
+
var message_4 = 'stop must not be empty when provided.';
|
|
428
|
+
throw IllegalArgumentException_init_$Create$(toString(message_4));
|
|
429
|
+
}
|
|
430
|
+
// Inline function 'kotlin.require' call
|
|
431
|
+
if (!(this.d8s_1.s() <= 4)) {
|
|
432
|
+
var message_5 = 'stop supports at most 4 sequences, but was ' + this.d8s_1.s();
|
|
433
|
+
throw IllegalArgumentException_init_$Create$(toString(message_5));
|
|
434
|
+
}
|
|
435
|
+
var tmp0 = this.d8s_1;
|
|
436
|
+
var tmp$ret$15;
|
|
437
|
+
$l$block_0: {
|
|
438
|
+
// Inline function 'kotlin.collections.all' call
|
|
439
|
+
var tmp;
|
|
440
|
+
if (isInterface(tmp0, Collection)) {
|
|
441
|
+
tmp = tmp0.m();
|
|
442
|
+
} else {
|
|
443
|
+
tmp = false;
|
|
444
|
+
}
|
|
445
|
+
if (tmp) {
|
|
446
|
+
tmp$ret$15 = true;
|
|
447
|
+
break $l$block_0;
|
|
448
|
+
}
|
|
449
|
+
var _iterator__ex2g4s = tmp0.p();
|
|
450
|
+
while (_iterator__ex2g4s.q()) {
|
|
451
|
+
var element = _iterator__ex2g4s.r();
|
|
452
|
+
// Inline function 'kotlin.text.isNotBlank' call
|
|
453
|
+
if (!!isBlank(element)) {
|
|
454
|
+
tmp$ret$15 = false;
|
|
455
|
+
break $l$block_0;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
tmp$ret$15 = true;
|
|
459
|
+
}
|
|
460
|
+
// Inline function 'kotlin.require' call
|
|
461
|
+
if (!tmp$ret$15) {
|
|
462
|
+
var message_6 = 'stop sequences must not be blank.';
|
|
463
|
+
throw IllegalArgumentException_init_$Create$(toString(message_6));
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
protoOf(DeepSeekParams).equals = function (other) {
|
|
468
|
+
var tmp;
|
|
469
|
+
if (this === other) {
|
|
470
|
+
tmp = true;
|
|
471
|
+
} else {
|
|
472
|
+
if (!(other instanceof DeepSeekParams)) {
|
|
473
|
+
tmp = false;
|
|
474
|
+
} else {
|
|
475
|
+
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.a8s_1 == other.a8s_1 && this.b8s_1 == other.b8s_1 && this.c8s_1 == other.c8s_1 && equals(this.d8s_1, other.d8s_1) && this.e8s_1 == other.e8s_1 && this.f8s_1 == other.f8s_1);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
return tmp;
|
|
479
|
+
};
|
|
480
|
+
protoOf(DeepSeekParams).hashCode = function () {
|
|
481
|
+
// Inline function 'kotlin.collections.fold' call
|
|
482
|
+
var accumulator = 0;
|
|
483
|
+
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.a8s_1, this.b8s_1, this.c8s_1, this.d8s_1, this.e8s_1, this.f8s_1]).p();
|
|
484
|
+
while (_iterator__ex2g4s.q()) {
|
|
485
|
+
var element = _iterator__ex2g4s.r();
|
|
486
|
+
var acc = accumulator;
|
|
487
|
+
var tmp = imul(31, acc);
|
|
488
|
+
var tmp1_elvis_lhs = element == null ? null : hashCode(element);
|
|
489
|
+
accumulator = tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
|
|
490
|
+
}
|
|
491
|
+
return accumulator;
|
|
492
|
+
};
|
|
493
|
+
protoOf(DeepSeekParams).toString = function () {
|
|
494
|
+
// Inline function 'kotlin.text.buildString' call
|
|
495
|
+
// Inline function 'kotlin.apply' call
|
|
496
|
+
var this_0 = StringBuilder_init_$Create$();
|
|
497
|
+
this_0.z8('DeepSeekParams(');
|
|
498
|
+
this_0.z8('temperature=' + this.u43_1);
|
|
499
|
+
this_0.z8(', maxTokens=' + this.v43_1);
|
|
500
|
+
this_0.z8(', numberOfChoices=' + this.w43_1);
|
|
501
|
+
this_0.z8(', speculation=' + this.x43_1);
|
|
502
|
+
this_0.z8(', schema=' + toString_0(this.y43_1));
|
|
503
|
+
this_0.z8(', toolChoice=' + toString_0(this.z43_1));
|
|
504
|
+
this_0.z8(', user=' + this.a44_1);
|
|
505
|
+
this_0.z8(', includeThoughts=' + this.b44_1);
|
|
506
|
+
this_0.z8(', thinkingBudget=' + this.c44_1);
|
|
507
|
+
this_0.z8(', additionalProperties=' + toString_0(this.d44_1));
|
|
508
|
+
this_0.z8(', frequencyPenalty=' + this.a8s_1);
|
|
509
|
+
this_0.z8(', presencePenalty=' + this.b8s_1);
|
|
510
|
+
this_0.z8(', logprobs=' + this.c8s_1);
|
|
511
|
+
this_0.z8(', stop=' + toString_0(this.d8s_1));
|
|
512
|
+
this_0.z8(', topLogprobs=' + this.e8s_1);
|
|
513
|
+
this_0.z8(', topP=' + this.f8s_1);
|
|
514
|
+
this_0.z8(')');
|
|
515
|
+
return this_0.toString();
|
|
516
|
+
};
|
|
517
|
+
function toDeepSeekParams(_this__u8e3s4) {
|
|
518
|
+
if (_this__u8e3s4 instanceof DeepSeekParams)
|
|
519
|
+
return _this__u8e3s4;
|
|
520
|
+
return new DeepSeekParams(_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, _this__u8e3s4.c44_1, _this__u8e3s4.d44_1);
|
|
521
|
+
}
|
|
522
|
+
function DeepSeekChatCompletionResponse$Companion$$childSerializers$_anonymous__fl84z3() {
|
|
523
|
+
return new ArrayListSerializer($serializer_getInstance());
|
|
524
|
+
}
|
|
525
|
+
function Companion_0() {
|
|
526
|
+
Companion_instance_3 = this;
|
|
527
|
+
var tmp = this;
|
|
528
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
529
|
+
// Inline function 'kotlin.arrayOf' call
|
|
530
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
531
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
532
|
+
tmp.p8s_1 = [lazy(tmp_0, DeepSeekChatCompletionResponse$Companion$$childSerializers$_anonymous__fl84z3), null, null, null, null, null, null];
|
|
533
|
+
}
|
|
534
|
+
var Companion_instance_3;
|
|
535
|
+
function Companion_getInstance_0() {
|
|
536
|
+
if (Companion_instance_3 == null)
|
|
537
|
+
new Companion_0();
|
|
538
|
+
return Companion_instance_3;
|
|
539
|
+
}
|
|
540
|
+
function $serializer() {
|
|
541
|
+
$serializer_instance = this;
|
|
542
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.deepseek.models.DeepSeekChatCompletionResponse', this, 7);
|
|
543
|
+
tmp0_serialDesc.m16('choices', false);
|
|
544
|
+
tmp0_serialDesc.m16('created', false);
|
|
545
|
+
tmp0_serialDesc.m16('id', false);
|
|
546
|
+
tmp0_serialDesc.m16('model', false);
|
|
547
|
+
tmp0_serialDesc.m16('systemFingerprint', false);
|
|
548
|
+
tmp0_serialDesc.m16('object', true);
|
|
549
|
+
tmp0_serialDesc.m16('usage', true);
|
|
550
|
+
this.q8s_1 = tmp0_serialDesc;
|
|
551
|
+
}
|
|
552
|
+
protoOf($serializer).r8s = function (encoder, value) {
|
|
553
|
+
var tmp0_desc = this.q8s_1;
|
|
554
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
555
|
+
var tmp2_cached = Companion_getInstance_0().p8s_1;
|
|
556
|
+
tmp1_output.n10(tmp0_desc, 0, tmp2_cached[0].b1(), value.h8s_1);
|
|
557
|
+
tmp1_output.h10(tmp0_desc, 1, value.i8s_1);
|
|
558
|
+
tmp1_output.l10(tmp0_desc, 2, value.j8s_1);
|
|
559
|
+
tmp1_output.l10(tmp0_desc, 3, value.k8s_1);
|
|
560
|
+
tmp1_output.l10(tmp0_desc, 4, value.l8s_1);
|
|
561
|
+
if (tmp1_output.t10(tmp0_desc, 5) ? true : !(value.m8s_1 === 'chat.completion')) {
|
|
562
|
+
tmp1_output.l10(tmp0_desc, 5, value.m8s_1);
|
|
563
|
+
}
|
|
564
|
+
if (tmp1_output.t10(tmp0_desc, 6) ? true : !(value.n8s_1 == null)) {
|
|
565
|
+
tmp1_output.p10(tmp0_desc, 6, $serializer_getInstance_0(), value.n8s_1);
|
|
566
|
+
}
|
|
567
|
+
tmp1_output.xy(tmp0_desc);
|
|
568
|
+
};
|
|
569
|
+
protoOf($serializer).gv = function (encoder, value) {
|
|
570
|
+
return this.r8s(encoder, value instanceof DeepSeekChatCompletionResponse ? value : THROW_CCE());
|
|
571
|
+
};
|
|
572
|
+
protoOf($serializer).hv = function (decoder) {
|
|
573
|
+
var tmp0_desc = this.q8s_1;
|
|
574
|
+
var tmp1_flag = true;
|
|
575
|
+
var tmp2_index = 0;
|
|
576
|
+
var tmp3_bitMask0 = 0;
|
|
577
|
+
var tmp4_local0 = null;
|
|
578
|
+
var tmp5_local1 = new Long(0, 0);
|
|
579
|
+
var tmp6_local2 = null;
|
|
580
|
+
var tmp7_local3 = null;
|
|
581
|
+
var tmp8_local4 = null;
|
|
582
|
+
var tmp9_local5 = null;
|
|
583
|
+
var tmp10_local6 = null;
|
|
584
|
+
var tmp11_input = decoder.wy(tmp0_desc);
|
|
585
|
+
var tmp12_cached = Companion_getInstance_0().p8s_1;
|
|
586
|
+
if (tmp11_input.mz()) {
|
|
587
|
+
tmp4_local0 = tmp11_input.iz(tmp0_desc, 0, tmp12_cached[0].b1(), tmp4_local0);
|
|
588
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
589
|
+
tmp5_local1 = tmp11_input.cz(tmp0_desc, 1);
|
|
590
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
591
|
+
tmp6_local2 = tmp11_input.gz(tmp0_desc, 2);
|
|
592
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
593
|
+
tmp7_local3 = tmp11_input.gz(tmp0_desc, 3);
|
|
594
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
595
|
+
tmp8_local4 = tmp11_input.gz(tmp0_desc, 4);
|
|
596
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
597
|
+
tmp9_local5 = tmp11_input.gz(tmp0_desc, 5);
|
|
598
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
599
|
+
tmp10_local6 = tmp11_input.kz(tmp0_desc, 6, $serializer_getInstance_0(), tmp10_local6);
|
|
600
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
601
|
+
} else
|
|
602
|
+
while (tmp1_flag) {
|
|
603
|
+
tmp2_index = tmp11_input.nz(tmp0_desc);
|
|
604
|
+
switch (tmp2_index) {
|
|
605
|
+
case -1:
|
|
606
|
+
tmp1_flag = false;
|
|
607
|
+
break;
|
|
608
|
+
case 0:
|
|
609
|
+
tmp4_local0 = tmp11_input.iz(tmp0_desc, 0, tmp12_cached[0].b1(), tmp4_local0);
|
|
610
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
611
|
+
break;
|
|
612
|
+
case 1:
|
|
613
|
+
tmp5_local1 = tmp11_input.cz(tmp0_desc, 1);
|
|
614
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
615
|
+
break;
|
|
616
|
+
case 2:
|
|
617
|
+
tmp6_local2 = tmp11_input.gz(tmp0_desc, 2);
|
|
618
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
619
|
+
break;
|
|
620
|
+
case 3:
|
|
621
|
+
tmp7_local3 = tmp11_input.gz(tmp0_desc, 3);
|
|
622
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
623
|
+
break;
|
|
624
|
+
case 4:
|
|
625
|
+
tmp8_local4 = tmp11_input.gz(tmp0_desc, 4);
|
|
626
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
627
|
+
break;
|
|
628
|
+
case 5:
|
|
629
|
+
tmp9_local5 = tmp11_input.gz(tmp0_desc, 5);
|
|
630
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
631
|
+
break;
|
|
632
|
+
case 6:
|
|
633
|
+
tmp10_local6 = tmp11_input.kz(tmp0_desc, 6, $serializer_getInstance_0(), tmp10_local6);
|
|
634
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
635
|
+
break;
|
|
636
|
+
default:
|
|
637
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
tmp11_input.xy(tmp0_desc);
|
|
641
|
+
return DeepSeekChatCompletionResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, null);
|
|
642
|
+
};
|
|
643
|
+
protoOf($serializer).fv = function () {
|
|
644
|
+
return this.q8s_1;
|
|
645
|
+
};
|
|
646
|
+
protoOf($serializer).d17 = function () {
|
|
647
|
+
// Inline function 'kotlin.arrayOf' call
|
|
648
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
649
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
650
|
+
return [Companion_getInstance_0().p8s_1[0].b1(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable($serializer_getInstance_0())];
|
|
651
|
+
};
|
|
652
|
+
var $serializer_instance;
|
|
653
|
+
function $serializer_getInstance_4() {
|
|
654
|
+
if ($serializer_instance == null)
|
|
655
|
+
new $serializer();
|
|
656
|
+
return $serializer_instance;
|
|
657
|
+
}
|
|
658
|
+
function DeepSeekChatCompletionResponse_init_$Init$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker, $this) {
|
|
659
|
+
if (!(31 === (31 & seen0))) {
|
|
660
|
+
throwMissingFieldException(seen0, 31, $serializer_getInstance_4().q8s_1);
|
|
661
|
+
}
|
|
662
|
+
$this.h8s_1 = choices;
|
|
663
|
+
$this.i8s_1 = created;
|
|
664
|
+
$this.j8s_1 = id;
|
|
665
|
+
$this.k8s_1 = model;
|
|
666
|
+
$this.l8s_1 = systemFingerprint;
|
|
667
|
+
if (0 === (seen0 & 32))
|
|
668
|
+
$this.m8s_1 = 'chat.completion';
|
|
669
|
+
else
|
|
670
|
+
$this.m8s_1 = objectType;
|
|
671
|
+
if (0 === (seen0 & 64))
|
|
672
|
+
$this.n8s_1 = null;
|
|
673
|
+
else
|
|
674
|
+
$this.n8s_1 = usage;
|
|
675
|
+
return $this;
|
|
676
|
+
}
|
|
677
|
+
function DeepSeekChatCompletionResponse_init_$Create$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker) {
|
|
678
|
+
return DeepSeekChatCompletionResponse_init_$Init$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker, objectCreate(protoOf(DeepSeekChatCompletionResponse)));
|
|
679
|
+
}
|
|
680
|
+
function DeepSeekChatCompletionResponse(choices, created, id, model, systemFingerprint, objectType, usage) {
|
|
681
|
+
Companion_getInstance_0();
|
|
682
|
+
objectType = objectType === VOID ? 'chat.completion' : objectType;
|
|
683
|
+
usage = usage === VOID ? null : usage;
|
|
684
|
+
this.h8s_1 = choices;
|
|
685
|
+
this.i8s_1 = created;
|
|
686
|
+
this.j8s_1 = id;
|
|
687
|
+
this.k8s_1 = model;
|
|
688
|
+
this.l8s_1 = systemFingerprint;
|
|
689
|
+
this.m8s_1 = objectType;
|
|
690
|
+
this.n8s_1 = usage;
|
|
691
|
+
}
|
|
692
|
+
function DeepSeekChatCompletionStreamResponse$Companion$$childSerializers$_anonymous__tqg1m9() {
|
|
693
|
+
return new ArrayListSerializer($serializer_getInstance_1());
|
|
694
|
+
}
|
|
695
|
+
function Companion_1() {
|
|
696
|
+
Companion_instance_4 = this;
|
|
697
|
+
var tmp = this;
|
|
698
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
699
|
+
// Inline function 'kotlin.arrayOf' call
|
|
700
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
701
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
702
|
+
tmp.s8s_1 = [lazy(tmp_0, DeepSeekChatCompletionStreamResponse$Companion$$childSerializers$_anonymous__tqg1m9), null, null, null, null, null, null];
|
|
703
|
+
}
|
|
704
|
+
var Companion_instance_4;
|
|
705
|
+
function Companion_getInstance_1() {
|
|
706
|
+
if (Companion_instance_4 == null)
|
|
707
|
+
new Companion_1();
|
|
708
|
+
return Companion_instance_4;
|
|
709
|
+
}
|
|
710
|
+
function $serializer_0() {
|
|
711
|
+
$serializer_instance_0 = this;
|
|
712
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.deepseek.models.DeepSeekChatCompletionStreamResponse', this, 7);
|
|
713
|
+
tmp0_serialDesc.m16('choices', false);
|
|
714
|
+
tmp0_serialDesc.m16('created', false);
|
|
715
|
+
tmp0_serialDesc.m16('id', false);
|
|
716
|
+
tmp0_serialDesc.m16('model', false);
|
|
717
|
+
tmp0_serialDesc.m16('systemFingerprint', false);
|
|
718
|
+
tmp0_serialDesc.m16('object', true);
|
|
719
|
+
tmp0_serialDesc.m16('usage', true);
|
|
720
|
+
this.t8s_1 = tmp0_serialDesc;
|
|
721
|
+
}
|
|
722
|
+
protoOf($serializer_0).u8s = function (encoder, value) {
|
|
723
|
+
var tmp0_desc = this.t8s_1;
|
|
724
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
725
|
+
var tmp2_cached = Companion_getInstance_1().s8s_1;
|
|
726
|
+
tmp1_output.n10(tmp0_desc, 0, tmp2_cached[0].b1(), value.b8r_1);
|
|
727
|
+
tmp1_output.h10(tmp0_desc, 1, value.c8r_1);
|
|
728
|
+
tmp1_output.l10(tmp0_desc, 2, value.d8r_1);
|
|
729
|
+
tmp1_output.l10(tmp0_desc, 3, value.e8r_1);
|
|
730
|
+
tmp1_output.l10(tmp0_desc, 4, value.f8r_1);
|
|
731
|
+
if (tmp1_output.t10(tmp0_desc, 5) ? true : !(value.g8r_1 === 'chat.completion.chunk')) {
|
|
732
|
+
tmp1_output.l10(tmp0_desc, 5, value.g8r_1);
|
|
733
|
+
}
|
|
734
|
+
if (tmp1_output.t10(tmp0_desc, 6) ? true : !(value.h8r_1 == null)) {
|
|
735
|
+
tmp1_output.p10(tmp0_desc, 6, $serializer_getInstance_0(), value.h8r_1);
|
|
736
|
+
}
|
|
737
|
+
tmp1_output.xy(tmp0_desc);
|
|
738
|
+
};
|
|
739
|
+
protoOf($serializer_0).gv = function (encoder, value) {
|
|
740
|
+
return this.u8s(encoder, value instanceof DeepSeekChatCompletionStreamResponse ? value : THROW_CCE());
|
|
741
|
+
};
|
|
742
|
+
protoOf($serializer_0).hv = function (decoder) {
|
|
743
|
+
var tmp0_desc = this.t8s_1;
|
|
744
|
+
var tmp1_flag = true;
|
|
745
|
+
var tmp2_index = 0;
|
|
746
|
+
var tmp3_bitMask0 = 0;
|
|
747
|
+
var tmp4_local0 = null;
|
|
748
|
+
var tmp5_local1 = new Long(0, 0);
|
|
749
|
+
var tmp6_local2 = null;
|
|
750
|
+
var tmp7_local3 = null;
|
|
751
|
+
var tmp8_local4 = null;
|
|
752
|
+
var tmp9_local5 = null;
|
|
753
|
+
var tmp10_local6 = null;
|
|
754
|
+
var tmp11_input = decoder.wy(tmp0_desc);
|
|
755
|
+
var tmp12_cached = Companion_getInstance_1().s8s_1;
|
|
756
|
+
if (tmp11_input.mz()) {
|
|
757
|
+
tmp4_local0 = tmp11_input.iz(tmp0_desc, 0, tmp12_cached[0].b1(), tmp4_local0);
|
|
758
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
759
|
+
tmp5_local1 = tmp11_input.cz(tmp0_desc, 1);
|
|
760
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
761
|
+
tmp6_local2 = tmp11_input.gz(tmp0_desc, 2);
|
|
762
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
763
|
+
tmp7_local3 = tmp11_input.gz(tmp0_desc, 3);
|
|
764
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
765
|
+
tmp8_local4 = tmp11_input.gz(tmp0_desc, 4);
|
|
766
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
767
|
+
tmp9_local5 = tmp11_input.gz(tmp0_desc, 5);
|
|
768
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
769
|
+
tmp10_local6 = tmp11_input.kz(tmp0_desc, 6, $serializer_getInstance_0(), tmp10_local6);
|
|
770
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
771
|
+
} else
|
|
772
|
+
while (tmp1_flag) {
|
|
773
|
+
tmp2_index = tmp11_input.nz(tmp0_desc);
|
|
774
|
+
switch (tmp2_index) {
|
|
775
|
+
case -1:
|
|
776
|
+
tmp1_flag = false;
|
|
777
|
+
break;
|
|
778
|
+
case 0:
|
|
779
|
+
tmp4_local0 = tmp11_input.iz(tmp0_desc, 0, tmp12_cached[0].b1(), tmp4_local0);
|
|
780
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
781
|
+
break;
|
|
782
|
+
case 1:
|
|
783
|
+
tmp5_local1 = tmp11_input.cz(tmp0_desc, 1);
|
|
784
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
785
|
+
break;
|
|
786
|
+
case 2:
|
|
787
|
+
tmp6_local2 = tmp11_input.gz(tmp0_desc, 2);
|
|
788
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
789
|
+
break;
|
|
790
|
+
case 3:
|
|
791
|
+
tmp7_local3 = tmp11_input.gz(tmp0_desc, 3);
|
|
792
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
793
|
+
break;
|
|
794
|
+
case 4:
|
|
795
|
+
tmp8_local4 = tmp11_input.gz(tmp0_desc, 4);
|
|
796
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
797
|
+
break;
|
|
798
|
+
case 5:
|
|
799
|
+
tmp9_local5 = tmp11_input.gz(tmp0_desc, 5);
|
|
800
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
801
|
+
break;
|
|
802
|
+
case 6:
|
|
803
|
+
tmp10_local6 = tmp11_input.kz(tmp0_desc, 6, $serializer_getInstance_0(), tmp10_local6);
|
|
804
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
805
|
+
break;
|
|
806
|
+
default:
|
|
807
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
tmp11_input.xy(tmp0_desc);
|
|
811
|
+
return DeepSeekChatCompletionStreamResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, null);
|
|
812
|
+
};
|
|
813
|
+
protoOf($serializer_0).fv = function () {
|
|
814
|
+
return this.t8s_1;
|
|
815
|
+
};
|
|
816
|
+
protoOf($serializer_0).d17 = function () {
|
|
817
|
+
// Inline function 'kotlin.arrayOf' call
|
|
818
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
819
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
820
|
+
return [Companion_getInstance_1().s8s_1[0].b1(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable($serializer_getInstance_0())];
|
|
821
|
+
};
|
|
822
|
+
var $serializer_instance_0;
|
|
823
|
+
function $serializer_getInstance_5() {
|
|
824
|
+
if ($serializer_instance_0 == null)
|
|
825
|
+
new $serializer_0();
|
|
826
|
+
return $serializer_instance_0;
|
|
827
|
+
}
|
|
828
|
+
function DeepSeekChatCompletionStreamResponse_init_$Init$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker, $this) {
|
|
829
|
+
if (!(31 === (31 & seen0))) {
|
|
830
|
+
throwMissingFieldException(seen0, 31, $serializer_getInstance_5().t8s_1);
|
|
831
|
+
}
|
|
832
|
+
$this.b8r_1 = choices;
|
|
833
|
+
$this.c8r_1 = created;
|
|
834
|
+
$this.d8r_1 = id;
|
|
835
|
+
$this.e8r_1 = model;
|
|
836
|
+
$this.f8r_1 = systemFingerprint;
|
|
837
|
+
if (0 === (seen0 & 32))
|
|
838
|
+
$this.g8r_1 = 'chat.completion.chunk';
|
|
839
|
+
else
|
|
840
|
+
$this.g8r_1 = objectType;
|
|
841
|
+
if (0 === (seen0 & 64))
|
|
842
|
+
$this.h8r_1 = null;
|
|
843
|
+
else
|
|
844
|
+
$this.h8r_1 = usage;
|
|
845
|
+
return $this;
|
|
846
|
+
}
|
|
847
|
+
function DeepSeekChatCompletionStreamResponse_init_$Create$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker) {
|
|
848
|
+
return DeepSeekChatCompletionStreamResponse_init_$Init$(seen0, choices, created, id, model, systemFingerprint, objectType, usage, serializationConstructorMarker, objectCreate(protoOf(DeepSeekChatCompletionStreamResponse)));
|
|
849
|
+
}
|
|
850
|
+
function DeepSeekChatCompletionStreamResponse(choices, created, id, model, systemFingerprint, objectType, usage) {
|
|
851
|
+
Companion_getInstance_1();
|
|
852
|
+
objectType = objectType === VOID ? 'chat.completion.chunk' : objectType;
|
|
853
|
+
usage = usage === VOID ? null : usage;
|
|
854
|
+
this.b8r_1 = choices;
|
|
855
|
+
this.c8r_1 = created;
|
|
856
|
+
this.d8r_1 = id;
|
|
857
|
+
this.e8r_1 = model;
|
|
858
|
+
this.f8r_1 = systemFingerprint;
|
|
859
|
+
this.g8r_1 = objectType;
|
|
860
|
+
this.h8r_1 = usage;
|
|
861
|
+
}
|
|
862
|
+
function DeepSeekChatCompletionRequest$Companion$$childSerializers$_anonymous__g0uej1() {
|
|
863
|
+
return new ArrayListSerializer(Companion_instance_0.q1j());
|
|
864
|
+
}
|
|
865
|
+
function DeepSeekChatCompletionRequest$Companion$$childSerializers$_anonymous__g0uej1_0() {
|
|
866
|
+
return new ArrayListSerializer($serializer_getInstance_2());
|
|
867
|
+
}
|
|
868
|
+
function DeepSeekChatCompletionRequest$Companion$$childSerializers$_anonymous__g0uej1_1() {
|
|
869
|
+
return Companion_instance_1.q1j();
|
|
870
|
+
}
|
|
871
|
+
function DeepSeekChatCompletionRequest$Companion$$childSerializers$_anonymous__g0uej1_2() {
|
|
872
|
+
return new ArrayListSerializer(StringSerializer_getInstance());
|
|
873
|
+
}
|
|
874
|
+
function DeepSeekChatCompletionRequest$Companion$$childSerializers$_anonymous__g0uej1_3() {
|
|
875
|
+
return new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance());
|
|
876
|
+
}
|
|
877
|
+
function Companion_2() {
|
|
878
|
+
Companion_instance_5 = this;
|
|
879
|
+
var tmp = this;
|
|
880
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
881
|
+
var tmp_1 = lazy(tmp_0, DeepSeekChatCompletionRequest$Companion$$childSerializers$_anonymous__g0uej1);
|
|
882
|
+
var tmp_2 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
883
|
+
var tmp_3 = lazy(tmp_2, DeepSeekChatCompletionRequest$Companion$$childSerializers$_anonymous__g0uej1_0);
|
|
884
|
+
var tmp_4 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
885
|
+
var tmp_5 = lazy(tmp_4, DeepSeekChatCompletionRequest$Companion$$childSerializers$_anonymous__g0uej1_1);
|
|
886
|
+
var tmp_6 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
887
|
+
var tmp_7 = lazy(tmp_6, DeepSeekChatCompletionRequest$Companion$$childSerializers$_anonymous__g0uej1_2);
|
|
888
|
+
var tmp_8 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
889
|
+
// Inline function 'kotlin.arrayOf' call
|
|
890
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
891
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
892
|
+
tmp.v8s_1 = [tmp_1, null, null, null, tmp_3, null, null, null, null, null, null, tmp_5, tmp_7, null, null, lazy(tmp_8, DeepSeekChatCompletionRequest$Companion$$childSerializers$_anonymous__g0uej1_3)];
|
|
893
|
+
}
|
|
894
|
+
protoOf(Companion_2).q1j = function () {
|
|
895
|
+
return $serializer_getInstance_6();
|
|
896
|
+
};
|
|
897
|
+
var Companion_instance_5;
|
|
898
|
+
function Companion_getInstance_2() {
|
|
899
|
+
if (Companion_instance_5 == null)
|
|
900
|
+
new Companion_2();
|
|
901
|
+
return Companion_instance_5;
|
|
902
|
+
}
|
|
903
|
+
function $serializer_1() {
|
|
904
|
+
$serializer_instance_1 = this;
|
|
905
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.deepseek.models.DeepSeekChatCompletionRequest', this, 16);
|
|
906
|
+
tmp0_serialDesc.m16('messages', false);
|
|
907
|
+
tmp0_serialDesc.m16('model', false);
|
|
908
|
+
tmp0_serialDesc.m16('stream', true);
|
|
909
|
+
tmp0_serialDesc.m16('temperature', true);
|
|
910
|
+
tmp0_serialDesc.m16('tools', true);
|
|
911
|
+
tmp0_serialDesc.m16('toolChoice', true);
|
|
912
|
+
tmp0_serialDesc.m16('topP', true);
|
|
913
|
+
tmp0_serialDesc.m16('topLogprobs', true);
|
|
914
|
+
tmp0_serialDesc.m16('maxTokens', true);
|
|
915
|
+
tmp0_serialDesc.m16('frequencyPenalty', true);
|
|
916
|
+
tmp0_serialDesc.m16('presencePenalty', true);
|
|
917
|
+
tmp0_serialDesc.m16('responseFormat', true);
|
|
918
|
+
tmp0_serialDesc.m16('stop', true);
|
|
919
|
+
tmp0_serialDesc.m16('logprobs', true);
|
|
920
|
+
tmp0_serialDesc.m16('streamOptions', true);
|
|
921
|
+
tmp0_serialDesc.m16('additionalProperties', true);
|
|
922
|
+
this.w8s_1 = tmp0_serialDesc;
|
|
923
|
+
}
|
|
924
|
+
protoOf($serializer_1).x8s = function (encoder, value) {
|
|
925
|
+
var tmp0_desc = this.w8s_1;
|
|
926
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
927
|
+
var tmp2_cached = Companion_getInstance_2().v8s_1;
|
|
928
|
+
tmp1_output.n10(tmp0_desc, 0, tmp2_cached[0].b1(), value.y8s_1);
|
|
929
|
+
tmp1_output.l10(tmp0_desc, 1, value.z8s_1);
|
|
930
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.a8t_1 == null)) {
|
|
931
|
+
tmp1_output.p10(tmp0_desc, 2, BooleanSerializer_getInstance(), value.a8t_1);
|
|
932
|
+
}
|
|
933
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.b8t_1 == null)) {
|
|
934
|
+
tmp1_output.p10(tmp0_desc, 3, DoubleSerializer_getInstance(), value.b8t_1);
|
|
935
|
+
}
|
|
936
|
+
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.c8t_1 == null)) {
|
|
937
|
+
tmp1_output.p10(tmp0_desc, 4, tmp2_cached[4].b1(), value.c8t_1);
|
|
938
|
+
}
|
|
939
|
+
if (tmp1_output.t10(tmp0_desc, 5) ? true : !(value.d8t_1 == null)) {
|
|
940
|
+
tmp1_output.p10(tmp0_desc, 5, OpenAIToolChoiceSerializer_getInstance(), value.d8t_1);
|
|
941
|
+
}
|
|
942
|
+
if (tmp1_output.t10(tmp0_desc, 6) ? true : !(value.e8t_1 == null)) {
|
|
943
|
+
tmp1_output.p10(tmp0_desc, 6, DoubleSerializer_getInstance(), value.e8t_1);
|
|
944
|
+
}
|
|
945
|
+
if (tmp1_output.t10(tmp0_desc, 7) ? true : !(value.f8t_1 == null)) {
|
|
946
|
+
tmp1_output.p10(tmp0_desc, 7, IntSerializer_getInstance(), value.f8t_1);
|
|
947
|
+
}
|
|
948
|
+
if (tmp1_output.t10(tmp0_desc, 8) ? true : !(value.g8t_1 == null)) {
|
|
949
|
+
tmp1_output.p10(tmp0_desc, 8, IntSerializer_getInstance(), value.g8t_1);
|
|
950
|
+
}
|
|
951
|
+
if (tmp1_output.t10(tmp0_desc, 9) ? true : !(value.h8t_1 == null)) {
|
|
952
|
+
tmp1_output.p10(tmp0_desc, 9, DoubleSerializer_getInstance(), value.h8t_1);
|
|
953
|
+
}
|
|
954
|
+
if (tmp1_output.t10(tmp0_desc, 10) ? true : !(value.i8t_1 == null)) {
|
|
955
|
+
tmp1_output.p10(tmp0_desc, 10, DoubleSerializer_getInstance(), value.i8t_1);
|
|
956
|
+
}
|
|
957
|
+
if (tmp1_output.t10(tmp0_desc, 11) ? true : !(value.j8t_1 == null)) {
|
|
958
|
+
tmp1_output.p10(tmp0_desc, 11, tmp2_cached[11].b1(), value.j8t_1);
|
|
959
|
+
}
|
|
960
|
+
if (tmp1_output.t10(tmp0_desc, 12) ? true : !(value.k8t_1 == null)) {
|
|
961
|
+
tmp1_output.p10(tmp0_desc, 12, tmp2_cached[12].b1(), value.k8t_1);
|
|
962
|
+
}
|
|
963
|
+
if (tmp1_output.t10(tmp0_desc, 13) ? true : !(value.l8t_1 == null)) {
|
|
964
|
+
tmp1_output.p10(tmp0_desc, 13, BooleanSerializer_getInstance(), value.l8t_1);
|
|
965
|
+
}
|
|
966
|
+
if (tmp1_output.t10(tmp0_desc, 14) ? true : !(value.m8t_1 == null)) {
|
|
967
|
+
tmp1_output.p10(tmp0_desc, 14, $serializer_getInstance_3(), value.m8t_1);
|
|
968
|
+
}
|
|
969
|
+
if (tmp1_output.t10(tmp0_desc, 15) ? true : !(value.n8t_1 == null)) {
|
|
970
|
+
tmp1_output.p10(tmp0_desc, 15, tmp2_cached[15].b1(), value.n8t_1);
|
|
971
|
+
}
|
|
972
|
+
tmp1_output.xy(tmp0_desc);
|
|
973
|
+
};
|
|
974
|
+
protoOf($serializer_1).gv = function (encoder, value) {
|
|
975
|
+
return this.x8s(encoder, value instanceof DeepSeekChatCompletionRequest ? value : THROW_CCE());
|
|
976
|
+
};
|
|
977
|
+
protoOf($serializer_1).hv = function (decoder) {
|
|
978
|
+
var tmp0_desc = this.w8s_1;
|
|
979
|
+
var tmp1_flag = true;
|
|
980
|
+
var tmp2_index = 0;
|
|
981
|
+
var tmp3_bitMask0 = 0;
|
|
982
|
+
var tmp4_local0 = null;
|
|
983
|
+
var tmp5_local1 = null;
|
|
984
|
+
var tmp6_local2 = null;
|
|
985
|
+
var tmp7_local3 = null;
|
|
986
|
+
var tmp8_local4 = null;
|
|
987
|
+
var tmp9_local5 = null;
|
|
988
|
+
var tmp10_local6 = null;
|
|
989
|
+
var tmp11_local7 = null;
|
|
990
|
+
var tmp12_local8 = null;
|
|
991
|
+
var tmp13_local9 = null;
|
|
992
|
+
var tmp14_local10 = null;
|
|
993
|
+
var tmp15_local11 = null;
|
|
994
|
+
var tmp16_local12 = null;
|
|
995
|
+
var tmp17_local13 = null;
|
|
996
|
+
var tmp18_local14 = null;
|
|
997
|
+
var tmp19_local15 = null;
|
|
998
|
+
var tmp20_input = decoder.wy(tmp0_desc);
|
|
999
|
+
var tmp21_cached = Companion_getInstance_2().v8s_1;
|
|
1000
|
+
if (tmp20_input.mz()) {
|
|
1001
|
+
tmp4_local0 = tmp20_input.iz(tmp0_desc, 0, tmp21_cached[0].b1(), tmp4_local0);
|
|
1002
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1003
|
+
tmp5_local1 = tmp20_input.gz(tmp0_desc, 1);
|
|
1004
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1005
|
+
tmp6_local2 = tmp20_input.kz(tmp0_desc, 2, BooleanSerializer_getInstance(), tmp6_local2);
|
|
1006
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1007
|
+
tmp7_local3 = tmp20_input.kz(tmp0_desc, 3, DoubleSerializer_getInstance(), tmp7_local3);
|
|
1008
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1009
|
+
tmp8_local4 = tmp20_input.kz(tmp0_desc, 4, tmp21_cached[4].b1(), tmp8_local4);
|
|
1010
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
1011
|
+
tmp9_local5 = tmp20_input.kz(tmp0_desc, 5, OpenAIToolChoiceSerializer_getInstance(), tmp9_local5);
|
|
1012
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
1013
|
+
tmp10_local6 = tmp20_input.kz(tmp0_desc, 6, DoubleSerializer_getInstance(), tmp10_local6);
|
|
1014
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
1015
|
+
tmp11_local7 = tmp20_input.kz(tmp0_desc, 7, IntSerializer_getInstance(), tmp11_local7);
|
|
1016
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 128;
|
|
1017
|
+
tmp12_local8 = tmp20_input.kz(tmp0_desc, 8, IntSerializer_getInstance(), tmp12_local8);
|
|
1018
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 256;
|
|
1019
|
+
tmp13_local9 = tmp20_input.kz(tmp0_desc, 9, DoubleSerializer_getInstance(), tmp13_local9);
|
|
1020
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 512;
|
|
1021
|
+
tmp14_local10 = tmp20_input.kz(tmp0_desc, 10, DoubleSerializer_getInstance(), tmp14_local10);
|
|
1022
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1024;
|
|
1023
|
+
tmp15_local11 = tmp20_input.kz(tmp0_desc, 11, tmp21_cached[11].b1(), tmp15_local11);
|
|
1024
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2048;
|
|
1025
|
+
tmp16_local12 = tmp20_input.kz(tmp0_desc, 12, tmp21_cached[12].b1(), tmp16_local12);
|
|
1026
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4096;
|
|
1027
|
+
tmp17_local13 = tmp20_input.kz(tmp0_desc, 13, BooleanSerializer_getInstance(), tmp17_local13);
|
|
1028
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8192;
|
|
1029
|
+
tmp18_local14 = tmp20_input.kz(tmp0_desc, 14, $serializer_getInstance_3(), tmp18_local14);
|
|
1030
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16384;
|
|
1031
|
+
tmp19_local15 = tmp20_input.kz(tmp0_desc, 15, tmp21_cached[15].b1(), tmp19_local15);
|
|
1032
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32768;
|
|
1033
|
+
} else
|
|
1034
|
+
while (tmp1_flag) {
|
|
1035
|
+
tmp2_index = tmp20_input.nz(tmp0_desc);
|
|
1036
|
+
switch (tmp2_index) {
|
|
1037
|
+
case -1:
|
|
1038
|
+
tmp1_flag = false;
|
|
1039
|
+
break;
|
|
1040
|
+
case 0:
|
|
1041
|
+
tmp4_local0 = tmp20_input.iz(tmp0_desc, 0, tmp21_cached[0].b1(), tmp4_local0);
|
|
1042
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1043
|
+
break;
|
|
1044
|
+
case 1:
|
|
1045
|
+
tmp5_local1 = tmp20_input.gz(tmp0_desc, 1);
|
|
1046
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1047
|
+
break;
|
|
1048
|
+
case 2:
|
|
1049
|
+
tmp6_local2 = tmp20_input.kz(tmp0_desc, 2, BooleanSerializer_getInstance(), tmp6_local2);
|
|
1050
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1051
|
+
break;
|
|
1052
|
+
case 3:
|
|
1053
|
+
tmp7_local3 = tmp20_input.kz(tmp0_desc, 3, DoubleSerializer_getInstance(), tmp7_local3);
|
|
1054
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
1055
|
+
break;
|
|
1056
|
+
case 4:
|
|
1057
|
+
tmp8_local4 = tmp20_input.kz(tmp0_desc, 4, tmp21_cached[4].b1(), tmp8_local4);
|
|
1058
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
1059
|
+
break;
|
|
1060
|
+
case 5:
|
|
1061
|
+
tmp9_local5 = tmp20_input.kz(tmp0_desc, 5, OpenAIToolChoiceSerializer_getInstance(), tmp9_local5);
|
|
1062
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
1063
|
+
break;
|
|
1064
|
+
case 6:
|
|
1065
|
+
tmp10_local6 = tmp20_input.kz(tmp0_desc, 6, DoubleSerializer_getInstance(), tmp10_local6);
|
|
1066
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
1067
|
+
break;
|
|
1068
|
+
case 7:
|
|
1069
|
+
tmp11_local7 = tmp20_input.kz(tmp0_desc, 7, IntSerializer_getInstance(), tmp11_local7);
|
|
1070
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 128;
|
|
1071
|
+
break;
|
|
1072
|
+
case 8:
|
|
1073
|
+
tmp12_local8 = tmp20_input.kz(tmp0_desc, 8, IntSerializer_getInstance(), tmp12_local8);
|
|
1074
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 256;
|
|
1075
|
+
break;
|
|
1076
|
+
case 9:
|
|
1077
|
+
tmp13_local9 = tmp20_input.kz(tmp0_desc, 9, DoubleSerializer_getInstance(), tmp13_local9);
|
|
1078
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 512;
|
|
1079
|
+
break;
|
|
1080
|
+
case 10:
|
|
1081
|
+
tmp14_local10 = tmp20_input.kz(tmp0_desc, 10, DoubleSerializer_getInstance(), tmp14_local10);
|
|
1082
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1024;
|
|
1083
|
+
break;
|
|
1084
|
+
case 11:
|
|
1085
|
+
tmp15_local11 = tmp20_input.kz(tmp0_desc, 11, tmp21_cached[11].b1(), tmp15_local11);
|
|
1086
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2048;
|
|
1087
|
+
break;
|
|
1088
|
+
case 12:
|
|
1089
|
+
tmp16_local12 = tmp20_input.kz(tmp0_desc, 12, tmp21_cached[12].b1(), tmp16_local12);
|
|
1090
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4096;
|
|
1091
|
+
break;
|
|
1092
|
+
case 13:
|
|
1093
|
+
tmp17_local13 = tmp20_input.kz(tmp0_desc, 13, BooleanSerializer_getInstance(), tmp17_local13);
|
|
1094
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8192;
|
|
1095
|
+
break;
|
|
1096
|
+
case 14:
|
|
1097
|
+
tmp18_local14 = tmp20_input.kz(tmp0_desc, 14, $serializer_getInstance_3(), tmp18_local14);
|
|
1098
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16384;
|
|
1099
|
+
break;
|
|
1100
|
+
case 15:
|
|
1101
|
+
tmp19_local15 = tmp20_input.kz(tmp0_desc, 15, tmp21_cached[15].b1(), tmp19_local15);
|
|
1102
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32768;
|
|
1103
|
+
break;
|
|
1104
|
+
default:
|
|
1105
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
tmp20_input.xy(tmp0_desc);
|
|
1109
|
+
return DeepSeekChatCompletionRequest_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, null);
|
|
1110
|
+
};
|
|
1111
|
+
protoOf($serializer_1).fv = function () {
|
|
1112
|
+
return this.w8s_1;
|
|
1113
|
+
};
|
|
1114
|
+
protoOf($serializer_1).d17 = function () {
|
|
1115
|
+
var tmp0_cached = Companion_getInstance_2().v8s_1;
|
|
1116
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1117
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1118
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1119
|
+
return [tmp0_cached[0].b1(), StringSerializer_getInstance(), get_nullable(BooleanSerializer_getInstance()), get_nullable(DoubleSerializer_getInstance()), get_nullable(tmp0_cached[4].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[11].b1()), get_nullable(tmp0_cached[12].b1()), get_nullable(BooleanSerializer_getInstance()), get_nullable($serializer_getInstance_3()), get_nullable(tmp0_cached[15].b1())];
|
|
1120
|
+
};
|
|
1121
|
+
var $serializer_instance_1;
|
|
1122
|
+
function $serializer_getInstance_6() {
|
|
1123
|
+
if ($serializer_instance_1 == null)
|
|
1124
|
+
new $serializer_1();
|
|
1125
|
+
return $serializer_instance_1;
|
|
1126
|
+
}
|
|
1127
|
+
function DeepSeekChatCompletionRequest_init_$Init$(seen0, messages, model, stream, temperature, tools, toolChoice, topP, topLogprobs, maxTokens, frequencyPenalty, presencePenalty, responseFormat, stop, logprobs, streamOptions, additionalProperties, serializationConstructorMarker, $this) {
|
|
1128
|
+
if (!(3 === (3 & seen0))) {
|
|
1129
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_6().w8s_1);
|
|
1130
|
+
}
|
|
1131
|
+
$this.y8s_1 = messages;
|
|
1132
|
+
$this.z8s_1 = model;
|
|
1133
|
+
if (0 === (seen0 & 4))
|
|
1134
|
+
$this.a8t_1 = null;
|
|
1135
|
+
else
|
|
1136
|
+
$this.a8t_1 = stream;
|
|
1137
|
+
if (0 === (seen0 & 8))
|
|
1138
|
+
$this.b8t_1 = null;
|
|
1139
|
+
else
|
|
1140
|
+
$this.b8t_1 = temperature;
|
|
1141
|
+
if (0 === (seen0 & 16))
|
|
1142
|
+
$this.c8t_1 = null;
|
|
1143
|
+
else
|
|
1144
|
+
$this.c8t_1 = tools;
|
|
1145
|
+
if (0 === (seen0 & 32))
|
|
1146
|
+
$this.d8t_1 = null;
|
|
1147
|
+
else
|
|
1148
|
+
$this.d8t_1 = toolChoice;
|
|
1149
|
+
if (0 === (seen0 & 64))
|
|
1150
|
+
$this.e8t_1 = null;
|
|
1151
|
+
else
|
|
1152
|
+
$this.e8t_1 = topP;
|
|
1153
|
+
if (0 === (seen0 & 128))
|
|
1154
|
+
$this.f8t_1 = null;
|
|
1155
|
+
else
|
|
1156
|
+
$this.f8t_1 = topLogprobs;
|
|
1157
|
+
if (0 === (seen0 & 256))
|
|
1158
|
+
$this.g8t_1 = null;
|
|
1159
|
+
else
|
|
1160
|
+
$this.g8t_1 = maxTokens;
|
|
1161
|
+
if (0 === (seen0 & 512))
|
|
1162
|
+
$this.h8t_1 = null;
|
|
1163
|
+
else
|
|
1164
|
+
$this.h8t_1 = frequencyPenalty;
|
|
1165
|
+
if (0 === (seen0 & 1024))
|
|
1166
|
+
$this.i8t_1 = null;
|
|
1167
|
+
else
|
|
1168
|
+
$this.i8t_1 = presencePenalty;
|
|
1169
|
+
if (0 === (seen0 & 2048))
|
|
1170
|
+
$this.j8t_1 = null;
|
|
1171
|
+
else
|
|
1172
|
+
$this.j8t_1 = responseFormat;
|
|
1173
|
+
if (0 === (seen0 & 4096))
|
|
1174
|
+
$this.k8t_1 = null;
|
|
1175
|
+
else
|
|
1176
|
+
$this.k8t_1 = stop;
|
|
1177
|
+
if (0 === (seen0 & 8192))
|
|
1178
|
+
$this.l8t_1 = null;
|
|
1179
|
+
else
|
|
1180
|
+
$this.l8t_1 = logprobs;
|
|
1181
|
+
if (0 === (seen0 & 16384))
|
|
1182
|
+
$this.m8t_1 = null;
|
|
1183
|
+
else
|
|
1184
|
+
$this.m8t_1 = streamOptions;
|
|
1185
|
+
if (0 === (seen0 & 32768))
|
|
1186
|
+
$this.n8t_1 = null;
|
|
1187
|
+
else
|
|
1188
|
+
$this.n8t_1 = additionalProperties;
|
|
1189
|
+
return $this;
|
|
1190
|
+
}
|
|
1191
|
+
function DeepSeekChatCompletionRequest_init_$Create$(seen0, messages, model, stream, temperature, tools, toolChoice, topP, topLogprobs, maxTokens, frequencyPenalty, presencePenalty, responseFormat, stop, logprobs, streamOptions, additionalProperties, serializationConstructorMarker) {
|
|
1192
|
+
return DeepSeekChatCompletionRequest_init_$Init$(seen0, messages, model, stream, temperature, tools, toolChoice, topP, topLogprobs, maxTokens, frequencyPenalty, presencePenalty, responseFormat, stop, logprobs, streamOptions, additionalProperties, serializationConstructorMarker, objectCreate(protoOf(DeepSeekChatCompletionRequest)));
|
|
1193
|
+
}
|
|
1194
|
+
function DeepSeekChatCompletionRequest(messages, model, stream, temperature, tools, toolChoice, topP, topLogprobs, maxTokens, frequencyPenalty, presencePenalty, responseFormat, stop, logprobs, streamOptions, additionalProperties) {
|
|
1195
|
+
Companion_getInstance_2();
|
|
1196
|
+
stream = stream === VOID ? null : stream;
|
|
1197
|
+
temperature = temperature === VOID ? null : temperature;
|
|
1198
|
+
tools = tools === VOID ? null : tools;
|
|
1199
|
+
toolChoice = toolChoice === VOID ? null : toolChoice;
|
|
1200
|
+
topP = topP === VOID ? null : topP;
|
|
1201
|
+
topLogprobs = topLogprobs === VOID ? null : topLogprobs;
|
|
1202
|
+
maxTokens = maxTokens === VOID ? null : maxTokens;
|
|
1203
|
+
frequencyPenalty = frequencyPenalty === VOID ? null : frequencyPenalty;
|
|
1204
|
+
presencePenalty = presencePenalty === VOID ? null : presencePenalty;
|
|
1205
|
+
responseFormat = responseFormat === VOID ? null : responseFormat;
|
|
1206
|
+
stop = stop === VOID ? null : stop;
|
|
1207
|
+
logprobs = logprobs === VOID ? null : logprobs;
|
|
1208
|
+
streamOptions = streamOptions === VOID ? null : streamOptions;
|
|
1209
|
+
additionalProperties = additionalProperties === VOID ? null : additionalProperties;
|
|
1210
|
+
this.y8s_1 = messages;
|
|
1211
|
+
this.z8s_1 = model;
|
|
1212
|
+
this.a8t_1 = stream;
|
|
1213
|
+
this.b8t_1 = temperature;
|
|
1214
|
+
this.c8t_1 = tools;
|
|
1215
|
+
this.d8t_1 = toolChoice;
|
|
1216
|
+
this.e8t_1 = topP;
|
|
1217
|
+
this.f8t_1 = topLogprobs;
|
|
1218
|
+
this.g8t_1 = maxTokens;
|
|
1219
|
+
this.h8t_1 = frequencyPenalty;
|
|
1220
|
+
this.i8t_1 = presencePenalty;
|
|
1221
|
+
this.j8t_1 = responseFormat;
|
|
1222
|
+
this.k8t_1 = stop;
|
|
1223
|
+
this.l8t_1 = logprobs;
|
|
1224
|
+
this.m8t_1 = streamOptions;
|
|
1225
|
+
this.n8t_1 = additionalProperties;
|
|
1226
|
+
}
|
|
1227
|
+
function DeepSeekChatCompletionRequestSerializer() {
|
|
1228
|
+
DeepSeekChatCompletionRequestSerializer_instance = this;
|
|
1229
|
+
AdditionalPropertiesFlatteningSerializer.call(this, Companion_getInstance_2().q1j());
|
|
1230
|
+
}
|
|
1231
|
+
var DeepSeekChatCompletionRequestSerializer_instance;
|
|
1232
|
+
function DeepSeekChatCompletionRequestSerializer_getInstance() {
|
|
1233
|
+
if (DeepSeekChatCompletionRequestSerializer_instance == null)
|
|
1234
|
+
new DeepSeekChatCompletionRequestSerializer();
|
|
1235
|
+
return DeepSeekChatCompletionRequestSerializer_instance;
|
|
1236
|
+
}
|
|
1237
|
+
//region block: post-declaration
|
|
1238
|
+
protoOf($serializer).e17 = typeParametersSerializers;
|
|
1239
|
+
protoOf($serializer_0).e17 = typeParametersSerializers;
|
|
1240
|
+
protoOf($serializer_1).e17 = typeParametersSerializers;
|
|
1241
|
+
//endregion
|
|
1242
|
+
//region block: exports
|
|
1243
|
+
_.$_$ = _.$_$ || {};
|
|
1244
|
+
_.$_$.a = DeepSeekLLMClient;
|
|
1245
|
+
//endregion
|
|
1246
|
+
return _;
|
|
1247
|
+
}));
|
|
1248
|
+
|
|
1249
|
+
//# sourceMappingURL=koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js.map
|