@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
|
@@ -0,0 +1,4675 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof define === 'function' && define.amd)
|
|
3
|
+
define(['exports', './kotlinx-serialization-kotlinx-serialization-core.js', './kotlin-kotlin-stdlib.js', './koog-utils.js', './kotlinx-serialization-kotlinx-serialization-json.js', './koog-prompt-prompt-executor-prompt-executor-clients.js', './ktor-ktor-sse.js', './koog-prompt-prompt-model.js', './ktor-ktor-http.js', './ktor-ktor-client-core.js', './ktor-ktor-utils.js', './kotlin-logging.js', './koog-prompt-prompt-structure.js', './koog-prompt-prompt-llm.js', './kotlinx-coroutines-core.js', './koog-agents-agents-tools.js', './ktor-ktor-serialization-kotlinx-json.js', './ktor-ktor-client-content-negotiation.js', './Kotlin-DateTime-library-kotlinx-datetime.js'], factory);
|
|
4
|
+
else if (typeof exports === 'object')
|
|
5
|
+
factory(module.exports, require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlin-kotlin-stdlib.js'), require('./koog-utils.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./koog-prompt-prompt-executor-prompt-executor-clients.js'), require('./ktor-ktor-sse.js'), require('./koog-prompt-prompt-model.js'), require('./ktor-ktor-http.js'), require('./ktor-ktor-client-core.js'), require('./ktor-ktor-utils.js'), require('./kotlin-logging.js'), require('./koog-prompt-prompt-structure.js'), require('./koog-prompt-prompt-llm.js'), require('./kotlinx-coroutines-core.js'), require('./koog-agents-agents-tools.js'), require('./ktor-ktor-serialization-kotlinx-json.js'), require('./ktor-ktor-client-content-negotiation.js'), require('./Kotlin-DateTime-library-kotlinx-datetime.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-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-google-client'.");
|
|
9
|
+
}
|
|
10
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-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-google-client'.");
|
|
12
|
+
}
|
|
13
|
+
if (typeof globalThis['koog-utils'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'. Its dependency 'koog-utils' was not found. Please, check whether 'koog-utils' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'.");
|
|
15
|
+
}
|
|
16
|
+
if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-json'] === 'undefined') {
|
|
17
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-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-google-client'.");
|
|
18
|
+
}
|
|
19
|
+
if (typeof globalThis['koog-prompt-prompt-executor-prompt-executor-clients'] === 'undefined') {
|
|
20
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-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-google-client'.");
|
|
21
|
+
}
|
|
22
|
+
if (typeof globalThis['ktor-ktor-sse'] === 'undefined') {
|
|
23
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'. Its dependency 'ktor-ktor-sse' was not found. Please, check whether 'ktor-ktor-sse' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'.");
|
|
24
|
+
}
|
|
25
|
+
if (typeof globalThis['koog-prompt-prompt-model'] === 'undefined') {
|
|
26
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-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-google-client'.");
|
|
27
|
+
}
|
|
28
|
+
if (typeof globalThis['ktor-ktor-http'] === 'undefined') {
|
|
29
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'. Its dependency 'ktor-ktor-http' was not found. Please, check whether 'ktor-ktor-http' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'.");
|
|
30
|
+
}
|
|
31
|
+
if (typeof globalThis['ktor-ktor-client-core'] === 'undefined') {
|
|
32
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-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-google-client'.");
|
|
33
|
+
}
|
|
34
|
+
if (typeof globalThis['ktor-ktor-utils'] === 'undefined') {
|
|
35
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'. Its dependency 'ktor-ktor-utils' was not found. Please, check whether 'ktor-ktor-utils' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'.");
|
|
36
|
+
}
|
|
37
|
+
if (typeof globalThis['kotlin-logging'] === 'undefined') {
|
|
38
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-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-google-client'.");
|
|
39
|
+
}
|
|
40
|
+
if (typeof globalThis['koog-prompt-prompt-structure'] === 'undefined') {
|
|
41
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'. Its dependency 'koog-prompt-prompt-structure' was not found. Please, check whether 'koog-prompt-prompt-structure' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'.");
|
|
42
|
+
}
|
|
43
|
+
if (typeof globalThis['koog-prompt-prompt-llm'] === 'undefined') {
|
|
44
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-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-google-client'.");
|
|
45
|
+
}
|
|
46
|
+
if (typeof globalThis['kotlinx-coroutines-core'] === 'undefined') {
|
|
47
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'.");
|
|
48
|
+
}
|
|
49
|
+
if (typeof globalThis['koog-agents-agents-tools'] === 'undefined') {
|
|
50
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'. Its dependency 'koog-agents-agents-tools' was not found. Please, check whether 'koog-agents-agents-tools' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'.");
|
|
51
|
+
}
|
|
52
|
+
if (typeof globalThis['ktor-ktor-serialization-kotlinx-json'] === 'undefined') {
|
|
53
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'. Its dependency 'ktor-ktor-serialization-kotlinx-json' was not found. Please, check whether 'ktor-ktor-serialization-kotlinx-json' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'.");
|
|
54
|
+
}
|
|
55
|
+
if (typeof globalThis['ktor-ktor-client-content-negotiation'] === 'undefined') {
|
|
56
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'. Its dependency 'ktor-ktor-client-content-negotiation' was not found. Please, check whether 'ktor-ktor-client-content-negotiation' is loaded prior to 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'.");
|
|
57
|
+
}
|
|
58
|
+
if (typeof globalThis['Kotlin-DateTime-library-kotlinx-datetime'] === 'undefined') {
|
|
59
|
+
throw new Error("Error loading module 'koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-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-google-client'.");
|
|
60
|
+
}
|
|
61
|
+
globalThis['koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'] = factory(typeof globalThis['koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'] === 'undefined' ? {} : globalThis['koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client'], globalThis['kotlinx-serialization-kotlinx-serialization-core'], globalThis['kotlin-kotlin-stdlib'], globalThis['koog-utils'], globalThis['kotlinx-serialization-kotlinx-serialization-json'], globalThis['koog-prompt-prompt-executor-prompt-executor-clients'], globalThis['ktor-ktor-sse'], globalThis['koog-prompt-prompt-model'], globalThis['ktor-ktor-http'], globalThis['ktor-ktor-client-core'], globalThis['ktor-ktor-utils'], globalThis['kotlin-logging'], globalThis['koog-prompt-prompt-structure'], globalThis['koog-prompt-prompt-llm'], globalThis['kotlinx-coroutines-core'], globalThis['koog-agents-agents-tools'], globalThis['ktor-ktor-serialization-kotlinx-json'], globalThis['ktor-ktor-client-content-negotiation'], globalThis['Kotlin-DateTime-library-kotlinx-datetime']);
|
|
62
|
+
}
|
|
63
|
+
}(function (_, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_kotlin, kotlin_ai_koog_utils, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_ai_koog_prompt_executor_clients, kotlin_io_ktor_ktor_sse, kotlin_ai_koog_prompt_model, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_utils, kotlin_io_github_oshai_kotlin_logging, kotlin_ai_koog_prompt_structure, kotlin_ai_koog_prompt_llm, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_ai_koog_agents_tools, kotlin_io_ktor_ktor_serialization_kotlinx_json, kotlin_io_ktor_ktor_client_content_negotiation, kotlin_org_jetbrains_kotlinx_kotlinx_datetime) {
|
|
64
|
+
'use strict';
|
|
65
|
+
//region block: imports
|
|
66
|
+
var imul = Math.imul;
|
|
67
|
+
var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z2;
|
|
68
|
+
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.o;
|
|
69
|
+
var lazy = kotlin_kotlin.$_$.xl;
|
|
70
|
+
var protoOf = kotlin_kotlin.$_$.we;
|
|
71
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.vd;
|
|
72
|
+
var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i3;
|
|
73
|
+
var Unit_instance = kotlin_kotlin.$_$.h6;
|
|
74
|
+
var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e1;
|
|
75
|
+
var THROW_CCE = kotlin_kotlin.$_$.zk;
|
|
76
|
+
var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h;
|
|
77
|
+
var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i1;
|
|
78
|
+
var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b3;
|
|
79
|
+
var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c3;
|
|
80
|
+
var initMetadataForObject = kotlin_kotlin.$_$.ae;
|
|
81
|
+
var VOID = kotlin_kotlin.$_$.h;
|
|
82
|
+
var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o3;
|
|
83
|
+
var objectCreate = kotlin_kotlin.$_$.ve;
|
|
84
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ud;
|
|
85
|
+
var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c1;
|
|
86
|
+
var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;
|
|
87
|
+
var getStringHashCode = kotlin_kotlin.$_$.sd;
|
|
88
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.od;
|
|
89
|
+
var toString = kotlin_kotlin.$_$.af;
|
|
90
|
+
var hashCode = kotlin_kotlin.$_$.td;
|
|
91
|
+
var equals = kotlin_kotlin.$_$.md;
|
|
92
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.yd;
|
|
93
|
+
var ByteArrayAsBase64Serializer = kotlin_ai_koog_utils.$_$.b;
|
|
94
|
+
var JsonObjectSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.i;
|
|
95
|
+
var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.e;
|
|
96
|
+
var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f3;
|
|
97
|
+
var DoubleSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z;
|
|
98
|
+
var createAnnotatedEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k3;
|
|
99
|
+
var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j3;
|
|
100
|
+
var Enum = kotlin_kotlin.$_$.mk;
|
|
101
|
+
var AdditionalPropertiesFlatteningSerializer = kotlin_ai_koog_prompt_executor_clients.$_$.a;
|
|
102
|
+
var get_jsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b1;
|
|
103
|
+
var JsonContentPolymorphicSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.m;
|
|
104
|
+
var getKClass = kotlin_kotlin.$_$.f;
|
|
105
|
+
var SerializationException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f;
|
|
106
|
+
var CoroutineImpl = kotlin_kotlin.$_$.tc;
|
|
107
|
+
var ServerSentEvent = kotlin_io_ktor_ktor_sse.$_$.a;
|
|
108
|
+
var isCharSequence = kotlin_kotlin.$_$.fe;
|
|
109
|
+
var trim = kotlin_kotlin.$_$.yj;
|
|
110
|
+
var arrayOf = kotlin_kotlin.$_$.nl;
|
|
111
|
+
var createKType = kotlin_kotlin.$_$.c;
|
|
112
|
+
var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j4;
|
|
113
|
+
var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x3;
|
|
114
|
+
var isInterface = kotlin_kotlin.$_$.je;
|
|
115
|
+
var Companion_getInstance = kotlin_ai_koog_prompt_model.$_$.d2;
|
|
116
|
+
var firstOrNull = kotlin_kotlin.$_$.s8;
|
|
117
|
+
var emitAppend = kotlin_ai_koog_prompt_model.$_$.g1;
|
|
118
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.dc;
|
|
119
|
+
var emitToolCall = kotlin_ai_koog_prompt_model.$_$.i1;
|
|
120
|
+
var emitEnd = kotlin_ai_koog_prompt_model.$_$.h1;
|
|
121
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.zd;
|
|
122
|
+
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.i;
|
|
123
|
+
var Companion_getInstance_0 = kotlin_io_ktor_ktor_http.$_$.j;
|
|
124
|
+
var parameter = kotlin_io_ktor_ktor_client_core.$_$.v;
|
|
125
|
+
var Text_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
|
|
126
|
+
var accept = kotlin_io_ktor_ktor_client_core.$_$.s;
|
|
127
|
+
var headers = kotlin_io_ktor_ktor_http.$_$.b2;
|
|
128
|
+
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.c1;
|
|
129
|
+
var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.x;
|
|
130
|
+
var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.b;
|
|
131
|
+
var ClientSSESession = kotlin_io_ktor_ktor_client_core.$_$.m;
|
|
132
|
+
var KotlinLogging_instance = kotlin_io_github_oshai_kotlin_logging.$_$.b;
|
|
133
|
+
var get_RegisteredBasicJsonSchemaGenerators = kotlin_ai_koog_prompt_structure.$_$.d;
|
|
134
|
+
var Google_getInstance = kotlin_ai_koog_prompt_llm.$_$.u;
|
|
135
|
+
var get_RegisteredStandardJsonSchemaGenerators = kotlin_ai_koog_prompt_structure.$_$.e;
|
|
136
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.t;
|
|
137
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.zl;
|
|
138
|
+
var Video_getInstance = kotlin_ai_koog_prompt_llm.$_$.r;
|
|
139
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.e2;
|
|
140
|
+
var getKClassFromExpression = kotlin_kotlin.$_$.e;
|
|
141
|
+
var Binary = kotlin_ai_koog_prompt_model.$_$.d;
|
|
142
|
+
var Video = kotlin_ai_koog_prompt_model.$_$.k;
|
|
143
|
+
var Document_getInstance = kotlin_ai_koog_prompt_llm.$_$.e;
|
|
144
|
+
var File = kotlin_ai_koog_prompt_model.$_$.h;
|
|
145
|
+
var Audio_getInstance = kotlin_ai_koog_prompt_llm.$_$.c;
|
|
146
|
+
var Audio = kotlin_ai_koog_prompt_model.$_$.g;
|
|
147
|
+
var Image_getInstance = kotlin_ai_koog_prompt_llm.$_$.q;
|
|
148
|
+
var Image = kotlin_ai_koog_prompt_model.$_$.i;
|
|
149
|
+
var Text = kotlin_ai_koog_prompt_model.$_$.j;
|
|
150
|
+
var JsonObjectBuilder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.q;
|
|
151
|
+
var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.s;
|
|
152
|
+
var emptyList = kotlin_kotlin.$_$.m8;
|
|
153
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.p7;
|
|
154
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.s;
|
|
155
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.j2;
|
|
156
|
+
var Companion_getInstance_1 = kotlin_kotlin.$_$.z5;
|
|
157
|
+
var toString_0 = kotlin_kotlin.$_$.gm;
|
|
158
|
+
var Call_init_$Create$ = kotlin_ai_koog_prompt_model.$_$.k1;
|
|
159
|
+
var Assistant_init_$Create$ = kotlin_ai_koog_prompt_model.$_$.j1;
|
|
160
|
+
var Collection = kotlin_kotlin.$_$.n6;
|
|
161
|
+
var Call = kotlin_ai_koog_prompt_model.$_$.o;
|
|
162
|
+
var listOf = kotlin_kotlin.$_$.t9;
|
|
163
|
+
var FunctionAdapter = kotlin_kotlin.$_$.zc;
|
|
164
|
+
var FlowCollector = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e1;
|
|
165
|
+
var toList = kotlin_kotlin.$_$.gb;
|
|
166
|
+
var put = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.i1;
|
|
167
|
+
var Object_0 = kotlin_ai_koog_agents_tools.$_$.h;
|
|
168
|
+
var List = kotlin_ai_koog_agents_tools.$_$.g;
|
|
169
|
+
var putJsonArray = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.f1;
|
|
170
|
+
var Enum_0 = kotlin_ai_koog_agents_tools.$_$.d;
|
|
171
|
+
var String_getInstance = kotlin_ai_koog_agents_tools.$_$.n;
|
|
172
|
+
var Integer_getInstance = kotlin_ai_koog_agents_tools.$_$.m;
|
|
173
|
+
var Float_getInstance = kotlin_ai_koog_agents_tools.$_$.l;
|
|
174
|
+
var Boolean_getInstance = kotlin_ai_koog_agents_tools.$_$.k;
|
|
175
|
+
var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.d;
|
|
176
|
+
var contentType = kotlin_io_ktor_ktor_http.$_$.w1;
|
|
177
|
+
var json = kotlin_io_ktor_ktor_serialization_kotlinx_json.$_$.a;
|
|
178
|
+
var defaultRequest = kotlin_io_ktor_ktor_client_core.$_$.q;
|
|
179
|
+
var get_SSE = kotlin_io_ktor_ktor_client_core.$_$.n;
|
|
180
|
+
var get_ContentNegotiation = kotlin_io_ktor_ktor_client_content_negotiation.$_$.a;
|
|
181
|
+
var get_HttpTimeout = kotlin_io_ktor_ktor_client_core.$_$.p;
|
|
182
|
+
var Completion_getInstance = kotlin_ai_koog_prompt_llm.$_$.d;
|
|
183
|
+
var sse = kotlin_io_ktor_ktor_client_core.$_$.d;
|
|
184
|
+
var Exception = kotlin_kotlin.$_$.ok;
|
|
185
|
+
var SSEClientException = kotlin_io_ktor_ktor_client_core.$_$.o;
|
|
186
|
+
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c2;
|
|
187
|
+
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.r;
|
|
188
|
+
var url = kotlin_io_ktor_ktor_client_core.$_$.x;
|
|
189
|
+
var HttpStatement = kotlin_io_ktor_ktor_client_core.$_$.z;
|
|
190
|
+
var bodyAsText = kotlin_io_ktor_ktor_client_core.$_$.f;
|
|
191
|
+
var isSuccess = kotlin_io_ktor_ktor_http.$_$.d2;
|
|
192
|
+
var add = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.y;
|
|
193
|
+
var Tools_getInstance = kotlin_ai_koog_prompt_llm.$_$.p;
|
|
194
|
+
var first = kotlin_kotlin.$_$.w8;
|
|
195
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.wd;
|
|
196
|
+
var Dispatchers_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.v;
|
|
197
|
+
var get_SuitableForIO = kotlin_ai_koog_utils.$_$.a;
|
|
198
|
+
var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.m;
|
|
199
|
+
var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.b1;
|
|
200
|
+
var System_instance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.b;
|
|
201
|
+
var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.x;
|
|
202
|
+
var streamFrameFlow = kotlin_ai_koog_prompt_model.$_$.d1;
|
|
203
|
+
var JsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.r;
|
|
204
|
+
var Result = kotlin_ai_koog_prompt_model.$_$.p;
|
|
205
|
+
var Assistant = kotlin_ai_koog_prompt_model.$_$.l;
|
|
206
|
+
var User = kotlin_ai_koog_prompt_model.$_$.r;
|
|
207
|
+
var System = kotlin_ai_koog_prompt_model.$_$.n;
|
|
208
|
+
var plus = kotlin_kotlin.$_$.ha;
|
|
209
|
+
var mapCapacity = kotlin_kotlin.$_$.v9;
|
|
210
|
+
var coerceAtLeast = kotlin_kotlin.$_$.gf;
|
|
211
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.b1;
|
|
212
|
+
var to = kotlin_kotlin.$_$.hm;
|
|
213
|
+
var Standard = kotlin_ai_koog_prompt_model.$_$.t;
|
|
214
|
+
var Basic = kotlin_ai_koog_prompt_model.$_$.s;
|
|
215
|
+
var Temperature_getInstance = kotlin_ai_koog_prompt_llm.$_$.n;
|
|
216
|
+
var MultipleChoices_getInstance = kotlin_ai_koog_prompt_llm.$_$.g;
|
|
217
|
+
var Named = kotlin_ai_koog_prompt_model.$_$.v;
|
|
218
|
+
var Required_getInstance = kotlin_ai_koog_prompt_model.$_$.g2;
|
|
219
|
+
var None_getInstance = kotlin_ai_koog_prompt_model.$_$.f2;
|
|
220
|
+
var Auto_getInstance = kotlin_ai_koog_prompt_model.$_$.e2;
|
|
221
|
+
var LLMClient = kotlin_ai_koog_prompt_executor_clients.$_$.c;
|
|
222
|
+
var ConnectionTimeoutConfig = kotlin_ai_koog_prompt_executor_clients.$_$.b;
|
|
223
|
+
var BasicJsonSchemaGenerator = kotlin_ai_koog_prompt_structure.$_$.a;
|
|
224
|
+
var toMutableMap = kotlin_kotlin.$_$.nb;
|
|
225
|
+
var StandardJsonSchemaGenerator = kotlin_ai_koog_prompt_structure.$_$.b;
|
|
226
|
+
var KtMap = kotlin_kotlin.$_$.v6;
|
|
227
|
+
var JsonArrayBuilder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.j;
|
|
228
|
+
var getValue = kotlin_kotlin.$_$.b9;
|
|
229
|
+
//endregion
|
|
230
|
+
//region block: pre-declaration
|
|
231
|
+
initMetadataForCompanion(Companion);
|
|
232
|
+
initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
233
|
+
initMetadataForClass(GoogleResponse, 'GoogleResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});
|
|
234
|
+
initMetadataForCompanion(Companion_0);
|
|
235
|
+
initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
236
|
+
initMetadataForClass(GoogleRequest, 'GoogleRequest', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_0});
|
|
237
|
+
initMetadataForCompanion(Companion_1);
|
|
238
|
+
initMetadataForObject($serializer_1, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
239
|
+
initMetadataForClass(GoogleUsageMetadata, 'GoogleUsageMetadata', GoogleUsageMetadata, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_1});
|
|
240
|
+
initMetadataForCompanion(Companion_2);
|
|
241
|
+
initMetadataForObject($serializer_2, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
242
|
+
initMetadataForClass(GoogleCandidate, 'GoogleCandidate', GoogleCandidate, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_2});
|
|
243
|
+
initMetadataForCompanion(Companion_3);
|
|
244
|
+
initMetadataForObject($serializer_3, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
245
|
+
initMetadataForCompanion(Companion_4);
|
|
246
|
+
initMetadataForObject($serializer_4, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
247
|
+
initMetadataForCompanion(Companion_5);
|
|
248
|
+
initMetadataForObject($serializer_5, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
249
|
+
initMetadataForCompanion(Companion_6);
|
|
250
|
+
initMetadataForObject($serializer_6, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
251
|
+
initMetadataForCompanion(Companion_7);
|
|
252
|
+
initMetadataForObject($serializer_7, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
253
|
+
initMetadataForInterface(GooglePart, 'GooglePart', VOID, VOID, VOID, VOID, VOID, {0: GooglePartSerializer_getInstance});
|
|
254
|
+
initMetadataForClass(Text_0, 'Text', VOID, VOID, [GooglePart], VOID, VOID, {0: $serializer_getInstance_3});
|
|
255
|
+
initMetadataForClass(InlineData, 'InlineData', VOID, VOID, [GooglePart], VOID, VOID, {0: $serializer_getInstance_4});
|
|
256
|
+
initMetadataForClass(FileData, 'FileData', VOID, VOID, [GooglePart], VOID, VOID, {0: $serializer_getInstance_5});
|
|
257
|
+
initMetadataForClass(FunctionCall, 'FunctionCall', VOID, VOID, [GooglePart], VOID, VOID, {0: $serializer_getInstance_6});
|
|
258
|
+
initMetadataForClass(FunctionResponse, 'FunctionResponse', VOID, VOID, [GooglePart], VOID, VOID, {0: $serializer_getInstance_7});
|
|
259
|
+
initMetadataForCompanion(Companion_8);
|
|
260
|
+
initMetadataForObject($serializer_8, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
261
|
+
initMetadataForClass(GoogleContent, 'GoogleContent', GoogleContent, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_8});
|
|
262
|
+
initMetadataForCompanion(Companion_9);
|
|
263
|
+
initMetadataForObject($serializer_9, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
264
|
+
initMetadataForObject($serializer_10, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
265
|
+
initMetadataForCompanion(Companion_10);
|
|
266
|
+
initMetadataForObject($serializer_11, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
267
|
+
initMetadataForCompanion(Companion_11);
|
|
268
|
+
initMetadataForObject($serializer_12, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
269
|
+
initMetadataForClass(Blob, 'Blob', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_9});
|
|
270
|
+
initMetadataForClass(FileData_0, 'FileData', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_10});
|
|
271
|
+
initMetadataForClass(FunctionCall_0, 'FunctionCall', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_11});
|
|
272
|
+
initMetadataForClass(FunctionResponse_0, 'FunctionResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_12});
|
|
273
|
+
initMetadataForCompanion(Companion_12);
|
|
274
|
+
initMetadataForObject($serializer_13, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
275
|
+
initMetadataForClass(GoogleTool, 'GoogleTool', GoogleTool, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_13});
|
|
276
|
+
initMetadataForCompanion(Companion_13);
|
|
277
|
+
initMetadataForObject($serializer_14, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
278
|
+
initMetadataForClass(GoogleFunctionDeclaration, 'GoogleFunctionDeclaration', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_14});
|
|
279
|
+
initMetadataForCompanion(Companion_14);
|
|
280
|
+
initMetadataForObject($serializer_15, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
281
|
+
initMetadataForClass(GoogleGenerationConfig, 'GoogleGenerationConfig', GoogleGenerationConfig, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_15});
|
|
282
|
+
initMetadataForCompanion(Companion_15);
|
|
283
|
+
initMetadataForObject($serializer_16, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
284
|
+
initMetadataForClass(GoogleThinkingConfig, 'GoogleThinkingConfig', GoogleThinkingConfig, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_16});
|
|
285
|
+
initMetadataForCompanion(Companion_16);
|
|
286
|
+
initMetadataForObject($serializer_17, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
287
|
+
initMetadataForClass(GoogleFunctionCallingConfig, 'GoogleFunctionCallingConfig', GoogleFunctionCallingConfig, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_17});
|
|
288
|
+
initMetadataForCompanion(Companion_17, VOID, [SerializerFactory]);
|
|
289
|
+
initMetadataForClass(GoogleFunctionCallingMode, 'GoogleFunctionCallingMode', VOID, Enum, VOID, VOID, VOID, {0: Companion_getInstance_20});
|
|
290
|
+
initMetadataForCompanion(Companion_18);
|
|
291
|
+
initMetadataForObject($serializer_18, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
292
|
+
initMetadataForClass(GoogleToolConfig, 'GoogleToolConfig', GoogleToolConfig, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_18});
|
|
293
|
+
initMetadataForCompanion(Companion_19);
|
|
294
|
+
initMetadataForObject($serializer_19, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
295
|
+
initMetadataForClass(GooglePromptFeedback, 'GooglePromptFeedback', GooglePromptFeedback, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_19});
|
|
296
|
+
initMetadataForObject(GoogleGenerationConfigSerializer, 'GoogleGenerationConfigSerializer', VOID, AdditionalPropertiesFlatteningSerializer);
|
|
297
|
+
initMetadataForObject($serializer_20, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
298
|
+
initMetadataForClass(GoogleSafetyRating, 'GoogleSafetyRating', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_20});
|
|
299
|
+
initMetadataForObject(GooglePartSerializer, 'GooglePartSerializer', VOID, JsonContentPolymorphicSerializer);
|
|
300
|
+
initMetadataForLambda(GoogleLLMClient$executeStreaming$slambda$slambda$slambda, CoroutineImpl, VOID, [1]);
|
|
301
|
+
initMetadataForLambda(GoogleLLMClient$executeStreaming$slambda$slambda, CoroutineImpl, VOID, [1]);
|
|
302
|
+
initMetadataForCompanion(Companion_20);
|
|
303
|
+
initMetadataForClass(sam$kotlinx_coroutines_flow_FlowCollector$0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', VOID, VOID, [FlowCollector, FunctionAdapter], [1]);
|
|
304
|
+
initMetadataForLambda(GoogleLLMClient$executeStreaming$slambda, CoroutineImpl, VOID, [1]);
|
|
305
|
+
initMetadataForLambda(GoogleLLMClient$getGoogleResponse$slambda, CoroutineImpl, VOID, [1]);
|
|
306
|
+
initMetadataForCoroutine($executeCOROUTINE$, CoroutineImpl);
|
|
307
|
+
initMetadataForCoroutine($getGoogleResponseCOROUTINE$, CoroutineImpl);
|
|
308
|
+
initMetadataForClass(GoogleLLMClient, 'GoogleLLMClient', VOID, VOID, [LLMClient], [3, 2]);
|
|
309
|
+
initMetadataForClass(GoogleClientSettings, 'GoogleClientSettings', GoogleClientSettings);
|
|
310
|
+
initMetadataForClass(GoogleBasicJsonSchemaGenerator, 'GoogleBasicJsonSchemaGenerator', GoogleBasicJsonSchemaGenerator, BasicJsonSchemaGenerator);
|
|
311
|
+
initMetadataForCompanion(Companion_21, GoogleBasicJsonSchemaGenerator);
|
|
312
|
+
initMetadataForClass(GoogleStandardJsonSchemaGenerator, 'GoogleStandardJsonSchemaGenerator', GoogleStandardJsonSchemaGenerator, StandardJsonSchemaGenerator);
|
|
313
|
+
initMetadataForCompanion(Companion_22, GoogleStandardJsonSchemaGenerator);
|
|
314
|
+
initMetadataForClass(GoogleResponseFormat, 'GoogleResponseFormat');
|
|
315
|
+
//endregion
|
|
316
|
+
function GoogleResponse$Companion$$childSerializers$_anonymous__rfngr4() {
|
|
317
|
+
return new ArrayListSerializer($serializer_getInstance_2());
|
|
318
|
+
}
|
|
319
|
+
function Companion() {
|
|
320
|
+
Companion_instance = this;
|
|
321
|
+
var tmp = this;
|
|
322
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
323
|
+
// Inline function 'kotlin.arrayOf' call
|
|
324
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
325
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
326
|
+
tmp.o8t_1 = [lazy(tmp_0, GoogleResponse$Companion$$childSerializers$_anonymous__rfngr4), null, null, null];
|
|
327
|
+
}
|
|
328
|
+
var Companion_instance;
|
|
329
|
+
function Companion_getInstance_2() {
|
|
330
|
+
if (Companion_instance == null)
|
|
331
|
+
new Companion();
|
|
332
|
+
return Companion_instance;
|
|
333
|
+
}
|
|
334
|
+
function $serializer() {
|
|
335
|
+
$serializer_instance = this;
|
|
336
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleResponse', this, 4);
|
|
337
|
+
tmp0_serialDesc.m16('candidates', false);
|
|
338
|
+
tmp0_serialDesc.m16('promptFeedback', true);
|
|
339
|
+
tmp0_serialDesc.m16('usageMetadata', true);
|
|
340
|
+
tmp0_serialDesc.m16('modelVersion', true);
|
|
341
|
+
this.p8t_1 = tmp0_serialDesc;
|
|
342
|
+
}
|
|
343
|
+
protoOf($serializer).q8t = function (encoder, value) {
|
|
344
|
+
var tmp0_desc = this.p8t_1;
|
|
345
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
346
|
+
var tmp2_cached = Companion_getInstance_2().o8t_1;
|
|
347
|
+
tmp1_output.n10(tmp0_desc, 0, tmp2_cached[0].b1(), value.r8t_1);
|
|
348
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.s8t_1 == null)) {
|
|
349
|
+
tmp1_output.p10(tmp0_desc, 1, $serializer_getInstance_19(), value.s8t_1);
|
|
350
|
+
}
|
|
351
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.t8t_1 == null)) {
|
|
352
|
+
tmp1_output.p10(tmp0_desc, 2, $serializer_getInstance_1(), value.t8t_1);
|
|
353
|
+
}
|
|
354
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.u8t_1 == null)) {
|
|
355
|
+
tmp1_output.p10(tmp0_desc, 3, StringSerializer_getInstance(), value.u8t_1);
|
|
356
|
+
}
|
|
357
|
+
tmp1_output.xy(tmp0_desc);
|
|
358
|
+
};
|
|
359
|
+
protoOf($serializer).gv = function (encoder, value) {
|
|
360
|
+
return this.q8t(encoder, value instanceof GoogleResponse ? value : THROW_CCE());
|
|
361
|
+
};
|
|
362
|
+
protoOf($serializer).hv = function (decoder) {
|
|
363
|
+
var tmp0_desc = this.p8t_1;
|
|
364
|
+
var tmp1_flag = true;
|
|
365
|
+
var tmp2_index = 0;
|
|
366
|
+
var tmp3_bitMask0 = 0;
|
|
367
|
+
var tmp4_local0 = null;
|
|
368
|
+
var tmp5_local1 = null;
|
|
369
|
+
var tmp6_local2 = null;
|
|
370
|
+
var tmp7_local3 = null;
|
|
371
|
+
var tmp8_input = decoder.wy(tmp0_desc);
|
|
372
|
+
var tmp9_cached = Companion_getInstance_2().o8t_1;
|
|
373
|
+
if (tmp8_input.mz()) {
|
|
374
|
+
tmp4_local0 = tmp8_input.iz(tmp0_desc, 0, tmp9_cached[0].b1(), tmp4_local0);
|
|
375
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
376
|
+
tmp5_local1 = tmp8_input.kz(tmp0_desc, 1, $serializer_getInstance_19(), tmp5_local1);
|
|
377
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
378
|
+
tmp6_local2 = tmp8_input.kz(tmp0_desc, 2, $serializer_getInstance_1(), tmp6_local2);
|
|
379
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
380
|
+
tmp7_local3 = tmp8_input.kz(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
|
|
381
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
382
|
+
} else
|
|
383
|
+
while (tmp1_flag) {
|
|
384
|
+
tmp2_index = tmp8_input.nz(tmp0_desc);
|
|
385
|
+
switch (tmp2_index) {
|
|
386
|
+
case -1:
|
|
387
|
+
tmp1_flag = false;
|
|
388
|
+
break;
|
|
389
|
+
case 0:
|
|
390
|
+
tmp4_local0 = tmp8_input.iz(tmp0_desc, 0, tmp9_cached[0].b1(), tmp4_local0);
|
|
391
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
392
|
+
break;
|
|
393
|
+
case 1:
|
|
394
|
+
tmp5_local1 = tmp8_input.kz(tmp0_desc, 1, $serializer_getInstance_19(), tmp5_local1);
|
|
395
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
396
|
+
break;
|
|
397
|
+
case 2:
|
|
398
|
+
tmp6_local2 = tmp8_input.kz(tmp0_desc, 2, $serializer_getInstance_1(), tmp6_local2);
|
|
399
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
400
|
+
break;
|
|
401
|
+
case 3:
|
|
402
|
+
tmp7_local3 = tmp8_input.kz(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
|
|
403
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
404
|
+
break;
|
|
405
|
+
default:
|
|
406
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
tmp8_input.xy(tmp0_desc);
|
|
410
|
+
return GoogleResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
411
|
+
};
|
|
412
|
+
protoOf($serializer).fv = function () {
|
|
413
|
+
return this.p8t_1;
|
|
414
|
+
};
|
|
415
|
+
protoOf($serializer).d17 = function () {
|
|
416
|
+
// Inline function 'kotlin.arrayOf' call
|
|
417
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
418
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
419
|
+
return [Companion_getInstance_2().o8t_1[0].b1(), get_nullable($serializer_getInstance_19()), get_nullable($serializer_getInstance_1()), get_nullable(StringSerializer_getInstance())];
|
|
420
|
+
};
|
|
421
|
+
var $serializer_instance;
|
|
422
|
+
function $serializer_getInstance() {
|
|
423
|
+
if ($serializer_instance == null)
|
|
424
|
+
new $serializer();
|
|
425
|
+
return $serializer_instance;
|
|
426
|
+
}
|
|
427
|
+
function GoogleResponse_init_$Init$(seen0, candidates, promptFeedback, usageMetadata, modelVersion, serializationConstructorMarker, $this) {
|
|
428
|
+
if (!(1 === (1 & seen0))) {
|
|
429
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance().p8t_1);
|
|
430
|
+
}
|
|
431
|
+
$this.r8t_1 = candidates;
|
|
432
|
+
if (0 === (seen0 & 2))
|
|
433
|
+
$this.s8t_1 = null;
|
|
434
|
+
else
|
|
435
|
+
$this.s8t_1 = promptFeedback;
|
|
436
|
+
if (0 === (seen0 & 4))
|
|
437
|
+
$this.t8t_1 = null;
|
|
438
|
+
else
|
|
439
|
+
$this.t8t_1 = usageMetadata;
|
|
440
|
+
if (0 === (seen0 & 8))
|
|
441
|
+
$this.u8t_1 = null;
|
|
442
|
+
else
|
|
443
|
+
$this.u8t_1 = modelVersion;
|
|
444
|
+
return $this;
|
|
445
|
+
}
|
|
446
|
+
function GoogleResponse_init_$Create$(seen0, candidates, promptFeedback, usageMetadata, modelVersion, serializationConstructorMarker) {
|
|
447
|
+
return GoogleResponse_init_$Init$(seen0, candidates, promptFeedback, usageMetadata, modelVersion, serializationConstructorMarker, objectCreate(protoOf(GoogleResponse)));
|
|
448
|
+
}
|
|
449
|
+
function GoogleResponse(candidates, promptFeedback, usageMetadata, modelVersion) {
|
|
450
|
+
Companion_getInstance_2();
|
|
451
|
+
promptFeedback = promptFeedback === VOID ? null : promptFeedback;
|
|
452
|
+
usageMetadata = usageMetadata === VOID ? null : usageMetadata;
|
|
453
|
+
modelVersion = modelVersion === VOID ? null : modelVersion;
|
|
454
|
+
this.r8t_1 = candidates;
|
|
455
|
+
this.s8t_1 = promptFeedback;
|
|
456
|
+
this.t8t_1 = usageMetadata;
|
|
457
|
+
this.u8t_1 = modelVersion;
|
|
458
|
+
}
|
|
459
|
+
function GoogleRequest$Companion$$childSerializers$_anonymous__wys3vw() {
|
|
460
|
+
return new ArrayListSerializer($serializer_getInstance_8());
|
|
461
|
+
}
|
|
462
|
+
function GoogleRequest$Companion$$childSerializers$_anonymous__wys3vw_0() {
|
|
463
|
+
return new ArrayListSerializer($serializer_getInstance_13());
|
|
464
|
+
}
|
|
465
|
+
function Companion_0() {
|
|
466
|
+
Companion_instance_0 = this;
|
|
467
|
+
var tmp = this;
|
|
468
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
469
|
+
var tmp_1 = lazy(tmp_0, GoogleRequest$Companion$$childSerializers$_anonymous__wys3vw);
|
|
470
|
+
var tmp_2 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
471
|
+
// Inline function 'kotlin.arrayOf' call
|
|
472
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
473
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
474
|
+
tmp.v8t_1 = [tmp_1, lazy(tmp_2, GoogleRequest$Companion$$childSerializers$_anonymous__wys3vw_0), null, null, null];
|
|
475
|
+
}
|
|
476
|
+
var Companion_instance_0;
|
|
477
|
+
function Companion_getInstance_3() {
|
|
478
|
+
if (Companion_instance_0 == null)
|
|
479
|
+
new Companion_0();
|
|
480
|
+
return Companion_instance_0;
|
|
481
|
+
}
|
|
482
|
+
function $serializer_0() {
|
|
483
|
+
$serializer_instance_0 = this;
|
|
484
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleRequest', this, 5);
|
|
485
|
+
tmp0_serialDesc.m16('contents', false);
|
|
486
|
+
tmp0_serialDesc.m16('tools', true);
|
|
487
|
+
tmp0_serialDesc.m16('systemInstruction', true);
|
|
488
|
+
tmp0_serialDesc.m16('generationConfig', true);
|
|
489
|
+
tmp0_serialDesc.m16('toolConfig', true);
|
|
490
|
+
this.w8t_1 = tmp0_serialDesc;
|
|
491
|
+
}
|
|
492
|
+
protoOf($serializer_0).x8t = function (encoder, value) {
|
|
493
|
+
var tmp0_desc = this.w8t_1;
|
|
494
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
495
|
+
var tmp2_cached = Companion_getInstance_3().v8t_1;
|
|
496
|
+
tmp1_output.n10(tmp0_desc, 0, tmp2_cached[0].b1(), value.y8t_1);
|
|
497
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.z8t_1 == null)) {
|
|
498
|
+
tmp1_output.p10(tmp0_desc, 1, tmp2_cached[1].b1(), value.z8t_1);
|
|
499
|
+
}
|
|
500
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.a8u_1 == null)) {
|
|
501
|
+
tmp1_output.p10(tmp0_desc, 2, $serializer_getInstance_8(), value.a8u_1);
|
|
502
|
+
}
|
|
503
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.b8u_1 == null)) {
|
|
504
|
+
tmp1_output.p10(tmp0_desc, 3, GoogleGenerationConfigSerializer_getInstance(), value.b8u_1);
|
|
505
|
+
}
|
|
506
|
+
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.c8u_1 == null)) {
|
|
507
|
+
tmp1_output.p10(tmp0_desc, 4, $serializer_getInstance_18(), value.c8u_1);
|
|
508
|
+
}
|
|
509
|
+
tmp1_output.xy(tmp0_desc);
|
|
510
|
+
};
|
|
511
|
+
protoOf($serializer_0).gv = function (encoder, value) {
|
|
512
|
+
return this.x8t(encoder, value instanceof GoogleRequest ? value : THROW_CCE());
|
|
513
|
+
};
|
|
514
|
+
protoOf($serializer_0).hv = function (decoder) {
|
|
515
|
+
var tmp0_desc = this.w8t_1;
|
|
516
|
+
var tmp1_flag = true;
|
|
517
|
+
var tmp2_index = 0;
|
|
518
|
+
var tmp3_bitMask0 = 0;
|
|
519
|
+
var tmp4_local0 = null;
|
|
520
|
+
var tmp5_local1 = null;
|
|
521
|
+
var tmp6_local2 = null;
|
|
522
|
+
var tmp7_local3 = null;
|
|
523
|
+
var tmp8_local4 = null;
|
|
524
|
+
var tmp9_input = decoder.wy(tmp0_desc);
|
|
525
|
+
var tmp10_cached = Companion_getInstance_3().v8t_1;
|
|
526
|
+
if (tmp9_input.mz()) {
|
|
527
|
+
tmp4_local0 = tmp9_input.iz(tmp0_desc, 0, tmp10_cached[0].b1(), tmp4_local0);
|
|
528
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
529
|
+
tmp5_local1 = tmp9_input.kz(tmp0_desc, 1, tmp10_cached[1].b1(), tmp5_local1);
|
|
530
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
531
|
+
tmp6_local2 = tmp9_input.kz(tmp0_desc, 2, $serializer_getInstance_8(), tmp6_local2);
|
|
532
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
533
|
+
tmp7_local3 = tmp9_input.kz(tmp0_desc, 3, GoogleGenerationConfigSerializer_getInstance(), tmp7_local3);
|
|
534
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
535
|
+
tmp8_local4 = tmp9_input.kz(tmp0_desc, 4, $serializer_getInstance_18(), tmp8_local4);
|
|
536
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
537
|
+
} else
|
|
538
|
+
while (tmp1_flag) {
|
|
539
|
+
tmp2_index = tmp9_input.nz(tmp0_desc);
|
|
540
|
+
switch (tmp2_index) {
|
|
541
|
+
case -1:
|
|
542
|
+
tmp1_flag = false;
|
|
543
|
+
break;
|
|
544
|
+
case 0:
|
|
545
|
+
tmp4_local0 = tmp9_input.iz(tmp0_desc, 0, tmp10_cached[0].b1(), tmp4_local0);
|
|
546
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
547
|
+
break;
|
|
548
|
+
case 1:
|
|
549
|
+
tmp5_local1 = tmp9_input.kz(tmp0_desc, 1, tmp10_cached[1].b1(), tmp5_local1);
|
|
550
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
551
|
+
break;
|
|
552
|
+
case 2:
|
|
553
|
+
tmp6_local2 = tmp9_input.kz(tmp0_desc, 2, $serializer_getInstance_8(), tmp6_local2);
|
|
554
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
555
|
+
break;
|
|
556
|
+
case 3:
|
|
557
|
+
tmp7_local3 = tmp9_input.kz(tmp0_desc, 3, GoogleGenerationConfigSerializer_getInstance(), tmp7_local3);
|
|
558
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
559
|
+
break;
|
|
560
|
+
case 4:
|
|
561
|
+
tmp8_local4 = tmp9_input.kz(tmp0_desc, 4, $serializer_getInstance_18(), tmp8_local4);
|
|
562
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
563
|
+
break;
|
|
564
|
+
default:
|
|
565
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
tmp9_input.xy(tmp0_desc);
|
|
569
|
+
return GoogleRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
|
|
570
|
+
};
|
|
571
|
+
protoOf($serializer_0).fv = function () {
|
|
572
|
+
return this.w8t_1;
|
|
573
|
+
};
|
|
574
|
+
protoOf($serializer_0).d17 = function () {
|
|
575
|
+
var tmp0_cached = Companion_getInstance_3().v8t_1;
|
|
576
|
+
// Inline function 'kotlin.arrayOf' call
|
|
577
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
578
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
579
|
+
return [tmp0_cached[0].b1(), get_nullable(tmp0_cached[1].b1()), get_nullable($serializer_getInstance_8()), get_nullable(GoogleGenerationConfigSerializer_getInstance()), get_nullable($serializer_getInstance_18())];
|
|
580
|
+
};
|
|
581
|
+
var $serializer_instance_0;
|
|
582
|
+
function $serializer_getInstance_0() {
|
|
583
|
+
if ($serializer_instance_0 == null)
|
|
584
|
+
new $serializer_0();
|
|
585
|
+
return $serializer_instance_0;
|
|
586
|
+
}
|
|
587
|
+
function GoogleRequest_init_$Init$(seen0, contents, tools, systemInstruction, generationConfig, toolConfig, serializationConstructorMarker, $this) {
|
|
588
|
+
if (!(1 === (1 & seen0))) {
|
|
589
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_0().w8t_1);
|
|
590
|
+
}
|
|
591
|
+
$this.y8t_1 = contents;
|
|
592
|
+
if (0 === (seen0 & 2))
|
|
593
|
+
$this.z8t_1 = null;
|
|
594
|
+
else
|
|
595
|
+
$this.z8t_1 = tools;
|
|
596
|
+
if (0 === (seen0 & 4))
|
|
597
|
+
$this.a8u_1 = null;
|
|
598
|
+
else
|
|
599
|
+
$this.a8u_1 = systemInstruction;
|
|
600
|
+
if (0 === (seen0 & 8))
|
|
601
|
+
$this.b8u_1 = null;
|
|
602
|
+
else
|
|
603
|
+
$this.b8u_1 = generationConfig;
|
|
604
|
+
if (0 === (seen0 & 16))
|
|
605
|
+
$this.c8u_1 = null;
|
|
606
|
+
else
|
|
607
|
+
$this.c8u_1 = toolConfig;
|
|
608
|
+
return $this;
|
|
609
|
+
}
|
|
610
|
+
function GoogleRequest_init_$Create$(seen0, contents, tools, systemInstruction, generationConfig, toolConfig, serializationConstructorMarker) {
|
|
611
|
+
return GoogleRequest_init_$Init$(seen0, contents, tools, systemInstruction, generationConfig, toolConfig, serializationConstructorMarker, objectCreate(protoOf(GoogleRequest)));
|
|
612
|
+
}
|
|
613
|
+
function GoogleRequest(contents, tools, systemInstruction, generationConfig, toolConfig) {
|
|
614
|
+
Companion_getInstance_3();
|
|
615
|
+
tools = tools === VOID ? null : tools;
|
|
616
|
+
systemInstruction = systemInstruction === VOID ? null : systemInstruction;
|
|
617
|
+
generationConfig = generationConfig === VOID ? null : generationConfig;
|
|
618
|
+
toolConfig = toolConfig === VOID ? null : toolConfig;
|
|
619
|
+
this.y8t_1 = contents;
|
|
620
|
+
this.z8t_1 = tools;
|
|
621
|
+
this.a8u_1 = systemInstruction;
|
|
622
|
+
this.b8u_1 = generationConfig;
|
|
623
|
+
this.c8u_1 = toolConfig;
|
|
624
|
+
}
|
|
625
|
+
function Companion_1() {
|
|
626
|
+
}
|
|
627
|
+
var Companion_instance_1;
|
|
628
|
+
function Companion_getInstance_4() {
|
|
629
|
+
return Companion_instance_1;
|
|
630
|
+
}
|
|
631
|
+
function $serializer_1() {
|
|
632
|
+
$serializer_instance_1 = this;
|
|
633
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleUsageMetadata', this, 5);
|
|
634
|
+
tmp0_serialDesc.m16('promptTokenCount', true);
|
|
635
|
+
tmp0_serialDesc.m16('candidatesTokenCount', true);
|
|
636
|
+
tmp0_serialDesc.m16('toolUsePromptTokenCount', true);
|
|
637
|
+
tmp0_serialDesc.m16('thoughtsTokenCount', true);
|
|
638
|
+
tmp0_serialDesc.m16('totalTokenCount', true);
|
|
639
|
+
this.d8u_1 = tmp0_serialDesc;
|
|
640
|
+
}
|
|
641
|
+
protoOf($serializer_1).e8u = function (encoder, value) {
|
|
642
|
+
var tmp0_desc = this.d8u_1;
|
|
643
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
644
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.f8u_1 == null)) {
|
|
645
|
+
tmp1_output.p10(tmp0_desc, 0, IntSerializer_getInstance(), value.f8u_1);
|
|
646
|
+
}
|
|
647
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.g8u_1 == null)) {
|
|
648
|
+
tmp1_output.p10(tmp0_desc, 1, IntSerializer_getInstance(), value.g8u_1);
|
|
649
|
+
}
|
|
650
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.h8u_1 == null)) {
|
|
651
|
+
tmp1_output.p10(tmp0_desc, 2, IntSerializer_getInstance(), value.h8u_1);
|
|
652
|
+
}
|
|
653
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.i8u_1 == null)) {
|
|
654
|
+
tmp1_output.p10(tmp0_desc, 3, IntSerializer_getInstance(), value.i8u_1);
|
|
655
|
+
}
|
|
656
|
+
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.j8u_1 == null)) {
|
|
657
|
+
tmp1_output.p10(tmp0_desc, 4, IntSerializer_getInstance(), value.j8u_1);
|
|
658
|
+
}
|
|
659
|
+
tmp1_output.xy(tmp0_desc);
|
|
660
|
+
};
|
|
661
|
+
protoOf($serializer_1).gv = function (encoder, value) {
|
|
662
|
+
return this.e8u(encoder, value instanceof GoogleUsageMetadata ? value : THROW_CCE());
|
|
663
|
+
};
|
|
664
|
+
protoOf($serializer_1).hv = function (decoder) {
|
|
665
|
+
var tmp0_desc = this.d8u_1;
|
|
666
|
+
var tmp1_flag = true;
|
|
667
|
+
var tmp2_index = 0;
|
|
668
|
+
var tmp3_bitMask0 = 0;
|
|
669
|
+
var tmp4_local0 = null;
|
|
670
|
+
var tmp5_local1 = null;
|
|
671
|
+
var tmp6_local2 = null;
|
|
672
|
+
var tmp7_local3 = null;
|
|
673
|
+
var tmp8_local4 = null;
|
|
674
|
+
var tmp9_input = decoder.wy(tmp0_desc);
|
|
675
|
+
if (tmp9_input.mz()) {
|
|
676
|
+
tmp4_local0 = tmp9_input.kz(tmp0_desc, 0, IntSerializer_getInstance(), tmp4_local0);
|
|
677
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
678
|
+
tmp5_local1 = tmp9_input.kz(tmp0_desc, 1, IntSerializer_getInstance(), tmp5_local1);
|
|
679
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
680
|
+
tmp6_local2 = tmp9_input.kz(tmp0_desc, 2, IntSerializer_getInstance(), tmp6_local2);
|
|
681
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
682
|
+
tmp7_local3 = tmp9_input.kz(tmp0_desc, 3, IntSerializer_getInstance(), tmp7_local3);
|
|
683
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
684
|
+
tmp8_local4 = tmp9_input.kz(tmp0_desc, 4, IntSerializer_getInstance(), tmp8_local4);
|
|
685
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
686
|
+
} else
|
|
687
|
+
while (tmp1_flag) {
|
|
688
|
+
tmp2_index = tmp9_input.nz(tmp0_desc);
|
|
689
|
+
switch (tmp2_index) {
|
|
690
|
+
case -1:
|
|
691
|
+
tmp1_flag = false;
|
|
692
|
+
break;
|
|
693
|
+
case 0:
|
|
694
|
+
tmp4_local0 = tmp9_input.kz(tmp0_desc, 0, IntSerializer_getInstance(), tmp4_local0);
|
|
695
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
696
|
+
break;
|
|
697
|
+
case 1:
|
|
698
|
+
tmp5_local1 = tmp9_input.kz(tmp0_desc, 1, IntSerializer_getInstance(), tmp5_local1);
|
|
699
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
700
|
+
break;
|
|
701
|
+
case 2:
|
|
702
|
+
tmp6_local2 = tmp9_input.kz(tmp0_desc, 2, IntSerializer_getInstance(), tmp6_local2);
|
|
703
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
704
|
+
break;
|
|
705
|
+
case 3:
|
|
706
|
+
tmp7_local3 = tmp9_input.kz(tmp0_desc, 3, IntSerializer_getInstance(), tmp7_local3);
|
|
707
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
708
|
+
break;
|
|
709
|
+
case 4:
|
|
710
|
+
tmp8_local4 = tmp9_input.kz(tmp0_desc, 4, IntSerializer_getInstance(), tmp8_local4);
|
|
711
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
712
|
+
break;
|
|
713
|
+
default:
|
|
714
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
tmp9_input.xy(tmp0_desc);
|
|
718
|
+
return GoogleUsageMetadata_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
|
|
719
|
+
};
|
|
720
|
+
protoOf($serializer_1).fv = function () {
|
|
721
|
+
return this.d8u_1;
|
|
722
|
+
};
|
|
723
|
+
protoOf($serializer_1).d17 = function () {
|
|
724
|
+
// Inline function 'kotlin.arrayOf' call
|
|
725
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
726
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
727
|
+
return [get_nullable(IntSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(IntSerializer_getInstance())];
|
|
728
|
+
};
|
|
729
|
+
var $serializer_instance_1;
|
|
730
|
+
function $serializer_getInstance_1() {
|
|
731
|
+
if ($serializer_instance_1 == null)
|
|
732
|
+
new $serializer_1();
|
|
733
|
+
return $serializer_instance_1;
|
|
734
|
+
}
|
|
735
|
+
function GoogleUsageMetadata_init_$Init$(seen0, promptTokenCount, candidatesTokenCount, toolUsePromptTokenCount, thoughtsTokenCount, totalTokenCount, serializationConstructorMarker, $this) {
|
|
736
|
+
if (!(0 === (0 & seen0))) {
|
|
737
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_1().d8u_1);
|
|
738
|
+
}
|
|
739
|
+
if (0 === (seen0 & 1))
|
|
740
|
+
$this.f8u_1 = null;
|
|
741
|
+
else
|
|
742
|
+
$this.f8u_1 = promptTokenCount;
|
|
743
|
+
if (0 === (seen0 & 2))
|
|
744
|
+
$this.g8u_1 = null;
|
|
745
|
+
else
|
|
746
|
+
$this.g8u_1 = candidatesTokenCount;
|
|
747
|
+
if (0 === (seen0 & 4))
|
|
748
|
+
$this.h8u_1 = null;
|
|
749
|
+
else
|
|
750
|
+
$this.h8u_1 = toolUsePromptTokenCount;
|
|
751
|
+
if (0 === (seen0 & 8))
|
|
752
|
+
$this.i8u_1 = null;
|
|
753
|
+
else
|
|
754
|
+
$this.i8u_1 = thoughtsTokenCount;
|
|
755
|
+
if (0 === (seen0 & 16))
|
|
756
|
+
$this.j8u_1 = null;
|
|
757
|
+
else
|
|
758
|
+
$this.j8u_1 = totalTokenCount;
|
|
759
|
+
return $this;
|
|
760
|
+
}
|
|
761
|
+
function GoogleUsageMetadata_init_$Create$(seen0, promptTokenCount, candidatesTokenCount, toolUsePromptTokenCount, thoughtsTokenCount, totalTokenCount, serializationConstructorMarker) {
|
|
762
|
+
return GoogleUsageMetadata_init_$Init$(seen0, promptTokenCount, candidatesTokenCount, toolUsePromptTokenCount, thoughtsTokenCount, totalTokenCount, serializationConstructorMarker, objectCreate(protoOf(GoogleUsageMetadata)));
|
|
763
|
+
}
|
|
764
|
+
function GoogleUsageMetadata(promptTokenCount, candidatesTokenCount, toolUsePromptTokenCount, thoughtsTokenCount, totalTokenCount) {
|
|
765
|
+
promptTokenCount = promptTokenCount === VOID ? null : promptTokenCount;
|
|
766
|
+
candidatesTokenCount = candidatesTokenCount === VOID ? null : candidatesTokenCount;
|
|
767
|
+
toolUsePromptTokenCount = toolUsePromptTokenCount === VOID ? null : toolUsePromptTokenCount;
|
|
768
|
+
thoughtsTokenCount = thoughtsTokenCount === VOID ? null : thoughtsTokenCount;
|
|
769
|
+
totalTokenCount = totalTokenCount === VOID ? null : totalTokenCount;
|
|
770
|
+
this.f8u_1 = promptTokenCount;
|
|
771
|
+
this.g8u_1 = candidatesTokenCount;
|
|
772
|
+
this.h8u_1 = toolUsePromptTokenCount;
|
|
773
|
+
this.i8u_1 = thoughtsTokenCount;
|
|
774
|
+
this.j8u_1 = totalTokenCount;
|
|
775
|
+
}
|
|
776
|
+
function GoogleCandidate$Companion$$childSerializers$_anonymous__54k10g() {
|
|
777
|
+
return new ArrayListSerializer($serializer_getInstance_20());
|
|
778
|
+
}
|
|
779
|
+
function Companion_2() {
|
|
780
|
+
Companion_instance_2 = this;
|
|
781
|
+
var tmp = this;
|
|
782
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
783
|
+
// Inline function 'kotlin.arrayOf' call
|
|
784
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
785
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
786
|
+
tmp.k8u_1 = [null, null, lazy(tmp_0, GoogleCandidate$Companion$$childSerializers$_anonymous__54k10g), null];
|
|
787
|
+
}
|
|
788
|
+
var Companion_instance_2;
|
|
789
|
+
function Companion_getInstance_5() {
|
|
790
|
+
if (Companion_instance_2 == null)
|
|
791
|
+
new Companion_2();
|
|
792
|
+
return Companion_instance_2;
|
|
793
|
+
}
|
|
794
|
+
function $serializer_2() {
|
|
795
|
+
$serializer_instance_2 = this;
|
|
796
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleCandidate', this, 4);
|
|
797
|
+
tmp0_serialDesc.m16('content', true);
|
|
798
|
+
tmp0_serialDesc.m16('finishReason', true);
|
|
799
|
+
tmp0_serialDesc.m16('safetyRatings', true);
|
|
800
|
+
tmp0_serialDesc.m16('index', true);
|
|
801
|
+
this.l8u_1 = tmp0_serialDesc;
|
|
802
|
+
}
|
|
803
|
+
protoOf($serializer_2).m8u = function (encoder, value) {
|
|
804
|
+
var tmp0_desc = this.l8u_1;
|
|
805
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
806
|
+
var tmp2_cached = Companion_getInstance_5().k8u_1;
|
|
807
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.n8u_1 == null)) {
|
|
808
|
+
tmp1_output.p10(tmp0_desc, 0, $serializer_getInstance_8(), value.n8u_1);
|
|
809
|
+
}
|
|
810
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.o8u_1 == null)) {
|
|
811
|
+
tmp1_output.p10(tmp0_desc, 1, StringSerializer_getInstance(), value.o8u_1);
|
|
812
|
+
}
|
|
813
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.p8u_1 == null)) {
|
|
814
|
+
tmp1_output.p10(tmp0_desc, 2, tmp2_cached[2].b1(), value.p8u_1);
|
|
815
|
+
}
|
|
816
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.q8u_1 == null)) {
|
|
817
|
+
tmp1_output.p10(tmp0_desc, 3, IntSerializer_getInstance(), value.q8u_1);
|
|
818
|
+
}
|
|
819
|
+
tmp1_output.xy(tmp0_desc);
|
|
820
|
+
};
|
|
821
|
+
protoOf($serializer_2).gv = function (encoder, value) {
|
|
822
|
+
return this.m8u(encoder, value instanceof GoogleCandidate ? value : THROW_CCE());
|
|
823
|
+
};
|
|
824
|
+
protoOf($serializer_2).hv = function (decoder) {
|
|
825
|
+
var tmp0_desc = this.l8u_1;
|
|
826
|
+
var tmp1_flag = true;
|
|
827
|
+
var tmp2_index = 0;
|
|
828
|
+
var tmp3_bitMask0 = 0;
|
|
829
|
+
var tmp4_local0 = null;
|
|
830
|
+
var tmp5_local1 = null;
|
|
831
|
+
var tmp6_local2 = null;
|
|
832
|
+
var tmp7_local3 = null;
|
|
833
|
+
var tmp8_input = decoder.wy(tmp0_desc);
|
|
834
|
+
var tmp9_cached = Companion_getInstance_5().k8u_1;
|
|
835
|
+
if (tmp8_input.mz()) {
|
|
836
|
+
tmp4_local0 = tmp8_input.kz(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);
|
|
837
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
838
|
+
tmp5_local1 = tmp8_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
839
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
840
|
+
tmp6_local2 = tmp8_input.kz(tmp0_desc, 2, tmp9_cached[2].b1(), tmp6_local2);
|
|
841
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
842
|
+
tmp7_local3 = tmp8_input.kz(tmp0_desc, 3, IntSerializer_getInstance(), tmp7_local3);
|
|
843
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
844
|
+
} else
|
|
845
|
+
while (tmp1_flag) {
|
|
846
|
+
tmp2_index = tmp8_input.nz(tmp0_desc);
|
|
847
|
+
switch (tmp2_index) {
|
|
848
|
+
case -1:
|
|
849
|
+
tmp1_flag = false;
|
|
850
|
+
break;
|
|
851
|
+
case 0:
|
|
852
|
+
tmp4_local0 = tmp8_input.kz(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);
|
|
853
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
854
|
+
break;
|
|
855
|
+
case 1:
|
|
856
|
+
tmp5_local1 = tmp8_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
857
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
858
|
+
break;
|
|
859
|
+
case 2:
|
|
860
|
+
tmp6_local2 = tmp8_input.kz(tmp0_desc, 2, tmp9_cached[2].b1(), tmp6_local2);
|
|
861
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
862
|
+
break;
|
|
863
|
+
case 3:
|
|
864
|
+
tmp7_local3 = tmp8_input.kz(tmp0_desc, 3, IntSerializer_getInstance(), tmp7_local3);
|
|
865
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
866
|
+
break;
|
|
867
|
+
default:
|
|
868
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
tmp8_input.xy(tmp0_desc);
|
|
872
|
+
return GoogleCandidate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
873
|
+
};
|
|
874
|
+
protoOf($serializer_2).fv = function () {
|
|
875
|
+
return this.l8u_1;
|
|
876
|
+
};
|
|
877
|
+
protoOf($serializer_2).d17 = function () {
|
|
878
|
+
var tmp0_cached = Companion_getInstance_5().k8u_1;
|
|
879
|
+
// Inline function 'kotlin.arrayOf' call
|
|
880
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
881
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
882
|
+
return [get_nullable($serializer_getInstance_8()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[2].b1()), get_nullable(IntSerializer_getInstance())];
|
|
883
|
+
};
|
|
884
|
+
var $serializer_instance_2;
|
|
885
|
+
function $serializer_getInstance_2() {
|
|
886
|
+
if ($serializer_instance_2 == null)
|
|
887
|
+
new $serializer_2();
|
|
888
|
+
return $serializer_instance_2;
|
|
889
|
+
}
|
|
890
|
+
function GoogleCandidate_init_$Init$(seen0, content, finishReason, safetyRatings, index, serializationConstructorMarker, $this) {
|
|
891
|
+
if (!(0 === (0 & seen0))) {
|
|
892
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_2().l8u_1);
|
|
893
|
+
}
|
|
894
|
+
if (0 === (seen0 & 1))
|
|
895
|
+
$this.n8u_1 = null;
|
|
896
|
+
else
|
|
897
|
+
$this.n8u_1 = content;
|
|
898
|
+
if (0 === (seen0 & 2))
|
|
899
|
+
$this.o8u_1 = null;
|
|
900
|
+
else
|
|
901
|
+
$this.o8u_1 = finishReason;
|
|
902
|
+
if (0 === (seen0 & 4))
|
|
903
|
+
$this.p8u_1 = null;
|
|
904
|
+
else
|
|
905
|
+
$this.p8u_1 = safetyRatings;
|
|
906
|
+
if (0 === (seen0 & 8))
|
|
907
|
+
$this.q8u_1 = null;
|
|
908
|
+
else
|
|
909
|
+
$this.q8u_1 = index;
|
|
910
|
+
return $this;
|
|
911
|
+
}
|
|
912
|
+
function GoogleCandidate_init_$Create$(seen0, content, finishReason, safetyRatings, index, serializationConstructorMarker) {
|
|
913
|
+
return GoogleCandidate_init_$Init$(seen0, content, finishReason, safetyRatings, index, serializationConstructorMarker, objectCreate(protoOf(GoogleCandidate)));
|
|
914
|
+
}
|
|
915
|
+
function GoogleCandidate(content, finishReason, safetyRatings, index) {
|
|
916
|
+
Companion_getInstance_5();
|
|
917
|
+
content = content === VOID ? null : content;
|
|
918
|
+
finishReason = finishReason === VOID ? null : finishReason;
|
|
919
|
+
safetyRatings = safetyRatings === VOID ? null : safetyRatings;
|
|
920
|
+
index = index === VOID ? null : index;
|
|
921
|
+
this.n8u_1 = content;
|
|
922
|
+
this.o8u_1 = finishReason;
|
|
923
|
+
this.p8u_1 = safetyRatings;
|
|
924
|
+
this.q8u_1 = index;
|
|
925
|
+
}
|
|
926
|
+
function Companion_3() {
|
|
927
|
+
}
|
|
928
|
+
protoOf(Companion_3).q1j = function () {
|
|
929
|
+
return $serializer_getInstance_3();
|
|
930
|
+
};
|
|
931
|
+
var Companion_instance_3;
|
|
932
|
+
function Companion_getInstance_6() {
|
|
933
|
+
return Companion_instance_3;
|
|
934
|
+
}
|
|
935
|
+
function $serializer_3() {
|
|
936
|
+
$serializer_instance_3 = this;
|
|
937
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('text', this, 2);
|
|
938
|
+
tmp0_serialDesc.m16('text', false);
|
|
939
|
+
tmp0_serialDesc.m16('thought', true);
|
|
940
|
+
this.r8u_1 = tmp0_serialDesc;
|
|
941
|
+
}
|
|
942
|
+
protoOf($serializer_3).s8u = function (encoder, value) {
|
|
943
|
+
var tmp0_desc = this.r8u_1;
|
|
944
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
945
|
+
tmp1_output.l10(tmp0_desc, 0, value.t8u_1);
|
|
946
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.u8u_1 == null)) {
|
|
947
|
+
tmp1_output.p10(tmp0_desc, 1, BooleanSerializer_getInstance(), value.u8u_1);
|
|
948
|
+
}
|
|
949
|
+
tmp1_output.xy(tmp0_desc);
|
|
950
|
+
};
|
|
951
|
+
protoOf($serializer_3).gv = function (encoder, value) {
|
|
952
|
+
return this.s8u(encoder, value instanceof Text_0 ? value : THROW_CCE());
|
|
953
|
+
};
|
|
954
|
+
protoOf($serializer_3).hv = function (decoder) {
|
|
955
|
+
var tmp0_desc = this.r8u_1;
|
|
956
|
+
var tmp1_flag = true;
|
|
957
|
+
var tmp2_index = 0;
|
|
958
|
+
var tmp3_bitMask0 = 0;
|
|
959
|
+
var tmp4_local0 = null;
|
|
960
|
+
var tmp5_local1 = null;
|
|
961
|
+
var tmp6_input = decoder.wy(tmp0_desc);
|
|
962
|
+
if (tmp6_input.mz()) {
|
|
963
|
+
tmp4_local0 = tmp6_input.gz(tmp0_desc, 0);
|
|
964
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
965
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
966
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
967
|
+
} else
|
|
968
|
+
while (tmp1_flag) {
|
|
969
|
+
tmp2_index = tmp6_input.nz(tmp0_desc);
|
|
970
|
+
switch (tmp2_index) {
|
|
971
|
+
case -1:
|
|
972
|
+
tmp1_flag = false;
|
|
973
|
+
break;
|
|
974
|
+
case 0:
|
|
975
|
+
tmp4_local0 = tmp6_input.gz(tmp0_desc, 0);
|
|
976
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
977
|
+
break;
|
|
978
|
+
case 1:
|
|
979
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
980
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
981
|
+
break;
|
|
982
|
+
default:
|
|
983
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
tmp6_input.xy(tmp0_desc);
|
|
987
|
+
return Text_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
988
|
+
};
|
|
989
|
+
protoOf($serializer_3).fv = function () {
|
|
990
|
+
return this.r8u_1;
|
|
991
|
+
};
|
|
992
|
+
protoOf($serializer_3).d17 = function () {
|
|
993
|
+
// Inline function 'kotlin.arrayOf' call
|
|
994
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
995
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
996
|
+
return [StringSerializer_getInstance(), get_nullable(BooleanSerializer_getInstance())];
|
|
997
|
+
};
|
|
998
|
+
var $serializer_instance_3;
|
|
999
|
+
function $serializer_getInstance_3() {
|
|
1000
|
+
if ($serializer_instance_3 == null)
|
|
1001
|
+
new $serializer_3();
|
|
1002
|
+
return $serializer_instance_3;
|
|
1003
|
+
}
|
|
1004
|
+
function Text_init_$Init$(seen0, text, thought, serializationConstructorMarker, $this) {
|
|
1005
|
+
if (!(1 === (1 & seen0))) {
|
|
1006
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_3().r8u_1);
|
|
1007
|
+
}
|
|
1008
|
+
$this.t8u_1 = text;
|
|
1009
|
+
if (0 === (seen0 & 2))
|
|
1010
|
+
$this.u8u_1 = null;
|
|
1011
|
+
else
|
|
1012
|
+
$this.u8u_1 = thought;
|
|
1013
|
+
return $this;
|
|
1014
|
+
}
|
|
1015
|
+
function Text_init_$Create$(seen0, text, thought, serializationConstructorMarker) {
|
|
1016
|
+
return Text_init_$Init$(seen0, text, thought, serializationConstructorMarker, objectCreate(protoOf(Text_0)));
|
|
1017
|
+
}
|
|
1018
|
+
function Companion_4() {
|
|
1019
|
+
}
|
|
1020
|
+
protoOf(Companion_4).q1j = function () {
|
|
1021
|
+
return $serializer_getInstance_4();
|
|
1022
|
+
};
|
|
1023
|
+
var Companion_instance_4;
|
|
1024
|
+
function Companion_getInstance_7() {
|
|
1025
|
+
return Companion_instance_4;
|
|
1026
|
+
}
|
|
1027
|
+
function $serializer_4() {
|
|
1028
|
+
$serializer_instance_4 = this;
|
|
1029
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('inlineData', this, 2);
|
|
1030
|
+
tmp0_serialDesc.m16('inlineData', false);
|
|
1031
|
+
tmp0_serialDesc.m16('thought', true);
|
|
1032
|
+
this.v8u_1 = tmp0_serialDesc;
|
|
1033
|
+
}
|
|
1034
|
+
protoOf($serializer_4).w8u = function (encoder, value) {
|
|
1035
|
+
var tmp0_desc = this.v8u_1;
|
|
1036
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1037
|
+
tmp1_output.n10(tmp0_desc, 0, $serializer_getInstance_9(), value.x8u_1);
|
|
1038
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.y8u_1 == null)) {
|
|
1039
|
+
tmp1_output.p10(tmp0_desc, 1, BooleanSerializer_getInstance(), value.y8u_1);
|
|
1040
|
+
}
|
|
1041
|
+
tmp1_output.xy(tmp0_desc);
|
|
1042
|
+
};
|
|
1043
|
+
protoOf($serializer_4).gv = function (encoder, value) {
|
|
1044
|
+
return this.w8u(encoder, value instanceof InlineData ? value : THROW_CCE());
|
|
1045
|
+
};
|
|
1046
|
+
protoOf($serializer_4).hv = function (decoder) {
|
|
1047
|
+
var tmp0_desc = this.v8u_1;
|
|
1048
|
+
var tmp1_flag = true;
|
|
1049
|
+
var tmp2_index = 0;
|
|
1050
|
+
var tmp3_bitMask0 = 0;
|
|
1051
|
+
var tmp4_local0 = null;
|
|
1052
|
+
var tmp5_local1 = null;
|
|
1053
|
+
var tmp6_input = decoder.wy(tmp0_desc);
|
|
1054
|
+
if (tmp6_input.mz()) {
|
|
1055
|
+
tmp4_local0 = tmp6_input.iz(tmp0_desc, 0, $serializer_getInstance_9(), tmp4_local0);
|
|
1056
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1057
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
1058
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1059
|
+
} else
|
|
1060
|
+
while (tmp1_flag) {
|
|
1061
|
+
tmp2_index = tmp6_input.nz(tmp0_desc);
|
|
1062
|
+
switch (tmp2_index) {
|
|
1063
|
+
case -1:
|
|
1064
|
+
tmp1_flag = false;
|
|
1065
|
+
break;
|
|
1066
|
+
case 0:
|
|
1067
|
+
tmp4_local0 = tmp6_input.iz(tmp0_desc, 0, $serializer_getInstance_9(), tmp4_local0);
|
|
1068
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1069
|
+
break;
|
|
1070
|
+
case 1:
|
|
1071
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
1072
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1073
|
+
break;
|
|
1074
|
+
default:
|
|
1075
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
tmp6_input.xy(tmp0_desc);
|
|
1079
|
+
return InlineData_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
1080
|
+
};
|
|
1081
|
+
protoOf($serializer_4).fv = function () {
|
|
1082
|
+
return this.v8u_1;
|
|
1083
|
+
};
|
|
1084
|
+
protoOf($serializer_4).d17 = function () {
|
|
1085
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1086
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1087
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1088
|
+
return [$serializer_getInstance_9(), get_nullable(BooleanSerializer_getInstance())];
|
|
1089
|
+
};
|
|
1090
|
+
var $serializer_instance_4;
|
|
1091
|
+
function $serializer_getInstance_4() {
|
|
1092
|
+
if ($serializer_instance_4 == null)
|
|
1093
|
+
new $serializer_4();
|
|
1094
|
+
return $serializer_instance_4;
|
|
1095
|
+
}
|
|
1096
|
+
function InlineData_init_$Init$(seen0, inlineData, thought, serializationConstructorMarker, $this) {
|
|
1097
|
+
if (!(1 === (1 & seen0))) {
|
|
1098
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_4().v8u_1);
|
|
1099
|
+
}
|
|
1100
|
+
$this.x8u_1 = inlineData;
|
|
1101
|
+
if (0 === (seen0 & 2))
|
|
1102
|
+
$this.y8u_1 = null;
|
|
1103
|
+
else
|
|
1104
|
+
$this.y8u_1 = thought;
|
|
1105
|
+
return $this;
|
|
1106
|
+
}
|
|
1107
|
+
function InlineData_init_$Create$(seen0, inlineData, thought, serializationConstructorMarker) {
|
|
1108
|
+
return InlineData_init_$Init$(seen0, inlineData, thought, serializationConstructorMarker, objectCreate(protoOf(InlineData)));
|
|
1109
|
+
}
|
|
1110
|
+
function Companion_5() {
|
|
1111
|
+
}
|
|
1112
|
+
protoOf(Companion_5).q1j = function () {
|
|
1113
|
+
return $serializer_getInstance_5();
|
|
1114
|
+
};
|
|
1115
|
+
var Companion_instance_5;
|
|
1116
|
+
function Companion_getInstance_8() {
|
|
1117
|
+
return Companion_instance_5;
|
|
1118
|
+
}
|
|
1119
|
+
function $serializer_5() {
|
|
1120
|
+
$serializer_instance_5 = this;
|
|
1121
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('fileData', this, 2);
|
|
1122
|
+
tmp0_serialDesc.m16('fileData', false);
|
|
1123
|
+
tmp0_serialDesc.m16('thought', true);
|
|
1124
|
+
this.z8u_1 = tmp0_serialDesc;
|
|
1125
|
+
}
|
|
1126
|
+
protoOf($serializer_5).a8v = function (encoder, value) {
|
|
1127
|
+
var tmp0_desc = this.z8u_1;
|
|
1128
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1129
|
+
tmp1_output.n10(tmp0_desc, 0, $serializer_getInstance_10(), value.b8v_1);
|
|
1130
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.c8v_1 == null)) {
|
|
1131
|
+
tmp1_output.p10(tmp0_desc, 1, BooleanSerializer_getInstance(), value.c8v_1);
|
|
1132
|
+
}
|
|
1133
|
+
tmp1_output.xy(tmp0_desc);
|
|
1134
|
+
};
|
|
1135
|
+
protoOf($serializer_5).gv = function (encoder, value) {
|
|
1136
|
+
return this.a8v(encoder, value instanceof FileData ? value : THROW_CCE());
|
|
1137
|
+
};
|
|
1138
|
+
protoOf($serializer_5).hv = function (decoder) {
|
|
1139
|
+
var tmp0_desc = this.z8u_1;
|
|
1140
|
+
var tmp1_flag = true;
|
|
1141
|
+
var tmp2_index = 0;
|
|
1142
|
+
var tmp3_bitMask0 = 0;
|
|
1143
|
+
var tmp4_local0 = null;
|
|
1144
|
+
var tmp5_local1 = null;
|
|
1145
|
+
var tmp6_input = decoder.wy(tmp0_desc);
|
|
1146
|
+
if (tmp6_input.mz()) {
|
|
1147
|
+
tmp4_local0 = tmp6_input.iz(tmp0_desc, 0, $serializer_getInstance_10(), tmp4_local0);
|
|
1148
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1149
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
1150
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1151
|
+
} else
|
|
1152
|
+
while (tmp1_flag) {
|
|
1153
|
+
tmp2_index = tmp6_input.nz(tmp0_desc);
|
|
1154
|
+
switch (tmp2_index) {
|
|
1155
|
+
case -1:
|
|
1156
|
+
tmp1_flag = false;
|
|
1157
|
+
break;
|
|
1158
|
+
case 0:
|
|
1159
|
+
tmp4_local0 = tmp6_input.iz(tmp0_desc, 0, $serializer_getInstance_10(), tmp4_local0);
|
|
1160
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1161
|
+
break;
|
|
1162
|
+
case 1:
|
|
1163
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
1164
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1165
|
+
break;
|
|
1166
|
+
default:
|
|
1167
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
tmp6_input.xy(tmp0_desc);
|
|
1171
|
+
return FileData_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
1172
|
+
};
|
|
1173
|
+
protoOf($serializer_5).fv = function () {
|
|
1174
|
+
return this.z8u_1;
|
|
1175
|
+
};
|
|
1176
|
+
protoOf($serializer_5).d17 = function () {
|
|
1177
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1178
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1179
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1180
|
+
return [$serializer_getInstance_10(), get_nullable(BooleanSerializer_getInstance())];
|
|
1181
|
+
};
|
|
1182
|
+
var $serializer_instance_5;
|
|
1183
|
+
function $serializer_getInstance_5() {
|
|
1184
|
+
if ($serializer_instance_5 == null)
|
|
1185
|
+
new $serializer_5();
|
|
1186
|
+
return $serializer_instance_5;
|
|
1187
|
+
}
|
|
1188
|
+
function FileData_init_$Init$(seen0, fileData, thought, serializationConstructorMarker, $this) {
|
|
1189
|
+
if (!(1 === (1 & seen0))) {
|
|
1190
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_5().z8u_1);
|
|
1191
|
+
}
|
|
1192
|
+
$this.b8v_1 = fileData;
|
|
1193
|
+
if (0 === (seen0 & 2))
|
|
1194
|
+
$this.c8v_1 = null;
|
|
1195
|
+
else
|
|
1196
|
+
$this.c8v_1 = thought;
|
|
1197
|
+
return $this;
|
|
1198
|
+
}
|
|
1199
|
+
function FileData_init_$Create$(seen0, fileData, thought, serializationConstructorMarker) {
|
|
1200
|
+
return FileData_init_$Init$(seen0, fileData, thought, serializationConstructorMarker, objectCreate(protoOf(FileData)));
|
|
1201
|
+
}
|
|
1202
|
+
function Companion_6() {
|
|
1203
|
+
}
|
|
1204
|
+
protoOf(Companion_6).q1j = function () {
|
|
1205
|
+
return $serializer_getInstance_6();
|
|
1206
|
+
};
|
|
1207
|
+
var Companion_instance_6;
|
|
1208
|
+
function Companion_getInstance_9() {
|
|
1209
|
+
return Companion_instance_6;
|
|
1210
|
+
}
|
|
1211
|
+
function $serializer_6() {
|
|
1212
|
+
$serializer_instance_6 = this;
|
|
1213
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('functionCall', this, 2);
|
|
1214
|
+
tmp0_serialDesc.m16('functionCall', false);
|
|
1215
|
+
tmp0_serialDesc.m16('thought', true);
|
|
1216
|
+
this.d8v_1 = tmp0_serialDesc;
|
|
1217
|
+
}
|
|
1218
|
+
protoOf($serializer_6).e8v = function (encoder, value) {
|
|
1219
|
+
var tmp0_desc = this.d8v_1;
|
|
1220
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1221
|
+
tmp1_output.n10(tmp0_desc, 0, $serializer_getInstance_11(), value.f8v_1);
|
|
1222
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.g8v_1 == null)) {
|
|
1223
|
+
tmp1_output.p10(tmp0_desc, 1, BooleanSerializer_getInstance(), value.g8v_1);
|
|
1224
|
+
}
|
|
1225
|
+
tmp1_output.xy(tmp0_desc);
|
|
1226
|
+
};
|
|
1227
|
+
protoOf($serializer_6).gv = function (encoder, value) {
|
|
1228
|
+
return this.e8v(encoder, value instanceof FunctionCall ? value : THROW_CCE());
|
|
1229
|
+
};
|
|
1230
|
+
protoOf($serializer_6).hv = function (decoder) {
|
|
1231
|
+
var tmp0_desc = this.d8v_1;
|
|
1232
|
+
var tmp1_flag = true;
|
|
1233
|
+
var tmp2_index = 0;
|
|
1234
|
+
var tmp3_bitMask0 = 0;
|
|
1235
|
+
var tmp4_local0 = null;
|
|
1236
|
+
var tmp5_local1 = null;
|
|
1237
|
+
var tmp6_input = decoder.wy(tmp0_desc);
|
|
1238
|
+
if (tmp6_input.mz()) {
|
|
1239
|
+
tmp4_local0 = tmp6_input.iz(tmp0_desc, 0, $serializer_getInstance_11(), tmp4_local0);
|
|
1240
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1241
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
1242
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1243
|
+
} else
|
|
1244
|
+
while (tmp1_flag) {
|
|
1245
|
+
tmp2_index = tmp6_input.nz(tmp0_desc);
|
|
1246
|
+
switch (tmp2_index) {
|
|
1247
|
+
case -1:
|
|
1248
|
+
tmp1_flag = false;
|
|
1249
|
+
break;
|
|
1250
|
+
case 0:
|
|
1251
|
+
tmp4_local0 = tmp6_input.iz(tmp0_desc, 0, $serializer_getInstance_11(), tmp4_local0);
|
|
1252
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1253
|
+
break;
|
|
1254
|
+
case 1:
|
|
1255
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
1256
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1257
|
+
break;
|
|
1258
|
+
default:
|
|
1259
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
tmp6_input.xy(tmp0_desc);
|
|
1263
|
+
return FunctionCall_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
1264
|
+
};
|
|
1265
|
+
protoOf($serializer_6).fv = function () {
|
|
1266
|
+
return this.d8v_1;
|
|
1267
|
+
};
|
|
1268
|
+
protoOf($serializer_6).d17 = function () {
|
|
1269
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1270
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1271
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1272
|
+
return [$serializer_getInstance_11(), get_nullable(BooleanSerializer_getInstance())];
|
|
1273
|
+
};
|
|
1274
|
+
var $serializer_instance_6;
|
|
1275
|
+
function $serializer_getInstance_6() {
|
|
1276
|
+
if ($serializer_instance_6 == null)
|
|
1277
|
+
new $serializer_6();
|
|
1278
|
+
return $serializer_instance_6;
|
|
1279
|
+
}
|
|
1280
|
+
function FunctionCall_init_$Init$(seen0, functionCall, thought, serializationConstructorMarker, $this) {
|
|
1281
|
+
if (!(1 === (1 & seen0))) {
|
|
1282
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_6().d8v_1);
|
|
1283
|
+
}
|
|
1284
|
+
$this.f8v_1 = functionCall;
|
|
1285
|
+
if (0 === (seen0 & 2))
|
|
1286
|
+
$this.g8v_1 = null;
|
|
1287
|
+
else
|
|
1288
|
+
$this.g8v_1 = thought;
|
|
1289
|
+
return $this;
|
|
1290
|
+
}
|
|
1291
|
+
function FunctionCall_init_$Create$(seen0, functionCall, thought, serializationConstructorMarker) {
|
|
1292
|
+
return FunctionCall_init_$Init$(seen0, functionCall, thought, serializationConstructorMarker, objectCreate(protoOf(FunctionCall)));
|
|
1293
|
+
}
|
|
1294
|
+
function Companion_7() {
|
|
1295
|
+
}
|
|
1296
|
+
protoOf(Companion_7).q1j = function () {
|
|
1297
|
+
return $serializer_getInstance_7();
|
|
1298
|
+
};
|
|
1299
|
+
var Companion_instance_7;
|
|
1300
|
+
function Companion_getInstance_10() {
|
|
1301
|
+
return Companion_instance_7;
|
|
1302
|
+
}
|
|
1303
|
+
function $serializer_7() {
|
|
1304
|
+
$serializer_instance_7 = this;
|
|
1305
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('functionResponse', this, 2);
|
|
1306
|
+
tmp0_serialDesc.m16('functionResponse', false);
|
|
1307
|
+
tmp0_serialDesc.m16('thought', true);
|
|
1308
|
+
this.h8v_1 = tmp0_serialDesc;
|
|
1309
|
+
}
|
|
1310
|
+
protoOf($serializer_7).i8v = function (encoder, value) {
|
|
1311
|
+
var tmp0_desc = this.h8v_1;
|
|
1312
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1313
|
+
tmp1_output.n10(tmp0_desc, 0, $serializer_getInstance_12(), value.j8v_1);
|
|
1314
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.k8v_1 == null)) {
|
|
1315
|
+
tmp1_output.p10(tmp0_desc, 1, BooleanSerializer_getInstance(), value.k8v_1);
|
|
1316
|
+
}
|
|
1317
|
+
tmp1_output.xy(tmp0_desc);
|
|
1318
|
+
};
|
|
1319
|
+
protoOf($serializer_7).gv = function (encoder, value) {
|
|
1320
|
+
return this.i8v(encoder, value instanceof FunctionResponse ? value : THROW_CCE());
|
|
1321
|
+
};
|
|
1322
|
+
protoOf($serializer_7).hv = function (decoder) {
|
|
1323
|
+
var tmp0_desc = this.h8v_1;
|
|
1324
|
+
var tmp1_flag = true;
|
|
1325
|
+
var tmp2_index = 0;
|
|
1326
|
+
var tmp3_bitMask0 = 0;
|
|
1327
|
+
var tmp4_local0 = null;
|
|
1328
|
+
var tmp5_local1 = null;
|
|
1329
|
+
var tmp6_input = decoder.wy(tmp0_desc);
|
|
1330
|
+
if (tmp6_input.mz()) {
|
|
1331
|
+
tmp4_local0 = tmp6_input.iz(tmp0_desc, 0, $serializer_getInstance_12(), tmp4_local0);
|
|
1332
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1333
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
1334
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1335
|
+
} else
|
|
1336
|
+
while (tmp1_flag) {
|
|
1337
|
+
tmp2_index = tmp6_input.nz(tmp0_desc);
|
|
1338
|
+
switch (tmp2_index) {
|
|
1339
|
+
case -1:
|
|
1340
|
+
tmp1_flag = false;
|
|
1341
|
+
break;
|
|
1342
|
+
case 0:
|
|
1343
|
+
tmp4_local0 = tmp6_input.iz(tmp0_desc, 0, $serializer_getInstance_12(), tmp4_local0);
|
|
1344
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1345
|
+
break;
|
|
1346
|
+
case 1:
|
|
1347
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
|
|
1348
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1349
|
+
break;
|
|
1350
|
+
default:
|
|
1351
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
tmp6_input.xy(tmp0_desc);
|
|
1355
|
+
return FunctionResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
1356
|
+
};
|
|
1357
|
+
protoOf($serializer_7).fv = function () {
|
|
1358
|
+
return this.h8v_1;
|
|
1359
|
+
};
|
|
1360
|
+
protoOf($serializer_7).d17 = function () {
|
|
1361
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1362
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1363
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1364
|
+
return [$serializer_getInstance_12(), get_nullable(BooleanSerializer_getInstance())];
|
|
1365
|
+
};
|
|
1366
|
+
var $serializer_instance_7;
|
|
1367
|
+
function $serializer_getInstance_7() {
|
|
1368
|
+
if ($serializer_instance_7 == null)
|
|
1369
|
+
new $serializer_7();
|
|
1370
|
+
return $serializer_instance_7;
|
|
1371
|
+
}
|
|
1372
|
+
function FunctionResponse_init_$Init$(seen0, functionResponse, thought, serializationConstructorMarker, $this) {
|
|
1373
|
+
if (!(1 === (1 & seen0))) {
|
|
1374
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_7().h8v_1);
|
|
1375
|
+
}
|
|
1376
|
+
$this.j8v_1 = functionResponse;
|
|
1377
|
+
if (0 === (seen0 & 2))
|
|
1378
|
+
$this.k8v_1 = null;
|
|
1379
|
+
else
|
|
1380
|
+
$this.k8v_1 = thought;
|
|
1381
|
+
return $this;
|
|
1382
|
+
}
|
|
1383
|
+
function FunctionResponse_init_$Create$(seen0, functionResponse, thought, serializationConstructorMarker) {
|
|
1384
|
+
return FunctionResponse_init_$Init$(seen0, functionResponse, thought, serializationConstructorMarker, objectCreate(protoOf(FunctionResponse)));
|
|
1385
|
+
}
|
|
1386
|
+
function Text_0(text, thought) {
|
|
1387
|
+
thought = thought === VOID ? null : thought;
|
|
1388
|
+
this.t8u_1 = text;
|
|
1389
|
+
this.u8u_1 = thought;
|
|
1390
|
+
}
|
|
1391
|
+
protoOf(Text_0).toString = function () {
|
|
1392
|
+
return 'Text(text=' + this.t8u_1 + ', thought=' + this.u8u_1 + ')';
|
|
1393
|
+
};
|
|
1394
|
+
protoOf(Text_0).hashCode = function () {
|
|
1395
|
+
var result = getStringHashCode(this.t8u_1);
|
|
1396
|
+
result = imul(result, 31) + (this.u8u_1 == null ? 0 : getBooleanHashCode(this.u8u_1)) | 0;
|
|
1397
|
+
return result;
|
|
1398
|
+
};
|
|
1399
|
+
protoOf(Text_0).equals = function (other) {
|
|
1400
|
+
if (this === other)
|
|
1401
|
+
return true;
|
|
1402
|
+
if (!(other instanceof Text_0))
|
|
1403
|
+
return false;
|
|
1404
|
+
var tmp0_other_with_cast = other instanceof Text_0 ? other : THROW_CCE();
|
|
1405
|
+
if (!(this.t8u_1 === tmp0_other_with_cast.t8u_1))
|
|
1406
|
+
return false;
|
|
1407
|
+
if (!(this.u8u_1 == tmp0_other_with_cast.u8u_1))
|
|
1408
|
+
return false;
|
|
1409
|
+
return true;
|
|
1410
|
+
};
|
|
1411
|
+
function InlineData(inlineData, thought) {
|
|
1412
|
+
thought = thought === VOID ? null : thought;
|
|
1413
|
+
this.x8u_1 = inlineData;
|
|
1414
|
+
this.y8u_1 = thought;
|
|
1415
|
+
}
|
|
1416
|
+
protoOf(InlineData).toString = function () {
|
|
1417
|
+
return 'InlineData(inlineData=' + toString(this.x8u_1) + ', thought=' + this.y8u_1 + ')';
|
|
1418
|
+
};
|
|
1419
|
+
protoOf(InlineData).hashCode = function () {
|
|
1420
|
+
var result = hashCode(this.x8u_1);
|
|
1421
|
+
result = imul(result, 31) + (this.y8u_1 == null ? 0 : getBooleanHashCode(this.y8u_1)) | 0;
|
|
1422
|
+
return result;
|
|
1423
|
+
};
|
|
1424
|
+
protoOf(InlineData).equals = function (other) {
|
|
1425
|
+
if (this === other)
|
|
1426
|
+
return true;
|
|
1427
|
+
if (!(other instanceof InlineData))
|
|
1428
|
+
return false;
|
|
1429
|
+
var tmp0_other_with_cast = other instanceof InlineData ? other : THROW_CCE();
|
|
1430
|
+
if (!equals(this.x8u_1, tmp0_other_with_cast.x8u_1))
|
|
1431
|
+
return false;
|
|
1432
|
+
if (!(this.y8u_1 == tmp0_other_with_cast.y8u_1))
|
|
1433
|
+
return false;
|
|
1434
|
+
return true;
|
|
1435
|
+
};
|
|
1436
|
+
function FileData() {
|
|
1437
|
+
}
|
|
1438
|
+
protoOf(FileData).toString = function () {
|
|
1439
|
+
return 'FileData(fileData=' + toString(this.b8v_1) + ', thought=' + this.c8v_1 + ')';
|
|
1440
|
+
};
|
|
1441
|
+
protoOf(FileData).hashCode = function () {
|
|
1442
|
+
var result = hashCode(this.b8v_1);
|
|
1443
|
+
result = imul(result, 31) + (this.c8v_1 == null ? 0 : getBooleanHashCode(this.c8v_1)) | 0;
|
|
1444
|
+
return result;
|
|
1445
|
+
};
|
|
1446
|
+
protoOf(FileData).equals = function (other) {
|
|
1447
|
+
if (this === other)
|
|
1448
|
+
return true;
|
|
1449
|
+
if (!(other instanceof FileData))
|
|
1450
|
+
return false;
|
|
1451
|
+
var tmp0_other_with_cast = other instanceof FileData ? other : THROW_CCE();
|
|
1452
|
+
if (!equals(this.b8v_1, tmp0_other_with_cast.b8v_1))
|
|
1453
|
+
return false;
|
|
1454
|
+
if (!(this.c8v_1 == tmp0_other_with_cast.c8v_1))
|
|
1455
|
+
return false;
|
|
1456
|
+
return true;
|
|
1457
|
+
};
|
|
1458
|
+
function FunctionCall(functionCall, thought) {
|
|
1459
|
+
thought = thought === VOID ? null : thought;
|
|
1460
|
+
this.f8v_1 = functionCall;
|
|
1461
|
+
this.g8v_1 = thought;
|
|
1462
|
+
}
|
|
1463
|
+
protoOf(FunctionCall).toString = function () {
|
|
1464
|
+
return 'FunctionCall(functionCall=' + toString(this.f8v_1) + ', thought=' + this.g8v_1 + ')';
|
|
1465
|
+
};
|
|
1466
|
+
protoOf(FunctionCall).hashCode = function () {
|
|
1467
|
+
var result = hashCode(this.f8v_1);
|
|
1468
|
+
result = imul(result, 31) + (this.g8v_1 == null ? 0 : getBooleanHashCode(this.g8v_1)) | 0;
|
|
1469
|
+
return result;
|
|
1470
|
+
};
|
|
1471
|
+
protoOf(FunctionCall).equals = function (other) {
|
|
1472
|
+
if (this === other)
|
|
1473
|
+
return true;
|
|
1474
|
+
if (!(other instanceof FunctionCall))
|
|
1475
|
+
return false;
|
|
1476
|
+
var tmp0_other_with_cast = other instanceof FunctionCall ? other : THROW_CCE();
|
|
1477
|
+
if (!equals(this.f8v_1, tmp0_other_with_cast.f8v_1))
|
|
1478
|
+
return false;
|
|
1479
|
+
if (!(this.g8v_1 == tmp0_other_with_cast.g8v_1))
|
|
1480
|
+
return false;
|
|
1481
|
+
return true;
|
|
1482
|
+
};
|
|
1483
|
+
function FunctionResponse(functionResponse, thought) {
|
|
1484
|
+
thought = thought === VOID ? null : thought;
|
|
1485
|
+
this.j8v_1 = functionResponse;
|
|
1486
|
+
this.k8v_1 = thought;
|
|
1487
|
+
}
|
|
1488
|
+
protoOf(FunctionResponse).toString = function () {
|
|
1489
|
+
return 'FunctionResponse(functionResponse=' + toString(this.j8v_1) + ', thought=' + this.k8v_1 + ')';
|
|
1490
|
+
};
|
|
1491
|
+
protoOf(FunctionResponse).hashCode = function () {
|
|
1492
|
+
var result = hashCode(this.j8v_1);
|
|
1493
|
+
result = imul(result, 31) + (this.k8v_1 == null ? 0 : getBooleanHashCode(this.k8v_1)) | 0;
|
|
1494
|
+
return result;
|
|
1495
|
+
};
|
|
1496
|
+
protoOf(FunctionResponse).equals = function (other) {
|
|
1497
|
+
if (this === other)
|
|
1498
|
+
return true;
|
|
1499
|
+
if (!(other instanceof FunctionResponse))
|
|
1500
|
+
return false;
|
|
1501
|
+
var tmp0_other_with_cast = other instanceof FunctionResponse ? other : THROW_CCE();
|
|
1502
|
+
if (!equals(this.j8v_1, tmp0_other_with_cast.j8v_1))
|
|
1503
|
+
return false;
|
|
1504
|
+
if (!(this.k8v_1 == tmp0_other_with_cast.k8v_1))
|
|
1505
|
+
return false;
|
|
1506
|
+
return true;
|
|
1507
|
+
};
|
|
1508
|
+
function GooglePart() {
|
|
1509
|
+
}
|
|
1510
|
+
function GoogleContent$Companion$$childSerializers$_anonymous__7n3iqe() {
|
|
1511
|
+
return new ArrayListSerializer(GooglePartSerializer_getInstance());
|
|
1512
|
+
}
|
|
1513
|
+
function Companion_8() {
|
|
1514
|
+
Companion_instance_8 = this;
|
|
1515
|
+
var tmp = this;
|
|
1516
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
1517
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1518
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1519
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1520
|
+
tmp.l8v_1 = [lazy(tmp_0, GoogleContent$Companion$$childSerializers$_anonymous__7n3iqe), null];
|
|
1521
|
+
}
|
|
1522
|
+
var Companion_instance_8;
|
|
1523
|
+
function Companion_getInstance_11() {
|
|
1524
|
+
if (Companion_instance_8 == null)
|
|
1525
|
+
new Companion_8();
|
|
1526
|
+
return Companion_instance_8;
|
|
1527
|
+
}
|
|
1528
|
+
function $serializer_8() {
|
|
1529
|
+
$serializer_instance_8 = this;
|
|
1530
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleContent', this, 2);
|
|
1531
|
+
tmp0_serialDesc.m16('parts', true);
|
|
1532
|
+
tmp0_serialDesc.m16('role', true);
|
|
1533
|
+
this.m8v_1 = tmp0_serialDesc;
|
|
1534
|
+
}
|
|
1535
|
+
protoOf($serializer_8).n8v = function (encoder, value) {
|
|
1536
|
+
var tmp0_desc = this.m8v_1;
|
|
1537
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1538
|
+
var tmp2_cached = Companion_getInstance_11().l8v_1;
|
|
1539
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.o8v_1 == null)) {
|
|
1540
|
+
tmp1_output.p10(tmp0_desc, 0, tmp2_cached[0].b1(), value.o8v_1);
|
|
1541
|
+
}
|
|
1542
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.p8v_1 == null)) {
|
|
1543
|
+
tmp1_output.p10(tmp0_desc, 1, StringSerializer_getInstance(), value.p8v_1);
|
|
1544
|
+
}
|
|
1545
|
+
tmp1_output.xy(tmp0_desc);
|
|
1546
|
+
};
|
|
1547
|
+
protoOf($serializer_8).gv = function (encoder, value) {
|
|
1548
|
+
return this.n8v(encoder, value instanceof GoogleContent ? value : THROW_CCE());
|
|
1549
|
+
};
|
|
1550
|
+
protoOf($serializer_8).hv = function (decoder) {
|
|
1551
|
+
var tmp0_desc = this.m8v_1;
|
|
1552
|
+
var tmp1_flag = true;
|
|
1553
|
+
var tmp2_index = 0;
|
|
1554
|
+
var tmp3_bitMask0 = 0;
|
|
1555
|
+
var tmp4_local0 = null;
|
|
1556
|
+
var tmp5_local1 = null;
|
|
1557
|
+
var tmp6_input = decoder.wy(tmp0_desc);
|
|
1558
|
+
var tmp7_cached = Companion_getInstance_11().l8v_1;
|
|
1559
|
+
if (tmp6_input.mz()) {
|
|
1560
|
+
tmp4_local0 = tmp6_input.kz(tmp0_desc, 0, tmp7_cached[0].b1(), tmp4_local0);
|
|
1561
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1562
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
1563
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1564
|
+
} else
|
|
1565
|
+
while (tmp1_flag) {
|
|
1566
|
+
tmp2_index = tmp6_input.nz(tmp0_desc);
|
|
1567
|
+
switch (tmp2_index) {
|
|
1568
|
+
case -1:
|
|
1569
|
+
tmp1_flag = false;
|
|
1570
|
+
break;
|
|
1571
|
+
case 0:
|
|
1572
|
+
tmp4_local0 = tmp6_input.kz(tmp0_desc, 0, tmp7_cached[0].b1(), tmp4_local0);
|
|
1573
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1574
|
+
break;
|
|
1575
|
+
case 1:
|
|
1576
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
|
|
1577
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1578
|
+
break;
|
|
1579
|
+
default:
|
|
1580
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
tmp6_input.xy(tmp0_desc);
|
|
1584
|
+
return GoogleContent_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
1585
|
+
};
|
|
1586
|
+
protoOf($serializer_8).fv = function () {
|
|
1587
|
+
return this.m8v_1;
|
|
1588
|
+
};
|
|
1589
|
+
protoOf($serializer_8).d17 = function () {
|
|
1590
|
+
var tmp0_cached = Companion_getInstance_11().l8v_1;
|
|
1591
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1592
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1593
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1594
|
+
return [get_nullable(tmp0_cached[0].b1()), get_nullable(StringSerializer_getInstance())];
|
|
1595
|
+
};
|
|
1596
|
+
var $serializer_instance_8;
|
|
1597
|
+
function $serializer_getInstance_8() {
|
|
1598
|
+
if ($serializer_instance_8 == null)
|
|
1599
|
+
new $serializer_8();
|
|
1600
|
+
return $serializer_instance_8;
|
|
1601
|
+
}
|
|
1602
|
+
function GoogleContent_init_$Init$(seen0, parts, role, serializationConstructorMarker, $this) {
|
|
1603
|
+
if (!(0 === (0 & seen0))) {
|
|
1604
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_8().m8v_1);
|
|
1605
|
+
}
|
|
1606
|
+
if (0 === (seen0 & 1))
|
|
1607
|
+
$this.o8v_1 = null;
|
|
1608
|
+
else
|
|
1609
|
+
$this.o8v_1 = parts;
|
|
1610
|
+
if (0 === (seen0 & 2))
|
|
1611
|
+
$this.p8v_1 = null;
|
|
1612
|
+
else
|
|
1613
|
+
$this.p8v_1 = role;
|
|
1614
|
+
return $this;
|
|
1615
|
+
}
|
|
1616
|
+
function GoogleContent_init_$Create$(seen0, parts, role, serializationConstructorMarker) {
|
|
1617
|
+
return GoogleContent_init_$Init$(seen0, parts, role, serializationConstructorMarker, objectCreate(protoOf(GoogleContent)));
|
|
1618
|
+
}
|
|
1619
|
+
function GoogleContent(parts, role) {
|
|
1620
|
+
Companion_getInstance_11();
|
|
1621
|
+
parts = parts === VOID ? null : parts;
|
|
1622
|
+
role = role === VOID ? null : role;
|
|
1623
|
+
this.o8v_1 = parts;
|
|
1624
|
+
this.p8v_1 = role;
|
|
1625
|
+
}
|
|
1626
|
+
function GoogleData$Blob$Companion$$childSerializers$_anonymous__2gyzw() {
|
|
1627
|
+
return new ByteArrayAsBase64Serializer();
|
|
1628
|
+
}
|
|
1629
|
+
function Companion_9() {
|
|
1630
|
+
Companion_instance_9 = this;
|
|
1631
|
+
var tmp = this;
|
|
1632
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
1633
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1634
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1635
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1636
|
+
tmp.q8v_1 = [null, lazy(tmp_0, GoogleData$Blob$Companion$$childSerializers$_anonymous__2gyzw)];
|
|
1637
|
+
}
|
|
1638
|
+
var Companion_instance_9;
|
|
1639
|
+
function Companion_getInstance_12() {
|
|
1640
|
+
if (Companion_instance_9 == null)
|
|
1641
|
+
new Companion_9();
|
|
1642
|
+
return Companion_instance_9;
|
|
1643
|
+
}
|
|
1644
|
+
function $serializer_9() {
|
|
1645
|
+
$serializer_instance_9 = this;
|
|
1646
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleData.Blob', this, 2);
|
|
1647
|
+
tmp0_serialDesc.m16('mimeType', false);
|
|
1648
|
+
tmp0_serialDesc.m16('data', false);
|
|
1649
|
+
this.r8v_1 = tmp0_serialDesc;
|
|
1650
|
+
}
|
|
1651
|
+
protoOf($serializer_9).s8v = function (encoder, value) {
|
|
1652
|
+
var tmp0_desc = this.r8v_1;
|
|
1653
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1654
|
+
var tmp2_cached = Companion_getInstance_12().q8v_1;
|
|
1655
|
+
tmp1_output.l10(tmp0_desc, 0, value.t8v_1);
|
|
1656
|
+
tmp1_output.n10(tmp0_desc, 1, tmp2_cached[1].b1(), value.u8v_1);
|
|
1657
|
+
tmp1_output.xy(tmp0_desc);
|
|
1658
|
+
};
|
|
1659
|
+
protoOf($serializer_9).gv = function (encoder, value) {
|
|
1660
|
+
return this.s8v(encoder, value instanceof Blob ? value : THROW_CCE());
|
|
1661
|
+
};
|
|
1662
|
+
protoOf($serializer_9).hv = function (decoder) {
|
|
1663
|
+
var tmp0_desc = this.r8v_1;
|
|
1664
|
+
var tmp1_flag = true;
|
|
1665
|
+
var tmp2_index = 0;
|
|
1666
|
+
var tmp3_bitMask0 = 0;
|
|
1667
|
+
var tmp4_local0 = null;
|
|
1668
|
+
var tmp5_local1 = null;
|
|
1669
|
+
var tmp6_input = decoder.wy(tmp0_desc);
|
|
1670
|
+
var tmp7_cached = Companion_getInstance_12().q8v_1;
|
|
1671
|
+
if (tmp6_input.mz()) {
|
|
1672
|
+
tmp4_local0 = tmp6_input.gz(tmp0_desc, 0);
|
|
1673
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1674
|
+
tmp5_local1 = tmp6_input.iz(tmp0_desc, 1, tmp7_cached[1].b1(), tmp5_local1);
|
|
1675
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1676
|
+
} else
|
|
1677
|
+
while (tmp1_flag) {
|
|
1678
|
+
tmp2_index = tmp6_input.nz(tmp0_desc);
|
|
1679
|
+
switch (tmp2_index) {
|
|
1680
|
+
case -1:
|
|
1681
|
+
tmp1_flag = false;
|
|
1682
|
+
break;
|
|
1683
|
+
case 0:
|
|
1684
|
+
tmp4_local0 = tmp6_input.gz(tmp0_desc, 0);
|
|
1685
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1686
|
+
break;
|
|
1687
|
+
case 1:
|
|
1688
|
+
tmp5_local1 = tmp6_input.iz(tmp0_desc, 1, tmp7_cached[1].b1(), tmp5_local1);
|
|
1689
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1690
|
+
break;
|
|
1691
|
+
default:
|
|
1692
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
tmp6_input.xy(tmp0_desc);
|
|
1696
|
+
return Blob_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
1697
|
+
};
|
|
1698
|
+
protoOf($serializer_9).fv = function () {
|
|
1699
|
+
return this.r8v_1;
|
|
1700
|
+
};
|
|
1701
|
+
protoOf($serializer_9).d17 = function () {
|
|
1702
|
+
var tmp0_cached = Companion_getInstance_12().q8v_1;
|
|
1703
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1704
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1705
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1706
|
+
return [StringSerializer_getInstance(), tmp0_cached[1].b1()];
|
|
1707
|
+
};
|
|
1708
|
+
var $serializer_instance_9;
|
|
1709
|
+
function $serializer_getInstance_9() {
|
|
1710
|
+
if ($serializer_instance_9 == null)
|
|
1711
|
+
new $serializer_9();
|
|
1712
|
+
return $serializer_instance_9;
|
|
1713
|
+
}
|
|
1714
|
+
function Blob_init_$Init$(seen0, mimeType, data, serializationConstructorMarker, $this) {
|
|
1715
|
+
if (!(3 === (3 & seen0))) {
|
|
1716
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_9().r8v_1);
|
|
1717
|
+
}
|
|
1718
|
+
$this.t8v_1 = mimeType;
|
|
1719
|
+
$this.u8v_1 = data;
|
|
1720
|
+
return $this;
|
|
1721
|
+
}
|
|
1722
|
+
function Blob_init_$Create$(seen0, mimeType, data, serializationConstructorMarker) {
|
|
1723
|
+
return Blob_init_$Init$(seen0, mimeType, data, serializationConstructorMarker, objectCreate(protoOf(Blob)));
|
|
1724
|
+
}
|
|
1725
|
+
function $serializer_10() {
|
|
1726
|
+
$serializer_instance_10 = this;
|
|
1727
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleData.FileData', this, 2);
|
|
1728
|
+
tmp0_serialDesc.m16('mimeType', false);
|
|
1729
|
+
tmp0_serialDesc.m16('fileUri', false);
|
|
1730
|
+
this.v8v_1 = tmp0_serialDesc;
|
|
1731
|
+
}
|
|
1732
|
+
protoOf($serializer_10).w8v = function (encoder, value) {
|
|
1733
|
+
var tmp0_desc = this.v8v_1;
|
|
1734
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1735
|
+
tmp1_output.l10(tmp0_desc, 0, value.x8v_1);
|
|
1736
|
+
tmp1_output.l10(tmp0_desc, 1, value.y8v_1);
|
|
1737
|
+
tmp1_output.xy(tmp0_desc);
|
|
1738
|
+
};
|
|
1739
|
+
protoOf($serializer_10).gv = function (encoder, value) {
|
|
1740
|
+
return this.w8v(encoder, value instanceof FileData_0 ? value : THROW_CCE());
|
|
1741
|
+
};
|
|
1742
|
+
protoOf($serializer_10).hv = function (decoder) {
|
|
1743
|
+
var tmp0_desc = this.v8v_1;
|
|
1744
|
+
var tmp1_flag = true;
|
|
1745
|
+
var tmp2_index = 0;
|
|
1746
|
+
var tmp3_bitMask0 = 0;
|
|
1747
|
+
var tmp4_local0 = null;
|
|
1748
|
+
var tmp5_local1 = null;
|
|
1749
|
+
var tmp6_input = decoder.wy(tmp0_desc);
|
|
1750
|
+
if (tmp6_input.mz()) {
|
|
1751
|
+
tmp4_local0 = tmp6_input.gz(tmp0_desc, 0);
|
|
1752
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1753
|
+
tmp5_local1 = tmp6_input.gz(tmp0_desc, 1);
|
|
1754
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1755
|
+
} else
|
|
1756
|
+
while (tmp1_flag) {
|
|
1757
|
+
tmp2_index = tmp6_input.nz(tmp0_desc);
|
|
1758
|
+
switch (tmp2_index) {
|
|
1759
|
+
case -1:
|
|
1760
|
+
tmp1_flag = false;
|
|
1761
|
+
break;
|
|
1762
|
+
case 0:
|
|
1763
|
+
tmp4_local0 = tmp6_input.gz(tmp0_desc, 0);
|
|
1764
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1765
|
+
break;
|
|
1766
|
+
case 1:
|
|
1767
|
+
tmp5_local1 = tmp6_input.gz(tmp0_desc, 1);
|
|
1768
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1769
|
+
break;
|
|
1770
|
+
default:
|
|
1771
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
tmp6_input.xy(tmp0_desc);
|
|
1775
|
+
return FileData_init_$Create$_0(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
1776
|
+
};
|
|
1777
|
+
protoOf($serializer_10).fv = function () {
|
|
1778
|
+
return this.v8v_1;
|
|
1779
|
+
};
|
|
1780
|
+
protoOf($serializer_10).d17 = function () {
|
|
1781
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1782
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1783
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1784
|
+
return [StringSerializer_getInstance(), StringSerializer_getInstance()];
|
|
1785
|
+
};
|
|
1786
|
+
var $serializer_instance_10;
|
|
1787
|
+
function $serializer_getInstance_10() {
|
|
1788
|
+
if ($serializer_instance_10 == null)
|
|
1789
|
+
new $serializer_10();
|
|
1790
|
+
return $serializer_instance_10;
|
|
1791
|
+
}
|
|
1792
|
+
function FileData_init_$Init$_0(seen0, mimeType, fileUri, serializationConstructorMarker, $this) {
|
|
1793
|
+
if (!(3 === (3 & seen0))) {
|
|
1794
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_10().v8v_1);
|
|
1795
|
+
}
|
|
1796
|
+
$this.x8v_1 = mimeType;
|
|
1797
|
+
$this.y8v_1 = fileUri;
|
|
1798
|
+
return $this;
|
|
1799
|
+
}
|
|
1800
|
+
function FileData_init_$Create$_0(seen0, mimeType, fileUri, serializationConstructorMarker) {
|
|
1801
|
+
return FileData_init_$Init$_0(seen0, mimeType, fileUri, serializationConstructorMarker, objectCreate(protoOf(FileData_0)));
|
|
1802
|
+
}
|
|
1803
|
+
function Companion_10() {
|
|
1804
|
+
}
|
|
1805
|
+
var Companion_instance_10;
|
|
1806
|
+
function Companion_getInstance_13() {
|
|
1807
|
+
return Companion_instance_10;
|
|
1808
|
+
}
|
|
1809
|
+
function $serializer_11() {
|
|
1810
|
+
$serializer_instance_11 = this;
|
|
1811
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleData.FunctionCall', this, 3);
|
|
1812
|
+
tmp0_serialDesc.m16('id', true);
|
|
1813
|
+
tmp0_serialDesc.m16('name', false);
|
|
1814
|
+
tmp0_serialDesc.m16('args', true);
|
|
1815
|
+
this.z8v_1 = tmp0_serialDesc;
|
|
1816
|
+
}
|
|
1817
|
+
protoOf($serializer_11).a8w = function (encoder, value) {
|
|
1818
|
+
var tmp0_desc = this.z8v_1;
|
|
1819
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1820
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.b8w_1 == null)) {
|
|
1821
|
+
tmp1_output.p10(tmp0_desc, 0, StringSerializer_getInstance(), value.b8w_1);
|
|
1822
|
+
}
|
|
1823
|
+
tmp1_output.l10(tmp0_desc, 1, value.c8w_1);
|
|
1824
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.d8w_1 == null)) {
|
|
1825
|
+
tmp1_output.p10(tmp0_desc, 2, JsonObjectSerializer_getInstance(), value.d8w_1);
|
|
1826
|
+
}
|
|
1827
|
+
tmp1_output.xy(tmp0_desc);
|
|
1828
|
+
};
|
|
1829
|
+
protoOf($serializer_11).gv = function (encoder, value) {
|
|
1830
|
+
return this.a8w(encoder, value instanceof FunctionCall_0 ? value : THROW_CCE());
|
|
1831
|
+
};
|
|
1832
|
+
protoOf($serializer_11).hv = function (decoder) {
|
|
1833
|
+
var tmp0_desc = this.z8v_1;
|
|
1834
|
+
var tmp1_flag = true;
|
|
1835
|
+
var tmp2_index = 0;
|
|
1836
|
+
var tmp3_bitMask0 = 0;
|
|
1837
|
+
var tmp4_local0 = null;
|
|
1838
|
+
var tmp5_local1 = null;
|
|
1839
|
+
var tmp6_local2 = null;
|
|
1840
|
+
var tmp7_input = decoder.wy(tmp0_desc);
|
|
1841
|
+
if (tmp7_input.mz()) {
|
|
1842
|
+
tmp4_local0 = tmp7_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
1843
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1844
|
+
tmp5_local1 = tmp7_input.gz(tmp0_desc, 1);
|
|
1845
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1846
|
+
tmp6_local2 = tmp7_input.kz(tmp0_desc, 2, JsonObjectSerializer_getInstance(), tmp6_local2);
|
|
1847
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1848
|
+
} else
|
|
1849
|
+
while (tmp1_flag) {
|
|
1850
|
+
tmp2_index = tmp7_input.nz(tmp0_desc);
|
|
1851
|
+
switch (tmp2_index) {
|
|
1852
|
+
case -1:
|
|
1853
|
+
tmp1_flag = false;
|
|
1854
|
+
break;
|
|
1855
|
+
case 0:
|
|
1856
|
+
tmp4_local0 = tmp7_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
1857
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1858
|
+
break;
|
|
1859
|
+
case 1:
|
|
1860
|
+
tmp5_local1 = tmp7_input.gz(tmp0_desc, 1);
|
|
1861
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1862
|
+
break;
|
|
1863
|
+
case 2:
|
|
1864
|
+
tmp6_local2 = tmp7_input.kz(tmp0_desc, 2, JsonObjectSerializer_getInstance(), tmp6_local2);
|
|
1865
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1866
|
+
break;
|
|
1867
|
+
default:
|
|
1868
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
tmp7_input.xy(tmp0_desc);
|
|
1872
|
+
return FunctionCall_init_$Create$_0(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
1873
|
+
};
|
|
1874
|
+
protoOf($serializer_11).fv = function () {
|
|
1875
|
+
return this.z8v_1;
|
|
1876
|
+
};
|
|
1877
|
+
protoOf($serializer_11).d17 = function () {
|
|
1878
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1879
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1880
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1881
|
+
return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), get_nullable(JsonObjectSerializer_getInstance())];
|
|
1882
|
+
};
|
|
1883
|
+
var $serializer_instance_11;
|
|
1884
|
+
function $serializer_getInstance_11() {
|
|
1885
|
+
if ($serializer_instance_11 == null)
|
|
1886
|
+
new $serializer_11();
|
|
1887
|
+
return $serializer_instance_11;
|
|
1888
|
+
}
|
|
1889
|
+
function FunctionCall_init_$Init$_0(seen0, id, name, args, serializationConstructorMarker, $this) {
|
|
1890
|
+
if (!(2 === (2 & seen0))) {
|
|
1891
|
+
throwMissingFieldException(seen0, 2, $serializer_getInstance_11().z8v_1);
|
|
1892
|
+
}
|
|
1893
|
+
if (0 === (seen0 & 1))
|
|
1894
|
+
$this.b8w_1 = null;
|
|
1895
|
+
else
|
|
1896
|
+
$this.b8w_1 = id;
|
|
1897
|
+
$this.c8w_1 = name;
|
|
1898
|
+
if (0 === (seen0 & 4))
|
|
1899
|
+
$this.d8w_1 = null;
|
|
1900
|
+
else
|
|
1901
|
+
$this.d8w_1 = args;
|
|
1902
|
+
return $this;
|
|
1903
|
+
}
|
|
1904
|
+
function FunctionCall_init_$Create$_0(seen0, id, name, args, serializationConstructorMarker) {
|
|
1905
|
+
return FunctionCall_init_$Init$_0(seen0, id, name, args, serializationConstructorMarker, objectCreate(protoOf(FunctionCall_0)));
|
|
1906
|
+
}
|
|
1907
|
+
function Companion_11() {
|
|
1908
|
+
}
|
|
1909
|
+
var Companion_instance_11;
|
|
1910
|
+
function Companion_getInstance_14() {
|
|
1911
|
+
return Companion_instance_11;
|
|
1912
|
+
}
|
|
1913
|
+
function $serializer_12() {
|
|
1914
|
+
$serializer_instance_12 = this;
|
|
1915
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleData.FunctionResponse', this, 3);
|
|
1916
|
+
tmp0_serialDesc.m16('id', true);
|
|
1917
|
+
tmp0_serialDesc.m16('name', false);
|
|
1918
|
+
tmp0_serialDesc.m16('response', false);
|
|
1919
|
+
this.e8w_1 = tmp0_serialDesc;
|
|
1920
|
+
}
|
|
1921
|
+
protoOf($serializer_12).f8w = function (encoder, value) {
|
|
1922
|
+
var tmp0_desc = this.e8w_1;
|
|
1923
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
1924
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.g8w_1 == null)) {
|
|
1925
|
+
tmp1_output.p10(tmp0_desc, 0, StringSerializer_getInstance(), value.g8w_1);
|
|
1926
|
+
}
|
|
1927
|
+
tmp1_output.l10(tmp0_desc, 1, value.h8w_1);
|
|
1928
|
+
tmp1_output.n10(tmp0_desc, 2, JsonObjectSerializer_getInstance(), value.i8w_1);
|
|
1929
|
+
tmp1_output.xy(tmp0_desc);
|
|
1930
|
+
};
|
|
1931
|
+
protoOf($serializer_12).gv = function (encoder, value) {
|
|
1932
|
+
return this.f8w(encoder, value instanceof FunctionResponse_0 ? value : THROW_CCE());
|
|
1933
|
+
};
|
|
1934
|
+
protoOf($serializer_12).hv = function (decoder) {
|
|
1935
|
+
var tmp0_desc = this.e8w_1;
|
|
1936
|
+
var tmp1_flag = true;
|
|
1937
|
+
var tmp2_index = 0;
|
|
1938
|
+
var tmp3_bitMask0 = 0;
|
|
1939
|
+
var tmp4_local0 = null;
|
|
1940
|
+
var tmp5_local1 = null;
|
|
1941
|
+
var tmp6_local2 = null;
|
|
1942
|
+
var tmp7_input = decoder.wy(tmp0_desc);
|
|
1943
|
+
if (tmp7_input.mz()) {
|
|
1944
|
+
tmp4_local0 = tmp7_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
1945
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1946
|
+
tmp5_local1 = tmp7_input.gz(tmp0_desc, 1);
|
|
1947
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1948
|
+
tmp6_local2 = tmp7_input.iz(tmp0_desc, 2, JsonObjectSerializer_getInstance(), tmp6_local2);
|
|
1949
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1950
|
+
} else
|
|
1951
|
+
while (tmp1_flag) {
|
|
1952
|
+
tmp2_index = tmp7_input.nz(tmp0_desc);
|
|
1953
|
+
switch (tmp2_index) {
|
|
1954
|
+
case -1:
|
|
1955
|
+
tmp1_flag = false;
|
|
1956
|
+
break;
|
|
1957
|
+
case 0:
|
|
1958
|
+
tmp4_local0 = tmp7_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
1959
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
1960
|
+
break;
|
|
1961
|
+
case 1:
|
|
1962
|
+
tmp5_local1 = tmp7_input.gz(tmp0_desc, 1);
|
|
1963
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
1964
|
+
break;
|
|
1965
|
+
case 2:
|
|
1966
|
+
tmp6_local2 = tmp7_input.iz(tmp0_desc, 2, JsonObjectSerializer_getInstance(), tmp6_local2);
|
|
1967
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
1968
|
+
break;
|
|
1969
|
+
default:
|
|
1970
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
tmp7_input.xy(tmp0_desc);
|
|
1974
|
+
return FunctionResponse_init_$Create$_0(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
1975
|
+
};
|
|
1976
|
+
protoOf($serializer_12).fv = function () {
|
|
1977
|
+
return this.e8w_1;
|
|
1978
|
+
};
|
|
1979
|
+
protoOf($serializer_12).d17 = function () {
|
|
1980
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1981
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1982
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1983
|
+
return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), JsonObjectSerializer_getInstance()];
|
|
1984
|
+
};
|
|
1985
|
+
var $serializer_instance_12;
|
|
1986
|
+
function $serializer_getInstance_12() {
|
|
1987
|
+
if ($serializer_instance_12 == null)
|
|
1988
|
+
new $serializer_12();
|
|
1989
|
+
return $serializer_instance_12;
|
|
1990
|
+
}
|
|
1991
|
+
function FunctionResponse_init_$Init$_0(seen0, id, name, response, serializationConstructorMarker, $this) {
|
|
1992
|
+
if (!(6 === (6 & seen0))) {
|
|
1993
|
+
throwMissingFieldException(seen0, 6, $serializer_getInstance_12().e8w_1);
|
|
1994
|
+
}
|
|
1995
|
+
if (0 === (seen0 & 1))
|
|
1996
|
+
$this.g8w_1 = null;
|
|
1997
|
+
else
|
|
1998
|
+
$this.g8w_1 = id;
|
|
1999
|
+
$this.h8w_1 = name;
|
|
2000
|
+
$this.i8w_1 = response;
|
|
2001
|
+
return $this;
|
|
2002
|
+
}
|
|
2003
|
+
function FunctionResponse_init_$Create$_0(seen0, id, name, response, serializationConstructorMarker) {
|
|
2004
|
+
return FunctionResponse_init_$Init$_0(seen0, id, name, response, serializationConstructorMarker, objectCreate(protoOf(FunctionResponse_0)));
|
|
2005
|
+
}
|
|
2006
|
+
function Blob(mimeType, data) {
|
|
2007
|
+
Companion_getInstance_12();
|
|
2008
|
+
this.t8v_1 = mimeType;
|
|
2009
|
+
this.u8v_1 = data;
|
|
2010
|
+
}
|
|
2011
|
+
function FileData_0() {
|
|
2012
|
+
}
|
|
2013
|
+
function FunctionCall_0(id, name, args) {
|
|
2014
|
+
id = id === VOID ? null : id;
|
|
2015
|
+
args = args === VOID ? null : args;
|
|
2016
|
+
this.b8w_1 = id;
|
|
2017
|
+
this.c8w_1 = name;
|
|
2018
|
+
this.d8w_1 = args;
|
|
2019
|
+
}
|
|
2020
|
+
function FunctionResponse_0(id, name, response) {
|
|
2021
|
+
id = id === VOID ? null : id;
|
|
2022
|
+
this.g8w_1 = id;
|
|
2023
|
+
this.h8w_1 = name;
|
|
2024
|
+
this.i8w_1 = response;
|
|
2025
|
+
}
|
|
2026
|
+
function GoogleTool$Companion$$childSerializers$_anonymous__3d7dfd() {
|
|
2027
|
+
return new ArrayListSerializer($serializer_getInstance_14());
|
|
2028
|
+
}
|
|
2029
|
+
function Companion_12() {
|
|
2030
|
+
Companion_instance_12 = this;
|
|
2031
|
+
var tmp = this;
|
|
2032
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
2033
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2034
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2035
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2036
|
+
tmp.j8w_1 = [lazy(tmp_0, GoogleTool$Companion$$childSerializers$_anonymous__3d7dfd)];
|
|
2037
|
+
}
|
|
2038
|
+
var Companion_instance_12;
|
|
2039
|
+
function Companion_getInstance_15() {
|
|
2040
|
+
if (Companion_instance_12 == null)
|
|
2041
|
+
new Companion_12();
|
|
2042
|
+
return Companion_instance_12;
|
|
2043
|
+
}
|
|
2044
|
+
function $serializer_13() {
|
|
2045
|
+
$serializer_instance_13 = this;
|
|
2046
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleTool', this, 1);
|
|
2047
|
+
tmp0_serialDesc.m16('functionDeclarations', true);
|
|
2048
|
+
this.k8w_1 = tmp0_serialDesc;
|
|
2049
|
+
}
|
|
2050
|
+
protoOf($serializer_13).l8w = function (encoder, value) {
|
|
2051
|
+
var tmp0_desc = this.k8w_1;
|
|
2052
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
2053
|
+
var tmp2_cached = Companion_getInstance_15().j8w_1;
|
|
2054
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.m8w_1 == null)) {
|
|
2055
|
+
tmp1_output.p10(tmp0_desc, 0, tmp2_cached[0].b1(), value.m8w_1);
|
|
2056
|
+
}
|
|
2057
|
+
tmp1_output.xy(tmp0_desc);
|
|
2058
|
+
};
|
|
2059
|
+
protoOf($serializer_13).gv = function (encoder, value) {
|
|
2060
|
+
return this.l8w(encoder, value instanceof GoogleTool ? value : THROW_CCE());
|
|
2061
|
+
};
|
|
2062
|
+
protoOf($serializer_13).hv = function (decoder) {
|
|
2063
|
+
var tmp0_desc = this.k8w_1;
|
|
2064
|
+
var tmp1_flag = true;
|
|
2065
|
+
var tmp2_index = 0;
|
|
2066
|
+
var tmp3_bitMask0 = 0;
|
|
2067
|
+
var tmp4_local0 = null;
|
|
2068
|
+
var tmp5_input = decoder.wy(tmp0_desc);
|
|
2069
|
+
var tmp6_cached = Companion_getInstance_15().j8w_1;
|
|
2070
|
+
if (tmp5_input.mz()) {
|
|
2071
|
+
tmp4_local0 = tmp5_input.kz(tmp0_desc, 0, tmp6_cached[0].b1(), tmp4_local0);
|
|
2072
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2073
|
+
} else
|
|
2074
|
+
while (tmp1_flag) {
|
|
2075
|
+
tmp2_index = tmp5_input.nz(tmp0_desc);
|
|
2076
|
+
switch (tmp2_index) {
|
|
2077
|
+
case -1:
|
|
2078
|
+
tmp1_flag = false;
|
|
2079
|
+
break;
|
|
2080
|
+
case 0:
|
|
2081
|
+
tmp4_local0 = tmp5_input.kz(tmp0_desc, 0, tmp6_cached[0].b1(), tmp4_local0);
|
|
2082
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2083
|
+
break;
|
|
2084
|
+
default:
|
|
2085
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
tmp5_input.xy(tmp0_desc);
|
|
2089
|
+
return GoogleTool_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
|
|
2090
|
+
};
|
|
2091
|
+
protoOf($serializer_13).fv = function () {
|
|
2092
|
+
return this.k8w_1;
|
|
2093
|
+
};
|
|
2094
|
+
protoOf($serializer_13).d17 = function () {
|
|
2095
|
+
var tmp0_cached = Companion_getInstance_15().j8w_1;
|
|
2096
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2097
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2098
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2099
|
+
return [get_nullable(tmp0_cached[0].b1())];
|
|
2100
|
+
};
|
|
2101
|
+
var $serializer_instance_13;
|
|
2102
|
+
function $serializer_getInstance_13() {
|
|
2103
|
+
if ($serializer_instance_13 == null)
|
|
2104
|
+
new $serializer_13();
|
|
2105
|
+
return $serializer_instance_13;
|
|
2106
|
+
}
|
|
2107
|
+
function GoogleTool_init_$Init$(seen0, functionDeclarations, serializationConstructorMarker, $this) {
|
|
2108
|
+
if (!(0 === (0 & seen0))) {
|
|
2109
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_13().k8w_1);
|
|
2110
|
+
}
|
|
2111
|
+
if (0 === (seen0 & 1))
|
|
2112
|
+
$this.m8w_1 = null;
|
|
2113
|
+
else
|
|
2114
|
+
$this.m8w_1 = functionDeclarations;
|
|
2115
|
+
return $this;
|
|
2116
|
+
}
|
|
2117
|
+
function GoogleTool_init_$Create$(seen0, functionDeclarations, serializationConstructorMarker) {
|
|
2118
|
+
return GoogleTool_init_$Init$(seen0, functionDeclarations, serializationConstructorMarker, objectCreate(protoOf(GoogleTool)));
|
|
2119
|
+
}
|
|
2120
|
+
function GoogleTool(functionDeclarations) {
|
|
2121
|
+
Companion_getInstance_15();
|
|
2122
|
+
functionDeclarations = functionDeclarations === VOID ? null : functionDeclarations;
|
|
2123
|
+
this.m8w_1 = functionDeclarations;
|
|
2124
|
+
}
|
|
2125
|
+
function Companion_13() {
|
|
2126
|
+
}
|
|
2127
|
+
var Companion_instance_13;
|
|
2128
|
+
function Companion_getInstance_16() {
|
|
2129
|
+
return Companion_instance_13;
|
|
2130
|
+
}
|
|
2131
|
+
function $serializer_14() {
|
|
2132
|
+
$serializer_instance_14 = this;
|
|
2133
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleFunctionDeclaration', this, 4);
|
|
2134
|
+
tmp0_serialDesc.m16('name', false);
|
|
2135
|
+
tmp0_serialDesc.m16('description', false);
|
|
2136
|
+
tmp0_serialDesc.m16('parameters', true);
|
|
2137
|
+
tmp0_serialDesc.m16('response', true);
|
|
2138
|
+
this.n8w_1 = tmp0_serialDesc;
|
|
2139
|
+
}
|
|
2140
|
+
protoOf($serializer_14).o8w = function (encoder, value) {
|
|
2141
|
+
var tmp0_desc = this.n8w_1;
|
|
2142
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
2143
|
+
tmp1_output.l10(tmp0_desc, 0, value.p8w_1);
|
|
2144
|
+
tmp1_output.l10(tmp0_desc, 1, value.q8w_1);
|
|
2145
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.r8w_1 == null)) {
|
|
2146
|
+
tmp1_output.p10(tmp0_desc, 2, JsonObjectSerializer_getInstance(), value.r8w_1);
|
|
2147
|
+
}
|
|
2148
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.s8w_1 == null)) {
|
|
2149
|
+
tmp1_output.p10(tmp0_desc, 3, JsonObjectSerializer_getInstance(), value.s8w_1);
|
|
2150
|
+
}
|
|
2151
|
+
tmp1_output.xy(tmp0_desc);
|
|
2152
|
+
};
|
|
2153
|
+
protoOf($serializer_14).gv = function (encoder, value) {
|
|
2154
|
+
return this.o8w(encoder, value instanceof GoogleFunctionDeclaration ? value : THROW_CCE());
|
|
2155
|
+
};
|
|
2156
|
+
protoOf($serializer_14).hv = function (decoder) {
|
|
2157
|
+
var tmp0_desc = this.n8w_1;
|
|
2158
|
+
var tmp1_flag = true;
|
|
2159
|
+
var tmp2_index = 0;
|
|
2160
|
+
var tmp3_bitMask0 = 0;
|
|
2161
|
+
var tmp4_local0 = null;
|
|
2162
|
+
var tmp5_local1 = null;
|
|
2163
|
+
var tmp6_local2 = null;
|
|
2164
|
+
var tmp7_local3 = null;
|
|
2165
|
+
var tmp8_input = decoder.wy(tmp0_desc);
|
|
2166
|
+
if (tmp8_input.mz()) {
|
|
2167
|
+
tmp4_local0 = tmp8_input.gz(tmp0_desc, 0);
|
|
2168
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2169
|
+
tmp5_local1 = tmp8_input.gz(tmp0_desc, 1);
|
|
2170
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2171
|
+
tmp6_local2 = tmp8_input.kz(tmp0_desc, 2, JsonObjectSerializer_getInstance(), tmp6_local2);
|
|
2172
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
2173
|
+
tmp7_local3 = tmp8_input.kz(tmp0_desc, 3, JsonObjectSerializer_getInstance(), tmp7_local3);
|
|
2174
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
2175
|
+
} else
|
|
2176
|
+
while (tmp1_flag) {
|
|
2177
|
+
tmp2_index = tmp8_input.nz(tmp0_desc);
|
|
2178
|
+
switch (tmp2_index) {
|
|
2179
|
+
case -1:
|
|
2180
|
+
tmp1_flag = false;
|
|
2181
|
+
break;
|
|
2182
|
+
case 0:
|
|
2183
|
+
tmp4_local0 = tmp8_input.gz(tmp0_desc, 0);
|
|
2184
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2185
|
+
break;
|
|
2186
|
+
case 1:
|
|
2187
|
+
tmp5_local1 = tmp8_input.gz(tmp0_desc, 1);
|
|
2188
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2189
|
+
break;
|
|
2190
|
+
case 2:
|
|
2191
|
+
tmp6_local2 = tmp8_input.kz(tmp0_desc, 2, JsonObjectSerializer_getInstance(), tmp6_local2);
|
|
2192
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
2193
|
+
break;
|
|
2194
|
+
case 3:
|
|
2195
|
+
tmp7_local3 = tmp8_input.kz(tmp0_desc, 3, JsonObjectSerializer_getInstance(), tmp7_local3);
|
|
2196
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
2197
|
+
break;
|
|
2198
|
+
default:
|
|
2199
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
tmp8_input.xy(tmp0_desc);
|
|
2203
|
+
return GoogleFunctionDeclaration_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
2204
|
+
};
|
|
2205
|
+
protoOf($serializer_14).fv = function () {
|
|
2206
|
+
return this.n8w_1;
|
|
2207
|
+
};
|
|
2208
|
+
protoOf($serializer_14).d17 = function () {
|
|
2209
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2210
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2211
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2212
|
+
return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(JsonObjectSerializer_getInstance()), get_nullable(JsonObjectSerializer_getInstance())];
|
|
2213
|
+
};
|
|
2214
|
+
var $serializer_instance_14;
|
|
2215
|
+
function $serializer_getInstance_14() {
|
|
2216
|
+
if ($serializer_instance_14 == null)
|
|
2217
|
+
new $serializer_14();
|
|
2218
|
+
return $serializer_instance_14;
|
|
2219
|
+
}
|
|
2220
|
+
function GoogleFunctionDeclaration_init_$Init$(seen0, name, description, parameters, response, serializationConstructorMarker, $this) {
|
|
2221
|
+
if (!(3 === (3 & seen0))) {
|
|
2222
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_14().n8w_1);
|
|
2223
|
+
}
|
|
2224
|
+
$this.p8w_1 = name;
|
|
2225
|
+
$this.q8w_1 = description;
|
|
2226
|
+
if (0 === (seen0 & 4))
|
|
2227
|
+
$this.r8w_1 = null;
|
|
2228
|
+
else
|
|
2229
|
+
$this.r8w_1 = parameters;
|
|
2230
|
+
if (0 === (seen0 & 8))
|
|
2231
|
+
$this.s8w_1 = null;
|
|
2232
|
+
else
|
|
2233
|
+
$this.s8w_1 = response;
|
|
2234
|
+
return $this;
|
|
2235
|
+
}
|
|
2236
|
+
function GoogleFunctionDeclaration_init_$Create$(seen0, name, description, parameters, response, serializationConstructorMarker) {
|
|
2237
|
+
return GoogleFunctionDeclaration_init_$Init$(seen0, name, description, parameters, response, serializationConstructorMarker, objectCreate(protoOf(GoogleFunctionDeclaration)));
|
|
2238
|
+
}
|
|
2239
|
+
function GoogleFunctionDeclaration(name, description, parameters, response) {
|
|
2240
|
+
parameters = parameters === VOID ? null : parameters;
|
|
2241
|
+
response = response === VOID ? null : response;
|
|
2242
|
+
this.p8w_1 = name;
|
|
2243
|
+
this.q8w_1 = description;
|
|
2244
|
+
this.r8w_1 = parameters;
|
|
2245
|
+
this.s8w_1 = response;
|
|
2246
|
+
}
|
|
2247
|
+
function GoogleGenerationConfig$Companion$$childSerializers$_anonymous__26byvr() {
|
|
2248
|
+
return new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance());
|
|
2249
|
+
}
|
|
2250
|
+
function Companion_14() {
|
|
2251
|
+
Companion_instance_14 = this;
|
|
2252
|
+
var tmp = this;
|
|
2253
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
2254
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2255
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2256
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2257
|
+
tmp.t8w_1 = [null, null, null, null, null, null, null, null, null, lazy(tmp_0, GoogleGenerationConfig$Companion$$childSerializers$_anonymous__26byvr)];
|
|
2258
|
+
}
|
|
2259
|
+
protoOf(Companion_14).q1j = function () {
|
|
2260
|
+
return $serializer_getInstance_15();
|
|
2261
|
+
};
|
|
2262
|
+
var Companion_instance_14;
|
|
2263
|
+
function Companion_getInstance_17() {
|
|
2264
|
+
if (Companion_instance_14 == null)
|
|
2265
|
+
new Companion_14();
|
|
2266
|
+
return Companion_instance_14;
|
|
2267
|
+
}
|
|
2268
|
+
function $serializer_15() {
|
|
2269
|
+
$serializer_instance_15 = this;
|
|
2270
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleGenerationConfig', this, 10);
|
|
2271
|
+
tmp0_serialDesc.m16('responseMimeType', true);
|
|
2272
|
+
tmp0_serialDesc.m16('responseSchema', true);
|
|
2273
|
+
tmp0_serialDesc.m16('responseJsonSchema', true);
|
|
2274
|
+
tmp0_serialDesc.m16('maxOutputTokens', true);
|
|
2275
|
+
tmp0_serialDesc.m16('temperature', true);
|
|
2276
|
+
tmp0_serialDesc.m16('candidateCount', true);
|
|
2277
|
+
tmp0_serialDesc.m16('topP', true);
|
|
2278
|
+
tmp0_serialDesc.m16('topK', true);
|
|
2279
|
+
tmp0_serialDesc.m16('thinkingConfig', true);
|
|
2280
|
+
tmp0_serialDesc.m16('additionalProperties', true);
|
|
2281
|
+
this.u8w_1 = tmp0_serialDesc;
|
|
2282
|
+
}
|
|
2283
|
+
protoOf($serializer_15).v8w = function (encoder, value) {
|
|
2284
|
+
var tmp0_desc = this.u8w_1;
|
|
2285
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
2286
|
+
var tmp2_cached = Companion_getInstance_17().t8w_1;
|
|
2287
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.w8w_1 == null)) {
|
|
2288
|
+
tmp1_output.p10(tmp0_desc, 0, StringSerializer_getInstance(), value.w8w_1);
|
|
2289
|
+
}
|
|
2290
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.x8w_1 == null)) {
|
|
2291
|
+
tmp1_output.p10(tmp0_desc, 1, JsonObjectSerializer_getInstance(), value.x8w_1);
|
|
2292
|
+
}
|
|
2293
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.y8w_1 == null)) {
|
|
2294
|
+
tmp1_output.p10(tmp0_desc, 2, JsonObjectSerializer_getInstance(), value.y8w_1);
|
|
2295
|
+
}
|
|
2296
|
+
if (tmp1_output.t10(tmp0_desc, 3) ? true : !(value.z8w_1 == null)) {
|
|
2297
|
+
tmp1_output.p10(tmp0_desc, 3, IntSerializer_getInstance(), value.z8w_1);
|
|
2298
|
+
}
|
|
2299
|
+
if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.a8x_1 == null)) {
|
|
2300
|
+
tmp1_output.p10(tmp0_desc, 4, DoubleSerializer_getInstance(), value.a8x_1);
|
|
2301
|
+
}
|
|
2302
|
+
if (tmp1_output.t10(tmp0_desc, 5) ? true : !(value.b8x_1 == null)) {
|
|
2303
|
+
tmp1_output.p10(tmp0_desc, 5, IntSerializer_getInstance(), value.b8x_1);
|
|
2304
|
+
}
|
|
2305
|
+
if (tmp1_output.t10(tmp0_desc, 6) ? true : !(value.c8x_1 == null)) {
|
|
2306
|
+
tmp1_output.p10(tmp0_desc, 6, DoubleSerializer_getInstance(), value.c8x_1);
|
|
2307
|
+
}
|
|
2308
|
+
if (tmp1_output.t10(tmp0_desc, 7) ? true : !(value.d8x_1 == null)) {
|
|
2309
|
+
tmp1_output.p10(tmp0_desc, 7, IntSerializer_getInstance(), value.d8x_1);
|
|
2310
|
+
}
|
|
2311
|
+
if (tmp1_output.t10(tmp0_desc, 8) ? true : !(value.e8x_1 == null)) {
|
|
2312
|
+
tmp1_output.p10(tmp0_desc, 8, $serializer_getInstance_16(), value.e8x_1);
|
|
2313
|
+
}
|
|
2314
|
+
if (tmp1_output.t10(tmp0_desc, 9) ? true : !(value.f8x_1 == null)) {
|
|
2315
|
+
tmp1_output.p10(tmp0_desc, 9, tmp2_cached[9].b1(), value.f8x_1);
|
|
2316
|
+
}
|
|
2317
|
+
tmp1_output.xy(tmp0_desc);
|
|
2318
|
+
};
|
|
2319
|
+
protoOf($serializer_15).gv = function (encoder, value) {
|
|
2320
|
+
return this.v8w(encoder, value instanceof GoogleGenerationConfig ? value : THROW_CCE());
|
|
2321
|
+
};
|
|
2322
|
+
protoOf($serializer_15).hv = function (decoder) {
|
|
2323
|
+
var tmp0_desc = this.u8w_1;
|
|
2324
|
+
var tmp1_flag = true;
|
|
2325
|
+
var tmp2_index = 0;
|
|
2326
|
+
var tmp3_bitMask0 = 0;
|
|
2327
|
+
var tmp4_local0 = null;
|
|
2328
|
+
var tmp5_local1 = null;
|
|
2329
|
+
var tmp6_local2 = null;
|
|
2330
|
+
var tmp7_local3 = null;
|
|
2331
|
+
var tmp8_local4 = null;
|
|
2332
|
+
var tmp9_local5 = null;
|
|
2333
|
+
var tmp10_local6 = null;
|
|
2334
|
+
var tmp11_local7 = null;
|
|
2335
|
+
var tmp12_local8 = null;
|
|
2336
|
+
var tmp13_local9 = null;
|
|
2337
|
+
var tmp14_input = decoder.wy(tmp0_desc);
|
|
2338
|
+
var tmp15_cached = Companion_getInstance_17().t8w_1;
|
|
2339
|
+
if (tmp14_input.mz()) {
|
|
2340
|
+
tmp4_local0 = tmp14_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
2341
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2342
|
+
tmp5_local1 = tmp14_input.kz(tmp0_desc, 1, JsonObjectSerializer_getInstance(), tmp5_local1);
|
|
2343
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2344
|
+
tmp6_local2 = tmp14_input.kz(tmp0_desc, 2, JsonObjectSerializer_getInstance(), tmp6_local2);
|
|
2345
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
2346
|
+
tmp7_local3 = tmp14_input.kz(tmp0_desc, 3, IntSerializer_getInstance(), tmp7_local3);
|
|
2347
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
2348
|
+
tmp8_local4 = tmp14_input.kz(tmp0_desc, 4, DoubleSerializer_getInstance(), tmp8_local4);
|
|
2349
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
2350
|
+
tmp9_local5 = tmp14_input.kz(tmp0_desc, 5, IntSerializer_getInstance(), tmp9_local5);
|
|
2351
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
2352
|
+
tmp10_local6 = tmp14_input.kz(tmp0_desc, 6, DoubleSerializer_getInstance(), tmp10_local6);
|
|
2353
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
2354
|
+
tmp11_local7 = tmp14_input.kz(tmp0_desc, 7, IntSerializer_getInstance(), tmp11_local7);
|
|
2355
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 128;
|
|
2356
|
+
tmp12_local8 = tmp14_input.kz(tmp0_desc, 8, $serializer_getInstance_16(), tmp12_local8);
|
|
2357
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 256;
|
|
2358
|
+
tmp13_local9 = tmp14_input.kz(tmp0_desc, 9, tmp15_cached[9].b1(), tmp13_local9);
|
|
2359
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 512;
|
|
2360
|
+
} else
|
|
2361
|
+
while (tmp1_flag) {
|
|
2362
|
+
tmp2_index = tmp14_input.nz(tmp0_desc);
|
|
2363
|
+
switch (tmp2_index) {
|
|
2364
|
+
case -1:
|
|
2365
|
+
tmp1_flag = false;
|
|
2366
|
+
break;
|
|
2367
|
+
case 0:
|
|
2368
|
+
tmp4_local0 = tmp14_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
2369
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2370
|
+
break;
|
|
2371
|
+
case 1:
|
|
2372
|
+
tmp5_local1 = tmp14_input.kz(tmp0_desc, 1, JsonObjectSerializer_getInstance(), tmp5_local1);
|
|
2373
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2374
|
+
break;
|
|
2375
|
+
case 2:
|
|
2376
|
+
tmp6_local2 = tmp14_input.kz(tmp0_desc, 2, JsonObjectSerializer_getInstance(), tmp6_local2);
|
|
2377
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
2378
|
+
break;
|
|
2379
|
+
case 3:
|
|
2380
|
+
tmp7_local3 = tmp14_input.kz(tmp0_desc, 3, IntSerializer_getInstance(), tmp7_local3);
|
|
2381
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
2382
|
+
break;
|
|
2383
|
+
case 4:
|
|
2384
|
+
tmp8_local4 = tmp14_input.kz(tmp0_desc, 4, DoubleSerializer_getInstance(), tmp8_local4);
|
|
2385
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 16;
|
|
2386
|
+
break;
|
|
2387
|
+
case 5:
|
|
2388
|
+
tmp9_local5 = tmp14_input.kz(tmp0_desc, 5, IntSerializer_getInstance(), tmp9_local5);
|
|
2389
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 32;
|
|
2390
|
+
break;
|
|
2391
|
+
case 6:
|
|
2392
|
+
tmp10_local6 = tmp14_input.kz(tmp0_desc, 6, DoubleSerializer_getInstance(), tmp10_local6);
|
|
2393
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 64;
|
|
2394
|
+
break;
|
|
2395
|
+
case 7:
|
|
2396
|
+
tmp11_local7 = tmp14_input.kz(tmp0_desc, 7, IntSerializer_getInstance(), tmp11_local7);
|
|
2397
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 128;
|
|
2398
|
+
break;
|
|
2399
|
+
case 8:
|
|
2400
|
+
tmp12_local8 = tmp14_input.kz(tmp0_desc, 8, $serializer_getInstance_16(), tmp12_local8);
|
|
2401
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 256;
|
|
2402
|
+
break;
|
|
2403
|
+
case 9:
|
|
2404
|
+
tmp13_local9 = tmp14_input.kz(tmp0_desc, 9, tmp15_cached[9].b1(), tmp13_local9);
|
|
2405
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 512;
|
|
2406
|
+
break;
|
|
2407
|
+
default:
|
|
2408
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
2409
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
tmp14_input.xy(tmp0_desc);
|
|
2412
|
+
return GoogleGenerationConfig_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, null);
|
|
2413
|
+
};
|
|
2414
|
+
protoOf($serializer_15).fv = function () {
|
|
2415
|
+
return this.u8w_1;
|
|
2416
|
+
};
|
|
2417
|
+
protoOf($serializer_15).d17 = function () {
|
|
2418
|
+
var tmp0_cached = Companion_getInstance_17().t8w_1;
|
|
2419
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2420
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2421
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2422
|
+
return [get_nullable(StringSerializer_getInstance()), get_nullable(JsonObjectSerializer_getInstance()), get_nullable(JsonObjectSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(DoubleSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable(DoubleSerializer_getInstance()), get_nullable(IntSerializer_getInstance()), get_nullable($serializer_getInstance_16()), get_nullable(tmp0_cached[9].b1())];
|
|
2423
|
+
};
|
|
2424
|
+
var $serializer_instance_15;
|
|
2425
|
+
function $serializer_getInstance_15() {
|
|
2426
|
+
if ($serializer_instance_15 == null)
|
|
2427
|
+
new $serializer_15();
|
|
2428
|
+
return $serializer_instance_15;
|
|
2429
|
+
}
|
|
2430
|
+
function GoogleGenerationConfig_init_$Init$(seen0, responseMimeType, responseSchema, responseJsonSchema, maxOutputTokens, temperature, candidateCount, topP, topK, thinkingConfig, additionalProperties, serializationConstructorMarker, $this) {
|
|
2431
|
+
if (!(0 === (0 & seen0))) {
|
|
2432
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_15().u8w_1);
|
|
2433
|
+
}
|
|
2434
|
+
if (0 === (seen0 & 1))
|
|
2435
|
+
$this.w8w_1 = null;
|
|
2436
|
+
else
|
|
2437
|
+
$this.w8w_1 = responseMimeType;
|
|
2438
|
+
if (0 === (seen0 & 2))
|
|
2439
|
+
$this.x8w_1 = null;
|
|
2440
|
+
else
|
|
2441
|
+
$this.x8w_1 = responseSchema;
|
|
2442
|
+
if (0 === (seen0 & 4))
|
|
2443
|
+
$this.y8w_1 = null;
|
|
2444
|
+
else
|
|
2445
|
+
$this.y8w_1 = responseJsonSchema;
|
|
2446
|
+
if (0 === (seen0 & 8))
|
|
2447
|
+
$this.z8w_1 = null;
|
|
2448
|
+
else
|
|
2449
|
+
$this.z8w_1 = maxOutputTokens;
|
|
2450
|
+
if (0 === (seen0 & 16))
|
|
2451
|
+
$this.a8x_1 = null;
|
|
2452
|
+
else
|
|
2453
|
+
$this.a8x_1 = temperature;
|
|
2454
|
+
if (0 === (seen0 & 32))
|
|
2455
|
+
$this.b8x_1 = null;
|
|
2456
|
+
else
|
|
2457
|
+
$this.b8x_1 = candidateCount;
|
|
2458
|
+
if (0 === (seen0 & 64))
|
|
2459
|
+
$this.c8x_1 = null;
|
|
2460
|
+
else
|
|
2461
|
+
$this.c8x_1 = topP;
|
|
2462
|
+
if (0 === (seen0 & 128))
|
|
2463
|
+
$this.d8x_1 = null;
|
|
2464
|
+
else
|
|
2465
|
+
$this.d8x_1 = topK;
|
|
2466
|
+
if (0 === (seen0 & 256))
|
|
2467
|
+
$this.e8x_1 = null;
|
|
2468
|
+
else
|
|
2469
|
+
$this.e8x_1 = thinkingConfig;
|
|
2470
|
+
if (0 === (seen0 & 512))
|
|
2471
|
+
$this.f8x_1 = null;
|
|
2472
|
+
else
|
|
2473
|
+
$this.f8x_1 = additionalProperties;
|
|
2474
|
+
return $this;
|
|
2475
|
+
}
|
|
2476
|
+
function GoogleGenerationConfig_init_$Create$(seen0, responseMimeType, responseSchema, responseJsonSchema, maxOutputTokens, temperature, candidateCount, topP, topK, thinkingConfig, additionalProperties, serializationConstructorMarker) {
|
|
2477
|
+
return GoogleGenerationConfig_init_$Init$(seen0, responseMimeType, responseSchema, responseJsonSchema, maxOutputTokens, temperature, candidateCount, topP, topK, thinkingConfig, additionalProperties, serializationConstructorMarker, objectCreate(protoOf(GoogleGenerationConfig)));
|
|
2478
|
+
}
|
|
2479
|
+
function GoogleGenerationConfig(responseMimeType, responseSchema, responseJsonSchema, maxOutputTokens, temperature, candidateCount, topP, topK, thinkingConfig, additionalProperties) {
|
|
2480
|
+
Companion_getInstance_17();
|
|
2481
|
+
responseMimeType = responseMimeType === VOID ? null : responseMimeType;
|
|
2482
|
+
responseSchema = responseSchema === VOID ? null : responseSchema;
|
|
2483
|
+
responseJsonSchema = responseJsonSchema === VOID ? null : responseJsonSchema;
|
|
2484
|
+
maxOutputTokens = maxOutputTokens === VOID ? null : maxOutputTokens;
|
|
2485
|
+
temperature = temperature === VOID ? null : temperature;
|
|
2486
|
+
candidateCount = candidateCount === VOID ? null : candidateCount;
|
|
2487
|
+
topP = topP === VOID ? null : topP;
|
|
2488
|
+
topK = topK === VOID ? null : topK;
|
|
2489
|
+
thinkingConfig = thinkingConfig === VOID ? null : thinkingConfig;
|
|
2490
|
+
additionalProperties = additionalProperties === VOID ? null : additionalProperties;
|
|
2491
|
+
this.w8w_1 = responseMimeType;
|
|
2492
|
+
this.x8w_1 = responseSchema;
|
|
2493
|
+
this.y8w_1 = responseJsonSchema;
|
|
2494
|
+
this.z8w_1 = maxOutputTokens;
|
|
2495
|
+
this.a8x_1 = temperature;
|
|
2496
|
+
this.b8x_1 = candidateCount;
|
|
2497
|
+
this.c8x_1 = topP;
|
|
2498
|
+
this.d8x_1 = topK;
|
|
2499
|
+
this.e8x_1 = thinkingConfig;
|
|
2500
|
+
this.f8x_1 = additionalProperties;
|
|
2501
|
+
}
|
|
2502
|
+
function Companion_15() {
|
|
2503
|
+
}
|
|
2504
|
+
var Companion_instance_15;
|
|
2505
|
+
function Companion_getInstance_18() {
|
|
2506
|
+
return Companion_instance_15;
|
|
2507
|
+
}
|
|
2508
|
+
function $serializer_16() {
|
|
2509
|
+
$serializer_instance_16 = this;
|
|
2510
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleThinkingConfig', this, 2);
|
|
2511
|
+
tmp0_serialDesc.m16('includeThoughts', true);
|
|
2512
|
+
tmp0_serialDesc.m16('thinkingBudget', true);
|
|
2513
|
+
this.g8x_1 = tmp0_serialDesc;
|
|
2514
|
+
}
|
|
2515
|
+
protoOf($serializer_16).h8x = function (encoder, value) {
|
|
2516
|
+
var tmp0_desc = this.g8x_1;
|
|
2517
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
2518
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.i8x_1 == null)) {
|
|
2519
|
+
tmp1_output.p10(tmp0_desc, 0, BooleanSerializer_getInstance(), value.i8x_1);
|
|
2520
|
+
}
|
|
2521
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.j8x_1 == null)) {
|
|
2522
|
+
tmp1_output.p10(tmp0_desc, 1, IntSerializer_getInstance(), value.j8x_1);
|
|
2523
|
+
}
|
|
2524
|
+
tmp1_output.xy(tmp0_desc);
|
|
2525
|
+
};
|
|
2526
|
+
protoOf($serializer_16).gv = function (encoder, value) {
|
|
2527
|
+
return this.h8x(encoder, value instanceof GoogleThinkingConfig ? value : THROW_CCE());
|
|
2528
|
+
};
|
|
2529
|
+
protoOf($serializer_16).hv = function (decoder) {
|
|
2530
|
+
var tmp0_desc = this.g8x_1;
|
|
2531
|
+
var tmp1_flag = true;
|
|
2532
|
+
var tmp2_index = 0;
|
|
2533
|
+
var tmp3_bitMask0 = 0;
|
|
2534
|
+
var tmp4_local0 = null;
|
|
2535
|
+
var tmp5_local1 = null;
|
|
2536
|
+
var tmp6_input = decoder.wy(tmp0_desc);
|
|
2537
|
+
if (tmp6_input.mz()) {
|
|
2538
|
+
tmp4_local0 = tmp6_input.kz(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
|
|
2539
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2540
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, IntSerializer_getInstance(), tmp5_local1);
|
|
2541
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2542
|
+
} else
|
|
2543
|
+
while (tmp1_flag) {
|
|
2544
|
+
tmp2_index = tmp6_input.nz(tmp0_desc);
|
|
2545
|
+
switch (tmp2_index) {
|
|
2546
|
+
case -1:
|
|
2547
|
+
tmp1_flag = false;
|
|
2548
|
+
break;
|
|
2549
|
+
case 0:
|
|
2550
|
+
tmp4_local0 = tmp6_input.kz(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
|
|
2551
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2552
|
+
break;
|
|
2553
|
+
case 1:
|
|
2554
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, IntSerializer_getInstance(), tmp5_local1);
|
|
2555
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2556
|
+
break;
|
|
2557
|
+
default:
|
|
2558
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
2559
|
+
}
|
|
2560
|
+
}
|
|
2561
|
+
tmp6_input.xy(tmp0_desc);
|
|
2562
|
+
return GoogleThinkingConfig_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
2563
|
+
};
|
|
2564
|
+
protoOf($serializer_16).fv = function () {
|
|
2565
|
+
return this.g8x_1;
|
|
2566
|
+
};
|
|
2567
|
+
protoOf($serializer_16).d17 = function () {
|
|
2568
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2569
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2570
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2571
|
+
return [get_nullable(BooleanSerializer_getInstance()), get_nullable(IntSerializer_getInstance())];
|
|
2572
|
+
};
|
|
2573
|
+
var $serializer_instance_16;
|
|
2574
|
+
function $serializer_getInstance_16() {
|
|
2575
|
+
if ($serializer_instance_16 == null)
|
|
2576
|
+
new $serializer_16();
|
|
2577
|
+
return $serializer_instance_16;
|
|
2578
|
+
}
|
|
2579
|
+
function GoogleThinkingConfig_init_$Init$(seen0, includeThoughts, thinkingBudget, serializationConstructorMarker, $this) {
|
|
2580
|
+
if (!(0 === (0 & seen0))) {
|
|
2581
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_16().g8x_1);
|
|
2582
|
+
}
|
|
2583
|
+
if (0 === (seen0 & 1))
|
|
2584
|
+
$this.i8x_1 = null;
|
|
2585
|
+
else
|
|
2586
|
+
$this.i8x_1 = includeThoughts;
|
|
2587
|
+
if (0 === (seen0 & 2))
|
|
2588
|
+
$this.j8x_1 = null;
|
|
2589
|
+
else
|
|
2590
|
+
$this.j8x_1 = thinkingBudget;
|
|
2591
|
+
return $this;
|
|
2592
|
+
}
|
|
2593
|
+
function GoogleThinkingConfig_init_$Create$(seen0, includeThoughts, thinkingBudget, serializationConstructorMarker) {
|
|
2594
|
+
return GoogleThinkingConfig_init_$Init$(seen0, includeThoughts, thinkingBudget, serializationConstructorMarker, objectCreate(protoOf(GoogleThinkingConfig)));
|
|
2595
|
+
}
|
|
2596
|
+
function GoogleThinkingConfig(includeThoughts, thinkingBudget) {
|
|
2597
|
+
includeThoughts = includeThoughts === VOID ? null : includeThoughts;
|
|
2598
|
+
thinkingBudget = thinkingBudget === VOID ? null : thinkingBudget;
|
|
2599
|
+
this.i8x_1 = includeThoughts;
|
|
2600
|
+
this.j8x_1 = thinkingBudget;
|
|
2601
|
+
}
|
|
2602
|
+
protoOf(GoogleThinkingConfig).toString = function () {
|
|
2603
|
+
return 'GoogleThinkingConfig(includeThoughts=' + this.i8x_1 + ', thinkingBudget=' + this.j8x_1 + ')';
|
|
2604
|
+
};
|
|
2605
|
+
protoOf(GoogleThinkingConfig).hashCode = function () {
|
|
2606
|
+
var result = this.i8x_1 == null ? 0 : getBooleanHashCode(this.i8x_1);
|
|
2607
|
+
result = imul(result, 31) + (this.j8x_1 == null ? 0 : this.j8x_1) | 0;
|
|
2608
|
+
return result;
|
|
2609
|
+
};
|
|
2610
|
+
protoOf(GoogleThinkingConfig).equals = function (other) {
|
|
2611
|
+
if (this === other)
|
|
2612
|
+
return true;
|
|
2613
|
+
if (!(other instanceof GoogleThinkingConfig))
|
|
2614
|
+
return false;
|
|
2615
|
+
var tmp0_other_with_cast = other instanceof GoogleThinkingConfig ? other : THROW_CCE();
|
|
2616
|
+
if (!(this.i8x_1 == tmp0_other_with_cast.i8x_1))
|
|
2617
|
+
return false;
|
|
2618
|
+
if (!(this.j8x_1 == tmp0_other_with_cast.j8x_1))
|
|
2619
|
+
return false;
|
|
2620
|
+
return true;
|
|
2621
|
+
};
|
|
2622
|
+
function GoogleFunctionCallingConfig$Companion$$childSerializers$_anonymous__yqskj9() {
|
|
2623
|
+
return Companion_getInstance_20().q1j();
|
|
2624
|
+
}
|
|
2625
|
+
function GoogleFunctionCallingConfig$Companion$$childSerializers$_anonymous__yqskj9_0() {
|
|
2626
|
+
return new ArrayListSerializer(StringSerializer_getInstance());
|
|
2627
|
+
}
|
|
2628
|
+
function Companion_16() {
|
|
2629
|
+
Companion_instance_16 = this;
|
|
2630
|
+
var tmp = this;
|
|
2631
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
2632
|
+
var tmp_1 = lazy(tmp_0, GoogleFunctionCallingConfig$Companion$$childSerializers$_anonymous__yqskj9);
|
|
2633
|
+
var tmp_2 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
2634
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2635
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2636
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2637
|
+
tmp.l8x_1 = [tmp_1, lazy(tmp_2, GoogleFunctionCallingConfig$Companion$$childSerializers$_anonymous__yqskj9_0)];
|
|
2638
|
+
}
|
|
2639
|
+
var Companion_instance_16;
|
|
2640
|
+
function Companion_getInstance_19() {
|
|
2641
|
+
if (Companion_instance_16 == null)
|
|
2642
|
+
new Companion_16();
|
|
2643
|
+
return Companion_instance_16;
|
|
2644
|
+
}
|
|
2645
|
+
function $serializer_17() {
|
|
2646
|
+
$serializer_instance_17 = this;
|
|
2647
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleFunctionCallingConfig', this, 2);
|
|
2648
|
+
tmp0_serialDesc.m16('mode', true);
|
|
2649
|
+
tmp0_serialDesc.m16('allowedFunctionNames', true);
|
|
2650
|
+
this.m8x_1 = tmp0_serialDesc;
|
|
2651
|
+
}
|
|
2652
|
+
protoOf($serializer_17).n8x = function (encoder, value) {
|
|
2653
|
+
var tmp0_desc = this.m8x_1;
|
|
2654
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
2655
|
+
var tmp2_cached = Companion_getInstance_19().l8x_1;
|
|
2656
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.o8x_1 == null)) {
|
|
2657
|
+
tmp1_output.p10(tmp0_desc, 0, tmp2_cached[0].b1(), value.o8x_1);
|
|
2658
|
+
}
|
|
2659
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.p8x_1 == null)) {
|
|
2660
|
+
tmp1_output.p10(tmp0_desc, 1, tmp2_cached[1].b1(), value.p8x_1);
|
|
2661
|
+
}
|
|
2662
|
+
tmp1_output.xy(tmp0_desc);
|
|
2663
|
+
};
|
|
2664
|
+
protoOf($serializer_17).gv = function (encoder, value) {
|
|
2665
|
+
return this.n8x(encoder, value instanceof GoogleFunctionCallingConfig ? value : THROW_CCE());
|
|
2666
|
+
};
|
|
2667
|
+
protoOf($serializer_17).hv = function (decoder) {
|
|
2668
|
+
var tmp0_desc = this.m8x_1;
|
|
2669
|
+
var tmp1_flag = true;
|
|
2670
|
+
var tmp2_index = 0;
|
|
2671
|
+
var tmp3_bitMask0 = 0;
|
|
2672
|
+
var tmp4_local0 = null;
|
|
2673
|
+
var tmp5_local1 = null;
|
|
2674
|
+
var tmp6_input = decoder.wy(tmp0_desc);
|
|
2675
|
+
var tmp7_cached = Companion_getInstance_19().l8x_1;
|
|
2676
|
+
if (tmp6_input.mz()) {
|
|
2677
|
+
tmp4_local0 = tmp6_input.kz(tmp0_desc, 0, tmp7_cached[0].b1(), tmp4_local0);
|
|
2678
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2679
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, tmp7_cached[1].b1(), tmp5_local1);
|
|
2680
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2681
|
+
} else
|
|
2682
|
+
while (tmp1_flag) {
|
|
2683
|
+
tmp2_index = tmp6_input.nz(tmp0_desc);
|
|
2684
|
+
switch (tmp2_index) {
|
|
2685
|
+
case -1:
|
|
2686
|
+
tmp1_flag = false;
|
|
2687
|
+
break;
|
|
2688
|
+
case 0:
|
|
2689
|
+
tmp4_local0 = tmp6_input.kz(tmp0_desc, 0, tmp7_cached[0].b1(), tmp4_local0);
|
|
2690
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2691
|
+
break;
|
|
2692
|
+
case 1:
|
|
2693
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, tmp7_cached[1].b1(), tmp5_local1);
|
|
2694
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2695
|
+
break;
|
|
2696
|
+
default:
|
|
2697
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
tmp6_input.xy(tmp0_desc);
|
|
2701
|
+
return GoogleFunctionCallingConfig_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
2702
|
+
};
|
|
2703
|
+
protoOf($serializer_17).fv = function () {
|
|
2704
|
+
return this.m8x_1;
|
|
2705
|
+
};
|
|
2706
|
+
protoOf($serializer_17).d17 = function () {
|
|
2707
|
+
var tmp0_cached = Companion_getInstance_19().l8x_1;
|
|
2708
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2709
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2710
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2711
|
+
return [get_nullable(tmp0_cached[0].b1()), get_nullable(tmp0_cached[1].b1())];
|
|
2712
|
+
};
|
|
2713
|
+
var $serializer_instance_17;
|
|
2714
|
+
function $serializer_getInstance_17() {
|
|
2715
|
+
if ($serializer_instance_17 == null)
|
|
2716
|
+
new $serializer_17();
|
|
2717
|
+
return $serializer_instance_17;
|
|
2718
|
+
}
|
|
2719
|
+
function GoogleFunctionCallingConfig_init_$Init$(seen0, mode, allowedFunctionNames, serializationConstructorMarker, $this) {
|
|
2720
|
+
if (!(0 === (0 & seen0))) {
|
|
2721
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_17().m8x_1);
|
|
2722
|
+
}
|
|
2723
|
+
if (0 === (seen0 & 1))
|
|
2724
|
+
$this.o8x_1 = null;
|
|
2725
|
+
else
|
|
2726
|
+
$this.o8x_1 = mode;
|
|
2727
|
+
if (0 === (seen0 & 2))
|
|
2728
|
+
$this.p8x_1 = null;
|
|
2729
|
+
else
|
|
2730
|
+
$this.p8x_1 = allowedFunctionNames;
|
|
2731
|
+
return $this;
|
|
2732
|
+
}
|
|
2733
|
+
function GoogleFunctionCallingConfig_init_$Create$(seen0, mode, allowedFunctionNames, serializationConstructorMarker) {
|
|
2734
|
+
return GoogleFunctionCallingConfig_init_$Init$(seen0, mode, allowedFunctionNames, serializationConstructorMarker, objectCreate(protoOf(GoogleFunctionCallingConfig)));
|
|
2735
|
+
}
|
|
2736
|
+
function GoogleFunctionCallingConfig(mode, allowedFunctionNames) {
|
|
2737
|
+
Companion_getInstance_19();
|
|
2738
|
+
mode = mode === VOID ? null : mode;
|
|
2739
|
+
allowedFunctionNames = allowedFunctionNames === VOID ? null : allowedFunctionNames;
|
|
2740
|
+
this.o8x_1 = mode;
|
|
2741
|
+
this.p8x_1 = allowedFunctionNames;
|
|
2742
|
+
}
|
|
2743
|
+
function _get_$cachedSerializer__te6jhj($this) {
|
|
2744
|
+
return $this.k8x_1.b1();
|
|
2745
|
+
}
|
|
2746
|
+
function GoogleFunctionCallingMode$Companion$_anonymous__psdx6v() {
|
|
2747
|
+
var tmp = values();
|
|
2748
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2749
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2750
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2751
|
+
var tmp_0 = ['auto', 'any', 'none'];
|
|
2752
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2753
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2754
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2755
|
+
var tmp$ret$5 = [null, null, null];
|
|
2756
|
+
return createAnnotatedEnumSerializer('ai.koog.prompt.executor.clients.google.GoogleFunctionCallingMode', tmp, tmp_0, tmp$ret$5, null);
|
|
2757
|
+
}
|
|
2758
|
+
var GoogleFunctionCallingMode_AUTO_instance;
|
|
2759
|
+
var GoogleFunctionCallingMode_ANY_instance;
|
|
2760
|
+
var GoogleFunctionCallingMode_NONE_instance;
|
|
2761
|
+
function values() {
|
|
2762
|
+
return [GoogleFunctionCallingMode_AUTO_getInstance(), GoogleFunctionCallingMode_ANY_getInstance(), GoogleFunctionCallingMode_NONE_getInstance()];
|
|
2763
|
+
}
|
|
2764
|
+
function Companion_17() {
|
|
2765
|
+
Companion_instance_17 = this;
|
|
2766
|
+
var tmp = this;
|
|
2767
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
2768
|
+
tmp.k8x_1 = lazy(tmp_0, GoogleFunctionCallingMode$Companion$_anonymous__psdx6v);
|
|
2769
|
+
}
|
|
2770
|
+
protoOf(Companion_17).q1j = function () {
|
|
2771
|
+
return _get_$cachedSerializer__te6jhj(this);
|
|
2772
|
+
};
|
|
2773
|
+
protoOf(Companion_17).o17 = function (typeParamsSerializers) {
|
|
2774
|
+
return this.q1j();
|
|
2775
|
+
};
|
|
2776
|
+
var Companion_instance_17;
|
|
2777
|
+
function Companion_getInstance_20() {
|
|
2778
|
+
GoogleFunctionCallingMode_initEntries();
|
|
2779
|
+
if (Companion_instance_17 == null)
|
|
2780
|
+
new Companion_17();
|
|
2781
|
+
return Companion_instance_17;
|
|
2782
|
+
}
|
|
2783
|
+
var GoogleFunctionCallingMode_entriesInitialized;
|
|
2784
|
+
function GoogleFunctionCallingMode_initEntries() {
|
|
2785
|
+
if (GoogleFunctionCallingMode_entriesInitialized)
|
|
2786
|
+
return Unit_instance;
|
|
2787
|
+
GoogleFunctionCallingMode_entriesInitialized = true;
|
|
2788
|
+
GoogleFunctionCallingMode_AUTO_instance = new GoogleFunctionCallingMode('AUTO', 0);
|
|
2789
|
+
GoogleFunctionCallingMode_ANY_instance = new GoogleFunctionCallingMode('ANY', 1);
|
|
2790
|
+
GoogleFunctionCallingMode_NONE_instance = new GoogleFunctionCallingMode('NONE', 2);
|
|
2791
|
+
Companion_getInstance_20();
|
|
2792
|
+
}
|
|
2793
|
+
function GoogleFunctionCallingMode(name, ordinal) {
|
|
2794
|
+
Enum.call(this, name, ordinal);
|
|
2795
|
+
}
|
|
2796
|
+
function Companion_18() {
|
|
2797
|
+
}
|
|
2798
|
+
var Companion_instance_18;
|
|
2799
|
+
function Companion_getInstance_21() {
|
|
2800
|
+
return Companion_instance_18;
|
|
2801
|
+
}
|
|
2802
|
+
function $serializer_18() {
|
|
2803
|
+
$serializer_instance_18 = this;
|
|
2804
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleToolConfig', this, 1);
|
|
2805
|
+
tmp0_serialDesc.m16('functionCallingConfig', true);
|
|
2806
|
+
this.q8x_1 = tmp0_serialDesc;
|
|
2807
|
+
}
|
|
2808
|
+
protoOf($serializer_18).r8x = function (encoder, value) {
|
|
2809
|
+
var tmp0_desc = this.q8x_1;
|
|
2810
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
2811
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.s8x_1 == null)) {
|
|
2812
|
+
tmp1_output.p10(tmp0_desc, 0, $serializer_getInstance_17(), value.s8x_1);
|
|
2813
|
+
}
|
|
2814
|
+
tmp1_output.xy(tmp0_desc);
|
|
2815
|
+
};
|
|
2816
|
+
protoOf($serializer_18).gv = function (encoder, value) {
|
|
2817
|
+
return this.r8x(encoder, value instanceof GoogleToolConfig ? value : THROW_CCE());
|
|
2818
|
+
};
|
|
2819
|
+
protoOf($serializer_18).hv = function (decoder) {
|
|
2820
|
+
var tmp0_desc = this.q8x_1;
|
|
2821
|
+
var tmp1_flag = true;
|
|
2822
|
+
var tmp2_index = 0;
|
|
2823
|
+
var tmp3_bitMask0 = 0;
|
|
2824
|
+
var tmp4_local0 = null;
|
|
2825
|
+
var tmp5_input = decoder.wy(tmp0_desc);
|
|
2826
|
+
if (tmp5_input.mz()) {
|
|
2827
|
+
tmp4_local0 = tmp5_input.kz(tmp0_desc, 0, $serializer_getInstance_17(), tmp4_local0);
|
|
2828
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2829
|
+
} else
|
|
2830
|
+
while (tmp1_flag) {
|
|
2831
|
+
tmp2_index = tmp5_input.nz(tmp0_desc);
|
|
2832
|
+
switch (tmp2_index) {
|
|
2833
|
+
case -1:
|
|
2834
|
+
tmp1_flag = false;
|
|
2835
|
+
break;
|
|
2836
|
+
case 0:
|
|
2837
|
+
tmp4_local0 = tmp5_input.kz(tmp0_desc, 0, $serializer_getInstance_17(), tmp4_local0);
|
|
2838
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2839
|
+
break;
|
|
2840
|
+
default:
|
|
2841
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
tmp5_input.xy(tmp0_desc);
|
|
2845
|
+
return GoogleToolConfig_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
|
|
2846
|
+
};
|
|
2847
|
+
protoOf($serializer_18).fv = function () {
|
|
2848
|
+
return this.q8x_1;
|
|
2849
|
+
};
|
|
2850
|
+
protoOf($serializer_18).d17 = function () {
|
|
2851
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2852
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2853
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2854
|
+
return [get_nullable($serializer_getInstance_17())];
|
|
2855
|
+
};
|
|
2856
|
+
var $serializer_instance_18;
|
|
2857
|
+
function $serializer_getInstance_18() {
|
|
2858
|
+
if ($serializer_instance_18 == null)
|
|
2859
|
+
new $serializer_18();
|
|
2860
|
+
return $serializer_instance_18;
|
|
2861
|
+
}
|
|
2862
|
+
function GoogleToolConfig_init_$Init$(seen0, functionCallingConfig, serializationConstructorMarker, $this) {
|
|
2863
|
+
if (!(0 === (0 & seen0))) {
|
|
2864
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_18().q8x_1);
|
|
2865
|
+
}
|
|
2866
|
+
if (0 === (seen0 & 1))
|
|
2867
|
+
$this.s8x_1 = null;
|
|
2868
|
+
else
|
|
2869
|
+
$this.s8x_1 = functionCallingConfig;
|
|
2870
|
+
return $this;
|
|
2871
|
+
}
|
|
2872
|
+
function GoogleToolConfig_init_$Create$(seen0, functionCallingConfig, serializationConstructorMarker) {
|
|
2873
|
+
return GoogleToolConfig_init_$Init$(seen0, functionCallingConfig, serializationConstructorMarker, objectCreate(protoOf(GoogleToolConfig)));
|
|
2874
|
+
}
|
|
2875
|
+
function GoogleToolConfig(functionCallingConfig) {
|
|
2876
|
+
functionCallingConfig = functionCallingConfig === VOID ? null : functionCallingConfig;
|
|
2877
|
+
this.s8x_1 = functionCallingConfig;
|
|
2878
|
+
}
|
|
2879
|
+
function GooglePromptFeedback$Companion$$childSerializers$_anonymous__nnxabs() {
|
|
2880
|
+
return new ArrayListSerializer($serializer_getInstance_20());
|
|
2881
|
+
}
|
|
2882
|
+
function Companion_19() {
|
|
2883
|
+
Companion_instance_19 = this;
|
|
2884
|
+
var tmp = this;
|
|
2885
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
2886
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2887
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2888
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2889
|
+
tmp.t8x_1 = [null, lazy(tmp_0, GooglePromptFeedback$Companion$$childSerializers$_anonymous__nnxabs)];
|
|
2890
|
+
}
|
|
2891
|
+
var Companion_instance_19;
|
|
2892
|
+
function Companion_getInstance_22() {
|
|
2893
|
+
if (Companion_instance_19 == null)
|
|
2894
|
+
new Companion_19();
|
|
2895
|
+
return Companion_instance_19;
|
|
2896
|
+
}
|
|
2897
|
+
function $serializer_19() {
|
|
2898
|
+
$serializer_instance_19 = this;
|
|
2899
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GooglePromptFeedback', this, 2);
|
|
2900
|
+
tmp0_serialDesc.m16('blockReason', true);
|
|
2901
|
+
tmp0_serialDesc.m16('safetyRatings', true);
|
|
2902
|
+
this.u8x_1 = tmp0_serialDesc;
|
|
2903
|
+
}
|
|
2904
|
+
protoOf($serializer_19).v8x = function (encoder, value) {
|
|
2905
|
+
var tmp0_desc = this.u8x_1;
|
|
2906
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
2907
|
+
var tmp2_cached = Companion_getInstance_22().t8x_1;
|
|
2908
|
+
if (tmp1_output.t10(tmp0_desc, 0) ? true : !(value.w8x_1 == null)) {
|
|
2909
|
+
tmp1_output.p10(tmp0_desc, 0, StringSerializer_getInstance(), value.w8x_1);
|
|
2910
|
+
}
|
|
2911
|
+
if (tmp1_output.t10(tmp0_desc, 1) ? true : !(value.x8x_1 == null)) {
|
|
2912
|
+
tmp1_output.p10(tmp0_desc, 1, tmp2_cached[1].b1(), value.x8x_1);
|
|
2913
|
+
}
|
|
2914
|
+
tmp1_output.xy(tmp0_desc);
|
|
2915
|
+
};
|
|
2916
|
+
protoOf($serializer_19).gv = function (encoder, value) {
|
|
2917
|
+
return this.v8x(encoder, value instanceof GooglePromptFeedback ? value : THROW_CCE());
|
|
2918
|
+
};
|
|
2919
|
+
protoOf($serializer_19).hv = function (decoder) {
|
|
2920
|
+
var tmp0_desc = this.u8x_1;
|
|
2921
|
+
var tmp1_flag = true;
|
|
2922
|
+
var tmp2_index = 0;
|
|
2923
|
+
var tmp3_bitMask0 = 0;
|
|
2924
|
+
var tmp4_local0 = null;
|
|
2925
|
+
var tmp5_local1 = null;
|
|
2926
|
+
var tmp6_input = decoder.wy(tmp0_desc);
|
|
2927
|
+
var tmp7_cached = Companion_getInstance_22().t8x_1;
|
|
2928
|
+
if (tmp6_input.mz()) {
|
|
2929
|
+
tmp4_local0 = tmp6_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
2930
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2931
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, tmp7_cached[1].b1(), tmp5_local1);
|
|
2932
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2933
|
+
} else
|
|
2934
|
+
while (tmp1_flag) {
|
|
2935
|
+
tmp2_index = tmp6_input.nz(tmp0_desc);
|
|
2936
|
+
switch (tmp2_index) {
|
|
2937
|
+
case -1:
|
|
2938
|
+
tmp1_flag = false;
|
|
2939
|
+
break;
|
|
2940
|
+
case 0:
|
|
2941
|
+
tmp4_local0 = tmp6_input.kz(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
|
|
2942
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
2943
|
+
break;
|
|
2944
|
+
case 1:
|
|
2945
|
+
tmp5_local1 = tmp6_input.kz(tmp0_desc, 1, tmp7_cached[1].b1(), tmp5_local1);
|
|
2946
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
2947
|
+
break;
|
|
2948
|
+
default:
|
|
2949
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
tmp6_input.xy(tmp0_desc);
|
|
2953
|
+
return GooglePromptFeedback_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
2954
|
+
};
|
|
2955
|
+
protoOf($serializer_19).fv = function () {
|
|
2956
|
+
return this.u8x_1;
|
|
2957
|
+
};
|
|
2958
|
+
protoOf($serializer_19).d17 = function () {
|
|
2959
|
+
var tmp0_cached = Companion_getInstance_22().t8x_1;
|
|
2960
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2961
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2962
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2963
|
+
return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1].b1())];
|
|
2964
|
+
};
|
|
2965
|
+
var $serializer_instance_19;
|
|
2966
|
+
function $serializer_getInstance_19() {
|
|
2967
|
+
if ($serializer_instance_19 == null)
|
|
2968
|
+
new $serializer_19();
|
|
2969
|
+
return $serializer_instance_19;
|
|
2970
|
+
}
|
|
2971
|
+
function GooglePromptFeedback_init_$Init$(seen0, blockReason, safetyRatings, serializationConstructorMarker, $this) {
|
|
2972
|
+
if (!(0 === (0 & seen0))) {
|
|
2973
|
+
throwMissingFieldException(seen0, 0, $serializer_getInstance_19().u8x_1);
|
|
2974
|
+
}
|
|
2975
|
+
if (0 === (seen0 & 1))
|
|
2976
|
+
$this.w8x_1 = null;
|
|
2977
|
+
else
|
|
2978
|
+
$this.w8x_1 = blockReason;
|
|
2979
|
+
if (0 === (seen0 & 2))
|
|
2980
|
+
$this.x8x_1 = null;
|
|
2981
|
+
else
|
|
2982
|
+
$this.x8x_1 = safetyRatings;
|
|
2983
|
+
return $this;
|
|
2984
|
+
}
|
|
2985
|
+
function GooglePromptFeedback_init_$Create$(seen0, blockReason, safetyRatings, serializationConstructorMarker) {
|
|
2986
|
+
return GooglePromptFeedback_init_$Init$(seen0, blockReason, safetyRatings, serializationConstructorMarker, objectCreate(protoOf(GooglePromptFeedback)));
|
|
2987
|
+
}
|
|
2988
|
+
function GooglePromptFeedback(blockReason, safetyRatings) {
|
|
2989
|
+
Companion_getInstance_22();
|
|
2990
|
+
blockReason = blockReason === VOID ? null : blockReason;
|
|
2991
|
+
safetyRatings = safetyRatings === VOID ? null : safetyRatings;
|
|
2992
|
+
this.w8x_1 = blockReason;
|
|
2993
|
+
this.x8x_1 = safetyRatings;
|
|
2994
|
+
}
|
|
2995
|
+
function GoogleGenerationConfigSerializer() {
|
|
2996
|
+
GoogleGenerationConfigSerializer_instance = this;
|
|
2997
|
+
AdditionalPropertiesFlatteningSerializer.call(this, Companion_getInstance_17().q1j());
|
|
2998
|
+
}
|
|
2999
|
+
var GoogleGenerationConfigSerializer_instance;
|
|
3000
|
+
function GoogleGenerationConfigSerializer_getInstance() {
|
|
3001
|
+
if (GoogleGenerationConfigSerializer_instance == null)
|
|
3002
|
+
new GoogleGenerationConfigSerializer();
|
|
3003
|
+
return GoogleGenerationConfigSerializer_instance;
|
|
3004
|
+
}
|
|
3005
|
+
function $serializer_20() {
|
|
3006
|
+
$serializer_instance_20 = this;
|
|
3007
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('ai.koog.prompt.executor.clients.google.GoogleSafetyRating', this, 3);
|
|
3008
|
+
tmp0_serialDesc.m16('category', false);
|
|
3009
|
+
tmp0_serialDesc.m16('probability', false);
|
|
3010
|
+
tmp0_serialDesc.m16('blocked', true);
|
|
3011
|
+
this.y8x_1 = tmp0_serialDesc;
|
|
3012
|
+
}
|
|
3013
|
+
protoOf($serializer_20).z8x = function (encoder, value) {
|
|
3014
|
+
var tmp0_desc = this.y8x_1;
|
|
3015
|
+
var tmp1_output = encoder.wy(tmp0_desc);
|
|
3016
|
+
tmp1_output.l10(tmp0_desc, 0, value.a8y_1);
|
|
3017
|
+
tmp1_output.l10(tmp0_desc, 1, value.b8y_1);
|
|
3018
|
+
if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.c8y_1 == null)) {
|
|
3019
|
+
tmp1_output.p10(tmp0_desc, 2, BooleanSerializer_getInstance(), value.c8y_1);
|
|
3020
|
+
}
|
|
3021
|
+
tmp1_output.xy(tmp0_desc);
|
|
3022
|
+
};
|
|
3023
|
+
protoOf($serializer_20).gv = function (encoder, value) {
|
|
3024
|
+
return this.z8x(encoder, value instanceof GoogleSafetyRating ? value : THROW_CCE());
|
|
3025
|
+
};
|
|
3026
|
+
protoOf($serializer_20).hv = function (decoder) {
|
|
3027
|
+
var tmp0_desc = this.y8x_1;
|
|
3028
|
+
var tmp1_flag = true;
|
|
3029
|
+
var tmp2_index = 0;
|
|
3030
|
+
var tmp3_bitMask0 = 0;
|
|
3031
|
+
var tmp4_local0 = null;
|
|
3032
|
+
var tmp5_local1 = null;
|
|
3033
|
+
var tmp6_local2 = null;
|
|
3034
|
+
var tmp7_input = decoder.wy(tmp0_desc);
|
|
3035
|
+
if (tmp7_input.mz()) {
|
|
3036
|
+
tmp4_local0 = tmp7_input.gz(tmp0_desc, 0);
|
|
3037
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
3038
|
+
tmp5_local1 = tmp7_input.gz(tmp0_desc, 1);
|
|
3039
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
3040
|
+
tmp6_local2 = tmp7_input.kz(tmp0_desc, 2, BooleanSerializer_getInstance(), tmp6_local2);
|
|
3041
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
3042
|
+
} else
|
|
3043
|
+
while (tmp1_flag) {
|
|
3044
|
+
tmp2_index = tmp7_input.nz(tmp0_desc);
|
|
3045
|
+
switch (tmp2_index) {
|
|
3046
|
+
case -1:
|
|
3047
|
+
tmp1_flag = false;
|
|
3048
|
+
break;
|
|
3049
|
+
case 0:
|
|
3050
|
+
tmp4_local0 = tmp7_input.gz(tmp0_desc, 0);
|
|
3051
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
3052
|
+
break;
|
|
3053
|
+
case 1:
|
|
3054
|
+
tmp5_local1 = tmp7_input.gz(tmp0_desc, 1);
|
|
3055
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
3056
|
+
break;
|
|
3057
|
+
case 2:
|
|
3058
|
+
tmp6_local2 = tmp7_input.kz(tmp0_desc, 2, BooleanSerializer_getInstance(), tmp6_local2);
|
|
3059
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
3060
|
+
break;
|
|
3061
|
+
default:
|
|
3062
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
3063
|
+
}
|
|
3064
|
+
}
|
|
3065
|
+
tmp7_input.xy(tmp0_desc);
|
|
3066
|
+
return GoogleSafetyRating_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
3067
|
+
};
|
|
3068
|
+
protoOf($serializer_20).fv = function () {
|
|
3069
|
+
return this.y8x_1;
|
|
3070
|
+
};
|
|
3071
|
+
protoOf($serializer_20).d17 = function () {
|
|
3072
|
+
// Inline function 'kotlin.arrayOf' call
|
|
3073
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
3074
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
3075
|
+
return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(BooleanSerializer_getInstance())];
|
|
3076
|
+
};
|
|
3077
|
+
var $serializer_instance_20;
|
|
3078
|
+
function $serializer_getInstance_20() {
|
|
3079
|
+
if ($serializer_instance_20 == null)
|
|
3080
|
+
new $serializer_20();
|
|
3081
|
+
return $serializer_instance_20;
|
|
3082
|
+
}
|
|
3083
|
+
function GoogleSafetyRating_init_$Init$(seen0, category, probability, blocked, serializationConstructorMarker, $this) {
|
|
3084
|
+
if (!(3 === (3 & seen0))) {
|
|
3085
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_20().y8x_1);
|
|
3086
|
+
}
|
|
3087
|
+
$this.a8y_1 = category;
|
|
3088
|
+
$this.b8y_1 = probability;
|
|
3089
|
+
if (0 === (seen0 & 4))
|
|
3090
|
+
$this.c8y_1 = null;
|
|
3091
|
+
else
|
|
3092
|
+
$this.c8y_1 = blocked;
|
|
3093
|
+
return $this;
|
|
3094
|
+
}
|
|
3095
|
+
function GoogleSafetyRating_init_$Create$(seen0, category, probability, blocked, serializationConstructorMarker) {
|
|
3096
|
+
return GoogleSafetyRating_init_$Init$(seen0, category, probability, blocked, serializationConstructorMarker, objectCreate(protoOf(GoogleSafetyRating)));
|
|
3097
|
+
}
|
|
3098
|
+
function GoogleSafetyRating() {
|
|
3099
|
+
}
|
|
3100
|
+
function selectDeserializer$has($element, field) {
|
|
3101
|
+
return get_jsonObject($element).s1j(field);
|
|
3102
|
+
}
|
|
3103
|
+
function GooglePartSerializer() {
|
|
3104
|
+
GooglePartSerializer_instance = this;
|
|
3105
|
+
JsonContentPolymorphicSerializer.call(this, getKClass(GooglePart));
|
|
3106
|
+
}
|
|
3107
|
+
protoOf(GooglePartSerializer).o1j = function (element) {
|
|
3108
|
+
var tmp;
|
|
3109
|
+
if (selectDeserializer$has(element, 'text')) {
|
|
3110
|
+
tmp = Companion_instance_3.q1j();
|
|
3111
|
+
} else if (selectDeserializer$has(element, 'inlineData')) {
|
|
3112
|
+
tmp = Companion_instance_4.q1j();
|
|
3113
|
+
} else if (selectDeserializer$has(element, 'fileData')) {
|
|
3114
|
+
tmp = Companion_instance_5.q1j();
|
|
3115
|
+
} else if (selectDeserializer$has(element, 'functionCall')) {
|
|
3116
|
+
tmp = Companion_instance_6.q1j();
|
|
3117
|
+
} else if (selectDeserializer$has(element, 'functionResponse')) {
|
|
3118
|
+
tmp = Companion_instance_7.q1j();
|
|
3119
|
+
} else {
|
|
3120
|
+
throw SerializationException_init_$Create$('Unknown Part variant: ' + toString(element));
|
|
3121
|
+
}
|
|
3122
|
+
return tmp;
|
|
3123
|
+
};
|
|
3124
|
+
var GooglePartSerializer_instance;
|
|
3125
|
+
function GooglePartSerializer_getInstance() {
|
|
3126
|
+
if (GooglePartSerializer_instance == null)
|
|
3127
|
+
new GooglePartSerializer();
|
|
3128
|
+
return GooglePartSerializer_instance;
|
|
3129
|
+
}
|
|
3130
|
+
function GoogleFunctionCallingMode_AUTO_getInstance() {
|
|
3131
|
+
GoogleFunctionCallingMode_initEntries();
|
|
3132
|
+
return GoogleFunctionCallingMode_AUTO_instance;
|
|
3133
|
+
}
|
|
3134
|
+
function GoogleFunctionCallingMode_ANY_getInstance() {
|
|
3135
|
+
GoogleFunctionCallingMode_initEntries();
|
|
3136
|
+
return GoogleFunctionCallingMode_ANY_instance;
|
|
3137
|
+
}
|
|
3138
|
+
function GoogleFunctionCallingMode_NONE_getInstance() {
|
|
3139
|
+
GoogleFunctionCallingMode_initEntries();
|
|
3140
|
+
return GoogleFunctionCallingMode_NONE_instance;
|
|
3141
|
+
}
|
|
3142
|
+
function GoogleLLMClient$Companion$logger$lambda() {
|
|
3143
|
+
return Unit_instance;
|
|
3144
|
+
}
|
|
3145
|
+
function GoogleLLMClient$executeStreaming$slambda$slambda$slambda(this$0, $this_streamFrameFlow, resultContinuation) {
|
|
3146
|
+
this.n8y_1 = this$0;
|
|
3147
|
+
this.o8y_1 = $this_streamFrameFlow;
|
|
3148
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
3149
|
+
}
|
|
3150
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda$slambda$slambda).b7x = function (event, $completion) {
|
|
3151
|
+
var tmp = this.c7x(event, $completion);
|
|
3152
|
+
tmp.z9_1 = Unit_instance;
|
|
3153
|
+
tmp.aa_1 = null;
|
|
3154
|
+
return tmp.fa();
|
|
3155
|
+
};
|
|
3156
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda$slambda$slambda).ra = function (p1, $completion) {
|
|
3157
|
+
return this.b7x(p1 instanceof ServerSentEvent ? p1 : THROW_CCE(), $completion);
|
|
3158
|
+
};
|
|
3159
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda$slambda$slambda).fa = function () {
|
|
3160
|
+
var suspendResult = this.z9_1;
|
|
3161
|
+
$sm: do
|
|
3162
|
+
try {
|
|
3163
|
+
var tmp = this.x9_1;
|
|
3164
|
+
switch (tmp) {
|
|
3165
|
+
case 0:
|
|
3166
|
+
this.y9_1 = 11;
|
|
3167
|
+
var tmp_0 = this;
|
|
3168
|
+
var this_0 = this.p8y_1;
|
|
3169
|
+
var tmp_1;
|
|
3170
|
+
if (!(this_0.k63_1 === '[DONE]')) {
|
|
3171
|
+
tmp_1 = this_0;
|
|
3172
|
+
} else {
|
|
3173
|
+
tmp_1 = null;
|
|
3174
|
+
}
|
|
3175
|
+
|
|
3176
|
+
var tmp0_safe_receiver = tmp_1;
|
|
3177
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.k63_1;
|
|
3178
|
+
var tmp_2;
|
|
3179
|
+
if (tmp1_safe_receiver == null) {
|
|
3180
|
+
tmp_2 = null;
|
|
3181
|
+
} else {
|
|
3182
|
+
tmp_2 = toString(trim(isCharSequence(tmp1_safe_receiver) ? tmp1_safe_receiver : THROW_CCE()));
|
|
3183
|
+
}
|
|
3184
|
+
|
|
3185
|
+
var tmp2_safe_receiver = tmp_2;
|
|
3186
|
+
var tmp_3;
|
|
3187
|
+
if (tmp2_safe_receiver == null) {
|
|
3188
|
+
tmp_3 = null;
|
|
3189
|
+
} else {
|
|
3190
|
+
var this_1 = this.n8y_1.v8z_1;
|
|
3191
|
+
var this_2 = this_1.lz();
|
|
3192
|
+
var this_3 = serializer(this_2, createKType(getKClass(GoogleResponse), arrayOf([]), false));
|
|
3193
|
+
tmp_3 = this_1.hw(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), tmp2_safe_receiver);
|
|
3194
|
+
}
|
|
3195
|
+
|
|
3196
|
+
tmp_0.q8y_1 = tmp_3;
|
|
3197
|
+
if (this.q8y_1 == null) {
|
|
3198
|
+
this.r8y_1 = null;
|
|
3199
|
+
this.x9_1 = 10;
|
|
3200
|
+
continue $sm;
|
|
3201
|
+
} else {
|
|
3202
|
+
var tmp_4 = this;
|
|
3203
|
+
tmp_4.s8y_1 = this.q8y_1;
|
|
3204
|
+
this.t8y_1 = this.s8y_1;
|
|
3205
|
+
var tmp_5 = this;
|
|
3206
|
+
tmp_5.u8y_1 = this.t8y_1;
|
|
3207
|
+
this.v8y_1 = this.u8y_1;
|
|
3208
|
+
var tmp_6 = this;
|
|
3209
|
+
var tmp0_safe_receiver_0 = this.v8y_1.t8t_1;
|
|
3210
|
+
var tmp_7;
|
|
3211
|
+
if (tmp0_safe_receiver_0 == null) {
|
|
3212
|
+
tmp_7 = null;
|
|
3213
|
+
} else {
|
|
3214
|
+
tmp_7 = Companion_getInstance().d46(this.n8y_1.u8z_1, tmp0_safe_receiver_0.j8u_1, tmp0_safe_receiver_0.f8u_1, tmp0_safe_receiver_0.g8u_1);
|
|
3215
|
+
}
|
|
3216
|
+
tmp_6.w8y_1 = tmp_7;
|
|
3217
|
+
this.x8y_1 = firstOrNull(this.v8y_1.r8t_1);
|
|
3218
|
+
if (this.x8y_1 == null) {
|
|
3219
|
+
this.y8y_1 = null;
|
|
3220
|
+
this.x9_1 = 9;
|
|
3221
|
+
continue $sm;
|
|
3222
|
+
} else {
|
|
3223
|
+
var tmp_8 = this;
|
|
3224
|
+
tmp_8.z8y_1 = this.x8y_1;
|
|
3225
|
+
this.a8z_1 = this.z8y_1;
|
|
3226
|
+
var tmp_9 = this;
|
|
3227
|
+
tmp_9.b8z_1 = this.a8z_1;
|
|
3228
|
+
this.c8z_1 = this.b8z_1;
|
|
3229
|
+
var tmp_10 = this;
|
|
3230
|
+
var tmp0_safe_receiver_1 = this.c8z_1.n8u_1;
|
|
3231
|
+
tmp_10.d8z_1 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.o8v_1;
|
|
3232
|
+
if (this.d8z_1 == null) {
|
|
3233
|
+
this.e8z_1 = null;
|
|
3234
|
+
this.x9_1 = 6;
|
|
3235
|
+
continue $sm;
|
|
3236
|
+
} else {
|
|
3237
|
+
var tmp_11 = this;
|
|
3238
|
+
tmp_11.f8z_1 = this.d8z_1;
|
|
3239
|
+
this.g8z_1 = this.f8z_1;
|
|
3240
|
+
this.h8z_1 = this.g8z_1.p();
|
|
3241
|
+
this.x9_1 = 1;
|
|
3242
|
+
continue $sm;
|
|
3243
|
+
}
|
|
3244
|
+
}
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
case 1:
|
|
3248
|
+
if (!this.h8z_1.q()) {
|
|
3249
|
+
this.x9_1 = 5;
|
|
3250
|
+
continue $sm;
|
|
3251
|
+
}
|
|
3252
|
+
|
|
3253
|
+
this.i8z_1 = this.h8z_1.r();
|
|
3254
|
+
var tmp_12 = this;
|
|
3255
|
+
tmp_12.j8z_1 = this.i8z_1;
|
|
3256
|
+
this.k8z_1 = this.j8z_1;
|
|
3257
|
+
this.l8z_1 = this.k8z_1;
|
|
3258
|
+
var tmp_13 = this.l8z_1;
|
|
3259
|
+
if (tmp_13 instanceof FunctionCall) {
|
|
3260
|
+
this.x9_1 = 3;
|
|
3261
|
+
var tmp1_safe_receiver_0 = this.k8z_1.f8v_1.d8w_1;
|
|
3262
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.toString();
|
|
3263
|
+
suspendResult = emitToolCall(this.o8y_1, this.k8z_1.f8v_1.b8w_1, this.k8z_1.f8v_1.c8w_1, tmp2_elvis_lhs == null ? '{}' : tmp2_elvis_lhs, this);
|
|
3264
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3265
|
+
return suspendResult;
|
|
3266
|
+
}
|
|
3267
|
+
continue $sm;
|
|
3268
|
+
} else {
|
|
3269
|
+
var tmp_14 = this.l8z_1;
|
|
3270
|
+
if (tmp_14 instanceof Text_0) {
|
|
3271
|
+
this.x9_1 = 2;
|
|
3272
|
+
suspendResult = emitAppend(this.o8y_1, this.k8z_1.t8u_1, this);
|
|
3273
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3274
|
+
return suspendResult;
|
|
3275
|
+
}
|
|
3276
|
+
continue $sm;
|
|
3277
|
+
} else {
|
|
3278
|
+
this.x9_1 = 4;
|
|
3279
|
+
continue $sm;
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3283
|
+
case 2:
|
|
3284
|
+
this.x9_1 = 4;
|
|
3285
|
+
continue $sm;
|
|
3286
|
+
case 3:
|
|
3287
|
+
this.x9_1 = 4;
|
|
3288
|
+
continue $sm;
|
|
3289
|
+
case 4:
|
|
3290
|
+
this.x9_1 = 1;
|
|
3291
|
+
continue $sm;
|
|
3292
|
+
case 5:
|
|
3293
|
+
this.e8z_1 = Unit_instance;
|
|
3294
|
+
this.x9_1 = 6;
|
|
3295
|
+
continue $sm;
|
|
3296
|
+
case 6:
|
|
3297
|
+
this.m8z_1 = this.c8z_1.o8u_1;
|
|
3298
|
+
if (this.m8z_1 == null) {
|
|
3299
|
+
this.n8z_1 = null;
|
|
3300
|
+
this.x9_1 = 8;
|
|
3301
|
+
continue $sm;
|
|
3302
|
+
} else {
|
|
3303
|
+
var tmp_15 = this;
|
|
3304
|
+
tmp_15.o8z_1 = this.m8z_1;
|
|
3305
|
+
this.p8z_1 = this.o8z_1;
|
|
3306
|
+
var tmp_16 = this;
|
|
3307
|
+
tmp_16.q8z_1 = this.p8z_1;
|
|
3308
|
+
this.r8z_1 = this.q8z_1;
|
|
3309
|
+
this.x9_1 = 7;
|
|
3310
|
+
suspendResult = emitEnd(this.o8y_1, this.r8z_1, this.w8y_1, this);
|
|
3311
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3312
|
+
return suspendResult;
|
|
3313
|
+
}
|
|
3314
|
+
continue $sm;
|
|
3315
|
+
}
|
|
3316
|
+
|
|
3317
|
+
case 7:
|
|
3318
|
+
var tmp_17 = this;
|
|
3319
|
+
tmp_17.n8z_1 = Unit_instance;
|
|
3320
|
+
this.x9_1 = 8;
|
|
3321
|
+
continue $sm;
|
|
3322
|
+
case 8:
|
|
3323
|
+
var tmp_18 = this;
|
|
3324
|
+
tmp_18.y8y_1 = Unit_instance;
|
|
3325
|
+
this.x9_1 = 9;
|
|
3326
|
+
continue $sm;
|
|
3327
|
+
case 9:
|
|
3328
|
+
var tmp_19 = this;
|
|
3329
|
+
tmp_19.r8y_1 = Unit_instance;
|
|
3330
|
+
this.x9_1 = 10;
|
|
3331
|
+
continue $sm;
|
|
3332
|
+
case 10:
|
|
3333
|
+
return Unit_instance;
|
|
3334
|
+
case 11:
|
|
3335
|
+
throw this.aa_1;
|
|
3336
|
+
}
|
|
3337
|
+
} catch ($p) {
|
|
3338
|
+
var e = $p;
|
|
3339
|
+
if (this.y9_1 === 11) {
|
|
3340
|
+
throw e;
|
|
3341
|
+
} else {
|
|
3342
|
+
this.x9_1 = this.y9_1;
|
|
3343
|
+
this.aa_1 = e;
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3346
|
+
while (true);
|
|
3347
|
+
};
|
|
3348
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda$slambda$slambda).c7x = function (event, completion) {
|
|
3349
|
+
var i = new GoogleLLMClient$executeStreaming$slambda$slambda$slambda(this.n8y_1, this.o8y_1, completion);
|
|
3350
|
+
i.p8y_1 = event;
|
|
3351
|
+
return i;
|
|
3352
|
+
};
|
|
3353
|
+
function GoogleLLMClient$executeStreaming$slambda$slambda$slambda_0(this$0, $this_streamFrameFlow, resultContinuation) {
|
|
3354
|
+
var i = new GoogleLLMClient$executeStreaming$slambda$slambda$slambda(this$0, $this_streamFrameFlow, resultContinuation);
|
|
3355
|
+
var l = function (event, $completion) {
|
|
3356
|
+
return i.b7x(event, $completion);
|
|
3357
|
+
};
|
|
3358
|
+
l.$arity = 1;
|
|
3359
|
+
return l;
|
|
3360
|
+
}
|
|
3361
|
+
function GoogleLLMClient$executeStreaming$slambda$lambda($prompt, $model) {
|
|
3362
|
+
return function () {
|
|
3363
|
+
return 'Executing streaming prompt: ' + $prompt.toString() + ' with model: ' + $model.toString();
|
|
3364
|
+
};
|
|
3365
|
+
}
|
|
3366
|
+
function GoogleLLMClient$executeStreaming$slambda$lambda$lambda($this$headers) {
|
|
3367
|
+
$this$headers.n4z(HttpHeaders_getInstance().p59_1, 'no-cache');
|
|
3368
|
+
$this$headers.n4z(HttpHeaders_getInstance().q59_1, 'keep-alive');
|
|
3369
|
+
return Unit_instance;
|
|
3370
|
+
}
|
|
3371
|
+
function GoogleLLMClient$executeStreaming$slambda$lambda_0($request) {
|
|
3372
|
+
return function ($this$sse) {
|
|
3373
|
+
$this$sse.x65_1 = Companion_getInstance_0().m5d_1;
|
|
3374
|
+
parameter($this$sse, 'alt', 'sse');
|
|
3375
|
+
accept($this$sse, Text_getInstance().u58_1);
|
|
3376
|
+
headers(GoogleLLMClient$executeStreaming$slambda$lambda$lambda);
|
|
3377
|
+
// Inline function 'io.ktor.client.request.setBody' call
|
|
3378
|
+
var body = $request;
|
|
3379
|
+
if (body == null) {
|
|
3380
|
+
$this$sse.z65_1 = NullBody_instance;
|
|
3381
|
+
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
3382
|
+
var tmp = getKClass(GoogleRequest);
|
|
3383
|
+
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
3384
|
+
var tmp_0;
|
|
3385
|
+
try {
|
|
3386
|
+
tmp_0 = createKType(getKClass(GoogleRequest), arrayOf([]), false);
|
|
3387
|
+
} catch ($p) {
|
|
3388
|
+
var tmp_1;
|
|
3389
|
+
if ($p instanceof Error) {
|
|
3390
|
+
var _unused_var__etf5q3 = $p;
|
|
3391
|
+
tmp_1 = null;
|
|
3392
|
+
} else {
|
|
3393
|
+
throw $p;
|
|
3394
|
+
}
|
|
3395
|
+
tmp_0 = tmp_1;
|
|
3396
|
+
}
|
|
3397
|
+
var tmp$ret$0 = tmp_0;
|
|
3398
|
+
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
3399
|
+
$this$sse.j6c(tmp$ret$1);
|
|
3400
|
+
} else {
|
|
3401
|
+
if (body instanceof OutgoingContent) {
|
|
3402
|
+
$this$sse.z65_1 = body;
|
|
3403
|
+
$this$sse.j6c(null);
|
|
3404
|
+
} else {
|
|
3405
|
+
$this$sse.z65_1 = body;
|
|
3406
|
+
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
3407
|
+
var tmp_2 = getKClass(GoogleRequest);
|
|
3408
|
+
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
3409
|
+
var tmp_3;
|
|
3410
|
+
try {
|
|
3411
|
+
tmp_3 = createKType(getKClass(GoogleRequest), arrayOf([]), false);
|
|
3412
|
+
} catch ($p) {
|
|
3413
|
+
var tmp_4;
|
|
3414
|
+
if ($p instanceof Error) {
|
|
3415
|
+
var _unused_var__etf5q3_0 = $p;
|
|
3416
|
+
tmp_4 = null;
|
|
3417
|
+
} else {
|
|
3418
|
+
throw $p;
|
|
3419
|
+
}
|
|
3420
|
+
tmp_3 = tmp_4;
|
|
3421
|
+
}
|
|
3422
|
+
var tmp$ret$2 = tmp_3;
|
|
3423
|
+
var tmp$ret$3 = new TypeInfo(tmp_2, tmp$ret$2);
|
|
3424
|
+
$this$sse.j6c(tmp$ret$3);
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
return Unit_instance;
|
|
3428
|
+
};
|
|
3429
|
+
}
|
|
3430
|
+
function GoogleLLMClient$executeStreaming$slambda$slambda(this$0, $this_streamFrameFlow, resultContinuation) {
|
|
3431
|
+
this.f90_1 = this$0;
|
|
3432
|
+
this.g90_1 = $this_streamFrameFlow;
|
|
3433
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
3434
|
+
}
|
|
3435
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda$slambda).n7y = function ($this$sse, $completion) {
|
|
3436
|
+
var tmp = this.o7y($this$sse, $completion);
|
|
3437
|
+
tmp.z9_1 = Unit_instance;
|
|
3438
|
+
tmp.aa_1 = null;
|
|
3439
|
+
return tmp.fa();
|
|
3440
|
+
};
|
|
3441
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda$slambda).ra = function (p1, $completion) {
|
|
3442
|
+
return this.n7y(p1 instanceof ClientSSESession ? p1 : THROW_CCE(), $completion);
|
|
3443
|
+
};
|
|
3444
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda$slambda).fa = function () {
|
|
3445
|
+
var suspendResult = this.z9_1;
|
|
3446
|
+
$sm: do
|
|
3447
|
+
try {
|
|
3448
|
+
var tmp = this.x9_1;
|
|
3449
|
+
switch (tmp) {
|
|
3450
|
+
case 0:
|
|
3451
|
+
this.y9_1 = 2;
|
|
3452
|
+
this.x9_1 = 1;
|
|
3453
|
+
var tmp_0 = this.h90_1.y6z();
|
|
3454
|
+
var tmp_1 = GoogleLLMClient$executeStreaming$slambda$slambda$slambda_0(this.f90_1, this.g90_1, null);
|
|
3455
|
+
suspendResult = tmp_0.g2k(new sam$kotlinx_coroutines_flow_FlowCollector$0(tmp_1), this);
|
|
3456
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3457
|
+
return suspendResult;
|
|
3458
|
+
}
|
|
3459
|
+
|
|
3460
|
+
continue $sm;
|
|
3461
|
+
case 1:
|
|
3462
|
+
return Unit_instance;
|
|
3463
|
+
case 2:
|
|
3464
|
+
throw this.aa_1;
|
|
3465
|
+
}
|
|
3466
|
+
} catch ($p) {
|
|
3467
|
+
var e = $p;
|
|
3468
|
+
if (this.y9_1 === 2) {
|
|
3469
|
+
throw e;
|
|
3470
|
+
} else {
|
|
3471
|
+
this.x9_1 = this.y9_1;
|
|
3472
|
+
this.aa_1 = e;
|
|
3473
|
+
}
|
|
3474
|
+
}
|
|
3475
|
+
while (true);
|
|
3476
|
+
};
|
|
3477
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda$slambda).o7y = function ($this$sse, completion) {
|
|
3478
|
+
var i = new GoogleLLMClient$executeStreaming$slambda$slambda(this.f90_1, this.g90_1, completion);
|
|
3479
|
+
i.h90_1 = $this$sse;
|
|
3480
|
+
return i;
|
|
3481
|
+
};
|
|
3482
|
+
function GoogleLLMClient$executeStreaming$slambda$slambda_0(this$0, $this_streamFrameFlow, resultContinuation) {
|
|
3483
|
+
var i = new GoogleLLMClient$executeStreaming$slambda$slambda(this$0, $this_streamFrameFlow, resultContinuation);
|
|
3484
|
+
var l = function ($this$sse, $completion) {
|
|
3485
|
+
return i.n7y($this$sse, $completion);
|
|
3486
|
+
};
|
|
3487
|
+
l.$arity = 1;
|
|
3488
|
+
return l;
|
|
3489
|
+
}
|
|
3490
|
+
function GoogleLLMClient$executeStreaming$slambda$lambda_1($response, $e) {
|
|
3491
|
+
return function () {
|
|
3492
|
+
return 'Error from GoogleAI API: ' + $response.a5j().toString() + ': ' + $e.x75_1;
|
|
3493
|
+
};
|
|
3494
|
+
}
|
|
3495
|
+
function GoogleLLMClient$executeStreaming$slambda$lambda_2($e) {
|
|
3496
|
+
return function () {
|
|
3497
|
+
return 'Exception during streaming: ' + $e.toString();
|
|
3498
|
+
};
|
|
3499
|
+
}
|
|
3500
|
+
function GoogleLLMClient$getGoogleResponse$slambda$lambda($response, $errorBody) {
|
|
3501
|
+
return function () {
|
|
3502
|
+
return 'Error from GoogleAI API: ' + $response.a5j().toString() + ': ' + $errorBody;
|
|
3503
|
+
};
|
|
3504
|
+
}
|
|
3505
|
+
function Companion_20() {
|
|
3506
|
+
Companion_instance_20 = this;
|
|
3507
|
+
var tmp = this;
|
|
3508
|
+
var tmp_0 = KotlinLogging_instance;
|
|
3509
|
+
tmp.i90_1 = tmp_0.a3j(GoogleLLMClient$Companion$logger$lambda);
|
|
3510
|
+
this.j90_1 = 'v1beta/models';
|
|
3511
|
+
this.k90_1 = 'generateContent';
|
|
3512
|
+
this.l90_1 = 'streamGenerateContent';
|
|
3513
|
+
var tmp0 = get_RegisteredBasicJsonSchemaGenerators();
|
|
3514
|
+
var tmp2 = Google_getInstance();
|
|
3515
|
+
// Inline function 'kotlin.collections.set' call
|
|
3516
|
+
var value = Companion_getInstance_24();
|
|
3517
|
+
tmp0.r2(tmp2, value);
|
|
3518
|
+
var tmp0_0 = get_RegisteredStandardJsonSchemaGenerators();
|
|
3519
|
+
var tmp2_0 = Google_getInstance();
|
|
3520
|
+
// Inline function 'kotlin.collections.set' call
|
|
3521
|
+
var value_0 = Companion_getInstance_25();
|
|
3522
|
+
tmp0_0.r2(tmp2_0, value_0);
|
|
3523
|
+
}
|
|
3524
|
+
var Companion_instance_20;
|
|
3525
|
+
function Companion_getInstance_23() {
|
|
3526
|
+
if (Companion_instance_20 == null)
|
|
3527
|
+
new Companion_20();
|
|
3528
|
+
return Companion_instance_20;
|
|
3529
|
+
}
|
|
3530
|
+
function getGoogleResponse($this, prompt, model, tools, $completion) {
|
|
3531
|
+
var tmp = new $getGoogleResponseCOROUTINE$($this, prompt, model, tools, $completion);
|
|
3532
|
+
tmp.z9_1 = Unit_instance;
|
|
3533
|
+
tmp.aa_1 = null;
|
|
3534
|
+
return tmp.fa();
|
|
3535
|
+
}
|
|
3536
|
+
function toGoogleContent($this, _this__u8e3s4, model) {
|
|
3537
|
+
// Inline function 'kotlin.collections.buildList' call
|
|
3538
|
+
// Inline function 'kotlin.collections.buildListInternal' call
|
|
3539
|
+
// Inline function 'kotlin.apply' call
|
|
3540
|
+
var this_0 = ArrayList_init_$Create$();
|
|
3541
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
3542
|
+
var _iterator__ex2g4s = _this__u8e3s4.e48_1.p();
|
|
3543
|
+
while (_iterator__ex2g4s.q()) {
|
|
3544
|
+
var element = _iterator__ex2g4s.r();
|
|
3545
|
+
if (element instanceof Text) {
|
|
3546
|
+
this_0.h(new Text_0(element.x46_1));
|
|
3547
|
+
} else {
|
|
3548
|
+
if (element instanceof Image) {
|
|
3549
|
+
// Inline function 'kotlin.require' call
|
|
3550
|
+
if (!model.d3i_1.w(Image_getInstance())) {
|
|
3551
|
+
var message = 'Model ' + model.c3i_1 + ' does not support images';
|
|
3552
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3553
|
+
}
|
|
3554
|
+
var content = element.b47_1;
|
|
3555
|
+
var tmp;
|
|
3556
|
+
if (isInterface(content, Binary)) {
|
|
3557
|
+
tmp = new Blob(element.d47_1, content.u46());
|
|
3558
|
+
} else {
|
|
3559
|
+
throw IllegalArgumentException_init_$Create$('Unsupported image attachment content: ' + toString(getKClassFromExpression(content)));
|
|
3560
|
+
}
|
|
3561
|
+
var blob = tmp;
|
|
3562
|
+
this_0.h(new InlineData(blob));
|
|
3563
|
+
} else {
|
|
3564
|
+
if (element instanceof Audio) {
|
|
3565
|
+
// Inline function 'kotlin.require' call
|
|
3566
|
+
if (!model.d3i_1.w(Audio_getInstance())) {
|
|
3567
|
+
var message_0 = 'Model ' + model.c3i_1 + ' does not support audio';
|
|
3568
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
3569
|
+
}
|
|
3570
|
+
var content_0 = element.p47_1;
|
|
3571
|
+
var tmp_0;
|
|
3572
|
+
if (isInterface(content_0, Binary)) {
|
|
3573
|
+
tmp_0 = new Blob(element.r47_1, content_0.u46());
|
|
3574
|
+
} else {
|
|
3575
|
+
throw IllegalArgumentException_init_$Create$('Unsupported audio attachment content: ' + toString(getKClassFromExpression(content_0)));
|
|
3576
|
+
}
|
|
3577
|
+
var blob_0 = tmp_0;
|
|
3578
|
+
this_0.h(new InlineData(blob_0));
|
|
3579
|
+
} else {
|
|
3580
|
+
if (element instanceof File) {
|
|
3581
|
+
// Inline function 'kotlin.require' call
|
|
3582
|
+
if (!model.d3i_1.w(Document_getInstance())) {
|
|
3583
|
+
var message_1 = 'Model ' + model.c3i_1 + ' does not support documents';
|
|
3584
|
+
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
3585
|
+
}
|
|
3586
|
+
var content_1 = element.w47_1;
|
|
3587
|
+
var tmp_1;
|
|
3588
|
+
if (isInterface(content_1, Binary)) {
|
|
3589
|
+
tmp_1 = new Blob(element.y47_1, content_1.u46());
|
|
3590
|
+
} else {
|
|
3591
|
+
throw IllegalArgumentException_init_$Create$('Unsupported file attachment content: ' + toString(getKClassFromExpression(content_1)));
|
|
3592
|
+
}
|
|
3593
|
+
var blob_1 = tmp_1;
|
|
3594
|
+
this_0.h(new InlineData(blob_1));
|
|
3595
|
+
} else {
|
|
3596
|
+
if (element instanceof Video) {
|
|
3597
|
+
// Inline function 'kotlin.require' call
|
|
3598
|
+
if (!model.d3i_1.w(Video_getInstance())) {
|
|
3599
|
+
var message_2 = 'Model ' + model.c3i_1 + ' does not support video';
|
|
3600
|
+
throw IllegalArgumentException_init_$Create$(toString(message_2));
|
|
3601
|
+
}
|
|
3602
|
+
var content_2 = element.i47_1;
|
|
3603
|
+
var tmp_2;
|
|
3604
|
+
if (isInterface(content_2, Binary)) {
|
|
3605
|
+
tmp_2 = new Blob(element.k47_1, content_2.u46());
|
|
3606
|
+
} else {
|
|
3607
|
+
throw IllegalArgumentException_init_$Create$('Unsupported video attachment content: ' + toString(getKClassFromExpression(content_2)));
|
|
3608
|
+
}
|
|
3609
|
+
var blob_2 = tmp_2;
|
|
3610
|
+
this_0.h(new InlineData(blob_2));
|
|
3611
|
+
} else {
|
|
3612
|
+
noWhenBranchMatchedException();
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3616
|
+
}
|
|
3617
|
+
}
|
|
3618
|
+
}
|
|
3619
|
+
var contentParts = this_0.e4();
|
|
3620
|
+
return new GoogleContent(contentParts, 'user');
|
|
3621
|
+
}
|
|
3622
|
+
function buildGoogleParamType($this, param) {
|
|
3623
|
+
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
3624
|
+
var builder = new JsonObjectBuilder();
|
|
3625
|
+
builder.g1k('description', JsonPrimitive(param.w7y_1));
|
|
3626
|
+
buildGoogleParamType$_anonymous_$putType_f6ydoy(builder, param.x7y_1);
|
|
3627
|
+
return builder.s1i();
|
|
3628
|
+
}
|
|
3629
|
+
function processGoogleCandidate($this, candidate, metaInfo) {
|
|
3630
|
+
var tmp0_safe_receiver = candidate.n8u_1;
|
|
3631
|
+
// Inline function 'kotlin.collections.orEmpty' call
|
|
3632
|
+
var tmp0_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o8v_1;
|
|
3633
|
+
var parts = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
3634
|
+
// Inline function 'kotlin.collections.map' call
|
|
3635
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
3636
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(parts, 10));
|
|
3637
|
+
var _iterator__ex2g4s = parts.p();
|
|
3638
|
+
while (_iterator__ex2g4s.q()) {
|
|
3639
|
+
var item = _iterator__ex2g4s.r();
|
|
3640
|
+
var tmp;
|
|
3641
|
+
if (item instanceof Text_0) {
|
|
3642
|
+
var tmp1_content = item.t8u_1;
|
|
3643
|
+
var tmp2_finishReason = candidate.o8u_1;
|
|
3644
|
+
tmp = Assistant_init_$Create$(tmp1_content, metaInfo, tmp2_finishReason);
|
|
3645
|
+
} else {
|
|
3646
|
+
if (item instanceof FunctionCall) {
|
|
3647
|
+
tmp = Call_init_$Create$(Companion_getInstance_1().et().toString(), item.f8v_1.c8w_1, toString_0(item.f8v_1.d8w_1), metaInfo);
|
|
3648
|
+
} else {
|
|
3649
|
+
var message = 'Not supported part type: ' + toString(item);
|
|
3650
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
3651
|
+
}
|
|
3652
|
+
}
|
|
3653
|
+
var tmp$ret$1 = tmp;
|
|
3654
|
+
destination.h(tmp$ret$1);
|
|
3655
|
+
}
|
|
3656
|
+
var responses = destination;
|
|
3657
|
+
var tmp_0;
|
|
3658
|
+
var tmp$ret$4;
|
|
3659
|
+
$l$block_0: {
|
|
3660
|
+
// Inline function 'kotlin.collections.any' call
|
|
3661
|
+
var tmp_1;
|
|
3662
|
+
if (isInterface(responses, Collection)) {
|
|
3663
|
+
tmp_1 = responses.m();
|
|
3664
|
+
} else {
|
|
3665
|
+
tmp_1 = false;
|
|
3666
|
+
}
|
|
3667
|
+
if (tmp_1) {
|
|
3668
|
+
tmp$ret$4 = false;
|
|
3669
|
+
break $l$block_0;
|
|
3670
|
+
}
|
|
3671
|
+
var _iterator__ex2g4s_0 = responses.p();
|
|
3672
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
3673
|
+
var element = _iterator__ex2g4s_0.r();
|
|
3674
|
+
if (element instanceof Call) {
|
|
3675
|
+
tmp$ret$4 = true;
|
|
3676
|
+
break $l$block_0;
|
|
3677
|
+
}
|
|
3678
|
+
}
|
|
3679
|
+
tmp$ret$4 = false;
|
|
3680
|
+
}
|
|
3681
|
+
if (tmp$ret$4) {
|
|
3682
|
+
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
3683
|
+
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
3684
|
+
var destination_0 = ArrayList_init_$Create$();
|
|
3685
|
+
var _iterator__ex2g4s_1 = responses.p();
|
|
3686
|
+
while (_iterator__ex2g4s_1.q()) {
|
|
3687
|
+
var element_0 = _iterator__ex2g4s_1.r();
|
|
3688
|
+
if (element_0 instanceof Call) {
|
|
3689
|
+
destination_0.h(element_0);
|
|
3690
|
+
}
|
|
3691
|
+
}
|
|
3692
|
+
tmp_0 = destination_0;
|
|
3693
|
+
} else {
|
|
3694
|
+
if (responses.m()) {
|
|
3695
|
+
var tmp1_finishReason = candidate.o8u_1;
|
|
3696
|
+
tmp_0 = listOf(Assistant_init_$Create$('', metaInfo, tmp1_finishReason));
|
|
3697
|
+
} else {
|
|
3698
|
+
tmp_0 = responses;
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3701
|
+
return tmp_0;
|
|
3702
|
+
}
|
|
3703
|
+
function processGoogleResponse($this, response) {
|
|
3704
|
+
if (response.r8t_1.m()) {
|
|
3705
|
+
var tmp = Companion_getInstance_23().i90_1;
|
|
3706
|
+
tmp.r3i(GoogleLLMClient$processGoogleResponse$lambda);
|
|
3707
|
+
// Inline function 'kotlin.error' call
|
|
3708
|
+
var message = 'Empty candidates in Gemini response';
|
|
3709
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
3710
|
+
}
|
|
3711
|
+
var tmp0_safe_receiver = response.t8t_1;
|
|
3712
|
+
var inputTokensCount = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f8u_1;
|
|
3713
|
+
var tmp1_safe_receiver = response.t8t_1;
|
|
3714
|
+
var outputTokensCount = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g8u_1;
|
|
3715
|
+
var tmp2_safe_receiver = response.t8t_1;
|
|
3716
|
+
var totalTokensCount = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.j8u_1;
|
|
3717
|
+
var metaInfo = Companion_getInstance().d46($this.u8z_1, totalTokensCount, inputTokensCount, outputTokensCount);
|
|
3718
|
+
// Inline function 'kotlin.collections.map' call
|
|
3719
|
+
var this_0 = response.r8t_1;
|
|
3720
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
3721
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
3722
|
+
var _iterator__ex2g4s = this_0.p();
|
|
3723
|
+
while (_iterator__ex2g4s.q()) {
|
|
3724
|
+
var item = _iterator__ex2g4s.r();
|
|
3725
|
+
var tmp$ret$0 = processGoogleCandidate($this, item, metaInfo);
|
|
3726
|
+
destination.h(tmp$ret$0);
|
|
3727
|
+
}
|
|
3728
|
+
return destination;
|
|
3729
|
+
}
|
|
3730
|
+
function sam$kotlinx_coroutines_flow_FlowCollector$0(function_0) {
|
|
3731
|
+
this.z90_1 = function_0;
|
|
3732
|
+
}
|
|
3733
|
+
protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).b2l = function (value, $completion) {
|
|
3734
|
+
return this.z90_1(value, $completion);
|
|
3735
|
+
};
|
|
3736
|
+
protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).v3 = function () {
|
|
3737
|
+
return this.z90_1;
|
|
3738
|
+
};
|
|
3739
|
+
protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).equals = function (other) {
|
|
3740
|
+
var tmp;
|
|
3741
|
+
if (!(other == null) ? isInterface(other, FlowCollector) : false) {
|
|
3742
|
+
var tmp_0;
|
|
3743
|
+
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
3744
|
+
tmp_0 = equals(this.v3(), other.v3());
|
|
3745
|
+
} else {
|
|
3746
|
+
tmp_0 = false;
|
|
3747
|
+
}
|
|
3748
|
+
tmp = tmp_0;
|
|
3749
|
+
} else {
|
|
3750
|
+
tmp = false;
|
|
3751
|
+
}
|
|
3752
|
+
return tmp;
|
|
3753
|
+
};
|
|
3754
|
+
protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).hashCode = function () {
|
|
3755
|
+
return hashCode(this.v3());
|
|
3756
|
+
};
|
|
3757
|
+
function createGoogleRequest$flushCalls(pendingCalls, contents) {
|
|
3758
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
3759
|
+
if (!pendingCalls.m()) {
|
|
3760
|
+
var tmp0_parts = toList(pendingCalls);
|
|
3761
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
3762
|
+
var element = new GoogleContent(tmp0_parts, 'model');
|
|
3763
|
+
contents.h(element);
|
|
3764
|
+
pendingCalls.n2();
|
|
3765
|
+
}
|
|
3766
|
+
}
|
|
3767
|
+
function buildGoogleParamType$_anonymous_$putType_f6ydoy(_this__u8e3s4, type) {
|
|
3768
|
+
if (equals(type, Boolean_getInstance()))
|
|
3769
|
+
put(_this__u8e3s4, 'type', 'boolean');
|
|
3770
|
+
else {
|
|
3771
|
+
if (equals(type, Float_getInstance()))
|
|
3772
|
+
put(_this__u8e3s4, 'type', 'number');
|
|
3773
|
+
else {
|
|
3774
|
+
if (equals(type, Integer_getInstance()))
|
|
3775
|
+
put(_this__u8e3s4, 'type', 'integer');
|
|
3776
|
+
else {
|
|
3777
|
+
if (equals(type, String_getInstance()))
|
|
3778
|
+
put(_this__u8e3s4, 'type', 'string');
|
|
3779
|
+
else {
|
|
3780
|
+
if (type instanceof Enum_0) {
|
|
3781
|
+
put(_this__u8e3s4, 'type', 'string');
|
|
3782
|
+
putJsonArray(_this__u8e3s4, 'enum', GoogleLLMClient$buildGoogleParamType$_anonymous_$putType$lambda_feev3c(type));
|
|
3783
|
+
} else {
|
|
3784
|
+
if (type instanceof List) {
|
|
3785
|
+
put(_this__u8e3s4, 'type', 'array');
|
|
3786
|
+
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
3787
|
+
var builder = new JsonObjectBuilder();
|
|
3788
|
+
buildGoogleParamType$_anonymous_$putType_f6ydoy(builder, type.l7z_1);
|
|
3789
|
+
var tmp$ret$1 = builder.s1i();
|
|
3790
|
+
_this__u8e3s4.g1k('items', tmp$ret$1);
|
|
3791
|
+
} else {
|
|
3792
|
+
if (type instanceof Object_0) {
|
|
3793
|
+
put(_this__u8e3s4, 'type', 'object');
|
|
3794
|
+
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
3795
|
+
var builder_0 = new JsonObjectBuilder();
|
|
3796
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
3797
|
+
var _iterator__ex2g4s = type.h7z_1.p();
|
|
3798
|
+
while (_iterator__ex2g4s.q()) {
|
|
3799
|
+
var element = _iterator__ex2g4s.r();
|
|
3800
|
+
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
3801
|
+
var builder_1 = new JsonObjectBuilder();
|
|
3802
|
+
buildGoogleParamType$_anonymous_$putType_f6ydoy(builder_1, element.x7y_1);
|
|
3803
|
+
put(builder_1, 'description', element.w7y_1);
|
|
3804
|
+
var tmp$ret$3 = builder_1.s1i();
|
|
3805
|
+
builder_0.g1k(element.v7y_1, tmp$ret$3);
|
|
3806
|
+
}
|
|
3807
|
+
var tmp$ret$7 = builder_0.s1i();
|
|
3808
|
+
_this__u8e3s4.g1k('properties', tmp$ret$7);
|
|
3809
|
+
} else {
|
|
3810
|
+
noWhenBranchMatchedException();
|
|
3811
|
+
}
|
|
3812
|
+
}
|
|
3813
|
+
}
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
}
|
|
3817
|
+
}
|
|
3818
|
+
}
|
|
3819
|
+
function GoogleLLMClient$json$lambda($this$Json) {
|
|
3820
|
+
$this$Json.c1i_1 = true;
|
|
3821
|
+
$this$Json.d1i_1 = true;
|
|
3822
|
+
$this$Json.a1i_1 = true;
|
|
3823
|
+
$this$Json.b1i_1 = false;
|
|
3824
|
+
return Unit_instance;
|
|
3825
|
+
}
|
|
3826
|
+
function GoogleLLMClient$httpClient$lambda$lambda(this$0) {
|
|
3827
|
+
return function ($this$defaultRequest) {
|
|
3828
|
+
$this$defaultRequest.p6g(this$0.t8z_1.a91_1);
|
|
3829
|
+
$this$defaultRequest.j6g_1.w5g_1.n4z('key', this$0.s8z_1);
|
|
3830
|
+
contentType($this$defaultRequest, Application_getInstance().h57_1);
|
|
3831
|
+
return Unit_instance;
|
|
3832
|
+
};
|
|
3833
|
+
}
|
|
3834
|
+
function GoogleLLMClient$httpClient$lambda$lambda_0(this$0) {
|
|
3835
|
+
return function ($this$install) {
|
|
3836
|
+
json($this$install, this$0.v8z_1);
|
|
3837
|
+
return Unit_instance;
|
|
3838
|
+
};
|
|
3839
|
+
}
|
|
3840
|
+
function GoogleLLMClient$httpClient$lambda$lambda_1(this$0) {
|
|
3841
|
+
return function ($this$install) {
|
|
3842
|
+
$this$install.g6v(this$0.t8z_1.b91_1.p4f_1);
|
|
3843
|
+
$this$install.h6v(this$0.t8z_1.b91_1.q4f_1);
|
|
3844
|
+
$this$install.i6v(this$0.t8z_1.b91_1.r4f_1);
|
|
3845
|
+
return Unit_instance;
|
|
3846
|
+
};
|
|
3847
|
+
}
|
|
3848
|
+
function GoogleLLMClient$httpClient$lambda(this$0) {
|
|
3849
|
+
return function ($this$config) {
|
|
3850
|
+
defaultRequest($this$config, GoogleLLMClient$httpClient$lambda$lambda(this$0));
|
|
3851
|
+
$this$config.r66(get_SSE());
|
|
3852
|
+
var tmp = get_ContentNegotiation();
|
|
3853
|
+
$this$config.e67(tmp, GoogleLLMClient$httpClient$lambda$lambda_0(this$0));
|
|
3854
|
+
var tmp_0 = get_HttpTimeout();
|
|
3855
|
+
$this$config.e67(tmp_0, GoogleLLMClient$httpClient$lambda$lambda_1(this$0));
|
|
3856
|
+
return Unit_instance;
|
|
3857
|
+
};
|
|
3858
|
+
}
|
|
3859
|
+
function GoogleLLMClient$execute$lambda($prompt, $tools, $model) {
|
|
3860
|
+
return function () {
|
|
3861
|
+
return 'Executing prompt: ' + $prompt.toString() + ' with tools: ' + toString($tools) + ' and model: ' + $model.toString();
|
|
3862
|
+
};
|
|
3863
|
+
}
|
|
3864
|
+
function GoogleLLMClient$executeStreaming$slambda($model, this$0, $prompt, resultContinuation) {
|
|
3865
|
+
this.k91_1 = $model;
|
|
3866
|
+
this.l91_1 = this$0;
|
|
3867
|
+
this.m91_1 = $prompt;
|
|
3868
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
3869
|
+
}
|
|
3870
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda).z4d = function ($this$streamFrameFlow, $completion) {
|
|
3871
|
+
var tmp = this.a4e($this$streamFrameFlow, $completion);
|
|
3872
|
+
tmp.z9_1 = Unit_instance;
|
|
3873
|
+
tmp.aa_1 = null;
|
|
3874
|
+
return tmp.fa();
|
|
3875
|
+
};
|
|
3876
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda).ra = function (p1, $completion) {
|
|
3877
|
+
return this.z4d((!(p1 == null) ? isInterface(p1, FlowCollector) : false) ? p1 : THROW_CCE(), $completion);
|
|
3878
|
+
};
|
|
3879
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda).fa = function () {
|
|
3880
|
+
var suspendResult = this.z9_1;
|
|
3881
|
+
$sm: do
|
|
3882
|
+
try {
|
|
3883
|
+
var tmp = this.x9_1;
|
|
3884
|
+
switch (tmp) {
|
|
3885
|
+
case 0:
|
|
3886
|
+
this.y9_1 = 4;
|
|
3887
|
+
var tmp_0 = Companion_getInstance_23().i90_1;
|
|
3888
|
+
tmp_0.o3i(GoogleLLMClient$executeStreaming$slambda$lambda(this.m91_1, this.k91_1));
|
|
3889
|
+
if (!this.k91_1.d3i_1.w(Completion_getInstance())) {
|
|
3890
|
+
var message = 'Model ' + this.k91_1.c3i_1 + ' does not support chat completions';
|
|
3891
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3892
|
+
}
|
|
3893
|
+
|
|
3894
|
+
this.o91_1 = this.l91_1.q91(this.m91_1, this.k91_1, emptyList());
|
|
3895
|
+
this.y9_1 = 2;
|
|
3896
|
+
this.x9_1 = 1;
|
|
3897
|
+
var tmp_1 = 'v1beta/models/' + this.k91_1.c3i_1 + ':streamGenerateContent';
|
|
3898
|
+
var tmp_2 = GoogleLLMClient$executeStreaming$slambda$lambda_0(this.o91_1);
|
|
3899
|
+
suspendResult = sse(this.l91_1.w8z_1, tmp_1, tmp_2, VOID, VOID, VOID, GoogleLLMClient$executeStreaming$slambda$slambda_0(this.l91_1, this.n91_1, null), this);
|
|
3900
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3901
|
+
return suspendResult;
|
|
3902
|
+
}
|
|
3903
|
+
|
|
3904
|
+
continue $sm;
|
|
3905
|
+
case 1:
|
|
3906
|
+
var tmp_3 = this;
|
|
3907
|
+
tmp_3.p91_1 = Unit_instance;
|
|
3908
|
+
this.y9_1 = 4;
|
|
3909
|
+
this.x9_1 = 3;
|
|
3910
|
+
continue $sm;
|
|
3911
|
+
case 2:
|
|
3912
|
+
this.y9_1 = 4;
|
|
3913
|
+
var tmp_4 = this.aa_1;
|
|
3914
|
+
if (tmp_4 instanceof SSEClientException) {
|
|
3915
|
+
var e = this.aa_1;
|
|
3916
|
+
var tmp_5 = this;
|
|
3917
|
+
var tmp0_safe_receiver = e.v75_1;
|
|
3918
|
+
var tmp_6;
|
|
3919
|
+
if (tmp0_safe_receiver == null) {
|
|
3920
|
+
tmp_6 = null;
|
|
3921
|
+
} else {
|
|
3922
|
+
var tmp_7 = Companion_getInstance_23().i90_1;
|
|
3923
|
+
tmp_7.r3i(GoogleLLMClient$executeStreaming$slambda$lambda_1(tmp0_safe_receiver, e));
|
|
3924
|
+
var message_0 = 'Error from GoogleAI API: ' + tmp0_safe_receiver.a5j().toString() + ': ' + e.x75_1;
|
|
3925
|
+
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
3926
|
+
}
|
|
3927
|
+
tmp_5.p91_1 = tmp_6;
|
|
3928
|
+
this.x9_1 = 3;
|
|
3929
|
+
continue $sm;
|
|
3930
|
+
} else {
|
|
3931
|
+
var tmp_8 = this.aa_1;
|
|
3932
|
+
if (tmp_8 instanceof Exception) {
|
|
3933
|
+
var e_0 = this.aa_1;
|
|
3934
|
+
var tmp_9 = this;
|
|
3935
|
+
var tmp_10 = Companion_getInstance_23().i90_1;
|
|
3936
|
+
tmp_10.r3i(GoogleLLMClient$executeStreaming$slambda$lambda_2(e_0));
|
|
3937
|
+
var tmp1_elvis_lhs = e_0.message;
|
|
3938
|
+
var message_1 = tmp1_elvis_lhs == null ? 'Unknown error during streaming' : tmp1_elvis_lhs;
|
|
3939
|
+
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
3940
|
+
} else {
|
|
3941
|
+
throw this.aa_1;
|
|
3942
|
+
}
|
|
3943
|
+
}
|
|
3944
|
+
|
|
3945
|
+
case 3:
|
|
3946
|
+
this.y9_1 = 4;
|
|
3947
|
+
return Unit_instance;
|
|
3948
|
+
case 4:
|
|
3949
|
+
throw this.aa_1;
|
|
3950
|
+
}
|
|
3951
|
+
} catch ($p) {
|
|
3952
|
+
var e_1 = $p;
|
|
3953
|
+
if (this.y9_1 === 4) {
|
|
3954
|
+
throw e_1;
|
|
3955
|
+
} else {
|
|
3956
|
+
this.x9_1 = this.y9_1;
|
|
3957
|
+
this.aa_1 = e_1;
|
|
3958
|
+
}
|
|
3959
|
+
}
|
|
3960
|
+
while (true);
|
|
3961
|
+
};
|
|
3962
|
+
protoOf(GoogleLLMClient$executeStreaming$slambda).a4e = function ($this$streamFrameFlow, completion) {
|
|
3963
|
+
var i = new GoogleLLMClient$executeStreaming$slambda(this.k91_1, this.l91_1, this.m91_1, completion);
|
|
3964
|
+
i.n91_1 = $this$streamFrameFlow;
|
|
3965
|
+
return i;
|
|
3966
|
+
};
|
|
3967
|
+
function GoogleLLMClient$executeStreaming$slambda_0($model, this$0, $prompt, resultContinuation) {
|
|
3968
|
+
var i = new GoogleLLMClient$executeStreaming$slambda($model, this$0, $prompt, resultContinuation);
|
|
3969
|
+
var l = function ($this$streamFrameFlow, $completion) {
|
|
3970
|
+
return i.z4d($this$streamFrameFlow, $completion);
|
|
3971
|
+
};
|
|
3972
|
+
l.$arity = 1;
|
|
3973
|
+
return l;
|
|
3974
|
+
}
|
|
3975
|
+
function GoogleLLMClient$getGoogleResponse$slambda(this$0, $model, $request, resultContinuation) {
|
|
3976
|
+
this.z91_1 = this$0;
|
|
3977
|
+
this.a92_1 = $model;
|
|
3978
|
+
this.b92_1 = $request;
|
|
3979
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
3980
|
+
}
|
|
3981
|
+
protoOf(GoogleLLMClient$getGoogleResponse$slambda).s92 = function ($this$withContext, $completion) {
|
|
3982
|
+
var tmp = this.y2q($this$withContext, $completion);
|
|
3983
|
+
tmp.z9_1 = Unit_instance;
|
|
3984
|
+
tmp.aa_1 = null;
|
|
3985
|
+
return tmp.fa();
|
|
3986
|
+
};
|
|
3987
|
+
protoOf(GoogleLLMClient$getGoogleResponse$slambda).ra = function (p1, $completion) {
|
|
3988
|
+
return this.s92((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
3989
|
+
};
|
|
3990
|
+
protoOf(GoogleLLMClient$getGoogleResponse$slambda).fa = function () {
|
|
3991
|
+
var suspendResult = this.z9_1;
|
|
3992
|
+
$sm: do
|
|
3993
|
+
try {
|
|
3994
|
+
var tmp = this.x9_1;
|
|
3995
|
+
switch (tmp) {
|
|
3996
|
+
case 0:
|
|
3997
|
+
this.y9_1 = 5;
|
|
3998
|
+
var tmp_0 = this;
|
|
3999
|
+
tmp_0.d92_1 = this.z91_1.w8z_1;
|
|
4000
|
+
var tmp_1 = this;
|
|
4001
|
+
tmp_1.e92_1 = 'v1beta/models/' + this.a92_1.c3i_1 + ':generateContent';
|
|
4002
|
+
this.f92_1 = this.d92_1;
|
|
4003
|
+
this.g92_1 = this.e92_1;
|
|
4004
|
+
var tmp_2 = this;
|
|
4005
|
+
tmp_2.h92_1 = this.f92_1;
|
|
4006
|
+
this.i92_1 = this.h92_1;
|
|
4007
|
+
this.j92_1 = new HttpRequestBuilder();
|
|
4008
|
+
this.j92_1.x65_1 = Companion_getInstance_0().m5d_1;
|
|
4009
|
+
var $this$post = this.j92_1;
|
|
4010
|
+
url($this$post, this.g92_1);
|
|
4011
|
+
var body = this.b92_1;
|
|
4012
|
+
if (body == null) {
|
|
4013
|
+
$this$post.z65_1 = NullBody_instance;
|
|
4014
|
+
var tmp_3 = getKClass(GoogleRequest);
|
|
4015
|
+
var tmp_4;
|
|
4016
|
+
try {
|
|
4017
|
+
tmp_4 = createKType(getKClass(GoogleRequest), arrayOf([]), false);
|
|
4018
|
+
} catch ($p) {
|
|
4019
|
+
var tmp_5;
|
|
4020
|
+
if ($p instanceof Error) {
|
|
4021
|
+
var _unused_var__etf5q3 = $p;
|
|
4022
|
+
tmp_5 = null;
|
|
4023
|
+
} else {
|
|
4024
|
+
throw $p;
|
|
4025
|
+
}
|
|
4026
|
+
tmp_4 = tmp_5;
|
|
4027
|
+
}
|
|
4028
|
+
$this$post.j6c(new TypeInfo(tmp_3, tmp_4));
|
|
4029
|
+
} else {
|
|
4030
|
+
if (body instanceof OutgoingContent) {
|
|
4031
|
+
$this$post.z65_1 = body;
|
|
4032
|
+
$this$post.j6c(null);
|
|
4033
|
+
} else {
|
|
4034
|
+
$this$post.z65_1 = body;
|
|
4035
|
+
var tmp_6 = getKClass(GoogleRequest);
|
|
4036
|
+
var tmp_7;
|
|
4037
|
+
try {
|
|
4038
|
+
tmp_7 = createKType(getKClass(GoogleRequest), arrayOf([]), false);
|
|
4039
|
+
} catch ($p) {
|
|
4040
|
+
var tmp_8;
|
|
4041
|
+
if ($p instanceof Error) {
|
|
4042
|
+
var _unused_var__etf5q3_0 = $p;
|
|
4043
|
+
tmp_8 = null;
|
|
4044
|
+
} else {
|
|
4045
|
+
throw $p;
|
|
4046
|
+
}
|
|
4047
|
+
tmp_7 = tmp_8;
|
|
4048
|
+
}
|
|
4049
|
+
$this$post.j6c(new TypeInfo(tmp_6, tmp_7));
|
|
4050
|
+
}
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
this.j92_1.x65_1 = Companion_getInstance_0().m5d_1;
|
|
4054
|
+
var tmp_9 = this;
|
|
4055
|
+
tmp_9.k92_1 = this.i92_1;
|
|
4056
|
+
var tmp_10 = this;
|
|
4057
|
+
tmp_10.l92_1 = this.j92_1;
|
|
4058
|
+
this.m92_1 = this.k92_1;
|
|
4059
|
+
this.n92_1 = this.l92_1;
|
|
4060
|
+
this.x9_1 = 1;
|
|
4061
|
+
suspendResult = (new HttpStatement(this.n92_1, this.m92_1)).d7g(this);
|
|
4062
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4063
|
+
return suspendResult;
|
|
4064
|
+
}
|
|
4065
|
+
|
|
4066
|
+
continue $sm;
|
|
4067
|
+
case 1:
|
|
4068
|
+
this.o92_1 = suspendResult;
|
|
4069
|
+
if (isSuccess(this.o92_1.a5j())) {
|
|
4070
|
+
var tmp_11 = this;
|
|
4071
|
+
tmp_11.q92_1 = this.o92_1;
|
|
4072
|
+
this.r92_1 = this.q92_1;
|
|
4073
|
+
this.x9_1 = 3;
|
|
4074
|
+
var tmp_12 = this.r92_1.m67();
|
|
4075
|
+
var tmp_13 = getKClass(GoogleResponse);
|
|
4076
|
+
var tmp_14;
|
|
4077
|
+
try {
|
|
4078
|
+
tmp_14 = createKType(getKClass(GoogleResponse), arrayOf([]), false);
|
|
4079
|
+
} catch ($p) {
|
|
4080
|
+
var tmp_15;
|
|
4081
|
+
if ($p instanceof Error) {
|
|
4082
|
+
var _unused_var__etf5q3_1 = $p;
|
|
4083
|
+
tmp_15 = null;
|
|
4084
|
+
} else {
|
|
4085
|
+
throw $p;
|
|
4086
|
+
}
|
|
4087
|
+
tmp_14 = tmp_15;
|
|
4088
|
+
}
|
|
4089
|
+
suspendResult = tmp_12.j67(new TypeInfo(tmp_13, tmp_14), this);
|
|
4090
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4091
|
+
return suspendResult;
|
|
4092
|
+
}
|
|
4093
|
+
continue $sm;
|
|
4094
|
+
} else {
|
|
4095
|
+
this.x9_1 = 2;
|
|
4096
|
+
suspendResult = bodyAsText(this.o92_1, VOID, this);
|
|
4097
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4098
|
+
return suspendResult;
|
|
4099
|
+
}
|
|
4100
|
+
continue $sm;
|
|
4101
|
+
}
|
|
4102
|
+
|
|
4103
|
+
case 2:
|
|
4104
|
+
var errorBody = suspendResult;
|
|
4105
|
+
var tmp_16 = Companion_getInstance_23().i90_1;
|
|
4106
|
+
tmp_16.r3i(GoogleLLMClient$getGoogleResponse$slambda$lambda(this.o92_1, errorBody));
|
|
4107
|
+
var tmp_17 = this;
|
|
4108
|
+
var message = 'Error from GoogleAI API: ' + this.o92_1.a5j().toString() + ': ' + errorBody;
|
|
4109
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
4110
|
+
case 3:
|
|
4111
|
+
var tmp_18 = this;
|
|
4112
|
+
tmp_18.p92_1 = suspendResult instanceof GoogleResponse ? suspendResult : THROW_CCE();
|
|
4113
|
+
this.x9_1 = 4;
|
|
4114
|
+
continue $sm;
|
|
4115
|
+
case 4:
|
|
4116
|
+
return this.p92_1;
|
|
4117
|
+
case 5:
|
|
4118
|
+
throw this.aa_1;
|
|
4119
|
+
}
|
|
4120
|
+
} catch ($p) {
|
|
4121
|
+
var e = $p;
|
|
4122
|
+
if (this.y9_1 === 5) {
|
|
4123
|
+
throw e;
|
|
4124
|
+
} else {
|
|
4125
|
+
this.x9_1 = this.y9_1;
|
|
4126
|
+
this.aa_1 = e;
|
|
4127
|
+
}
|
|
4128
|
+
}
|
|
4129
|
+
while (true);
|
|
4130
|
+
};
|
|
4131
|
+
protoOf(GoogleLLMClient$getGoogleResponse$slambda).y2q = function ($this$withContext, completion) {
|
|
4132
|
+
var i = new GoogleLLMClient$getGoogleResponse$slambda(this.z91_1, this.a92_1, this.b92_1, completion);
|
|
4133
|
+
i.c92_1 = $this$withContext;
|
|
4134
|
+
return i;
|
|
4135
|
+
};
|
|
4136
|
+
function GoogleLLMClient$getGoogleResponse$slambda_0(this$0, $model, $request, resultContinuation) {
|
|
4137
|
+
var i = new GoogleLLMClient$getGoogleResponse$slambda(this$0, $model, $request, resultContinuation);
|
|
4138
|
+
var l = function ($this$withContext, $completion) {
|
|
4139
|
+
return i.s92($this$withContext, $completion);
|
|
4140
|
+
};
|
|
4141
|
+
l.$arity = 1;
|
|
4142
|
+
return l;
|
|
4143
|
+
}
|
|
4144
|
+
function GoogleLLMClient$getGoogleResponse$lambda($response) {
|
|
4145
|
+
return function () {
|
|
4146
|
+
return 'Content `parts` field is missing in the response from GoogleAI API: ' + toString($response);
|
|
4147
|
+
};
|
|
4148
|
+
}
|
|
4149
|
+
function GoogleLLMClient$createGoogleRequest$lambda($tool) {
|
|
4150
|
+
return function ($this$putJsonArray) {
|
|
4151
|
+
// Inline function 'kotlin.collections.map' call
|
|
4152
|
+
var this_0 = $tool.t7y_1;
|
|
4153
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
4154
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
4155
|
+
var _iterator__ex2g4s = this_0.p();
|
|
4156
|
+
while (_iterator__ex2g4s.q()) {
|
|
4157
|
+
var item = _iterator__ex2g4s.r();
|
|
4158
|
+
var tmp$ret$0 = JsonPrimitive(item.v7y_1);
|
|
4159
|
+
destination.h(tmp$ret$0);
|
|
4160
|
+
}
|
|
4161
|
+
$this$putJsonArray.j1k(destination);
|
|
4162
|
+
return Unit_instance;
|
|
4163
|
+
};
|
|
4164
|
+
}
|
|
4165
|
+
function GoogleLLMClient$processGoogleResponse$lambda() {
|
|
4166
|
+
return 'Empty candidates in Gemini response';
|
|
4167
|
+
}
|
|
4168
|
+
function GoogleLLMClient$buildGoogleParamType$_anonymous_$putType$lambda_feev3c($type) {
|
|
4169
|
+
return function ($this$putJsonArray) {
|
|
4170
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
4171
|
+
var indexedObject = $type.n7z_1;
|
|
4172
|
+
var inductionVariable = 0;
|
|
4173
|
+
var last = indexedObject.length;
|
|
4174
|
+
while (inductionVariable < last) {
|
|
4175
|
+
var element = indexedObject[inductionVariable];
|
|
4176
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
4177
|
+
add($this$putJsonArray, element);
|
|
4178
|
+
}
|
|
4179
|
+
return Unit_instance;
|
|
4180
|
+
};
|
|
4181
|
+
}
|
|
4182
|
+
function $executeCOROUTINE$(_this__u8e3s4, prompt, model, tools, resultContinuation) {
|
|
4183
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
4184
|
+
this.b93_1 = _this__u8e3s4;
|
|
4185
|
+
this.c93_1 = prompt;
|
|
4186
|
+
this.d93_1 = model;
|
|
4187
|
+
this.e93_1 = tools;
|
|
4188
|
+
}
|
|
4189
|
+
protoOf($executeCOROUTINE$).fa = function () {
|
|
4190
|
+
var suspendResult = this.z9_1;
|
|
4191
|
+
$sm: do
|
|
4192
|
+
try {
|
|
4193
|
+
var tmp = this.x9_1;
|
|
4194
|
+
switch (tmp) {
|
|
4195
|
+
case 0:
|
|
4196
|
+
this.y9_1 = 2;
|
|
4197
|
+
var tmp_0 = Companion_getInstance_23().i90_1;
|
|
4198
|
+
tmp_0.o3i(GoogleLLMClient$execute$lambda(this.c93_1, this.e93_1, this.d93_1));
|
|
4199
|
+
if (!this.d93_1.d3i_1.w(Completion_getInstance())) {
|
|
4200
|
+
var message = 'Model ' + this.d93_1.c3i_1 + ' does not support chat completions';
|
|
4201
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
4202
|
+
}
|
|
4203
|
+
|
|
4204
|
+
if (!(this.d93_1.d3i_1.w(Tools_getInstance()) || this.e93_1.m())) {
|
|
4205
|
+
var message_0 = 'Model ' + this.d93_1.c3i_1 + ' does not support tools';
|
|
4206
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
4207
|
+
}
|
|
4208
|
+
|
|
4209
|
+
this.x9_1 = 1;
|
|
4210
|
+
suspendResult = getGoogleResponse(this.b93_1, this.c93_1, this.d93_1, this.e93_1, this);
|
|
4211
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4212
|
+
return suspendResult;
|
|
4213
|
+
}
|
|
4214
|
+
|
|
4215
|
+
continue $sm;
|
|
4216
|
+
case 1:
|
|
4217
|
+
var response = suspendResult;
|
|
4218
|
+
return first(processGoogleResponse(this.b93_1, response));
|
|
4219
|
+
case 2:
|
|
4220
|
+
throw this.aa_1;
|
|
4221
|
+
}
|
|
4222
|
+
} catch ($p) {
|
|
4223
|
+
var e = $p;
|
|
4224
|
+
if (this.y9_1 === 2) {
|
|
4225
|
+
throw e;
|
|
4226
|
+
} else {
|
|
4227
|
+
this.x9_1 = this.y9_1;
|
|
4228
|
+
this.aa_1 = e;
|
|
4229
|
+
}
|
|
4230
|
+
}
|
|
4231
|
+
while (true);
|
|
4232
|
+
};
|
|
4233
|
+
function $getGoogleResponseCOROUTINE$(_this__u8e3s4, prompt, model, tools, resultContinuation) {
|
|
4234
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
4235
|
+
this.u90_1 = _this__u8e3s4;
|
|
4236
|
+
this.v90_1 = prompt;
|
|
4237
|
+
this.w90_1 = model;
|
|
4238
|
+
this.x90_1 = tools;
|
|
4239
|
+
}
|
|
4240
|
+
protoOf($getGoogleResponseCOROUTINE$).fa = function () {
|
|
4241
|
+
var suspendResult = this.z9_1;
|
|
4242
|
+
$sm: do
|
|
4243
|
+
try {
|
|
4244
|
+
var tmp = this.x9_1;
|
|
4245
|
+
switch (tmp) {
|
|
4246
|
+
case 0:
|
|
4247
|
+
this.y9_1 = 2;
|
|
4248
|
+
this.y90_1 = this.u90_1.q91(this.v90_1, this.w90_1, this.x90_1);
|
|
4249
|
+
this.x9_1 = 1;
|
|
4250
|
+
var tmp_0 = get_SuitableForIO(Dispatchers_getInstance());
|
|
4251
|
+
suspendResult = withContext(tmp_0, GoogleLLMClient$getGoogleResponse$slambda_0(this.u90_1, this.w90_1, this.y90_1, null), this);
|
|
4252
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4253
|
+
return suspendResult;
|
|
4254
|
+
}
|
|
4255
|
+
|
|
4256
|
+
continue $sm;
|
|
4257
|
+
case 1:
|
|
4258
|
+
var response = suspendResult;
|
|
4259
|
+
var tmp_1;
|
|
4260
|
+
if (!response.r8t_1.m()) {
|
|
4261
|
+
var tmp0 = response.r8t_1;
|
|
4262
|
+
var tmp$ret$0;
|
|
4263
|
+
l$ret$1: do {
|
|
4264
|
+
var tmp_2;
|
|
4265
|
+
if (isInterface(tmp0, Collection)) {
|
|
4266
|
+
tmp_2 = tmp0.m();
|
|
4267
|
+
} else {
|
|
4268
|
+
tmp_2 = false;
|
|
4269
|
+
}
|
|
4270
|
+
if (tmp_2) {
|
|
4271
|
+
tmp$ret$0 = true;
|
|
4272
|
+
break l$ret$1;
|
|
4273
|
+
}
|
|
4274
|
+
var _iterator__ex2g4s = tmp0.p();
|
|
4275
|
+
while (_iterator__ex2g4s.q()) {
|
|
4276
|
+
var element = _iterator__ex2g4s.r();
|
|
4277
|
+
var tmp0_safe_receiver = element.n8u_1;
|
|
4278
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o8v_1;
|
|
4279
|
+
if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.m()) === true)) {
|
|
4280
|
+
tmp$ret$0 = false;
|
|
4281
|
+
break l$ret$1;
|
|
4282
|
+
}
|
|
4283
|
+
}
|
|
4284
|
+
tmp$ret$0 = true;
|
|
4285
|
+
}
|
|
4286
|
+
while (false);
|
|
4287
|
+
tmp_1 = tmp$ret$0;
|
|
4288
|
+
} else {
|
|
4289
|
+
tmp_1 = false;
|
|
4290
|
+
}
|
|
4291
|
+
|
|
4292
|
+
if (tmp_1) {
|
|
4293
|
+
var tmp_3 = Companion_getInstance_23().i90_1;
|
|
4294
|
+
tmp_3.q3i(GoogleLLMClient$getGoogleResponse$lambda(response));
|
|
4295
|
+
}
|
|
4296
|
+
|
|
4297
|
+
return response;
|
|
4298
|
+
case 2:
|
|
4299
|
+
throw this.aa_1;
|
|
4300
|
+
}
|
|
4301
|
+
} catch ($p) {
|
|
4302
|
+
var e = $p;
|
|
4303
|
+
if (this.y9_1 === 2) {
|
|
4304
|
+
throw e;
|
|
4305
|
+
} else {
|
|
4306
|
+
this.x9_1 = this.y9_1;
|
|
4307
|
+
this.aa_1 = e;
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4310
|
+
while (true);
|
|
4311
|
+
};
|
|
4312
|
+
function GoogleLLMClient(apiKey, settings, baseClient, clock) {
|
|
4313
|
+
Companion_getInstance_23();
|
|
4314
|
+
settings = settings === VOID ? new GoogleClientSettings() : settings;
|
|
4315
|
+
baseClient = baseClient === VOID ? HttpClient() : baseClient;
|
|
4316
|
+
clock = clock === VOID ? System_instance : clock;
|
|
4317
|
+
this.s8z_1 = apiKey;
|
|
4318
|
+
this.t8z_1 = settings;
|
|
4319
|
+
this.u8z_1 = clock;
|
|
4320
|
+
var tmp = this;
|
|
4321
|
+
tmp.v8z_1 = Json(VOID, GoogleLLMClient$json$lambda);
|
|
4322
|
+
var tmp_0 = this;
|
|
4323
|
+
tmp_0.w8z_1 = baseClient.a67(GoogleLLMClient$httpClient$lambda(this));
|
|
4324
|
+
}
|
|
4325
|
+
protoOf(GoogleLLMClient).j4f = function (prompt, model, tools, $completion) {
|
|
4326
|
+
var tmp = new $executeCOROUTINE$(this, prompt, model, tools, $completion);
|
|
4327
|
+
tmp.z9_1 = Unit_instance;
|
|
4328
|
+
tmp.aa_1 = null;
|
|
4329
|
+
return tmp.fa();
|
|
4330
|
+
};
|
|
4331
|
+
protoOf(GoogleLLMClient).l4f = function (prompt, model, tools) {
|
|
4332
|
+
return streamFrameFlow(GoogleLLMClient$executeStreaming$slambda_0(model, this, prompt, null));
|
|
4333
|
+
};
|
|
4334
|
+
protoOf(GoogleLLMClient).q91 = function (prompt, model, tools) {
|
|
4335
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
4336
|
+
var systemMessageParts = ArrayList_init_$Create$();
|
|
4337
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
4338
|
+
var contents = ArrayList_init_$Create$();
|
|
4339
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
4340
|
+
var pendingCalls = ArrayList_init_$Create$();
|
|
4341
|
+
var _iterator__ex2g4s = prompt.z44_1.p();
|
|
4342
|
+
while (_iterator__ex2g4s.q()) {
|
|
4343
|
+
var message = _iterator__ex2g4s.r();
|
|
4344
|
+
if (message instanceof System) {
|
|
4345
|
+
systemMessageParts.h(new Text_0(message.v1j()));
|
|
4346
|
+
} else {
|
|
4347
|
+
if (message instanceof User) {
|
|
4348
|
+
createGoogleRequest$flushCalls(pendingCalls, contents);
|
|
4349
|
+
contents.h(toGoogleContent(this, message, model));
|
|
4350
|
+
} else {
|
|
4351
|
+
if (message instanceof Assistant) {
|
|
4352
|
+
createGoogleRequest$flushCalls(pendingCalls, contents);
|
|
4353
|
+
var tmp1_parts = listOf(new Text_0(message.v1j()));
|
|
4354
|
+
contents.h(new GoogleContent(tmp1_parts, 'model'));
|
|
4355
|
+
} else {
|
|
4356
|
+
if (message instanceof Result) {
|
|
4357
|
+
createGoogleRequest$flushCalls(pendingCalls, contents);
|
|
4358
|
+
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
4359
|
+
var builder = new JsonObjectBuilder();
|
|
4360
|
+
put(builder, 'result', message.v1j());
|
|
4361
|
+
var tmp$ret$4 = builder.s1i();
|
|
4362
|
+
var tmp2_parts = listOf(new FunctionResponse(new FunctionResponse_0(message.p45_1, message.q45_1, tmp$ret$4)));
|
|
4363
|
+
contents.h(new GoogleContent(tmp2_parts, 'user'));
|
|
4364
|
+
} else {
|
|
4365
|
+
if (message instanceof Call) {
|
|
4366
|
+
var tmp0 = this.v8z_1;
|
|
4367
|
+
// Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
|
|
4368
|
+
var string = message.v1j();
|
|
4369
|
+
// Inline function 'kotlinx.serialization.serializer' call
|
|
4370
|
+
var this_0 = tmp0.lz();
|
|
4371
|
+
// Inline function 'kotlinx.serialization.internal.cast' call
|
|
4372
|
+
var this_1 = serializer(this_0, createKType(getKClass(JsonObject), arrayOf([]), true));
|
|
4373
|
+
var tmp$ret$6 = isInterface(this_1, KSerializer) ? this_1 : THROW_CCE();
|
|
4374
|
+
var tmp$ret$7 = tmp0.hw(tmp$ret$6, string);
|
|
4375
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
4376
|
+
var element = new FunctionCall(new FunctionCall_0(message.j45_1, message.k45_1, tmp$ret$7));
|
|
4377
|
+
pendingCalls.h(element);
|
|
4378
|
+
} else {
|
|
4379
|
+
noWhenBranchMatchedException();
|
|
4380
|
+
}
|
|
4381
|
+
}
|
|
4382
|
+
}
|
|
4383
|
+
}
|
|
4384
|
+
}
|
|
4385
|
+
}
|
|
4386
|
+
createGoogleRequest$flushCalls(pendingCalls, contents);
|
|
4387
|
+
// Inline function 'kotlin.collections.map' call
|
|
4388
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
4389
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tools, 10));
|
|
4390
|
+
var _iterator__ex2g4s_0 = tools.p();
|
|
4391
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
4392
|
+
var item = _iterator__ex2g4s_0.r();
|
|
4393
|
+
// Inline function 'kotlin.collections.associate' call
|
|
4394
|
+
var this_2 = plus(item.t7y_1, item.u7y_1);
|
|
4395
|
+
var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_2, 10)), 16);
|
|
4396
|
+
// Inline function 'kotlin.collections.associateTo' call
|
|
4397
|
+
var destination_0 = LinkedHashMap_init_$Create$(capacity);
|
|
4398
|
+
var _iterator__ex2g4s_1 = this_2.p();
|
|
4399
|
+
while (_iterator__ex2g4s_1.q()) {
|
|
4400
|
+
var element_0 = _iterator__ex2g4s_1.r();
|
|
4401
|
+
// Inline function 'kotlin.collections.plusAssign' call
|
|
4402
|
+
var pair = to(element_0.v7y_1, buildGoogleParamType(this, element_0));
|
|
4403
|
+
destination_0.r2(pair.qi_1, pair.ri_1);
|
|
4404
|
+
}
|
|
4405
|
+
var properties = destination_0;
|
|
4406
|
+
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
4407
|
+
var builder_0 = new JsonObjectBuilder();
|
|
4408
|
+
put(builder_0, 'type', 'object');
|
|
4409
|
+
builder_0.g1k('properties', new JsonObject(properties));
|
|
4410
|
+
putJsonArray(builder_0, 'required', GoogleLLMClient$createGoogleRequest$lambda(item));
|
|
4411
|
+
var tmp$ret$14 = builder_0.s1i();
|
|
4412
|
+
var tmp$ret$15 = new GoogleFunctionDeclaration(item.r7y_1, item.s7y_1, tmp$ret$14);
|
|
4413
|
+
destination.h(tmp$ret$15);
|
|
4414
|
+
}
|
|
4415
|
+
// Inline function 'kotlin.takeIf' call
|
|
4416
|
+
var tmp;
|
|
4417
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
4418
|
+
if (!destination.m()) {
|
|
4419
|
+
tmp = destination;
|
|
4420
|
+
} else {
|
|
4421
|
+
tmp = null;
|
|
4422
|
+
}
|
|
4423
|
+
var tmp3_safe_receiver = tmp;
|
|
4424
|
+
var tmp_0;
|
|
4425
|
+
if (tmp3_safe_receiver == null) {
|
|
4426
|
+
tmp_0 = null;
|
|
4427
|
+
} else {
|
|
4428
|
+
// Inline function 'kotlin.let' call
|
|
4429
|
+
tmp_0 = listOf(new GoogleTool(tmp3_safe_receiver));
|
|
4430
|
+
}
|
|
4431
|
+
var googleTools = tmp_0;
|
|
4432
|
+
// Inline function 'kotlin.takeIf' call
|
|
4433
|
+
var tmp_1;
|
|
4434
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
4435
|
+
if (!systemMessageParts.m()) {
|
|
4436
|
+
tmp_1 = systemMessageParts;
|
|
4437
|
+
} else {
|
|
4438
|
+
tmp_1 = null;
|
|
4439
|
+
}
|
|
4440
|
+
var tmp4_safe_receiver = tmp_1;
|
|
4441
|
+
var tmp_2;
|
|
4442
|
+
if (tmp4_safe_receiver == null) {
|
|
4443
|
+
tmp_2 = null;
|
|
4444
|
+
} else {
|
|
4445
|
+
// Inline function 'kotlin.let' call
|
|
4446
|
+
tmp_2 = new GoogleContent(tmp4_safe_receiver);
|
|
4447
|
+
}
|
|
4448
|
+
var googleSystemInstruction = tmp_2;
|
|
4449
|
+
var tmp5_safe_receiver = prompt.b45_1.y43_1;
|
|
4450
|
+
var tmp_3;
|
|
4451
|
+
if (tmp5_safe_receiver == null) {
|
|
4452
|
+
tmp_3 = null;
|
|
4453
|
+
} else {
|
|
4454
|
+
// Inline function 'kotlin.let' call
|
|
4455
|
+
// Inline function 'kotlin.require' call
|
|
4456
|
+
if (!model.d3i_1.w(tmp5_safe_receiver.h4a())) {
|
|
4457
|
+
var message_0 = 'Model ' + model.c3i_1 + ' does not support structured output schema ' + tmp5_safe_receiver.h3e();
|
|
4458
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
4459
|
+
}
|
|
4460
|
+
var tmp_4;
|
|
4461
|
+
if (tmp5_safe_receiver instanceof Basic) {
|
|
4462
|
+
tmp_4 = new GoogleResponseFormat('application/json', tmp5_safe_receiver.y49_1);
|
|
4463
|
+
} else {
|
|
4464
|
+
if (tmp5_safe_receiver instanceof Standard) {
|
|
4465
|
+
tmp_4 = new GoogleResponseFormat('application/json', VOID, tmp5_safe_receiver.e4a_1);
|
|
4466
|
+
} else {
|
|
4467
|
+
throw IllegalArgumentException_init_$Create$('Unsupported schema type: ' + toString(tmp5_safe_receiver));
|
|
4468
|
+
}
|
|
4469
|
+
}
|
|
4470
|
+
tmp_3 = tmp_4;
|
|
4471
|
+
}
|
|
4472
|
+
var responseFormat = tmp_3;
|
|
4473
|
+
var tmp9_responseMimeType = responseFormat == null ? null : responseFormat.f93_1;
|
|
4474
|
+
var tmp10_responseSchema = responseFormat == null ? null : responseFormat.g93_1;
|
|
4475
|
+
var tmp11_responseJsonSchema = responseFormat == null ? null : responseFormat.h93_1;
|
|
4476
|
+
var tmp12_temperature = model.d3i_1.w(Temperature_getInstance()) ? prompt.b45_1.u43_1 : null;
|
|
4477
|
+
var tmp13_candidateCount = model.d3i_1.w(MultipleChoices_getInstance()) ? prompt.b45_1.w43_1 : null;
|
|
4478
|
+
var tmp14_maxOutputTokens = prompt.b45_1.v43_1;
|
|
4479
|
+
// Inline function 'kotlin.takeIf' call
|
|
4480
|
+
var this_3 = prompt.b45_1.b44_1;
|
|
4481
|
+
var tmp_5;
|
|
4482
|
+
if (this_3 === true) {
|
|
4483
|
+
tmp_5 = this_3;
|
|
4484
|
+
} else {
|
|
4485
|
+
tmp_5 = null;
|
|
4486
|
+
}
|
|
4487
|
+
var tmp$ret$33 = tmp_5;
|
|
4488
|
+
// Inline function 'kotlin.takeIf' call
|
|
4489
|
+
var this_4 = new GoogleThinkingConfig(tmp$ret$33, prompt.b45_1.c44_1);
|
|
4490
|
+
var tmp_6;
|
|
4491
|
+
if (!(this_4.i8x_1 == null) || !(this_4.j8x_1 == null)) {
|
|
4492
|
+
tmp_6 = this_4;
|
|
4493
|
+
} else {
|
|
4494
|
+
tmp_6 = null;
|
|
4495
|
+
}
|
|
4496
|
+
var tmp15_thinkingConfig = tmp_6;
|
|
4497
|
+
var tmp16_additionalProperties = prompt.b45_1.d44_1;
|
|
4498
|
+
var generationConfig = new GoogleGenerationConfig(tmp9_responseMimeType, tmp10_responseSchema, tmp11_responseJsonSchema, tmp14_maxOutputTokens, tmp12_temperature, tmp13_candidateCount, VOID, VOID, tmp15_thinkingConfig, tmp16_additionalProperties);
|
|
4499
|
+
var toolChoice = prompt.b45_1.z43_1;
|
|
4500
|
+
var tmp_7;
|
|
4501
|
+
if (equals(toolChoice, Auto_getInstance())) {
|
|
4502
|
+
tmp_7 = new GoogleFunctionCallingConfig(GoogleFunctionCallingMode_AUTO_getInstance());
|
|
4503
|
+
} else {
|
|
4504
|
+
if (equals(toolChoice, None_getInstance())) {
|
|
4505
|
+
tmp_7 = new GoogleFunctionCallingConfig(GoogleFunctionCallingMode_NONE_getInstance());
|
|
4506
|
+
} else {
|
|
4507
|
+
if (equals(toolChoice, Required_getInstance())) {
|
|
4508
|
+
tmp_7 = new GoogleFunctionCallingConfig(GoogleFunctionCallingMode_ANY_getInstance());
|
|
4509
|
+
} else {
|
|
4510
|
+
if (toolChoice instanceof Named) {
|
|
4511
|
+
tmp_7 = new GoogleFunctionCallingConfig(GoogleFunctionCallingMode_ANY_getInstance(), listOf(toolChoice.m4a_1));
|
|
4512
|
+
} else {
|
|
4513
|
+
if (toolChoice == null) {
|
|
4514
|
+
tmp_7 = null;
|
|
4515
|
+
} else {
|
|
4516
|
+
noWhenBranchMatchedException();
|
|
4517
|
+
}
|
|
4518
|
+
}
|
|
4519
|
+
}
|
|
4520
|
+
}
|
|
4521
|
+
}
|
|
4522
|
+
var functionCallingConfig = tmp_7;
|
|
4523
|
+
var tmp17_toolConfig = new GoogleToolConfig(functionCallingConfig);
|
|
4524
|
+
return new GoogleRequest(contents, googleTools, googleSystemInstruction, generationConfig, tmp17_toolConfig);
|
|
4525
|
+
};
|
|
4526
|
+
function GoogleClientSettings(baseUrl, timeoutConfig) {
|
|
4527
|
+
baseUrl = baseUrl === VOID ? 'https://generativelanguage.googleapis.com' : baseUrl;
|
|
4528
|
+
timeoutConfig = timeoutConfig === VOID ? new ConnectionTimeoutConfig() : timeoutConfig;
|
|
4529
|
+
this.a91_1 = baseUrl;
|
|
4530
|
+
this.b91_1 = timeoutConfig;
|
|
4531
|
+
}
|
|
4532
|
+
function Companion_21() {
|
|
4533
|
+
Companion_instance_21 = this;
|
|
4534
|
+
GoogleBasicJsonSchemaGenerator.call(this);
|
|
4535
|
+
}
|
|
4536
|
+
var Companion_instance_21;
|
|
4537
|
+
function Companion_getInstance_24() {
|
|
4538
|
+
if (Companion_instance_21 == null)
|
|
4539
|
+
new Companion_21();
|
|
4540
|
+
return Companion_instance_21;
|
|
4541
|
+
}
|
|
4542
|
+
function GoogleBasicJsonSchemaGenerator() {
|
|
4543
|
+
Companion_getInstance_24();
|
|
4544
|
+
BasicJsonSchemaGenerator.call(this);
|
|
4545
|
+
}
|
|
4546
|
+
protoOf(GoogleBasicJsonSchemaGenerator).i89 = function (context) {
|
|
4547
|
+
var schema = toMutableMap(protoOf(BasicJsonSchemaGenerator).i89.call(this, context));
|
|
4548
|
+
schema.s2('additionalProperties');
|
|
4549
|
+
return new JsonObject(schema);
|
|
4550
|
+
};
|
|
4551
|
+
function Companion_22() {
|
|
4552
|
+
Companion_instance_22 = this;
|
|
4553
|
+
GoogleStandardJsonSchemaGenerator.call(this);
|
|
4554
|
+
}
|
|
4555
|
+
var Companion_instance_22;
|
|
4556
|
+
function Companion_getInstance_25() {
|
|
4557
|
+
if (Companion_instance_22 == null)
|
|
4558
|
+
new Companion_22();
|
|
4559
|
+
return Companion_instance_22;
|
|
4560
|
+
}
|
|
4561
|
+
function GoogleStandardJsonSchemaGenerator() {
|
|
4562
|
+
Companion_getInstance_25();
|
|
4563
|
+
StandardJsonSchemaGenerator.call(this);
|
|
4564
|
+
}
|
|
4565
|
+
protoOf(GoogleStandardJsonSchemaGenerator).i89 = function (context) {
|
|
4566
|
+
var refObject = toMutableMap(protoOf(StandardJsonSchemaGenerator).i89.call(this, context));
|
|
4567
|
+
var tmp;
|
|
4568
|
+
// Inline function 'kotlin.collections.contains' call
|
|
4569
|
+
// Inline function 'kotlin.collections.containsKey' call
|
|
4570
|
+
if ((isInterface(refObject, KtMap) ? refObject : THROW_CCE()).h2('$ref')) {
|
|
4571
|
+
tmp = refObject.s() > 1;
|
|
4572
|
+
} else {
|
|
4573
|
+
tmp = false;
|
|
4574
|
+
}
|
|
4575
|
+
if (tmp) {
|
|
4576
|
+
// Inline function 'kotlinx.serialization.json.buildJsonArray' call
|
|
4577
|
+
var builder = new JsonArrayBuilder();
|
|
4578
|
+
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
4579
|
+
var builder_0 = new JsonObjectBuilder();
|
|
4580
|
+
builder_0.g1k('$ref', getValue(refObject, '$ref'));
|
|
4581
|
+
var tmp$ret$3 = builder_0.s1i();
|
|
4582
|
+
builder.i1k(tmp$ret$3);
|
|
4583
|
+
// Inline function 'kotlin.collections.set' call
|
|
4584
|
+
var value = builder.s1i();
|
|
4585
|
+
refObject.r2('oneOf', value);
|
|
4586
|
+
refObject.s2('$ref');
|
|
4587
|
+
}
|
|
4588
|
+
return new JsonObject(refObject);
|
|
4589
|
+
};
|
|
4590
|
+
protoOf(GoogleStandardJsonSchemaGenerator).y89 = function (context) {
|
|
4591
|
+
// Inline function 'kotlinx.serialization.json.buildJsonObject' call
|
|
4592
|
+
var builder = new JsonObjectBuilder();
|
|
4593
|
+
put(builder, 'type', 'string');
|
|
4594
|
+
// Inline function 'kotlinx.serialization.json.buildJsonArray' call
|
|
4595
|
+
var builder_0 = new JsonArrayBuilder();
|
|
4596
|
+
add(builder_0, context.n89_1.fw());
|
|
4597
|
+
var tmp$ret$1 = builder_0.s1i();
|
|
4598
|
+
builder.g1k('enum', tmp$ret$1);
|
|
4599
|
+
return builder.s1i();
|
|
4600
|
+
};
|
|
4601
|
+
function GoogleResponseFormat(responseMimeType, responseSchema, responseJsonSchema) {
|
|
4602
|
+
responseSchema = responseSchema === VOID ? null : responseSchema;
|
|
4603
|
+
responseJsonSchema = responseJsonSchema === VOID ? null : responseJsonSchema;
|
|
4604
|
+
this.f93_1 = responseMimeType;
|
|
4605
|
+
this.g93_1 = responseSchema;
|
|
4606
|
+
this.h93_1 = responseJsonSchema;
|
|
4607
|
+
}
|
|
4608
|
+
protoOf(GoogleResponseFormat).toString = function () {
|
|
4609
|
+
return 'GoogleResponseFormat(responseMimeType=' + this.f93_1 + ', responseSchema=' + toString_0(this.g93_1) + ', responseJsonSchema=' + toString_0(this.h93_1) + ')';
|
|
4610
|
+
};
|
|
4611
|
+
protoOf(GoogleResponseFormat).hashCode = function () {
|
|
4612
|
+
var result = getStringHashCode(this.f93_1);
|
|
4613
|
+
result = imul(result, 31) + (this.g93_1 == null ? 0 : this.g93_1.hashCode()) | 0;
|
|
4614
|
+
result = imul(result, 31) + (this.h93_1 == null ? 0 : this.h93_1.hashCode()) | 0;
|
|
4615
|
+
return result;
|
|
4616
|
+
};
|
|
4617
|
+
protoOf(GoogleResponseFormat).equals = function (other) {
|
|
4618
|
+
if (this === other)
|
|
4619
|
+
return true;
|
|
4620
|
+
if (!(other instanceof GoogleResponseFormat))
|
|
4621
|
+
return false;
|
|
4622
|
+
var tmp0_other_with_cast = other instanceof GoogleResponseFormat ? other : THROW_CCE();
|
|
4623
|
+
if (!(this.f93_1 === tmp0_other_with_cast.f93_1))
|
|
4624
|
+
return false;
|
|
4625
|
+
if (!equals(this.g93_1, tmp0_other_with_cast.g93_1))
|
|
4626
|
+
return false;
|
|
4627
|
+
if (!equals(this.h93_1, tmp0_other_with_cast.h93_1))
|
|
4628
|
+
return false;
|
|
4629
|
+
return true;
|
|
4630
|
+
};
|
|
4631
|
+
//region block: post-declaration
|
|
4632
|
+
protoOf($serializer).e17 = typeParametersSerializers;
|
|
4633
|
+
protoOf($serializer_0).e17 = typeParametersSerializers;
|
|
4634
|
+
protoOf($serializer_1).e17 = typeParametersSerializers;
|
|
4635
|
+
protoOf($serializer_2).e17 = typeParametersSerializers;
|
|
4636
|
+
protoOf($serializer_3).e17 = typeParametersSerializers;
|
|
4637
|
+
protoOf($serializer_4).e17 = typeParametersSerializers;
|
|
4638
|
+
protoOf($serializer_5).e17 = typeParametersSerializers;
|
|
4639
|
+
protoOf($serializer_6).e17 = typeParametersSerializers;
|
|
4640
|
+
protoOf($serializer_7).e17 = typeParametersSerializers;
|
|
4641
|
+
protoOf($serializer_8).e17 = typeParametersSerializers;
|
|
4642
|
+
protoOf($serializer_9).e17 = typeParametersSerializers;
|
|
4643
|
+
protoOf($serializer_10).e17 = typeParametersSerializers;
|
|
4644
|
+
protoOf($serializer_11).e17 = typeParametersSerializers;
|
|
4645
|
+
protoOf($serializer_12).e17 = typeParametersSerializers;
|
|
4646
|
+
protoOf($serializer_13).e17 = typeParametersSerializers;
|
|
4647
|
+
protoOf($serializer_14).e17 = typeParametersSerializers;
|
|
4648
|
+
protoOf($serializer_15).e17 = typeParametersSerializers;
|
|
4649
|
+
protoOf($serializer_16).e17 = typeParametersSerializers;
|
|
4650
|
+
protoOf($serializer_17).e17 = typeParametersSerializers;
|
|
4651
|
+
protoOf($serializer_18).e17 = typeParametersSerializers;
|
|
4652
|
+
protoOf($serializer_19).e17 = typeParametersSerializers;
|
|
4653
|
+
protoOf($serializer_20).e17 = typeParametersSerializers;
|
|
4654
|
+
//endregion
|
|
4655
|
+
//region block: init
|
|
4656
|
+
Companion_instance_1 = new Companion_1();
|
|
4657
|
+
Companion_instance_3 = new Companion_3();
|
|
4658
|
+
Companion_instance_4 = new Companion_4();
|
|
4659
|
+
Companion_instance_5 = new Companion_5();
|
|
4660
|
+
Companion_instance_6 = new Companion_6();
|
|
4661
|
+
Companion_instance_7 = new Companion_7();
|
|
4662
|
+
Companion_instance_10 = new Companion_10();
|
|
4663
|
+
Companion_instance_11 = new Companion_11();
|
|
4664
|
+
Companion_instance_13 = new Companion_13();
|
|
4665
|
+
Companion_instance_15 = new Companion_15();
|
|
4666
|
+
Companion_instance_18 = new Companion_18();
|
|
4667
|
+
//endregion
|
|
4668
|
+
//region block: exports
|
|
4669
|
+
_.$_$ = _.$_$ || {};
|
|
4670
|
+
_.$_$.a = GoogleLLMClient;
|
|
4671
|
+
//endregion
|
|
4672
|
+
return _;
|
|
4673
|
+
}));
|
|
4674
|
+
|
|
4675
|
+
//# sourceMappingURL=koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js.map
|