weave-typescript 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/google/api/annotations.pb.js +1 -1
  2. package/dist/google/api/http.pb.js +1 -1
  3. package/dist/google/protobuf/descriptor.pb.d.ts +8 -1
  4. package/dist/google/protobuf/descriptor.pb.js +8 -1
  5. package/dist/google/protobuf/struct.pb.js +1 -1
  6. package/dist/google/protobuf/timestamp.pb.d.ts +7 -6
  7. package/dist/google/protobuf/timestamp.pb.js +1 -1
  8. package/dist/index.d.ts +9 -16
  9. package/dist/index.js +13 -21
  10. package/dist/weaveapi/{storage/v1/auth.pb.d.ts → atc/v1/event.pb.d.ts} +12 -6
  11. package/dist/weaveapi/atc/v1/event.pb.js +263 -0
  12. package/dist/weaveapi/{auth/v1/session.pb.d.ts → atc/v1/message.pb.d.ts} +22 -21
  13. package/dist/weaveapi/atc/v1/message.pb.js +287 -0
  14. package/dist/weaveapi/atc/v1/process.pb.d.ts +91 -0
  15. package/dist/weaveapi/atc/v1/process.pb.js +658 -0
  16. package/dist/weaveapi/atc/v1/run.pb.d.ts +71 -0
  17. package/dist/weaveapi/atc/v1/run.pb.js +525 -0
  18. package/dist/weaveapi/atc/v1/service.pb.d.ts +339 -0
  19. package/dist/weaveapi/atc/v1/service.pb.js +1922 -0
  20. package/dist/weaveapi/project/v1/project.pb.d.ts +67 -5
  21. package/dist/weaveapi/project/v1/project.pb.js +765 -66
  22. package/dist/weaveapi/project/v1/service.pb.d.ts +117 -76
  23. package/dist/weaveapi/project/v1/service.pb.js +1088 -401
  24. package/dist/weaveapi/task/v1/service.pb.d.ts +171 -0
  25. package/dist/weaveapi/task/v1/service.pb.js +1416 -0
  26. package/dist/weaveapi/task/v1/task.pb.d.ts +84 -0
  27. package/dist/weaveapi/task/v1/task.pb.js +782 -0
  28. package/dist/weavesql/atcdb/event_sql.d.ts +101 -0
  29. package/dist/weavesql/atcdb/event_sql.js +191 -0
  30. package/dist/weavesql/atcdb/mailbox_sql.d.ts +43 -0
  31. package/dist/weavesql/atcdb/mailbox_sql.js +85 -0
  32. package/dist/weavesql/weavedb/project_sql.d.ts +121 -46
  33. package/dist/weavesql/weavedb/project_sql.js +304 -112
  34. package/dist/weavesql/weavedb/task_sql.d.ts +163 -0
  35. package/dist/weavesql/weavedb/task_sql.js +328 -0
  36. package/package.json +1 -1
  37. package/dist/weaveapi/auth/v1/service.pb.d.ts +0 -709
  38. package/dist/weaveapi/auth/v1/service.pb.js +0 -4977
  39. package/dist/weaveapi/auth/v1/session.pb.js +0 -308
  40. package/dist/weaveapi/auth/v1/usage.pb.d.ts +0 -76
  41. package/dist/weaveapi/auth/v1/usage.pb.js +0 -849
  42. package/dist/weaveapi/auth/v1/user.pb.d.ts +0 -141
  43. package/dist/weaveapi/auth/v1/user.pb.js +0 -1625
  44. package/dist/weaveapi/data/v1/data.pb.d.ts +0 -54
  45. package/dist/weaveapi/data/v1/data.pb.js +0 -411
  46. package/dist/weaveapi/data/v1/service.pb.d.ts +0 -296
  47. package/dist/weaveapi/data/v1/service.pb.js +0 -2777
  48. package/dist/weaveapi/generate/v1/configuration.pb.d.ts +0 -122
  49. package/dist/weaveapi/generate/v1/configuration.pb.js +0 -877
  50. package/dist/weaveapi/generate/v1/generate.pb.d.ts +0 -48
  51. package/dist/weaveapi/generate/v1/generate.pb.js +0 -367
  52. package/dist/weaveapi/generate/v1/service.pb.d.ts +0 -173
  53. package/dist/weaveapi/generate/v1/service.pb.js +0 -1207
  54. package/dist/weaveapi/input/v1/input.pb.d.ts +0 -77
  55. package/dist/weaveapi/input/v1/input.pb.js +0 -632
  56. package/dist/weaveapi/input/v1/service.pb.d.ts +0 -390
  57. package/dist/weaveapi/input/v1/service.pb.js +0 -3610
  58. package/dist/weaveapi/integration/v1/integration.pb.d.ts +0 -67
  59. package/dist/weaveapi/integration/v1/integration.pb.js +0 -486
  60. package/dist/weaveapi/integration/v1/service.pb.d.ts +0 -318
  61. package/dist/weaveapi/integration/v1/service.pb.js +0 -2992
  62. package/dist/weaveapi/llmx/v1/architecture.pb.d.ts +0 -665
  63. package/dist/weaveapi/llmx/v1/architecture.pb.js +0 -3028
  64. package/dist/weaveapi/llmx/v1/capabilities.pb.d.ts +0 -709
  65. package/dist/weaveapi/llmx/v1/capabilities.pb.js +0 -3458
  66. package/dist/weaveapi/llmx/v1/model.pb.d.ts +0 -375
  67. package/dist/weaveapi/llmx/v1/model.pb.js +0 -1472
  68. package/dist/weaveapi/llmx/v1/pricing.pb.d.ts +0 -340
  69. package/dist/weaveapi/llmx/v1/pricing.pb.js +0 -974
  70. package/dist/weaveapi/llmx/v1/provider.pb.d.ts +0 -72
  71. package/dist/weaveapi/llmx/v1/provider.pb.js +0 -218
  72. package/dist/weaveapi/llmx/v1/service.pb.d.ts +0 -683
  73. package/dist/weaveapi/llmx/v1/service.pb.js +0 -5266
  74. package/dist/weaveapi/mcpregistry/v1/server.pb.d.ts +0 -54
  75. package/dist/weaveapi/mcpregistry/v1/server.pb.js +0 -436
  76. package/dist/weaveapi/mcpregistry/v1/service.pb.d.ts +0 -171
  77. package/dist/weaveapi/mcpregistry/v1/service.pb.js +0 -963
  78. package/dist/weaveapi/payment/v1/invoice.pb.d.ts +0 -92
  79. package/dist/weaveapi/payment/v1/invoice.pb.js +0 -998
  80. package/dist/weaveapi/payment/v1/service.pb.d.ts +0 -662
  81. package/dist/weaveapi/payment/v1/service.pb.js +0 -5395
  82. package/dist/weaveapi/payment/v1/subscription.pb.d.ts +0 -165
  83. package/dist/weaveapi/payment/v1/subscription.pb.js +0 -1930
  84. package/dist/weaveapi/report/v1/report.pb.d.ts +0 -81
  85. package/dist/weaveapi/report/v1/report.pb.js +0 -678
  86. package/dist/weaveapi/report/v1/service.pb.d.ts +0 -194
  87. package/dist/weaveapi/report/v1/service.pb.js +0 -1923
  88. package/dist/weaveapi/requirement/v1/requirement.pb.d.ts +0 -70
  89. package/dist/weaveapi/requirement/v1/requirement.pb.js +0 -570
  90. package/dist/weaveapi/requirement/v1/service.pb.d.ts +0 -390
  91. package/dist/weaveapi/requirement/v1/service.pb.js +0 -3636
  92. package/dist/weaveapi/run/v1/run.pb.d.ts +0 -117
  93. package/dist/weaveapi/run/v1/run.pb.js +0 -1155
  94. package/dist/weaveapi/run/v1/service.pb.d.ts +0 -229
  95. package/dist/weaveapi/run/v1/service.pb.js +0 -2426
  96. package/dist/weaveapi/script/v1/script.pb.d.ts +0 -102
  97. package/dist/weaveapi/script/v1/script.pb.js +0 -1025
  98. package/dist/weaveapi/script/v1/service.pb.d.ts +0 -502
  99. package/dist/weaveapi/script/v1/service.pb.js +0 -4871
  100. package/dist/weaveapi/storage/v1/auth.pb.js +0 -110
  101. package/dist/weaveapi/storage/v1/nosql_database.pb.d.ts +0 -91
  102. package/dist/weaveapi/storage/v1/nosql_database.pb.js +0 -1056
  103. package/dist/weaveapi/storage/v1/object_store.pb.d.ts +0 -49
  104. package/dist/weaveapi/storage/v1/object_store.pb.js +0 -441
  105. package/dist/weaveapi/storage/v1/service.pb.d.ts +0 -245
  106. package/dist/weaveapi/storage/v1/service.pb.js +0 -1339
  107. package/dist/weaveapi/storage/v1/sql_database.pb.d.ts +0 -98
  108. package/dist/weaveapi/storage/v1/sql_database.pb.js +0 -1184
  109. package/dist/weaveapi/storage/v1/storage.pb.d.ts +0 -35
  110. package/dist/weaveapi/storage/v1/storage.pb.js +0 -198
  111. package/dist/weaveapi/storage/v1/vcs.pb.d.ts +0 -75
  112. package/dist/weaveapi/storage/v1/vcs.pb.js +0 -864
  113. package/dist/weaveapi/suite/v1/service.pb.d.ts +0 -539
  114. package/dist/weaveapi/suite/v1/service.pb.js +0 -5279
  115. package/dist/weaveapi/suite/v1/suite.pb.d.ts +0 -92
  116. package/dist/weaveapi/suite/v1/suite.pb.js +0 -876
  117. package/dist/weaveapi/synthesize/v1/dataset.pb.d.ts +0 -68
  118. package/dist/weaveapi/synthesize/v1/dataset.pb.js +0 -460
  119. package/dist/weaveapi/synthesize/v1/inline_data.pb.d.ts +0 -45
  120. package/dist/weaveapi/synthesize/v1/inline_data.pb.js +0 -166
  121. package/dist/weaveapi/synthesize/v1/relationship.pb.d.ts +0 -58
  122. package/dist/weaveapi/synthesize/v1/relationship.pb.js +0 -253
  123. package/dist/weaveapi/synthesize/v1/service.pb.d.ts +0 -144
  124. package/dist/weaveapi/synthesize/v1/service.pb.js +0 -917
  125. package/dist/weaveapi/synthesize/v1/training.pb.d.ts +0 -58
  126. package/dist/weaveapi/synthesize/v1/training.pb.js +0 -386
  127. package/dist/weaveapi/testcase/v1/service.pb.d.ts +0 -498
  128. package/dist/weaveapi/testcase/v1/service.pb.js +0 -4728
  129. package/dist/weaveapi/testcase/v1/testcase.pb.d.ts +0 -91
  130. package/dist/weaveapi/testcase/v1/testcase.pb.js +0 -794
  131. package/dist/weaveapi/workflow/v1/service.pb.d.ts +0 -261
  132. package/dist/weaveapi/workflow/v1/service.pb.js +0 -2120
  133. package/dist/weaveapi/workflow/v1/workflow.pb.d.ts +0 -77
  134. package/dist/weaveapi/workflow/v1/workflow.pb.js +0 -555
  135. package/dist/weaveapi/workflowdata/v1/service.pb.d.ts +0 -295
  136. package/dist/weaveapi/workflowdata/v1/service.pb.js +0 -2612
@@ -1,3458 +0,0 @@
1
- "use strict";
2
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
- // versions:
4
- // protoc-gen-ts_proto v2.11.2
5
- // protoc unknown
6
- // source: weaveapi/llmx/v1/capabilities.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.FineTuning = exports.Embeddings = exports.Video = exports.Audio = exports.Reasoning = exports.Caching = exports.SystemPrompt = exports.ToolUse = exports.Vision = exports.FunctionCalling = exports.Streaming = exports.StructuredResponse = exports.Text = exports.Capability = exports.ModalityDirection = exports.Hyperparameter = exports.DistanceMetric = exports.ReasoningStrategy = exports.CacheStrategy = exports.ToolType = exports.VideoFormat = exports.AudioFormat = exports.ImageFormat = exports.JsonSchemaType = exports.DataFormat = exports.CapabilityType = exports.protobufPackage = void 0;
9
- exports.capabilityTypeFromJSON = capabilityTypeFromJSON;
10
- exports.capabilityTypeToJSON = capabilityTypeToJSON;
11
- exports.dataFormatFromJSON = dataFormatFromJSON;
12
- exports.dataFormatToJSON = dataFormatToJSON;
13
- exports.jsonSchemaTypeFromJSON = jsonSchemaTypeFromJSON;
14
- exports.jsonSchemaTypeToJSON = jsonSchemaTypeToJSON;
15
- exports.imageFormatFromJSON = imageFormatFromJSON;
16
- exports.imageFormatToJSON = imageFormatToJSON;
17
- exports.audioFormatFromJSON = audioFormatFromJSON;
18
- exports.audioFormatToJSON = audioFormatToJSON;
19
- exports.videoFormatFromJSON = videoFormatFromJSON;
20
- exports.videoFormatToJSON = videoFormatToJSON;
21
- exports.toolTypeFromJSON = toolTypeFromJSON;
22
- exports.toolTypeToJSON = toolTypeToJSON;
23
- exports.cacheStrategyFromJSON = cacheStrategyFromJSON;
24
- exports.cacheStrategyToJSON = cacheStrategyToJSON;
25
- exports.reasoningStrategyFromJSON = reasoningStrategyFromJSON;
26
- exports.reasoningStrategyToJSON = reasoningStrategyToJSON;
27
- exports.distanceMetricFromJSON = distanceMetricFromJSON;
28
- exports.distanceMetricToJSON = distanceMetricToJSON;
29
- exports.hyperparameterFromJSON = hyperparameterFromJSON;
30
- exports.hyperparameterToJSON = hyperparameterToJSON;
31
- exports.modalityDirectionFromJSON = modalityDirectionFromJSON;
32
- exports.modalityDirectionToJSON = modalityDirectionToJSON;
33
- /* eslint-disable */
34
- const wire_1 = require("@bufbuild/protobuf/wire");
35
- exports.protobufPackage = "weaveapi.llmx.v1";
36
- /** Core capability types that models can support */
37
- var CapabilityType;
38
- (function (CapabilityType) {
39
- CapabilityType[CapabilityType["CAPABILITY_TYPE_UNSPECIFIED"] = 0] = "CAPABILITY_TYPE_UNSPECIFIED";
40
- /** CAPABILITY_TYPE_TEXT - Basic text input/output capability */
41
- CapabilityType[CapabilityType["CAPABILITY_TYPE_TEXT"] = 1] = "CAPABILITY_TYPE_TEXT";
42
- /** CAPABILITY_TYPE_STRUCTURED_RESPONSE - Structured output (JSON, XML, etc.) */
43
- CapabilityType[CapabilityType["CAPABILITY_TYPE_STRUCTURED_RESPONSE"] = 2] = "CAPABILITY_TYPE_STRUCTURED_RESPONSE";
44
- /** CAPABILITY_TYPE_STREAMING - Server-sent or websocket streaming of partial outputs */
45
- CapabilityType[CapabilityType["CAPABILITY_TYPE_STREAMING"] = 3] = "CAPABILITY_TYPE_STREAMING";
46
- /** CAPABILITY_TYPE_FUNCTION_CALLING - Tool/function calling with schemaed arguments */
47
- CapabilityType[CapabilityType["CAPABILITY_TYPE_FUNCTION_CALLING"] = 4] = "CAPABILITY_TYPE_FUNCTION_CALLING";
48
- /** CAPABILITY_TYPE_VISION - Image understanding and/or generation */
49
- CapabilityType[CapabilityType["CAPABILITY_TYPE_VISION"] = 5] = "CAPABILITY_TYPE_VISION";
50
- /** CAPABILITY_TYPE_TOOL_USE - General tool use beyond plain function calls */
51
- CapabilityType[CapabilityType["CAPABILITY_TYPE_TOOL_USE"] = 6] = "CAPABILITY_TYPE_TOOL_USE";
52
- /** CAPABILITY_TYPE_SYSTEM_PROMPT - System messages/prompt steering support */
53
- CapabilityType[CapabilityType["CAPABILITY_TYPE_SYSTEM_PROMPT"] = 7] = "CAPABILITY_TYPE_SYSTEM_PROMPT";
54
- /** CAPABILITY_TYPE_CACHING - Prompt/context caching capabilities */
55
- CapabilityType[CapabilityType["CAPABILITY_TYPE_CACHING"] = 8] = "CAPABILITY_TYPE_CACHING";
56
- /** CAPABILITY_TYPE_REASONING - Advanced reasoning controls/strategies */
57
- CapabilityType[CapabilityType["CAPABILITY_TYPE_REASONING"] = 9] = "CAPABILITY_TYPE_REASONING";
58
- /** CAPABILITY_TYPE_AUDIO - Audio STT/TTS support */
59
- CapabilityType[CapabilityType["CAPABILITY_TYPE_AUDIO"] = 10] = "CAPABILITY_TYPE_AUDIO";
60
- /** CAPABILITY_TYPE_VIDEO - Video analysis/generation support */
61
- CapabilityType[CapabilityType["CAPABILITY_TYPE_VIDEO"] = 11] = "CAPABILITY_TYPE_VIDEO";
62
- /** CAPABILITY_TYPE_EMBEDDINGS - Vector embedding generation */
63
- CapabilityType[CapabilityType["CAPABILITY_TYPE_EMBEDDINGS"] = 12] = "CAPABILITY_TYPE_EMBEDDINGS";
64
- /** CAPABILITY_TYPE_FINE_TUNING - Custom model training/fine-tuning */
65
- CapabilityType[CapabilityType["CAPABILITY_TYPE_FINE_TUNING"] = 13] = "CAPABILITY_TYPE_FINE_TUNING";
66
- CapabilityType[CapabilityType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
67
- })(CapabilityType || (exports.CapabilityType = CapabilityType = {}));
68
- function capabilityTypeFromJSON(object) {
69
- switch (object) {
70
- case 0:
71
- case "CAPABILITY_TYPE_UNSPECIFIED":
72
- return CapabilityType.CAPABILITY_TYPE_UNSPECIFIED;
73
- case 1:
74
- case "CAPABILITY_TYPE_TEXT":
75
- return CapabilityType.CAPABILITY_TYPE_TEXT;
76
- case 2:
77
- case "CAPABILITY_TYPE_STRUCTURED_RESPONSE":
78
- return CapabilityType.CAPABILITY_TYPE_STRUCTURED_RESPONSE;
79
- case 3:
80
- case "CAPABILITY_TYPE_STREAMING":
81
- return CapabilityType.CAPABILITY_TYPE_STREAMING;
82
- case 4:
83
- case "CAPABILITY_TYPE_FUNCTION_CALLING":
84
- return CapabilityType.CAPABILITY_TYPE_FUNCTION_CALLING;
85
- case 5:
86
- case "CAPABILITY_TYPE_VISION":
87
- return CapabilityType.CAPABILITY_TYPE_VISION;
88
- case 6:
89
- case "CAPABILITY_TYPE_TOOL_USE":
90
- return CapabilityType.CAPABILITY_TYPE_TOOL_USE;
91
- case 7:
92
- case "CAPABILITY_TYPE_SYSTEM_PROMPT":
93
- return CapabilityType.CAPABILITY_TYPE_SYSTEM_PROMPT;
94
- case 8:
95
- case "CAPABILITY_TYPE_CACHING":
96
- return CapabilityType.CAPABILITY_TYPE_CACHING;
97
- case 9:
98
- case "CAPABILITY_TYPE_REASONING":
99
- return CapabilityType.CAPABILITY_TYPE_REASONING;
100
- case 10:
101
- case "CAPABILITY_TYPE_AUDIO":
102
- return CapabilityType.CAPABILITY_TYPE_AUDIO;
103
- case 11:
104
- case "CAPABILITY_TYPE_VIDEO":
105
- return CapabilityType.CAPABILITY_TYPE_VIDEO;
106
- case 12:
107
- case "CAPABILITY_TYPE_EMBEDDINGS":
108
- return CapabilityType.CAPABILITY_TYPE_EMBEDDINGS;
109
- case 13:
110
- case "CAPABILITY_TYPE_FINE_TUNING":
111
- return CapabilityType.CAPABILITY_TYPE_FINE_TUNING;
112
- case -1:
113
- case "UNRECOGNIZED":
114
- default:
115
- return CapabilityType.UNRECOGNIZED;
116
- }
117
- }
118
- function capabilityTypeToJSON(object) {
119
- switch (object) {
120
- case CapabilityType.CAPABILITY_TYPE_UNSPECIFIED:
121
- return "CAPABILITY_TYPE_UNSPECIFIED";
122
- case CapabilityType.CAPABILITY_TYPE_TEXT:
123
- return "CAPABILITY_TYPE_TEXT";
124
- case CapabilityType.CAPABILITY_TYPE_STRUCTURED_RESPONSE:
125
- return "CAPABILITY_TYPE_STRUCTURED_RESPONSE";
126
- case CapabilityType.CAPABILITY_TYPE_STREAMING:
127
- return "CAPABILITY_TYPE_STREAMING";
128
- case CapabilityType.CAPABILITY_TYPE_FUNCTION_CALLING:
129
- return "CAPABILITY_TYPE_FUNCTION_CALLING";
130
- case CapabilityType.CAPABILITY_TYPE_VISION:
131
- return "CAPABILITY_TYPE_VISION";
132
- case CapabilityType.CAPABILITY_TYPE_TOOL_USE:
133
- return "CAPABILITY_TYPE_TOOL_USE";
134
- case CapabilityType.CAPABILITY_TYPE_SYSTEM_PROMPT:
135
- return "CAPABILITY_TYPE_SYSTEM_PROMPT";
136
- case CapabilityType.CAPABILITY_TYPE_CACHING:
137
- return "CAPABILITY_TYPE_CACHING";
138
- case CapabilityType.CAPABILITY_TYPE_REASONING:
139
- return "CAPABILITY_TYPE_REASONING";
140
- case CapabilityType.CAPABILITY_TYPE_AUDIO:
141
- return "CAPABILITY_TYPE_AUDIO";
142
- case CapabilityType.CAPABILITY_TYPE_VIDEO:
143
- return "CAPABILITY_TYPE_VIDEO";
144
- case CapabilityType.CAPABILITY_TYPE_EMBEDDINGS:
145
- return "CAPABILITY_TYPE_EMBEDDINGS";
146
- case CapabilityType.CAPABILITY_TYPE_FINE_TUNING:
147
- return "CAPABILITY_TYPE_FINE_TUNING";
148
- case CapabilityType.UNRECOGNIZED:
149
- default:
150
- return "UNRECOGNIZED";
151
- }
152
- }
153
- /** Data format types for structured responses, fine-tuning, etc. */
154
- var DataFormat;
155
- (function (DataFormat) {
156
- DataFormat[DataFormat["DATA_FORMAT_UNSPECIFIED"] = 0] = "DATA_FORMAT_UNSPECIFIED";
157
- DataFormat[DataFormat["DATA_FORMAT_JSON"] = 1] = "DATA_FORMAT_JSON";
158
- DataFormat[DataFormat["DATA_FORMAT_YAML"] = 2] = "DATA_FORMAT_YAML";
159
- DataFormat[DataFormat["DATA_FORMAT_XML"] = 3] = "DATA_FORMAT_XML";
160
- DataFormat[DataFormat["DATA_FORMAT_JSONL"] = 4] = "DATA_FORMAT_JSONL";
161
- DataFormat[DataFormat["DATA_FORMAT_CSV"] = 5] = "DATA_FORMAT_CSV";
162
- DataFormat[DataFormat["DATA_FORMAT_PARQUET"] = 6] = "DATA_FORMAT_PARQUET";
163
- DataFormat[DataFormat["DATA_FORMAT_PLAIN"] = 7] = "DATA_FORMAT_PLAIN";
164
- DataFormat[DataFormat["DATA_FORMAT_MARKDOWN"] = 8] = "DATA_FORMAT_MARKDOWN";
165
- DataFormat[DataFormat["DATA_FORMAT_STRUCTURED"] = 9] = "DATA_FORMAT_STRUCTURED";
166
- DataFormat[DataFormat["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
167
- })(DataFormat || (exports.DataFormat = DataFormat = {}));
168
- function dataFormatFromJSON(object) {
169
- switch (object) {
170
- case 0:
171
- case "DATA_FORMAT_UNSPECIFIED":
172
- return DataFormat.DATA_FORMAT_UNSPECIFIED;
173
- case 1:
174
- case "DATA_FORMAT_JSON":
175
- return DataFormat.DATA_FORMAT_JSON;
176
- case 2:
177
- case "DATA_FORMAT_YAML":
178
- return DataFormat.DATA_FORMAT_YAML;
179
- case 3:
180
- case "DATA_FORMAT_XML":
181
- return DataFormat.DATA_FORMAT_XML;
182
- case 4:
183
- case "DATA_FORMAT_JSONL":
184
- return DataFormat.DATA_FORMAT_JSONL;
185
- case 5:
186
- case "DATA_FORMAT_CSV":
187
- return DataFormat.DATA_FORMAT_CSV;
188
- case 6:
189
- case "DATA_FORMAT_PARQUET":
190
- return DataFormat.DATA_FORMAT_PARQUET;
191
- case 7:
192
- case "DATA_FORMAT_PLAIN":
193
- return DataFormat.DATA_FORMAT_PLAIN;
194
- case 8:
195
- case "DATA_FORMAT_MARKDOWN":
196
- return DataFormat.DATA_FORMAT_MARKDOWN;
197
- case 9:
198
- case "DATA_FORMAT_STRUCTURED":
199
- return DataFormat.DATA_FORMAT_STRUCTURED;
200
- case -1:
201
- case "UNRECOGNIZED":
202
- default:
203
- return DataFormat.UNRECOGNIZED;
204
- }
205
- }
206
- function dataFormatToJSON(object) {
207
- switch (object) {
208
- case DataFormat.DATA_FORMAT_UNSPECIFIED:
209
- return "DATA_FORMAT_UNSPECIFIED";
210
- case DataFormat.DATA_FORMAT_JSON:
211
- return "DATA_FORMAT_JSON";
212
- case DataFormat.DATA_FORMAT_YAML:
213
- return "DATA_FORMAT_YAML";
214
- case DataFormat.DATA_FORMAT_XML:
215
- return "DATA_FORMAT_XML";
216
- case DataFormat.DATA_FORMAT_JSONL:
217
- return "DATA_FORMAT_JSONL";
218
- case DataFormat.DATA_FORMAT_CSV:
219
- return "DATA_FORMAT_CSV";
220
- case DataFormat.DATA_FORMAT_PARQUET:
221
- return "DATA_FORMAT_PARQUET";
222
- case DataFormat.DATA_FORMAT_PLAIN:
223
- return "DATA_FORMAT_PLAIN";
224
- case DataFormat.DATA_FORMAT_MARKDOWN:
225
- return "DATA_FORMAT_MARKDOWN";
226
- case DataFormat.DATA_FORMAT_STRUCTURED:
227
- return "DATA_FORMAT_STRUCTURED";
228
- case DataFormat.UNRECOGNIZED:
229
- default:
230
- return "UNRECOGNIZED";
231
- }
232
- }
233
- /** JSON schema types supported in structured responses */
234
- var JsonSchemaType;
235
- (function (JsonSchemaType) {
236
- JsonSchemaType[JsonSchemaType["JSON_SCHEMA_TYPE_UNSPECIFIED"] = 0] = "JSON_SCHEMA_TYPE_UNSPECIFIED";
237
- JsonSchemaType[JsonSchemaType["JSON_SCHEMA_TYPE_OBJECT"] = 1] = "JSON_SCHEMA_TYPE_OBJECT";
238
- JsonSchemaType[JsonSchemaType["JSON_SCHEMA_TYPE_ARRAY"] = 2] = "JSON_SCHEMA_TYPE_ARRAY";
239
- JsonSchemaType[JsonSchemaType["JSON_SCHEMA_TYPE_STRING"] = 3] = "JSON_SCHEMA_TYPE_STRING";
240
- JsonSchemaType[JsonSchemaType["JSON_SCHEMA_TYPE_NUMBER"] = 4] = "JSON_SCHEMA_TYPE_NUMBER";
241
- JsonSchemaType[JsonSchemaType["JSON_SCHEMA_TYPE_BOOLEAN"] = 5] = "JSON_SCHEMA_TYPE_BOOLEAN";
242
- JsonSchemaType[JsonSchemaType["JSON_SCHEMA_TYPE_NULL"] = 6] = "JSON_SCHEMA_TYPE_NULL";
243
- JsonSchemaType[JsonSchemaType["JSON_SCHEMA_TYPE_INTEGER"] = 7] = "JSON_SCHEMA_TYPE_INTEGER";
244
- JsonSchemaType[JsonSchemaType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
245
- })(JsonSchemaType || (exports.JsonSchemaType = JsonSchemaType = {}));
246
- function jsonSchemaTypeFromJSON(object) {
247
- switch (object) {
248
- case 0:
249
- case "JSON_SCHEMA_TYPE_UNSPECIFIED":
250
- return JsonSchemaType.JSON_SCHEMA_TYPE_UNSPECIFIED;
251
- case 1:
252
- case "JSON_SCHEMA_TYPE_OBJECT":
253
- return JsonSchemaType.JSON_SCHEMA_TYPE_OBJECT;
254
- case 2:
255
- case "JSON_SCHEMA_TYPE_ARRAY":
256
- return JsonSchemaType.JSON_SCHEMA_TYPE_ARRAY;
257
- case 3:
258
- case "JSON_SCHEMA_TYPE_STRING":
259
- return JsonSchemaType.JSON_SCHEMA_TYPE_STRING;
260
- case 4:
261
- case "JSON_SCHEMA_TYPE_NUMBER":
262
- return JsonSchemaType.JSON_SCHEMA_TYPE_NUMBER;
263
- case 5:
264
- case "JSON_SCHEMA_TYPE_BOOLEAN":
265
- return JsonSchemaType.JSON_SCHEMA_TYPE_BOOLEAN;
266
- case 6:
267
- case "JSON_SCHEMA_TYPE_NULL":
268
- return JsonSchemaType.JSON_SCHEMA_TYPE_NULL;
269
- case 7:
270
- case "JSON_SCHEMA_TYPE_INTEGER":
271
- return JsonSchemaType.JSON_SCHEMA_TYPE_INTEGER;
272
- case -1:
273
- case "UNRECOGNIZED":
274
- default:
275
- return JsonSchemaType.UNRECOGNIZED;
276
- }
277
- }
278
- function jsonSchemaTypeToJSON(object) {
279
- switch (object) {
280
- case JsonSchemaType.JSON_SCHEMA_TYPE_UNSPECIFIED:
281
- return "JSON_SCHEMA_TYPE_UNSPECIFIED";
282
- case JsonSchemaType.JSON_SCHEMA_TYPE_OBJECT:
283
- return "JSON_SCHEMA_TYPE_OBJECT";
284
- case JsonSchemaType.JSON_SCHEMA_TYPE_ARRAY:
285
- return "JSON_SCHEMA_TYPE_ARRAY";
286
- case JsonSchemaType.JSON_SCHEMA_TYPE_STRING:
287
- return "JSON_SCHEMA_TYPE_STRING";
288
- case JsonSchemaType.JSON_SCHEMA_TYPE_NUMBER:
289
- return "JSON_SCHEMA_TYPE_NUMBER";
290
- case JsonSchemaType.JSON_SCHEMA_TYPE_BOOLEAN:
291
- return "JSON_SCHEMA_TYPE_BOOLEAN";
292
- case JsonSchemaType.JSON_SCHEMA_TYPE_NULL:
293
- return "JSON_SCHEMA_TYPE_NULL";
294
- case JsonSchemaType.JSON_SCHEMA_TYPE_INTEGER:
295
- return "JSON_SCHEMA_TYPE_INTEGER";
296
- case JsonSchemaType.UNRECOGNIZED:
297
- default:
298
- return "UNRECOGNIZED";
299
- }
300
- }
301
- /** Image formats */
302
- var ImageFormat;
303
- (function (ImageFormat) {
304
- ImageFormat[ImageFormat["IMAGE_FORMAT_UNSPECIFIED"] = 0] = "IMAGE_FORMAT_UNSPECIFIED";
305
- ImageFormat[ImageFormat["IMAGE_FORMAT_JPEG"] = 1] = "IMAGE_FORMAT_JPEG";
306
- ImageFormat[ImageFormat["IMAGE_FORMAT_PNG"] = 2] = "IMAGE_FORMAT_PNG";
307
- ImageFormat[ImageFormat["IMAGE_FORMAT_GIF"] = 3] = "IMAGE_FORMAT_GIF";
308
- ImageFormat[ImageFormat["IMAGE_FORMAT_WEBP"] = 4] = "IMAGE_FORMAT_WEBP";
309
- ImageFormat[ImageFormat["IMAGE_FORMAT_BMP"] = 5] = "IMAGE_FORMAT_BMP";
310
- ImageFormat[ImageFormat["IMAGE_FORMAT_TIFF"] = 6] = "IMAGE_FORMAT_TIFF";
311
- ImageFormat[ImageFormat["IMAGE_FORMAT_SVG"] = 7] = "IMAGE_FORMAT_SVG";
312
- ImageFormat[ImageFormat["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
313
- })(ImageFormat || (exports.ImageFormat = ImageFormat = {}));
314
- function imageFormatFromJSON(object) {
315
- switch (object) {
316
- case 0:
317
- case "IMAGE_FORMAT_UNSPECIFIED":
318
- return ImageFormat.IMAGE_FORMAT_UNSPECIFIED;
319
- case 1:
320
- case "IMAGE_FORMAT_JPEG":
321
- return ImageFormat.IMAGE_FORMAT_JPEG;
322
- case 2:
323
- case "IMAGE_FORMAT_PNG":
324
- return ImageFormat.IMAGE_FORMAT_PNG;
325
- case 3:
326
- case "IMAGE_FORMAT_GIF":
327
- return ImageFormat.IMAGE_FORMAT_GIF;
328
- case 4:
329
- case "IMAGE_FORMAT_WEBP":
330
- return ImageFormat.IMAGE_FORMAT_WEBP;
331
- case 5:
332
- case "IMAGE_FORMAT_BMP":
333
- return ImageFormat.IMAGE_FORMAT_BMP;
334
- case 6:
335
- case "IMAGE_FORMAT_TIFF":
336
- return ImageFormat.IMAGE_FORMAT_TIFF;
337
- case 7:
338
- case "IMAGE_FORMAT_SVG":
339
- return ImageFormat.IMAGE_FORMAT_SVG;
340
- case -1:
341
- case "UNRECOGNIZED":
342
- default:
343
- return ImageFormat.UNRECOGNIZED;
344
- }
345
- }
346
- function imageFormatToJSON(object) {
347
- switch (object) {
348
- case ImageFormat.IMAGE_FORMAT_UNSPECIFIED:
349
- return "IMAGE_FORMAT_UNSPECIFIED";
350
- case ImageFormat.IMAGE_FORMAT_JPEG:
351
- return "IMAGE_FORMAT_JPEG";
352
- case ImageFormat.IMAGE_FORMAT_PNG:
353
- return "IMAGE_FORMAT_PNG";
354
- case ImageFormat.IMAGE_FORMAT_GIF:
355
- return "IMAGE_FORMAT_GIF";
356
- case ImageFormat.IMAGE_FORMAT_WEBP:
357
- return "IMAGE_FORMAT_WEBP";
358
- case ImageFormat.IMAGE_FORMAT_BMP:
359
- return "IMAGE_FORMAT_BMP";
360
- case ImageFormat.IMAGE_FORMAT_TIFF:
361
- return "IMAGE_FORMAT_TIFF";
362
- case ImageFormat.IMAGE_FORMAT_SVG:
363
- return "IMAGE_FORMAT_SVG";
364
- case ImageFormat.UNRECOGNIZED:
365
- default:
366
- return "UNRECOGNIZED";
367
- }
368
- }
369
- /** Audio formats */
370
- var AudioFormat;
371
- (function (AudioFormat) {
372
- AudioFormat[AudioFormat["AUDIO_FORMAT_UNSPECIFIED"] = 0] = "AUDIO_FORMAT_UNSPECIFIED";
373
- AudioFormat[AudioFormat["AUDIO_FORMAT_MP3"] = 1] = "AUDIO_FORMAT_MP3";
374
- AudioFormat[AudioFormat["AUDIO_FORMAT_WAV"] = 2] = "AUDIO_FORMAT_WAV";
375
- AudioFormat[AudioFormat["AUDIO_FORMAT_OGG"] = 3] = "AUDIO_FORMAT_OGG";
376
- AudioFormat[AudioFormat["AUDIO_FORMAT_M4A"] = 4] = "AUDIO_FORMAT_M4A";
377
- AudioFormat[AudioFormat["AUDIO_FORMAT_FLAC"] = 5] = "AUDIO_FORMAT_FLAC";
378
- AudioFormat[AudioFormat["AUDIO_FORMAT_AAC"] = 6] = "AUDIO_FORMAT_AAC";
379
- AudioFormat[AudioFormat["AUDIO_FORMAT_WMA"] = 7] = "AUDIO_FORMAT_WMA";
380
- AudioFormat[AudioFormat["AUDIO_FORMAT_OPUS"] = 8] = "AUDIO_FORMAT_OPUS";
381
- AudioFormat[AudioFormat["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
382
- })(AudioFormat || (exports.AudioFormat = AudioFormat = {}));
383
- function audioFormatFromJSON(object) {
384
- switch (object) {
385
- case 0:
386
- case "AUDIO_FORMAT_UNSPECIFIED":
387
- return AudioFormat.AUDIO_FORMAT_UNSPECIFIED;
388
- case 1:
389
- case "AUDIO_FORMAT_MP3":
390
- return AudioFormat.AUDIO_FORMAT_MP3;
391
- case 2:
392
- case "AUDIO_FORMAT_WAV":
393
- return AudioFormat.AUDIO_FORMAT_WAV;
394
- case 3:
395
- case "AUDIO_FORMAT_OGG":
396
- return AudioFormat.AUDIO_FORMAT_OGG;
397
- case 4:
398
- case "AUDIO_FORMAT_M4A":
399
- return AudioFormat.AUDIO_FORMAT_M4A;
400
- case 5:
401
- case "AUDIO_FORMAT_FLAC":
402
- return AudioFormat.AUDIO_FORMAT_FLAC;
403
- case 6:
404
- case "AUDIO_FORMAT_AAC":
405
- return AudioFormat.AUDIO_FORMAT_AAC;
406
- case 7:
407
- case "AUDIO_FORMAT_WMA":
408
- return AudioFormat.AUDIO_FORMAT_WMA;
409
- case 8:
410
- case "AUDIO_FORMAT_OPUS":
411
- return AudioFormat.AUDIO_FORMAT_OPUS;
412
- case -1:
413
- case "UNRECOGNIZED":
414
- default:
415
- return AudioFormat.UNRECOGNIZED;
416
- }
417
- }
418
- function audioFormatToJSON(object) {
419
- switch (object) {
420
- case AudioFormat.AUDIO_FORMAT_UNSPECIFIED:
421
- return "AUDIO_FORMAT_UNSPECIFIED";
422
- case AudioFormat.AUDIO_FORMAT_MP3:
423
- return "AUDIO_FORMAT_MP3";
424
- case AudioFormat.AUDIO_FORMAT_WAV:
425
- return "AUDIO_FORMAT_WAV";
426
- case AudioFormat.AUDIO_FORMAT_OGG:
427
- return "AUDIO_FORMAT_OGG";
428
- case AudioFormat.AUDIO_FORMAT_M4A:
429
- return "AUDIO_FORMAT_M4A";
430
- case AudioFormat.AUDIO_FORMAT_FLAC:
431
- return "AUDIO_FORMAT_FLAC";
432
- case AudioFormat.AUDIO_FORMAT_AAC:
433
- return "AUDIO_FORMAT_AAC";
434
- case AudioFormat.AUDIO_FORMAT_WMA:
435
- return "AUDIO_FORMAT_WMA";
436
- case AudioFormat.AUDIO_FORMAT_OPUS:
437
- return "AUDIO_FORMAT_OPUS";
438
- case AudioFormat.UNRECOGNIZED:
439
- default:
440
- return "UNRECOGNIZED";
441
- }
442
- }
443
- /** Video formats */
444
- var VideoFormat;
445
- (function (VideoFormat) {
446
- VideoFormat[VideoFormat["VIDEO_FORMAT_UNSPECIFIED"] = 0] = "VIDEO_FORMAT_UNSPECIFIED";
447
- VideoFormat[VideoFormat["VIDEO_FORMAT_MP4"] = 1] = "VIDEO_FORMAT_MP4";
448
- VideoFormat[VideoFormat["VIDEO_FORMAT_AVI"] = 2] = "VIDEO_FORMAT_AVI";
449
- VideoFormat[VideoFormat["VIDEO_FORMAT_MOV"] = 3] = "VIDEO_FORMAT_MOV";
450
- VideoFormat[VideoFormat["VIDEO_FORMAT_MKV"] = 4] = "VIDEO_FORMAT_MKV";
451
- VideoFormat[VideoFormat["VIDEO_FORMAT_WEBM"] = 5] = "VIDEO_FORMAT_WEBM";
452
- VideoFormat[VideoFormat["VIDEO_FORMAT_FLV"] = 6] = "VIDEO_FORMAT_FLV";
453
- VideoFormat[VideoFormat["VIDEO_FORMAT_WMV"] = 7] = "VIDEO_FORMAT_WMV";
454
- VideoFormat[VideoFormat["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
455
- })(VideoFormat || (exports.VideoFormat = VideoFormat = {}));
456
- function videoFormatFromJSON(object) {
457
- switch (object) {
458
- case 0:
459
- case "VIDEO_FORMAT_UNSPECIFIED":
460
- return VideoFormat.VIDEO_FORMAT_UNSPECIFIED;
461
- case 1:
462
- case "VIDEO_FORMAT_MP4":
463
- return VideoFormat.VIDEO_FORMAT_MP4;
464
- case 2:
465
- case "VIDEO_FORMAT_AVI":
466
- return VideoFormat.VIDEO_FORMAT_AVI;
467
- case 3:
468
- case "VIDEO_FORMAT_MOV":
469
- return VideoFormat.VIDEO_FORMAT_MOV;
470
- case 4:
471
- case "VIDEO_FORMAT_MKV":
472
- return VideoFormat.VIDEO_FORMAT_MKV;
473
- case 5:
474
- case "VIDEO_FORMAT_WEBM":
475
- return VideoFormat.VIDEO_FORMAT_WEBM;
476
- case 6:
477
- case "VIDEO_FORMAT_FLV":
478
- return VideoFormat.VIDEO_FORMAT_FLV;
479
- case 7:
480
- case "VIDEO_FORMAT_WMV":
481
- return VideoFormat.VIDEO_FORMAT_WMV;
482
- case -1:
483
- case "UNRECOGNIZED":
484
- default:
485
- return VideoFormat.UNRECOGNIZED;
486
- }
487
- }
488
- function videoFormatToJSON(object) {
489
- switch (object) {
490
- case VideoFormat.VIDEO_FORMAT_UNSPECIFIED:
491
- return "VIDEO_FORMAT_UNSPECIFIED";
492
- case VideoFormat.VIDEO_FORMAT_MP4:
493
- return "VIDEO_FORMAT_MP4";
494
- case VideoFormat.VIDEO_FORMAT_AVI:
495
- return "VIDEO_FORMAT_AVI";
496
- case VideoFormat.VIDEO_FORMAT_MOV:
497
- return "VIDEO_FORMAT_MOV";
498
- case VideoFormat.VIDEO_FORMAT_MKV:
499
- return "VIDEO_FORMAT_MKV";
500
- case VideoFormat.VIDEO_FORMAT_WEBM:
501
- return "VIDEO_FORMAT_WEBM";
502
- case VideoFormat.VIDEO_FORMAT_FLV:
503
- return "VIDEO_FORMAT_FLV";
504
- case VideoFormat.VIDEO_FORMAT_WMV:
505
- return "VIDEO_FORMAT_WMV";
506
- case VideoFormat.UNRECOGNIZED:
507
- default:
508
- return "UNRECOGNIZED";
509
- }
510
- }
511
- /** Tool types supported */
512
- var ToolType;
513
- (function (ToolType) {
514
- ToolType[ToolType["TOOL_TYPE_UNSPECIFIED"] = 0] = "TOOL_TYPE_UNSPECIFIED";
515
- ToolType[ToolType["TOOL_TYPE_FUNCTION"] = 1] = "TOOL_TYPE_FUNCTION";
516
- ToolType[ToolType["TOOL_TYPE_RETRIEVAL"] = 2] = "TOOL_TYPE_RETRIEVAL";
517
- ToolType[ToolType["TOOL_TYPE_CODE_INTERPRETER"] = 3] = "TOOL_TYPE_CODE_INTERPRETER";
518
- ToolType[ToolType["TOOL_TYPE_WEB_BROWSER"] = 4] = "TOOL_TYPE_WEB_BROWSER";
519
- ToolType[ToolType["TOOL_TYPE_DATABASE"] = 5] = "TOOL_TYPE_DATABASE";
520
- ToolType[ToolType["TOOL_TYPE_API"] = 6] = "TOOL_TYPE_API";
521
- ToolType[ToolType["TOOL_TYPE_CUSTOM"] = 7] = "TOOL_TYPE_CUSTOM";
522
- ToolType[ToolType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
523
- })(ToolType || (exports.ToolType = ToolType = {}));
524
- function toolTypeFromJSON(object) {
525
- switch (object) {
526
- case 0:
527
- case "TOOL_TYPE_UNSPECIFIED":
528
- return ToolType.TOOL_TYPE_UNSPECIFIED;
529
- case 1:
530
- case "TOOL_TYPE_FUNCTION":
531
- return ToolType.TOOL_TYPE_FUNCTION;
532
- case 2:
533
- case "TOOL_TYPE_RETRIEVAL":
534
- return ToolType.TOOL_TYPE_RETRIEVAL;
535
- case 3:
536
- case "TOOL_TYPE_CODE_INTERPRETER":
537
- return ToolType.TOOL_TYPE_CODE_INTERPRETER;
538
- case 4:
539
- case "TOOL_TYPE_WEB_BROWSER":
540
- return ToolType.TOOL_TYPE_WEB_BROWSER;
541
- case 5:
542
- case "TOOL_TYPE_DATABASE":
543
- return ToolType.TOOL_TYPE_DATABASE;
544
- case 6:
545
- case "TOOL_TYPE_API":
546
- return ToolType.TOOL_TYPE_API;
547
- case 7:
548
- case "TOOL_TYPE_CUSTOM":
549
- return ToolType.TOOL_TYPE_CUSTOM;
550
- case -1:
551
- case "UNRECOGNIZED":
552
- default:
553
- return ToolType.UNRECOGNIZED;
554
- }
555
- }
556
- function toolTypeToJSON(object) {
557
- switch (object) {
558
- case ToolType.TOOL_TYPE_UNSPECIFIED:
559
- return "TOOL_TYPE_UNSPECIFIED";
560
- case ToolType.TOOL_TYPE_FUNCTION:
561
- return "TOOL_TYPE_FUNCTION";
562
- case ToolType.TOOL_TYPE_RETRIEVAL:
563
- return "TOOL_TYPE_RETRIEVAL";
564
- case ToolType.TOOL_TYPE_CODE_INTERPRETER:
565
- return "TOOL_TYPE_CODE_INTERPRETER";
566
- case ToolType.TOOL_TYPE_WEB_BROWSER:
567
- return "TOOL_TYPE_WEB_BROWSER";
568
- case ToolType.TOOL_TYPE_DATABASE:
569
- return "TOOL_TYPE_DATABASE";
570
- case ToolType.TOOL_TYPE_API:
571
- return "TOOL_TYPE_API";
572
- case ToolType.TOOL_TYPE_CUSTOM:
573
- return "TOOL_TYPE_CUSTOM";
574
- case ToolType.UNRECOGNIZED:
575
- default:
576
- return "UNRECOGNIZED";
577
- }
578
- }
579
- /** Cache key strategies */
580
- var CacheStrategy;
581
- (function (CacheStrategy) {
582
- CacheStrategy[CacheStrategy["CACHE_STRATEGY_UNSPECIFIED"] = 0] = "CACHE_STRATEGY_UNSPECIFIED";
583
- CacheStrategy[CacheStrategy["CACHE_STRATEGY_HASH"] = 1] = "CACHE_STRATEGY_HASH";
584
- CacheStrategy[CacheStrategy["CACHE_STRATEGY_SEMANTIC"] = 2] = "CACHE_STRATEGY_SEMANTIC";
585
- CacheStrategy[CacheStrategy["CACHE_STRATEGY_CUSTOM"] = 3] = "CACHE_STRATEGY_CUSTOM";
586
- CacheStrategy[CacheStrategy["CACHE_STRATEGY_PREFIX"] = 4] = "CACHE_STRATEGY_PREFIX";
587
- CacheStrategy[CacheStrategy["CACHE_STRATEGY_SUFFIX"] = 5] = "CACHE_STRATEGY_SUFFIX";
588
- CacheStrategy[CacheStrategy["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
589
- })(CacheStrategy || (exports.CacheStrategy = CacheStrategy = {}));
590
- function cacheStrategyFromJSON(object) {
591
- switch (object) {
592
- case 0:
593
- case "CACHE_STRATEGY_UNSPECIFIED":
594
- return CacheStrategy.CACHE_STRATEGY_UNSPECIFIED;
595
- case 1:
596
- case "CACHE_STRATEGY_HASH":
597
- return CacheStrategy.CACHE_STRATEGY_HASH;
598
- case 2:
599
- case "CACHE_STRATEGY_SEMANTIC":
600
- return CacheStrategy.CACHE_STRATEGY_SEMANTIC;
601
- case 3:
602
- case "CACHE_STRATEGY_CUSTOM":
603
- return CacheStrategy.CACHE_STRATEGY_CUSTOM;
604
- case 4:
605
- case "CACHE_STRATEGY_PREFIX":
606
- return CacheStrategy.CACHE_STRATEGY_PREFIX;
607
- case 5:
608
- case "CACHE_STRATEGY_SUFFIX":
609
- return CacheStrategy.CACHE_STRATEGY_SUFFIX;
610
- case -1:
611
- case "UNRECOGNIZED":
612
- default:
613
- return CacheStrategy.UNRECOGNIZED;
614
- }
615
- }
616
- function cacheStrategyToJSON(object) {
617
- switch (object) {
618
- case CacheStrategy.CACHE_STRATEGY_UNSPECIFIED:
619
- return "CACHE_STRATEGY_UNSPECIFIED";
620
- case CacheStrategy.CACHE_STRATEGY_HASH:
621
- return "CACHE_STRATEGY_HASH";
622
- case CacheStrategy.CACHE_STRATEGY_SEMANTIC:
623
- return "CACHE_STRATEGY_SEMANTIC";
624
- case CacheStrategy.CACHE_STRATEGY_CUSTOM:
625
- return "CACHE_STRATEGY_CUSTOM";
626
- case CacheStrategy.CACHE_STRATEGY_PREFIX:
627
- return "CACHE_STRATEGY_PREFIX";
628
- case CacheStrategy.CACHE_STRATEGY_SUFFIX:
629
- return "CACHE_STRATEGY_SUFFIX";
630
- case CacheStrategy.UNRECOGNIZED:
631
- default:
632
- return "UNRECOGNIZED";
633
- }
634
- }
635
- /** Reasoning strategies */
636
- var ReasoningStrategy;
637
- (function (ReasoningStrategy) {
638
- ReasoningStrategy[ReasoningStrategy["REASONING_STRATEGY_UNSPECIFIED"] = 0] = "REASONING_STRATEGY_UNSPECIFIED";
639
- ReasoningStrategy[ReasoningStrategy["REASONING_STRATEGY_CHAIN_OF_THOUGHT"] = 1] = "REASONING_STRATEGY_CHAIN_OF_THOUGHT";
640
- ReasoningStrategy[ReasoningStrategy["REASONING_STRATEGY_TREE_OF_THOUGHTS"] = 2] = "REASONING_STRATEGY_TREE_OF_THOUGHTS";
641
- ReasoningStrategy[ReasoningStrategy["REASONING_STRATEGY_GRAPH_OF_THOUGHTS"] = 3] = "REASONING_STRATEGY_GRAPH_OF_THOUGHTS";
642
- ReasoningStrategy[ReasoningStrategy["REASONING_STRATEGY_STEP_BY_STEP"] = 4] = "REASONING_STRATEGY_STEP_BY_STEP";
643
- ReasoningStrategy[ReasoningStrategy["REASONING_STRATEGY_SELF_CONSISTENCY"] = 5] = "REASONING_STRATEGY_SELF_CONSISTENCY";
644
- ReasoningStrategy[ReasoningStrategy["REASONING_STRATEGY_LEAST_TO_MOST"] = 6] = "REASONING_STRATEGY_LEAST_TO_MOST";
645
- ReasoningStrategy[ReasoningStrategy["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
646
- })(ReasoningStrategy || (exports.ReasoningStrategy = ReasoningStrategy = {}));
647
- function reasoningStrategyFromJSON(object) {
648
- switch (object) {
649
- case 0:
650
- case "REASONING_STRATEGY_UNSPECIFIED":
651
- return ReasoningStrategy.REASONING_STRATEGY_UNSPECIFIED;
652
- case 1:
653
- case "REASONING_STRATEGY_CHAIN_OF_THOUGHT":
654
- return ReasoningStrategy.REASONING_STRATEGY_CHAIN_OF_THOUGHT;
655
- case 2:
656
- case "REASONING_STRATEGY_TREE_OF_THOUGHTS":
657
- return ReasoningStrategy.REASONING_STRATEGY_TREE_OF_THOUGHTS;
658
- case 3:
659
- case "REASONING_STRATEGY_GRAPH_OF_THOUGHTS":
660
- return ReasoningStrategy.REASONING_STRATEGY_GRAPH_OF_THOUGHTS;
661
- case 4:
662
- case "REASONING_STRATEGY_STEP_BY_STEP":
663
- return ReasoningStrategy.REASONING_STRATEGY_STEP_BY_STEP;
664
- case 5:
665
- case "REASONING_STRATEGY_SELF_CONSISTENCY":
666
- return ReasoningStrategy.REASONING_STRATEGY_SELF_CONSISTENCY;
667
- case 6:
668
- case "REASONING_STRATEGY_LEAST_TO_MOST":
669
- return ReasoningStrategy.REASONING_STRATEGY_LEAST_TO_MOST;
670
- case -1:
671
- case "UNRECOGNIZED":
672
- default:
673
- return ReasoningStrategy.UNRECOGNIZED;
674
- }
675
- }
676
- function reasoningStrategyToJSON(object) {
677
- switch (object) {
678
- case ReasoningStrategy.REASONING_STRATEGY_UNSPECIFIED:
679
- return "REASONING_STRATEGY_UNSPECIFIED";
680
- case ReasoningStrategy.REASONING_STRATEGY_CHAIN_OF_THOUGHT:
681
- return "REASONING_STRATEGY_CHAIN_OF_THOUGHT";
682
- case ReasoningStrategy.REASONING_STRATEGY_TREE_OF_THOUGHTS:
683
- return "REASONING_STRATEGY_TREE_OF_THOUGHTS";
684
- case ReasoningStrategy.REASONING_STRATEGY_GRAPH_OF_THOUGHTS:
685
- return "REASONING_STRATEGY_GRAPH_OF_THOUGHTS";
686
- case ReasoningStrategy.REASONING_STRATEGY_STEP_BY_STEP:
687
- return "REASONING_STRATEGY_STEP_BY_STEP";
688
- case ReasoningStrategy.REASONING_STRATEGY_SELF_CONSISTENCY:
689
- return "REASONING_STRATEGY_SELF_CONSISTENCY";
690
- case ReasoningStrategy.REASONING_STRATEGY_LEAST_TO_MOST:
691
- return "REASONING_STRATEGY_LEAST_TO_MOST";
692
- case ReasoningStrategy.UNRECOGNIZED:
693
- default:
694
- return "UNRECOGNIZED";
695
- }
696
- }
697
- /** Distance metrics for embeddings */
698
- var DistanceMetric;
699
- (function (DistanceMetric) {
700
- DistanceMetric[DistanceMetric["DISTANCE_METRIC_UNSPECIFIED"] = 0] = "DISTANCE_METRIC_UNSPECIFIED";
701
- DistanceMetric[DistanceMetric["DISTANCE_METRIC_COSINE"] = 1] = "DISTANCE_METRIC_COSINE";
702
- DistanceMetric[DistanceMetric["DISTANCE_METRIC_EUCLIDEAN"] = 2] = "DISTANCE_METRIC_EUCLIDEAN";
703
- DistanceMetric[DistanceMetric["DISTANCE_METRIC_DOT_PRODUCT"] = 3] = "DISTANCE_METRIC_DOT_PRODUCT";
704
- DistanceMetric[DistanceMetric["DISTANCE_METRIC_MANHATTAN"] = 4] = "DISTANCE_METRIC_MANHATTAN";
705
- DistanceMetric[DistanceMetric["DISTANCE_METRIC_HAMMING"] = 5] = "DISTANCE_METRIC_HAMMING";
706
- DistanceMetric[DistanceMetric["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
707
- })(DistanceMetric || (exports.DistanceMetric = DistanceMetric = {}));
708
- function distanceMetricFromJSON(object) {
709
- switch (object) {
710
- case 0:
711
- case "DISTANCE_METRIC_UNSPECIFIED":
712
- return DistanceMetric.DISTANCE_METRIC_UNSPECIFIED;
713
- case 1:
714
- case "DISTANCE_METRIC_COSINE":
715
- return DistanceMetric.DISTANCE_METRIC_COSINE;
716
- case 2:
717
- case "DISTANCE_METRIC_EUCLIDEAN":
718
- return DistanceMetric.DISTANCE_METRIC_EUCLIDEAN;
719
- case 3:
720
- case "DISTANCE_METRIC_DOT_PRODUCT":
721
- return DistanceMetric.DISTANCE_METRIC_DOT_PRODUCT;
722
- case 4:
723
- case "DISTANCE_METRIC_MANHATTAN":
724
- return DistanceMetric.DISTANCE_METRIC_MANHATTAN;
725
- case 5:
726
- case "DISTANCE_METRIC_HAMMING":
727
- return DistanceMetric.DISTANCE_METRIC_HAMMING;
728
- case -1:
729
- case "UNRECOGNIZED":
730
- default:
731
- return DistanceMetric.UNRECOGNIZED;
732
- }
733
- }
734
- function distanceMetricToJSON(object) {
735
- switch (object) {
736
- case DistanceMetric.DISTANCE_METRIC_UNSPECIFIED:
737
- return "DISTANCE_METRIC_UNSPECIFIED";
738
- case DistanceMetric.DISTANCE_METRIC_COSINE:
739
- return "DISTANCE_METRIC_COSINE";
740
- case DistanceMetric.DISTANCE_METRIC_EUCLIDEAN:
741
- return "DISTANCE_METRIC_EUCLIDEAN";
742
- case DistanceMetric.DISTANCE_METRIC_DOT_PRODUCT:
743
- return "DISTANCE_METRIC_DOT_PRODUCT";
744
- case DistanceMetric.DISTANCE_METRIC_MANHATTAN:
745
- return "DISTANCE_METRIC_MANHATTAN";
746
- case DistanceMetric.DISTANCE_METRIC_HAMMING:
747
- return "DISTANCE_METRIC_HAMMING";
748
- case DistanceMetric.UNRECOGNIZED:
749
- default:
750
- return "UNRECOGNIZED";
751
- }
752
- }
753
- /** Hyperparameter types for fine-tuning */
754
- var Hyperparameter;
755
- (function (Hyperparameter) {
756
- Hyperparameter[Hyperparameter["HYPERPARAMETER_UNSPECIFIED"] = 0] = "HYPERPARAMETER_UNSPECIFIED";
757
- Hyperparameter[Hyperparameter["HYPERPARAMETER_LEARNING_RATE"] = 1] = "HYPERPARAMETER_LEARNING_RATE";
758
- Hyperparameter[Hyperparameter["HYPERPARAMETER_BATCH_SIZE"] = 2] = "HYPERPARAMETER_BATCH_SIZE";
759
- Hyperparameter[Hyperparameter["HYPERPARAMETER_EPOCHS"] = 3] = "HYPERPARAMETER_EPOCHS";
760
- Hyperparameter[Hyperparameter["HYPERPARAMETER_WARMUP_STEPS"] = 4] = "HYPERPARAMETER_WARMUP_STEPS";
761
- Hyperparameter[Hyperparameter["HYPERPARAMETER_WEIGHT_DECAY"] = 5] = "HYPERPARAMETER_WEIGHT_DECAY";
762
- Hyperparameter[Hyperparameter["HYPERPARAMETER_GRADIENT_ACCUMULATION"] = 6] = "HYPERPARAMETER_GRADIENT_ACCUMULATION";
763
- Hyperparameter[Hyperparameter["HYPERPARAMETER_LR_SCHEDULER"] = 7] = "HYPERPARAMETER_LR_SCHEDULER";
764
- Hyperparameter[Hyperparameter["HYPERPARAMETER_OPTIMIZER"] = 8] = "HYPERPARAMETER_OPTIMIZER";
765
- Hyperparameter[Hyperparameter["HYPERPARAMETER_DROPOUT"] = 9] = "HYPERPARAMETER_DROPOUT";
766
- Hyperparameter[Hyperparameter["HYPERPARAMETER_MAX_SEQUENCE_LENGTH"] = 10] = "HYPERPARAMETER_MAX_SEQUENCE_LENGTH";
767
- Hyperparameter[Hyperparameter["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
768
- })(Hyperparameter || (exports.Hyperparameter = Hyperparameter = {}));
769
- function hyperparameterFromJSON(object) {
770
- switch (object) {
771
- case 0:
772
- case "HYPERPARAMETER_UNSPECIFIED":
773
- return Hyperparameter.HYPERPARAMETER_UNSPECIFIED;
774
- case 1:
775
- case "HYPERPARAMETER_LEARNING_RATE":
776
- return Hyperparameter.HYPERPARAMETER_LEARNING_RATE;
777
- case 2:
778
- case "HYPERPARAMETER_BATCH_SIZE":
779
- return Hyperparameter.HYPERPARAMETER_BATCH_SIZE;
780
- case 3:
781
- case "HYPERPARAMETER_EPOCHS":
782
- return Hyperparameter.HYPERPARAMETER_EPOCHS;
783
- case 4:
784
- case "HYPERPARAMETER_WARMUP_STEPS":
785
- return Hyperparameter.HYPERPARAMETER_WARMUP_STEPS;
786
- case 5:
787
- case "HYPERPARAMETER_WEIGHT_DECAY":
788
- return Hyperparameter.HYPERPARAMETER_WEIGHT_DECAY;
789
- case 6:
790
- case "HYPERPARAMETER_GRADIENT_ACCUMULATION":
791
- return Hyperparameter.HYPERPARAMETER_GRADIENT_ACCUMULATION;
792
- case 7:
793
- case "HYPERPARAMETER_LR_SCHEDULER":
794
- return Hyperparameter.HYPERPARAMETER_LR_SCHEDULER;
795
- case 8:
796
- case "HYPERPARAMETER_OPTIMIZER":
797
- return Hyperparameter.HYPERPARAMETER_OPTIMIZER;
798
- case 9:
799
- case "HYPERPARAMETER_DROPOUT":
800
- return Hyperparameter.HYPERPARAMETER_DROPOUT;
801
- case 10:
802
- case "HYPERPARAMETER_MAX_SEQUENCE_LENGTH":
803
- return Hyperparameter.HYPERPARAMETER_MAX_SEQUENCE_LENGTH;
804
- case -1:
805
- case "UNRECOGNIZED":
806
- default:
807
- return Hyperparameter.UNRECOGNIZED;
808
- }
809
- }
810
- function hyperparameterToJSON(object) {
811
- switch (object) {
812
- case Hyperparameter.HYPERPARAMETER_UNSPECIFIED:
813
- return "HYPERPARAMETER_UNSPECIFIED";
814
- case Hyperparameter.HYPERPARAMETER_LEARNING_RATE:
815
- return "HYPERPARAMETER_LEARNING_RATE";
816
- case Hyperparameter.HYPERPARAMETER_BATCH_SIZE:
817
- return "HYPERPARAMETER_BATCH_SIZE";
818
- case Hyperparameter.HYPERPARAMETER_EPOCHS:
819
- return "HYPERPARAMETER_EPOCHS";
820
- case Hyperparameter.HYPERPARAMETER_WARMUP_STEPS:
821
- return "HYPERPARAMETER_WARMUP_STEPS";
822
- case Hyperparameter.HYPERPARAMETER_WEIGHT_DECAY:
823
- return "HYPERPARAMETER_WEIGHT_DECAY";
824
- case Hyperparameter.HYPERPARAMETER_GRADIENT_ACCUMULATION:
825
- return "HYPERPARAMETER_GRADIENT_ACCUMULATION";
826
- case Hyperparameter.HYPERPARAMETER_LR_SCHEDULER:
827
- return "HYPERPARAMETER_LR_SCHEDULER";
828
- case Hyperparameter.HYPERPARAMETER_OPTIMIZER:
829
- return "HYPERPARAMETER_OPTIMIZER";
830
- case Hyperparameter.HYPERPARAMETER_DROPOUT:
831
- return "HYPERPARAMETER_DROPOUT";
832
- case Hyperparameter.HYPERPARAMETER_MAX_SEQUENCE_LENGTH:
833
- return "HYPERPARAMETER_MAX_SEQUENCE_LENGTH";
834
- case Hyperparameter.UNRECOGNIZED:
835
- default:
836
- return "UNRECOGNIZED";
837
- }
838
- }
839
- /** Modality direction - whether a modality supports input, output, or both */
840
- var ModalityDirection;
841
- (function (ModalityDirection) {
842
- ModalityDirection[ModalityDirection["MODALITY_DIRECTION_UNSPECIFIED"] = 0] = "MODALITY_DIRECTION_UNSPECIFIED";
843
- /** MODALITY_DIRECTION_INPUT_ONLY - Can only process/analyze (e.g., image analysis) */
844
- ModalityDirection[ModalityDirection["MODALITY_DIRECTION_INPUT_ONLY"] = 1] = "MODALITY_DIRECTION_INPUT_ONLY";
845
- /** MODALITY_DIRECTION_OUTPUT_ONLY - Can only generate (e.g., TTS without STT) */
846
- ModalityDirection[ModalityDirection["MODALITY_DIRECTION_OUTPUT_ONLY"] = 2] = "MODALITY_DIRECTION_OUTPUT_ONLY";
847
- /** MODALITY_DIRECTION_INPUT_OUTPUT - Can both process and generate */
848
- ModalityDirection[ModalityDirection["MODALITY_DIRECTION_INPUT_OUTPUT"] = 3] = "MODALITY_DIRECTION_INPUT_OUTPUT";
849
- ModalityDirection[ModalityDirection["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
850
- })(ModalityDirection || (exports.ModalityDirection = ModalityDirection = {}));
851
- function modalityDirectionFromJSON(object) {
852
- switch (object) {
853
- case 0:
854
- case "MODALITY_DIRECTION_UNSPECIFIED":
855
- return ModalityDirection.MODALITY_DIRECTION_UNSPECIFIED;
856
- case 1:
857
- case "MODALITY_DIRECTION_INPUT_ONLY":
858
- return ModalityDirection.MODALITY_DIRECTION_INPUT_ONLY;
859
- case 2:
860
- case "MODALITY_DIRECTION_OUTPUT_ONLY":
861
- return ModalityDirection.MODALITY_DIRECTION_OUTPUT_ONLY;
862
- case 3:
863
- case "MODALITY_DIRECTION_INPUT_OUTPUT":
864
- return ModalityDirection.MODALITY_DIRECTION_INPUT_OUTPUT;
865
- case -1:
866
- case "UNRECOGNIZED":
867
- default:
868
- return ModalityDirection.UNRECOGNIZED;
869
- }
870
- }
871
- function modalityDirectionToJSON(object) {
872
- switch (object) {
873
- case ModalityDirection.MODALITY_DIRECTION_UNSPECIFIED:
874
- return "MODALITY_DIRECTION_UNSPECIFIED";
875
- case ModalityDirection.MODALITY_DIRECTION_INPUT_ONLY:
876
- return "MODALITY_DIRECTION_INPUT_ONLY";
877
- case ModalityDirection.MODALITY_DIRECTION_OUTPUT_ONLY:
878
- return "MODALITY_DIRECTION_OUTPUT_ONLY";
879
- case ModalityDirection.MODALITY_DIRECTION_INPUT_OUTPUT:
880
- return "MODALITY_DIRECTION_INPUT_OUTPUT";
881
- case ModalityDirection.UNRECOGNIZED:
882
- default:
883
- return "UNRECOGNIZED";
884
- }
885
- }
886
- function createBaseCapability() {
887
- return {
888
- type: 0,
889
- enabled: false,
890
- text: undefined,
891
- structuredResponse: undefined,
892
- streaming: undefined,
893
- functionCalling: undefined,
894
- vision: undefined,
895
- toolUse: undefined,
896
- systemPrompt: undefined,
897
- caching: undefined,
898
- reasoning: undefined,
899
- audio: undefined,
900
- video: undefined,
901
- embeddings: undefined,
902
- fineTuning: undefined,
903
- additionalInfo: "",
904
- };
905
- }
906
- exports.Capability = {
907
- encode(message, writer = new wire_1.BinaryWriter()) {
908
- if (message.type !== 0) {
909
- writer.uint32(8).int32(message.type);
910
- }
911
- if (message.enabled !== false) {
912
- writer.uint32(16).bool(message.enabled);
913
- }
914
- if (message.text !== undefined) {
915
- exports.Text.encode(message.text, writer.uint32(26).fork()).join();
916
- }
917
- if (message.structuredResponse !== undefined) {
918
- exports.StructuredResponse.encode(message.structuredResponse, writer.uint32(34).fork()).join();
919
- }
920
- if (message.streaming !== undefined) {
921
- exports.Streaming.encode(message.streaming, writer.uint32(42).fork()).join();
922
- }
923
- if (message.functionCalling !== undefined) {
924
- exports.FunctionCalling.encode(message.functionCalling, writer.uint32(50).fork()).join();
925
- }
926
- if (message.vision !== undefined) {
927
- exports.Vision.encode(message.vision, writer.uint32(58).fork()).join();
928
- }
929
- if (message.toolUse !== undefined) {
930
- exports.ToolUse.encode(message.toolUse, writer.uint32(66).fork()).join();
931
- }
932
- if (message.systemPrompt !== undefined) {
933
- exports.SystemPrompt.encode(message.systemPrompt, writer.uint32(74).fork()).join();
934
- }
935
- if (message.caching !== undefined) {
936
- exports.Caching.encode(message.caching, writer.uint32(82).fork()).join();
937
- }
938
- if (message.reasoning !== undefined) {
939
- exports.Reasoning.encode(message.reasoning, writer.uint32(90).fork()).join();
940
- }
941
- if (message.audio !== undefined) {
942
- exports.Audio.encode(message.audio, writer.uint32(98).fork()).join();
943
- }
944
- if (message.video !== undefined) {
945
- exports.Video.encode(message.video, writer.uint32(106).fork()).join();
946
- }
947
- if (message.embeddings !== undefined) {
948
- exports.Embeddings.encode(message.embeddings, writer.uint32(114).fork()).join();
949
- }
950
- if (message.fineTuning !== undefined) {
951
- exports.FineTuning.encode(message.fineTuning, writer.uint32(122).fork()).join();
952
- }
953
- if (message.additionalInfo !== "") {
954
- writer.uint32(130).string(message.additionalInfo);
955
- }
956
- return writer;
957
- },
958
- decode(input, length) {
959
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
960
- const end = length === undefined ? reader.len : reader.pos + length;
961
- const message = createBaseCapability();
962
- while (reader.pos < end) {
963
- const tag = reader.uint32();
964
- switch (tag >>> 3) {
965
- case 1: {
966
- if (tag !== 8) {
967
- break;
968
- }
969
- message.type = reader.int32();
970
- continue;
971
- }
972
- case 2: {
973
- if (tag !== 16) {
974
- break;
975
- }
976
- message.enabled = reader.bool();
977
- continue;
978
- }
979
- case 3: {
980
- if (tag !== 26) {
981
- break;
982
- }
983
- message.text = exports.Text.decode(reader, reader.uint32());
984
- continue;
985
- }
986
- case 4: {
987
- if (tag !== 34) {
988
- break;
989
- }
990
- message.structuredResponse = exports.StructuredResponse.decode(reader, reader.uint32());
991
- continue;
992
- }
993
- case 5: {
994
- if (tag !== 42) {
995
- break;
996
- }
997
- message.streaming = exports.Streaming.decode(reader, reader.uint32());
998
- continue;
999
- }
1000
- case 6: {
1001
- if (tag !== 50) {
1002
- break;
1003
- }
1004
- message.functionCalling = exports.FunctionCalling.decode(reader, reader.uint32());
1005
- continue;
1006
- }
1007
- case 7: {
1008
- if (tag !== 58) {
1009
- break;
1010
- }
1011
- message.vision = exports.Vision.decode(reader, reader.uint32());
1012
- continue;
1013
- }
1014
- case 8: {
1015
- if (tag !== 66) {
1016
- break;
1017
- }
1018
- message.toolUse = exports.ToolUse.decode(reader, reader.uint32());
1019
- continue;
1020
- }
1021
- case 9: {
1022
- if (tag !== 74) {
1023
- break;
1024
- }
1025
- message.systemPrompt = exports.SystemPrompt.decode(reader, reader.uint32());
1026
- continue;
1027
- }
1028
- case 10: {
1029
- if (tag !== 82) {
1030
- break;
1031
- }
1032
- message.caching = exports.Caching.decode(reader, reader.uint32());
1033
- continue;
1034
- }
1035
- case 11: {
1036
- if (tag !== 90) {
1037
- break;
1038
- }
1039
- message.reasoning = exports.Reasoning.decode(reader, reader.uint32());
1040
- continue;
1041
- }
1042
- case 12: {
1043
- if (tag !== 98) {
1044
- break;
1045
- }
1046
- message.audio = exports.Audio.decode(reader, reader.uint32());
1047
- continue;
1048
- }
1049
- case 13: {
1050
- if (tag !== 106) {
1051
- break;
1052
- }
1053
- message.video = exports.Video.decode(reader, reader.uint32());
1054
- continue;
1055
- }
1056
- case 14: {
1057
- if (tag !== 114) {
1058
- break;
1059
- }
1060
- message.embeddings = exports.Embeddings.decode(reader, reader.uint32());
1061
- continue;
1062
- }
1063
- case 15: {
1064
- if (tag !== 122) {
1065
- break;
1066
- }
1067
- message.fineTuning = exports.FineTuning.decode(reader, reader.uint32());
1068
- continue;
1069
- }
1070
- case 16: {
1071
- if (tag !== 130) {
1072
- break;
1073
- }
1074
- message.additionalInfo = reader.string();
1075
- continue;
1076
- }
1077
- }
1078
- if ((tag & 7) === 4 || tag === 0) {
1079
- break;
1080
- }
1081
- reader.skip(tag & 7);
1082
- }
1083
- return message;
1084
- },
1085
- fromJSON(object) {
1086
- return {
1087
- type: isSet(object.type) ? capabilityTypeFromJSON(object.type) : 0,
1088
- enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
1089
- text: isSet(object.text) ? exports.Text.fromJSON(object.text) : undefined,
1090
- structuredResponse: isSet(object.structuredResponse)
1091
- ? exports.StructuredResponse.fromJSON(object.structuredResponse)
1092
- : isSet(object.structured_response)
1093
- ? exports.StructuredResponse.fromJSON(object.structured_response)
1094
- : undefined,
1095
- streaming: isSet(object.streaming) ? exports.Streaming.fromJSON(object.streaming) : undefined,
1096
- functionCalling: isSet(object.functionCalling)
1097
- ? exports.FunctionCalling.fromJSON(object.functionCalling)
1098
- : isSet(object.function_calling)
1099
- ? exports.FunctionCalling.fromJSON(object.function_calling)
1100
- : undefined,
1101
- vision: isSet(object.vision) ? exports.Vision.fromJSON(object.vision) : undefined,
1102
- toolUse: isSet(object.toolUse)
1103
- ? exports.ToolUse.fromJSON(object.toolUse)
1104
- : isSet(object.tool_use)
1105
- ? exports.ToolUse.fromJSON(object.tool_use)
1106
- : undefined,
1107
- systemPrompt: isSet(object.systemPrompt)
1108
- ? exports.SystemPrompt.fromJSON(object.systemPrompt)
1109
- : isSet(object.system_prompt)
1110
- ? exports.SystemPrompt.fromJSON(object.system_prompt)
1111
- : undefined,
1112
- caching: isSet(object.caching) ? exports.Caching.fromJSON(object.caching) : undefined,
1113
- reasoning: isSet(object.reasoning) ? exports.Reasoning.fromJSON(object.reasoning) : undefined,
1114
- audio: isSet(object.audio) ? exports.Audio.fromJSON(object.audio) : undefined,
1115
- video: isSet(object.video) ? exports.Video.fromJSON(object.video) : undefined,
1116
- embeddings: isSet(object.embeddings) ? exports.Embeddings.fromJSON(object.embeddings) : undefined,
1117
- fineTuning: isSet(object.fineTuning)
1118
- ? exports.FineTuning.fromJSON(object.fineTuning)
1119
- : isSet(object.fine_tuning)
1120
- ? exports.FineTuning.fromJSON(object.fine_tuning)
1121
- : undefined,
1122
- additionalInfo: isSet(object.additionalInfo)
1123
- ? globalThis.String(object.additionalInfo)
1124
- : isSet(object.additional_info)
1125
- ? globalThis.String(object.additional_info)
1126
- : "",
1127
- };
1128
- },
1129
- toJSON(message) {
1130
- const obj = {};
1131
- if (message.type !== 0) {
1132
- obj.type = capabilityTypeToJSON(message.type);
1133
- }
1134
- if (message.enabled !== false) {
1135
- obj.enabled = message.enabled;
1136
- }
1137
- if (message.text !== undefined) {
1138
- obj.text = exports.Text.toJSON(message.text);
1139
- }
1140
- if (message.structuredResponse !== undefined) {
1141
- obj.structuredResponse = exports.StructuredResponse.toJSON(message.structuredResponse);
1142
- }
1143
- if (message.streaming !== undefined) {
1144
- obj.streaming = exports.Streaming.toJSON(message.streaming);
1145
- }
1146
- if (message.functionCalling !== undefined) {
1147
- obj.functionCalling = exports.FunctionCalling.toJSON(message.functionCalling);
1148
- }
1149
- if (message.vision !== undefined) {
1150
- obj.vision = exports.Vision.toJSON(message.vision);
1151
- }
1152
- if (message.toolUse !== undefined) {
1153
- obj.toolUse = exports.ToolUse.toJSON(message.toolUse);
1154
- }
1155
- if (message.systemPrompt !== undefined) {
1156
- obj.systemPrompt = exports.SystemPrompt.toJSON(message.systemPrompt);
1157
- }
1158
- if (message.caching !== undefined) {
1159
- obj.caching = exports.Caching.toJSON(message.caching);
1160
- }
1161
- if (message.reasoning !== undefined) {
1162
- obj.reasoning = exports.Reasoning.toJSON(message.reasoning);
1163
- }
1164
- if (message.audio !== undefined) {
1165
- obj.audio = exports.Audio.toJSON(message.audio);
1166
- }
1167
- if (message.video !== undefined) {
1168
- obj.video = exports.Video.toJSON(message.video);
1169
- }
1170
- if (message.embeddings !== undefined) {
1171
- obj.embeddings = exports.Embeddings.toJSON(message.embeddings);
1172
- }
1173
- if (message.fineTuning !== undefined) {
1174
- obj.fineTuning = exports.FineTuning.toJSON(message.fineTuning);
1175
- }
1176
- if (message.additionalInfo !== "") {
1177
- obj.additionalInfo = message.additionalInfo;
1178
- }
1179
- return obj;
1180
- },
1181
- create(base) {
1182
- return exports.Capability.fromPartial(base !== null && base !== void 0 ? base : {});
1183
- },
1184
- fromPartial(object) {
1185
- var _a, _b, _c;
1186
- const message = createBaseCapability();
1187
- message.type = (_a = object.type) !== null && _a !== void 0 ? _a : 0;
1188
- message.enabled = (_b = object.enabled) !== null && _b !== void 0 ? _b : false;
1189
- message.text = (object.text !== undefined && object.text !== null) ? exports.Text.fromPartial(object.text) : undefined;
1190
- message.structuredResponse = (object.structuredResponse !== undefined && object.structuredResponse !== null)
1191
- ? exports.StructuredResponse.fromPartial(object.structuredResponse)
1192
- : undefined;
1193
- message.streaming = (object.streaming !== undefined && object.streaming !== null)
1194
- ? exports.Streaming.fromPartial(object.streaming)
1195
- : undefined;
1196
- message.functionCalling = (object.functionCalling !== undefined && object.functionCalling !== null)
1197
- ? exports.FunctionCalling.fromPartial(object.functionCalling)
1198
- : undefined;
1199
- message.vision = (object.vision !== undefined && object.vision !== null)
1200
- ? exports.Vision.fromPartial(object.vision)
1201
- : undefined;
1202
- message.toolUse = (object.toolUse !== undefined && object.toolUse !== null)
1203
- ? exports.ToolUse.fromPartial(object.toolUse)
1204
- : undefined;
1205
- message.systemPrompt = (object.systemPrompt !== undefined && object.systemPrompt !== null)
1206
- ? exports.SystemPrompt.fromPartial(object.systemPrompt)
1207
- : undefined;
1208
- message.caching = (object.caching !== undefined && object.caching !== null)
1209
- ? exports.Caching.fromPartial(object.caching)
1210
- : undefined;
1211
- message.reasoning = (object.reasoning !== undefined && object.reasoning !== null)
1212
- ? exports.Reasoning.fromPartial(object.reasoning)
1213
- : undefined;
1214
- message.audio = (object.audio !== undefined && object.audio !== null) ? exports.Audio.fromPartial(object.audio) : undefined;
1215
- message.video = (object.video !== undefined && object.video !== null) ? exports.Video.fromPartial(object.video) : undefined;
1216
- message.embeddings = (object.embeddings !== undefined && object.embeddings !== null)
1217
- ? exports.Embeddings.fromPartial(object.embeddings)
1218
- : undefined;
1219
- message.fineTuning = (object.fineTuning !== undefined && object.fineTuning !== null)
1220
- ? exports.FineTuning.fromPartial(object.fineTuning)
1221
- : undefined;
1222
- message.additionalInfo = (_c = object.additionalInfo) !== null && _c !== void 0 ? _c : "";
1223
- return message;
1224
- },
1225
- };
1226
- function createBaseText() {
1227
- return {
1228
- direction: 0,
1229
- maxInputLength: 0,
1230
- maxOutputLength: 0,
1231
- supportedLanguages: [],
1232
- supportsConversation: false,
1233
- supportsContext: false,
1234
- };
1235
- }
1236
- exports.Text = {
1237
- encode(message, writer = new wire_1.BinaryWriter()) {
1238
- if (message.direction !== 0) {
1239
- writer.uint32(8).int32(message.direction);
1240
- }
1241
- if (message.maxInputLength !== 0) {
1242
- writer.uint32(16).int32(message.maxInputLength);
1243
- }
1244
- if (message.maxOutputLength !== 0) {
1245
- writer.uint32(24).int32(message.maxOutputLength);
1246
- }
1247
- for (const v of message.supportedLanguages) {
1248
- writer.uint32(34).string(v);
1249
- }
1250
- if (message.supportsConversation !== false) {
1251
- writer.uint32(40).bool(message.supportsConversation);
1252
- }
1253
- if (message.supportsContext !== false) {
1254
- writer.uint32(48).bool(message.supportsContext);
1255
- }
1256
- return writer;
1257
- },
1258
- decode(input, length) {
1259
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1260
- const end = length === undefined ? reader.len : reader.pos + length;
1261
- const message = createBaseText();
1262
- while (reader.pos < end) {
1263
- const tag = reader.uint32();
1264
- switch (tag >>> 3) {
1265
- case 1: {
1266
- if (tag !== 8) {
1267
- break;
1268
- }
1269
- message.direction = reader.int32();
1270
- continue;
1271
- }
1272
- case 2: {
1273
- if (tag !== 16) {
1274
- break;
1275
- }
1276
- message.maxInputLength = reader.int32();
1277
- continue;
1278
- }
1279
- case 3: {
1280
- if (tag !== 24) {
1281
- break;
1282
- }
1283
- message.maxOutputLength = reader.int32();
1284
- continue;
1285
- }
1286
- case 4: {
1287
- if (tag !== 34) {
1288
- break;
1289
- }
1290
- message.supportedLanguages.push(reader.string());
1291
- continue;
1292
- }
1293
- case 5: {
1294
- if (tag !== 40) {
1295
- break;
1296
- }
1297
- message.supportsConversation = reader.bool();
1298
- continue;
1299
- }
1300
- case 6: {
1301
- if (tag !== 48) {
1302
- break;
1303
- }
1304
- message.supportsContext = reader.bool();
1305
- continue;
1306
- }
1307
- }
1308
- if ((tag & 7) === 4 || tag === 0) {
1309
- break;
1310
- }
1311
- reader.skip(tag & 7);
1312
- }
1313
- return message;
1314
- },
1315
- fromJSON(object) {
1316
- return {
1317
- direction: isSet(object.direction) ? modalityDirectionFromJSON(object.direction) : 0,
1318
- maxInputLength: isSet(object.maxInputLength)
1319
- ? globalThis.Number(object.maxInputLength)
1320
- : isSet(object.max_input_length)
1321
- ? globalThis.Number(object.max_input_length)
1322
- : 0,
1323
- maxOutputLength: isSet(object.maxOutputLength)
1324
- ? globalThis.Number(object.maxOutputLength)
1325
- : isSet(object.max_output_length)
1326
- ? globalThis.Number(object.max_output_length)
1327
- : 0,
1328
- supportedLanguages: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supportedLanguages)
1329
- ? object.supportedLanguages.map((e) => globalThis.String(e))
1330
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supported_languages)
1331
- ? object.supported_languages.map((e) => globalThis.String(e))
1332
- : [],
1333
- supportsConversation: isSet(object.supportsConversation)
1334
- ? globalThis.Boolean(object.supportsConversation)
1335
- : isSet(object.supports_conversation)
1336
- ? globalThis.Boolean(object.supports_conversation)
1337
- : false,
1338
- supportsContext: isSet(object.supportsContext)
1339
- ? globalThis.Boolean(object.supportsContext)
1340
- : isSet(object.supports_context)
1341
- ? globalThis.Boolean(object.supports_context)
1342
- : false,
1343
- };
1344
- },
1345
- toJSON(message) {
1346
- var _a;
1347
- const obj = {};
1348
- if (message.direction !== 0) {
1349
- obj.direction = modalityDirectionToJSON(message.direction);
1350
- }
1351
- if (message.maxInputLength !== 0) {
1352
- obj.maxInputLength = Math.round(message.maxInputLength);
1353
- }
1354
- if (message.maxOutputLength !== 0) {
1355
- obj.maxOutputLength = Math.round(message.maxOutputLength);
1356
- }
1357
- if ((_a = message.supportedLanguages) === null || _a === void 0 ? void 0 : _a.length) {
1358
- obj.supportedLanguages = message.supportedLanguages;
1359
- }
1360
- if (message.supportsConversation !== false) {
1361
- obj.supportsConversation = message.supportsConversation;
1362
- }
1363
- if (message.supportsContext !== false) {
1364
- obj.supportsContext = message.supportsContext;
1365
- }
1366
- return obj;
1367
- },
1368
- create(base) {
1369
- return exports.Text.fromPartial(base !== null && base !== void 0 ? base : {});
1370
- },
1371
- fromPartial(object) {
1372
- var _a;
1373
- var _b, _c, _d, _e, _f;
1374
- const message = createBaseText();
1375
- message.direction = (_b = object.direction) !== null && _b !== void 0 ? _b : 0;
1376
- message.maxInputLength = (_c = object.maxInputLength) !== null && _c !== void 0 ? _c : 0;
1377
- message.maxOutputLength = (_d = object.maxOutputLength) !== null && _d !== void 0 ? _d : 0;
1378
- message.supportedLanguages = ((_a = object.supportedLanguages) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
1379
- message.supportsConversation = (_e = object.supportsConversation) !== null && _e !== void 0 ? _e : false;
1380
- message.supportsContext = (_f = object.supportsContext) !== null && _f !== void 0 ? _f : false;
1381
- return message;
1382
- },
1383
- };
1384
- function createBaseStructuredResponse() {
1385
- return {
1386
- systemPromptHint: "",
1387
- supportedFormats: [],
1388
- maxSchemaDepth: 0,
1389
- requiresToolUse: false,
1390
- requiresJsonMode: false,
1391
- maxProperties: 0,
1392
- supportedTypes: [],
1393
- supportsStreaming: false,
1394
- };
1395
- }
1396
- exports.StructuredResponse = {
1397
- encode(message, writer = new wire_1.BinaryWriter()) {
1398
- if (message.systemPromptHint !== "") {
1399
- writer.uint32(10).string(message.systemPromptHint);
1400
- }
1401
- writer.uint32(18).fork();
1402
- for (const v of message.supportedFormats) {
1403
- writer.int32(v);
1404
- }
1405
- writer.join();
1406
- if (message.maxSchemaDepth !== 0) {
1407
- writer.uint32(24).int32(message.maxSchemaDepth);
1408
- }
1409
- if (message.requiresToolUse !== false) {
1410
- writer.uint32(32).bool(message.requiresToolUse);
1411
- }
1412
- if (message.requiresJsonMode !== false) {
1413
- writer.uint32(40).bool(message.requiresJsonMode);
1414
- }
1415
- if (message.maxProperties !== 0) {
1416
- writer.uint32(48).int32(message.maxProperties);
1417
- }
1418
- writer.uint32(58).fork();
1419
- for (const v of message.supportedTypes) {
1420
- writer.int32(v);
1421
- }
1422
- writer.join();
1423
- if (message.supportsStreaming !== false) {
1424
- writer.uint32(64).bool(message.supportsStreaming);
1425
- }
1426
- return writer;
1427
- },
1428
- decode(input, length) {
1429
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1430
- const end = length === undefined ? reader.len : reader.pos + length;
1431
- const message = createBaseStructuredResponse();
1432
- while (reader.pos < end) {
1433
- const tag = reader.uint32();
1434
- switch (tag >>> 3) {
1435
- case 1: {
1436
- if (tag !== 10) {
1437
- break;
1438
- }
1439
- message.systemPromptHint = reader.string();
1440
- continue;
1441
- }
1442
- case 2: {
1443
- if (tag === 16) {
1444
- message.supportedFormats.push(reader.int32());
1445
- continue;
1446
- }
1447
- if (tag === 18) {
1448
- const end2 = reader.uint32() + reader.pos;
1449
- while (reader.pos < end2) {
1450
- message.supportedFormats.push(reader.int32());
1451
- }
1452
- continue;
1453
- }
1454
- break;
1455
- }
1456
- case 3: {
1457
- if (tag !== 24) {
1458
- break;
1459
- }
1460
- message.maxSchemaDepth = reader.int32();
1461
- continue;
1462
- }
1463
- case 4: {
1464
- if (tag !== 32) {
1465
- break;
1466
- }
1467
- message.requiresToolUse = reader.bool();
1468
- continue;
1469
- }
1470
- case 5: {
1471
- if (tag !== 40) {
1472
- break;
1473
- }
1474
- message.requiresJsonMode = reader.bool();
1475
- continue;
1476
- }
1477
- case 6: {
1478
- if (tag !== 48) {
1479
- break;
1480
- }
1481
- message.maxProperties = reader.int32();
1482
- continue;
1483
- }
1484
- case 7: {
1485
- if (tag === 56) {
1486
- message.supportedTypes.push(reader.int32());
1487
- continue;
1488
- }
1489
- if (tag === 58) {
1490
- const end2 = reader.uint32() + reader.pos;
1491
- while (reader.pos < end2) {
1492
- message.supportedTypes.push(reader.int32());
1493
- }
1494
- continue;
1495
- }
1496
- break;
1497
- }
1498
- case 8: {
1499
- if (tag !== 64) {
1500
- break;
1501
- }
1502
- message.supportsStreaming = reader.bool();
1503
- continue;
1504
- }
1505
- }
1506
- if ((tag & 7) === 4 || tag === 0) {
1507
- break;
1508
- }
1509
- reader.skip(tag & 7);
1510
- }
1511
- return message;
1512
- },
1513
- fromJSON(object) {
1514
- return {
1515
- systemPromptHint: isSet(object.systemPromptHint)
1516
- ? globalThis.String(object.systemPromptHint)
1517
- : isSet(object.system_prompt_hint)
1518
- ? globalThis.String(object.system_prompt_hint)
1519
- : "",
1520
- supportedFormats: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supportedFormats)
1521
- ? object.supportedFormats.map((e) => dataFormatFromJSON(e))
1522
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supported_formats)
1523
- ? object.supported_formats.map((e) => dataFormatFromJSON(e))
1524
- : [],
1525
- maxSchemaDepth: isSet(object.maxSchemaDepth)
1526
- ? globalThis.Number(object.maxSchemaDepth)
1527
- : isSet(object.max_schema_depth)
1528
- ? globalThis.Number(object.max_schema_depth)
1529
- : 0,
1530
- requiresToolUse: isSet(object.requiresToolUse)
1531
- ? globalThis.Boolean(object.requiresToolUse)
1532
- : isSet(object.requires_tool_use)
1533
- ? globalThis.Boolean(object.requires_tool_use)
1534
- : false,
1535
- requiresJsonMode: isSet(object.requiresJsonMode)
1536
- ? globalThis.Boolean(object.requiresJsonMode)
1537
- : isSet(object.requires_json_mode)
1538
- ? globalThis.Boolean(object.requires_json_mode)
1539
- : false,
1540
- maxProperties: isSet(object.maxProperties)
1541
- ? globalThis.Number(object.maxProperties)
1542
- : isSet(object.max_properties)
1543
- ? globalThis.Number(object.max_properties)
1544
- : 0,
1545
- supportedTypes: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supportedTypes)
1546
- ? object.supportedTypes.map((e) => jsonSchemaTypeFromJSON(e))
1547
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supported_types)
1548
- ? object.supported_types.map((e) => jsonSchemaTypeFromJSON(e))
1549
- : [],
1550
- supportsStreaming: isSet(object.supportsStreaming)
1551
- ? globalThis.Boolean(object.supportsStreaming)
1552
- : isSet(object.supports_streaming)
1553
- ? globalThis.Boolean(object.supports_streaming)
1554
- : false,
1555
- };
1556
- },
1557
- toJSON(message) {
1558
- var _a, _b;
1559
- const obj = {};
1560
- if (message.systemPromptHint !== "") {
1561
- obj.systemPromptHint = message.systemPromptHint;
1562
- }
1563
- if ((_a = message.supportedFormats) === null || _a === void 0 ? void 0 : _a.length) {
1564
- obj.supportedFormats = message.supportedFormats.map((e) => dataFormatToJSON(e));
1565
- }
1566
- if (message.maxSchemaDepth !== 0) {
1567
- obj.maxSchemaDepth = Math.round(message.maxSchemaDepth);
1568
- }
1569
- if (message.requiresToolUse !== false) {
1570
- obj.requiresToolUse = message.requiresToolUse;
1571
- }
1572
- if (message.requiresJsonMode !== false) {
1573
- obj.requiresJsonMode = message.requiresJsonMode;
1574
- }
1575
- if (message.maxProperties !== 0) {
1576
- obj.maxProperties = Math.round(message.maxProperties);
1577
- }
1578
- if ((_b = message.supportedTypes) === null || _b === void 0 ? void 0 : _b.length) {
1579
- obj.supportedTypes = message.supportedTypes.map((e) => jsonSchemaTypeToJSON(e));
1580
- }
1581
- if (message.supportsStreaming !== false) {
1582
- obj.supportsStreaming = message.supportsStreaming;
1583
- }
1584
- return obj;
1585
- },
1586
- create(base) {
1587
- return exports.StructuredResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1588
- },
1589
- fromPartial(object) {
1590
- var _a, _b;
1591
- var _c, _d, _e, _f, _g, _h;
1592
- const message = createBaseStructuredResponse();
1593
- message.systemPromptHint = (_c = object.systemPromptHint) !== null && _c !== void 0 ? _c : "";
1594
- message.supportedFormats = ((_a = object.supportedFormats) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
1595
- message.maxSchemaDepth = (_d = object.maxSchemaDepth) !== null && _d !== void 0 ? _d : 0;
1596
- message.requiresToolUse = (_e = object.requiresToolUse) !== null && _e !== void 0 ? _e : false;
1597
- message.requiresJsonMode = (_f = object.requiresJsonMode) !== null && _f !== void 0 ? _f : false;
1598
- message.maxProperties = (_g = object.maxProperties) !== null && _g !== void 0 ? _g : 0;
1599
- message.supportedTypes = ((_b = object.supportedTypes) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
1600
- message.supportsStreaming = (_h = object.supportsStreaming) !== null && _h !== void 0 ? _h : false;
1601
- return message;
1602
- },
1603
- };
1604
- function createBaseStreaming() {
1605
- return {
1606
- chunkDelimiter: "",
1607
- bufferSize: 0,
1608
- supportsSse: false,
1609
- supportsUsage: false,
1610
- avgChunkSizeBytes: 0,
1611
- maxChunkDelayMs: 0,
1612
- };
1613
- }
1614
- exports.Streaming = {
1615
- encode(message, writer = new wire_1.BinaryWriter()) {
1616
- if (message.chunkDelimiter !== "") {
1617
- writer.uint32(10).string(message.chunkDelimiter);
1618
- }
1619
- if (message.bufferSize !== 0) {
1620
- writer.uint32(16).int32(message.bufferSize);
1621
- }
1622
- if (message.supportsSse !== false) {
1623
- writer.uint32(24).bool(message.supportsSse);
1624
- }
1625
- if (message.supportsUsage !== false) {
1626
- writer.uint32(32).bool(message.supportsUsage);
1627
- }
1628
- if (message.avgChunkSizeBytes !== 0) {
1629
- writer.uint32(40).int32(message.avgChunkSizeBytes);
1630
- }
1631
- if (message.maxChunkDelayMs !== 0) {
1632
- writer.uint32(48).int32(message.maxChunkDelayMs);
1633
- }
1634
- return writer;
1635
- },
1636
- decode(input, length) {
1637
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1638
- const end = length === undefined ? reader.len : reader.pos + length;
1639
- const message = createBaseStreaming();
1640
- while (reader.pos < end) {
1641
- const tag = reader.uint32();
1642
- switch (tag >>> 3) {
1643
- case 1: {
1644
- if (tag !== 10) {
1645
- break;
1646
- }
1647
- message.chunkDelimiter = reader.string();
1648
- continue;
1649
- }
1650
- case 2: {
1651
- if (tag !== 16) {
1652
- break;
1653
- }
1654
- message.bufferSize = reader.int32();
1655
- continue;
1656
- }
1657
- case 3: {
1658
- if (tag !== 24) {
1659
- break;
1660
- }
1661
- message.supportsSse = reader.bool();
1662
- continue;
1663
- }
1664
- case 4: {
1665
- if (tag !== 32) {
1666
- break;
1667
- }
1668
- message.supportsUsage = reader.bool();
1669
- continue;
1670
- }
1671
- case 5: {
1672
- if (tag !== 40) {
1673
- break;
1674
- }
1675
- message.avgChunkSizeBytes = reader.int32();
1676
- continue;
1677
- }
1678
- case 6: {
1679
- if (tag !== 48) {
1680
- break;
1681
- }
1682
- message.maxChunkDelayMs = reader.int32();
1683
- continue;
1684
- }
1685
- }
1686
- if ((tag & 7) === 4 || tag === 0) {
1687
- break;
1688
- }
1689
- reader.skip(tag & 7);
1690
- }
1691
- return message;
1692
- },
1693
- fromJSON(object) {
1694
- return {
1695
- chunkDelimiter: isSet(object.chunkDelimiter)
1696
- ? globalThis.String(object.chunkDelimiter)
1697
- : isSet(object.chunk_delimiter)
1698
- ? globalThis.String(object.chunk_delimiter)
1699
- : "",
1700
- bufferSize: isSet(object.bufferSize)
1701
- ? globalThis.Number(object.bufferSize)
1702
- : isSet(object.buffer_size)
1703
- ? globalThis.Number(object.buffer_size)
1704
- : 0,
1705
- supportsSse: isSet(object.supportsSse)
1706
- ? globalThis.Boolean(object.supportsSse)
1707
- : isSet(object.supports_sse)
1708
- ? globalThis.Boolean(object.supports_sse)
1709
- : false,
1710
- supportsUsage: isSet(object.supportsUsage)
1711
- ? globalThis.Boolean(object.supportsUsage)
1712
- : isSet(object.supports_usage)
1713
- ? globalThis.Boolean(object.supports_usage)
1714
- : false,
1715
- avgChunkSizeBytes: isSet(object.avgChunkSizeBytes)
1716
- ? globalThis.Number(object.avgChunkSizeBytes)
1717
- : isSet(object.avg_chunk_size_bytes)
1718
- ? globalThis.Number(object.avg_chunk_size_bytes)
1719
- : 0,
1720
- maxChunkDelayMs: isSet(object.maxChunkDelayMs)
1721
- ? globalThis.Number(object.maxChunkDelayMs)
1722
- : isSet(object.max_chunk_delay_ms)
1723
- ? globalThis.Number(object.max_chunk_delay_ms)
1724
- : 0,
1725
- };
1726
- },
1727
- toJSON(message) {
1728
- const obj = {};
1729
- if (message.chunkDelimiter !== "") {
1730
- obj.chunkDelimiter = message.chunkDelimiter;
1731
- }
1732
- if (message.bufferSize !== 0) {
1733
- obj.bufferSize = Math.round(message.bufferSize);
1734
- }
1735
- if (message.supportsSse !== false) {
1736
- obj.supportsSse = message.supportsSse;
1737
- }
1738
- if (message.supportsUsage !== false) {
1739
- obj.supportsUsage = message.supportsUsage;
1740
- }
1741
- if (message.avgChunkSizeBytes !== 0) {
1742
- obj.avgChunkSizeBytes = Math.round(message.avgChunkSizeBytes);
1743
- }
1744
- if (message.maxChunkDelayMs !== 0) {
1745
- obj.maxChunkDelayMs = Math.round(message.maxChunkDelayMs);
1746
- }
1747
- return obj;
1748
- },
1749
- create(base) {
1750
- return exports.Streaming.fromPartial(base !== null && base !== void 0 ? base : {});
1751
- },
1752
- fromPartial(object) {
1753
- var _a, _b, _c, _d, _e, _f;
1754
- const message = createBaseStreaming();
1755
- message.chunkDelimiter = (_a = object.chunkDelimiter) !== null && _a !== void 0 ? _a : "";
1756
- message.bufferSize = (_b = object.bufferSize) !== null && _b !== void 0 ? _b : 0;
1757
- message.supportsSse = (_c = object.supportsSse) !== null && _c !== void 0 ? _c : false;
1758
- message.supportsUsage = (_d = object.supportsUsage) !== null && _d !== void 0 ? _d : false;
1759
- message.avgChunkSizeBytes = (_e = object.avgChunkSizeBytes) !== null && _e !== void 0 ? _e : 0;
1760
- message.maxChunkDelayMs = (_f = object.maxChunkDelayMs) !== null && _f !== void 0 ? _f : 0;
1761
- return message;
1762
- },
1763
- };
1764
- function createBaseFunctionCalling() {
1765
- return {
1766
- maxFunctions: 0,
1767
- maxParallelCalls: 0,
1768
- supportsParallel: false,
1769
- requiresToolRole: false,
1770
- supportsStreaming: false,
1771
- supportedParameterTypes: [],
1772
- maxNestingDepth: 0,
1773
- };
1774
- }
1775
- exports.FunctionCalling = {
1776
- encode(message, writer = new wire_1.BinaryWriter()) {
1777
- if (message.maxFunctions !== 0) {
1778
- writer.uint32(8).int32(message.maxFunctions);
1779
- }
1780
- if (message.maxParallelCalls !== 0) {
1781
- writer.uint32(16).int32(message.maxParallelCalls);
1782
- }
1783
- if (message.supportsParallel !== false) {
1784
- writer.uint32(24).bool(message.supportsParallel);
1785
- }
1786
- if (message.requiresToolRole !== false) {
1787
- writer.uint32(32).bool(message.requiresToolRole);
1788
- }
1789
- if (message.supportsStreaming !== false) {
1790
- writer.uint32(40).bool(message.supportsStreaming);
1791
- }
1792
- writer.uint32(50).fork();
1793
- for (const v of message.supportedParameterTypes) {
1794
- writer.int32(v);
1795
- }
1796
- writer.join();
1797
- if (message.maxNestingDepth !== 0) {
1798
- writer.uint32(56).int32(message.maxNestingDepth);
1799
- }
1800
- return writer;
1801
- },
1802
- decode(input, length) {
1803
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1804
- const end = length === undefined ? reader.len : reader.pos + length;
1805
- const message = createBaseFunctionCalling();
1806
- while (reader.pos < end) {
1807
- const tag = reader.uint32();
1808
- switch (tag >>> 3) {
1809
- case 1: {
1810
- if (tag !== 8) {
1811
- break;
1812
- }
1813
- message.maxFunctions = reader.int32();
1814
- continue;
1815
- }
1816
- case 2: {
1817
- if (tag !== 16) {
1818
- break;
1819
- }
1820
- message.maxParallelCalls = reader.int32();
1821
- continue;
1822
- }
1823
- case 3: {
1824
- if (tag !== 24) {
1825
- break;
1826
- }
1827
- message.supportsParallel = reader.bool();
1828
- continue;
1829
- }
1830
- case 4: {
1831
- if (tag !== 32) {
1832
- break;
1833
- }
1834
- message.requiresToolRole = reader.bool();
1835
- continue;
1836
- }
1837
- case 5: {
1838
- if (tag !== 40) {
1839
- break;
1840
- }
1841
- message.supportsStreaming = reader.bool();
1842
- continue;
1843
- }
1844
- case 6: {
1845
- if (tag === 48) {
1846
- message.supportedParameterTypes.push(reader.int32());
1847
- continue;
1848
- }
1849
- if (tag === 50) {
1850
- const end2 = reader.uint32() + reader.pos;
1851
- while (reader.pos < end2) {
1852
- message.supportedParameterTypes.push(reader.int32());
1853
- }
1854
- continue;
1855
- }
1856
- break;
1857
- }
1858
- case 7: {
1859
- if (tag !== 56) {
1860
- break;
1861
- }
1862
- message.maxNestingDepth = reader.int32();
1863
- continue;
1864
- }
1865
- }
1866
- if ((tag & 7) === 4 || tag === 0) {
1867
- break;
1868
- }
1869
- reader.skip(tag & 7);
1870
- }
1871
- return message;
1872
- },
1873
- fromJSON(object) {
1874
- return {
1875
- maxFunctions: isSet(object.maxFunctions)
1876
- ? globalThis.Number(object.maxFunctions)
1877
- : isSet(object.max_functions)
1878
- ? globalThis.Number(object.max_functions)
1879
- : 0,
1880
- maxParallelCalls: isSet(object.maxParallelCalls)
1881
- ? globalThis.Number(object.maxParallelCalls)
1882
- : isSet(object.max_parallel_calls)
1883
- ? globalThis.Number(object.max_parallel_calls)
1884
- : 0,
1885
- supportsParallel: isSet(object.supportsParallel)
1886
- ? globalThis.Boolean(object.supportsParallel)
1887
- : isSet(object.supports_parallel)
1888
- ? globalThis.Boolean(object.supports_parallel)
1889
- : false,
1890
- requiresToolRole: isSet(object.requiresToolRole)
1891
- ? globalThis.Boolean(object.requiresToolRole)
1892
- : isSet(object.requires_tool_role)
1893
- ? globalThis.Boolean(object.requires_tool_role)
1894
- : false,
1895
- supportsStreaming: isSet(object.supportsStreaming)
1896
- ? globalThis.Boolean(object.supportsStreaming)
1897
- : isSet(object.supports_streaming)
1898
- ? globalThis.Boolean(object.supports_streaming)
1899
- : false,
1900
- supportedParameterTypes: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supportedParameterTypes)
1901
- ? object.supportedParameterTypes.map((e) => jsonSchemaTypeFromJSON(e))
1902
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supported_parameter_types)
1903
- ? object.supported_parameter_types.map((e) => jsonSchemaTypeFromJSON(e))
1904
- : [],
1905
- maxNestingDepth: isSet(object.maxNestingDepth)
1906
- ? globalThis.Number(object.maxNestingDepth)
1907
- : isSet(object.max_nesting_depth)
1908
- ? globalThis.Number(object.max_nesting_depth)
1909
- : 0,
1910
- };
1911
- },
1912
- toJSON(message) {
1913
- var _a;
1914
- const obj = {};
1915
- if (message.maxFunctions !== 0) {
1916
- obj.maxFunctions = Math.round(message.maxFunctions);
1917
- }
1918
- if (message.maxParallelCalls !== 0) {
1919
- obj.maxParallelCalls = Math.round(message.maxParallelCalls);
1920
- }
1921
- if (message.supportsParallel !== false) {
1922
- obj.supportsParallel = message.supportsParallel;
1923
- }
1924
- if (message.requiresToolRole !== false) {
1925
- obj.requiresToolRole = message.requiresToolRole;
1926
- }
1927
- if (message.supportsStreaming !== false) {
1928
- obj.supportsStreaming = message.supportsStreaming;
1929
- }
1930
- if ((_a = message.supportedParameterTypes) === null || _a === void 0 ? void 0 : _a.length) {
1931
- obj.supportedParameterTypes = message.supportedParameterTypes.map((e) => jsonSchemaTypeToJSON(e));
1932
- }
1933
- if (message.maxNestingDepth !== 0) {
1934
- obj.maxNestingDepth = Math.round(message.maxNestingDepth);
1935
- }
1936
- return obj;
1937
- },
1938
- create(base) {
1939
- return exports.FunctionCalling.fromPartial(base !== null && base !== void 0 ? base : {});
1940
- },
1941
- fromPartial(object) {
1942
- var _a;
1943
- var _b, _c, _d, _e, _f, _g;
1944
- const message = createBaseFunctionCalling();
1945
- message.maxFunctions = (_b = object.maxFunctions) !== null && _b !== void 0 ? _b : 0;
1946
- message.maxParallelCalls = (_c = object.maxParallelCalls) !== null && _c !== void 0 ? _c : 0;
1947
- message.supportsParallel = (_d = object.supportsParallel) !== null && _d !== void 0 ? _d : false;
1948
- message.requiresToolRole = (_e = object.requiresToolRole) !== null && _e !== void 0 ? _e : false;
1949
- message.supportsStreaming = (_f = object.supportsStreaming) !== null && _f !== void 0 ? _f : false;
1950
- message.supportedParameterTypes = ((_a = object.supportedParameterTypes) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
1951
- message.maxNestingDepth = (_g = object.maxNestingDepth) !== null && _g !== void 0 ? _g : 0;
1952
- return message;
1953
- },
1954
- };
1955
- function createBaseVision() {
1956
- return {
1957
- direction: 0,
1958
- supportedFormats: [],
1959
- maxImageSizeBytes: 0,
1960
- maxImagesPerRequest: 0,
1961
- maxResolutionWidth: 0,
1962
- maxResolutionHeight: 0,
1963
- supportsOcr: false,
1964
- supportsObjectDetection: false,
1965
- supportsVideoFrames: false,
1966
- };
1967
- }
1968
- exports.Vision = {
1969
- encode(message, writer = new wire_1.BinaryWriter()) {
1970
- if (message.direction !== 0) {
1971
- writer.uint32(8).int32(message.direction);
1972
- }
1973
- writer.uint32(18).fork();
1974
- for (const v of message.supportedFormats) {
1975
- writer.int32(v);
1976
- }
1977
- writer.join();
1978
- if (message.maxImageSizeBytes !== 0) {
1979
- writer.uint32(24).int64(message.maxImageSizeBytes);
1980
- }
1981
- if (message.maxImagesPerRequest !== 0) {
1982
- writer.uint32(32).int32(message.maxImagesPerRequest);
1983
- }
1984
- if (message.maxResolutionWidth !== 0) {
1985
- writer.uint32(40).int32(message.maxResolutionWidth);
1986
- }
1987
- if (message.maxResolutionHeight !== 0) {
1988
- writer.uint32(48).int32(message.maxResolutionHeight);
1989
- }
1990
- if (message.supportsOcr !== false) {
1991
- writer.uint32(56).bool(message.supportsOcr);
1992
- }
1993
- if (message.supportsObjectDetection !== false) {
1994
- writer.uint32(64).bool(message.supportsObjectDetection);
1995
- }
1996
- if (message.supportsVideoFrames !== false) {
1997
- writer.uint32(72).bool(message.supportsVideoFrames);
1998
- }
1999
- return writer;
2000
- },
2001
- decode(input, length) {
2002
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2003
- const end = length === undefined ? reader.len : reader.pos + length;
2004
- const message = createBaseVision();
2005
- while (reader.pos < end) {
2006
- const tag = reader.uint32();
2007
- switch (tag >>> 3) {
2008
- case 1: {
2009
- if (tag !== 8) {
2010
- break;
2011
- }
2012
- message.direction = reader.int32();
2013
- continue;
2014
- }
2015
- case 2: {
2016
- if (tag === 16) {
2017
- message.supportedFormats.push(reader.int32());
2018
- continue;
2019
- }
2020
- if (tag === 18) {
2021
- const end2 = reader.uint32() + reader.pos;
2022
- while (reader.pos < end2) {
2023
- message.supportedFormats.push(reader.int32());
2024
- }
2025
- continue;
2026
- }
2027
- break;
2028
- }
2029
- case 3: {
2030
- if (tag !== 24) {
2031
- break;
2032
- }
2033
- message.maxImageSizeBytes = longToNumber(reader.int64());
2034
- continue;
2035
- }
2036
- case 4: {
2037
- if (tag !== 32) {
2038
- break;
2039
- }
2040
- message.maxImagesPerRequest = reader.int32();
2041
- continue;
2042
- }
2043
- case 5: {
2044
- if (tag !== 40) {
2045
- break;
2046
- }
2047
- message.maxResolutionWidth = reader.int32();
2048
- continue;
2049
- }
2050
- case 6: {
2051
- if (tag !== 48) {
2052
- break;
2053
- }
2054
- message.maxResolutionHeight = reader.int32();
2055
- continue;
2056
- }
2057
- case 7: {
2058
- if (tag !== 56) {
2059
- break;
2060
- }
2061
- message.supportsOcr = reader.bool();
2062
- continue;
2063
- }
2064
- case 8: {
2065
- if (tag !== 64) {
2066
- break;
2067
- }
2068
- message.supportsObjectDetection = reader.bool();
2069
- continue;
2070
- }
2071
- case 9: {
2072
- if (tag !== 72) {
2073
- break;
2074
- }
2075
- message.supportsVideoFrames = reader.bool();
2076
- continue;
2077
- }
2078
- }
2079
- if ((tag & 7) === 4 || tag === 0) {
2080
- break;
2081
- }
2082
- reader.skip(tag & 7);
2083
- }
2084
- return message;
2085
- },
2086
- fromJSON(object) {
2087
- return {
2088
- direction: isSet(object.direction) ? modalityDirectionFromJSON(object.direction) : 0,
2089
- supportedFormats: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supportedFormats)
2090
- ? object.supportedFormats.map((e) => imageFormatFromJSON(e))
2091
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supported_formats)
2092
- ? object.supported_formats.map((e) => imageFormatFromJSON(e))
2093
- : [],
2094
- maxImageSizeBytes: isSet(object.maxImageSizeBytes)
2095
- ? globalThis.Number(object.maxImageSizeBytes)
2096
- : isSet(object.max_image_size_bytes)
2097
- ? globalThis.Number(object.max_image_size_bytes)
2098
- : 0,
2099
- maxImagesPerRequest: isSet(object.maxImagesPerRequest)
2100
- ? globalThis.Number(object.maxImagesPerRequest)
2101
- : isSet(object.max_images_per_request)
2102
- ? globalThis.Number(object.max_images_per_request)
2103
- : 0,
2104
- maxResolutionWidth: isSet(object.maxResolutionWidth)
2105
- ? globalThis.Number(object.maxResolutionWidth)
2106
- : isSet(object.max_resolution_width)
2107
- ? globalThis.Number(object.max_resolution_width)
2108
- : 0,
2109
- maxResolutionHeight: isSet(object.maxResolutionHeight)
2110
- ? globalThis.Number(object.maxResolutionHeight)
2111
- : isSet(object.max_resolution_height)
2112
- ? globalThis.Number(object.max_resolution_height)
2113
- : 0,
2114
- supportsOcr: isSet(object.supportsOcr)
2115
- ? globalThis.Boolean(object.supportsOcr)
2116
- : isSet(object.supports_ocr)
2117
- ? globalThis.Boolean(object.supports_ocr)
2118
- : false,
2119
- supportsObjectDetection: isSet(object.supportsObjectDetection)
2120
- ? globalThis.Boolean(object.supportsObjectDetection)
2121
- : isSet(object.supports_object_detection)
2122
- ? globalThis.Boolean(object.supports_object_detection)
2123
- : false,
2124
- supportsVideoFrames: isSet(object.supportsVideoFrames)
2125
- ? globalThis.Boolean(object.supportsVideoFrames)
2126
- : isSet(object.supports_video_frames)
2127
- ? globalThis.Boolean(object.supports_video_frames)
2128
- : false,
2129
- };
2130
- },
2131
- toJSON(message) {
2132
- var _a;
2133
- const obj = {};
2134
- if (message.direction !== 0) {
2135
- obj.direction = modalityDirectionToJSON(message.direction);
2136
- }
2137
- if ((_a = message.supportedFormats) === null || _a === void 0 ? void 0 : _a.length) {
2138
- obj.supportedFormats = message.supportedFormats.map((e) => imageFormatToJSON(e));
2139
- }
2140
- if (message.maxImageSizeBytes !== 0) {
2141
- obj.maxImageSizeBytes = Math.round(message.maxImageSizeBytes);
2142
- }
2143
- if (message.maxImagesPerRequest !== 0) {
2144
- obj.maxImagesPerRequest = Math.round(message.maxImagesPerRequest);
2145
- }
2146
- if (message.maxResolutionWidth !== 0) {
2147
- obj.maxResolutionWidth = Math.round(message.maxResolutionWidth);
2148
- }
2149
- if (message.maxResolutionHeight !== 0) {
2150
- obj.maxResolutionHeight = Math.round(message.maxResolutionHeight);
2151
- }
2152
- if (message.supportsOcr !== false) {
2153
- obj.supportsOcr = message.supportsOcr;
2154
- }
2155
- if (message.supportsObjectDetection !== false) {
2156
- obj.supportsObjectDetection = message.supportsObjectDetection;
2157
- }
2158
- if (message.supportsVideoFrames !== false) {
2159
- obj.supportsVideoFrames = message.supportsVideoFrames;
2160
- }
2161
- return obj;
2162
- },
2163
- create(base) {
2164
- return exports.Vision.fromPartial(base !== null && base !== void 0 ? base : {});
2165
- },
2166
- fromPartial(object) {
2167
- var _a;
2168
- var _b, _c, _d, _e, _f, _g, _h, _j;
2169
- const message = createBaseVision();
2170
- message.direction = (_b = object.direction) !== null && _b !== void 0 ? _b : 0;
2171
- message.supportedFormats = ((_a = object.supportedFormats) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
2172
- message.maxImageSizeBytes = (_c = object.maxImageSizeBytes) !== null && _c !== void 0 ? _c : 0;
2173
- message.maxImagesPerRequest = (_d = object.maxImagesPerRequest) !== null && _d !== void 0 ? _d : 0;
2174
- message.maxResolutionWidth = (_e = object.maxResolutionWidth) !== null && _e !== void 0 ? _e : 0;
2175
- message.maxResolutionHeight = (_f = object.maxResolutionHeight) !== null && _f !== void 0 ? _f : 0;
2176
- message.supportsOcr = (_g = object.supportsOcr) !== null && _g !== void 0 ? _g : false;
2177
- message.supportsObjectDetection = (_h = object.supportsObjectDetection) !== null && _h !== void 0 ? _h : false;
2178
- message.supportsVideoFrames = (_j = object.supportsVideoFrames) !== null && _j !== void 0 ? _j : false;
2179
- return message;
2180
- },
2181
- };
2182
- function createBaseToolUse() {
2183
- return { maxTools: 0, supportsSequential: false, supportsParallel: false, maxToolRounds: 0, supportedToolTypes: [] };
2184
- }
2185
- exports.ToolUse = {
2186
- encode(message, writer = new wire_1.BinaryWriter()) {
2187
- if (message.maxTools !== 0) {
2188
- writer.uint32(8).int32(message.maxTools);
2189
- }
2190
- if (message.supportsSequential !== false) {
2191
- writer.uint32(16).bool(message.supportsSequential);
2192
- }
2193
- if (message.supportsParallel !== false) {
2194
- writer.uint32(24).bool(message.supportsParallel);
2195
- }
2196
- if (message.maxToolRounds !== 0) {
2197
- writer.uint32(32).int32(message.maxToolRounds);
2198
- }
2199
- writer.uint32(42).fork();
2200
- for (const v of message.supportedToolTypes) {
2201
- writer.int32(v);
2202
- }
2203
- writer.join();
2204
- return writer;
2205
- },
2206
- decode(input, length) {
2207
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2208
- const end = length === undefined ? reader.len : reader.pos + length;
2209
- const message = createBaseToolUse();
2210
- while (reader.pos < end) {
2211
- const tag = reader.uint32();
2212
- switch (tag >>> 3) {
2213
- case 1: {
2214
- if (tag !== 8) {
2215
- break;
2216
- }
2217
- message.maxTools = reader.int32();
2218
- continue;
2219
- }
2220
- case 2: {
2221
- if (tag !== 16) {
2222
- break;
2223
- }
2224
- message.supportsSequential = reader.bool();
2225
- continue;
2226
- }
2227
- case 3: {
2228
- if (tag !== 24) {
2229
- break;
2230
- }
2231
- message.supportsParallel = reader.bool();
2232
- continue;
2233
- }
2234
- case 4: {
2235
- if (tag !== 32) {
2236
- break;
2237
- }
2238
- message.maxToolRounds = reader.int32();
2239
- continue;
2240
- }
2241
- case 5: {
2242
- if (tag === 40) {
2243
- message.supportedToolTypes.push(reader.int32());
2244
- continue;
2245
- }
2246
- if (tag === 42) {
2247
- const end2 = reader.uint32() + reader.pos;
2248
- while (reader.pos < end2) {
2249
- message.supportedToolTypes.push(reader.int32());
2250
- }
2251
- continue;
2252
- }
2253
- break;
2254
- }
2255
- }
2256
- if ((tag & 7) === 4 || tag === 0) {
2257
- break;
2258
- }
2259
- reader.skip(tag & 7);
2260
- }
2261
- return message;
2262
- },
2263
- fromJSON(object) {
2264
- return {
2265
- maxTools: isSet(object.maxTools)
2266
- ? globalThis.Number(object.maxTools)
2267
- : isSet(object.max_tools)
2268
- ? globalThis.Number(object.max_tools)
2269
- : 0,
2270
- supportsSequential: isSet(object.supportsSequential)
2271
- ? globalThis.Boolean(object.supportsSequential)
2272
- : isSet(object.supports_sequential)
2273
- ? globalThis.Boolean(object.supports_sequential)
2274
- : false,
2275
- supportsParallel: isSet(object.supportsParallel)
2276
- ? globalThis.Boolean(object.supportsParallel)
2277
- : isSet(object.supports_parallel)
2278
- ? globalThis.Boolean(object.supports_parallel)
2279
- : false,
2280
- maxToolRounds: isSet(object.maxToolRounds)
2281
- ? globalThis.Number(object.maxToolRounds)
2282
- : isSet(object.max_tool_rounds)
2283
- ? globalThis.Number(object.max_tool_rounds)
2284
- : 0,
2285
- supportedToolTypes: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supportedToolTypes)
2286
- ? object.supportedToolTypes.map((e) => toolTypeFromJSON(e))
2287
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supported_tool_types)
2288
- ? object.supported_tool_types.map((e) => toolTypeFromJSON(e))
2289
- : [],
2290
- };
2291
- },
2292
- toJSON(message) {
2293
- var _a;
2294
- const obj = {};
2295
- if (message.maxTools !== 0) {
2296
- obj.maxTools = Math.round(message.maxTools);
2297
- }
2298
- if (message.supportsSequential !== false) {
2299
- obj.supportsSequential = message.supportsSequential;
2300
- }
2301
- if (message.supportsParallel !== false) {
2302
- obj.supportsParallel = message.supportsParallel;
2303
- }
2304
- if (message.maxToolRounds !== 0) {
2305
- obj.maxToolRounds = Math.round(message.maxToolRounds);
2306
- }
2307
- if ((_a = message.supportedToolTypes) === null || _a === void 0 ? void 0 : _a.length) {
2308
- obj.supportedToolTypes = message.supportedToolTypes.map((e) => toolTypeToJSON(e));
2309
- }
2310
- return obj;
2311
- },
2312
- create(base) {
2313
- return exports.ToolUse.fromPartial(base !== null && base !== void 0 ? base : {});
2314
- },
2315
- fromPartial(object) {
2316
- var _a;
2317
- var _b, _c, _d, _e;
2318
- const message = createBaseToolUse();
2319
- message.maxTools = (_b = object.maxTools) !== null && _b !== void 0 ? _b : 0;
2320
- message.supportsSequential = (_c = object.supportsSequential) !== null && _c !== void 0 ? _c : false;
2321
- message.supportsParallel = (_d = object.supportsParallel) !== null && _d !== void 0 ? _d : false;
2322
- message.maxToolRounds = (_e = object.maxToolRounds) !== null && _e !== void 0 ? _e : 0;
2323
- message.supportedToolTypes = ((_a = object.supportedToolTypes) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
2324
- return message;
2325
- },
2326
- };
2327
- function createBaseSystemPrompt() {
2328
- return { maxLength: 0, supportsMultiple: false, supportsCaching: false, format: 0 };
2329
- }
2330
- exports.SystemPrompt = {
2331
- encode(message, writer = new wire_1.BinaryWriter()) {
2332
- if (message.maxLength !== 0) {
2333
- writer.uint32(8).int32(message.maxLength);
2334
- }
2335
- if (message.supportsMultiple !== false) {
2336
- writer.uint32(16).bool(message.supportsMultiple);
2337
- }
2338
- if (message.supportsCaching !== false) {
2339
- writer.uint32(24).bool(message.supportsCaching);
2340
- }
2341
- if (message.format !== 0) {
2342
- writer.uint32(32).int32(message.format);
2343
- }
2344
- return writer;
2345
- },
2346
- decode(input, length) {
2347
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2348
- const end = length === undefined ? reader.len : reader.pos + length;
2349
- const message = createBaseSystemPrompt();
2350
- while (reader.pos < end) {
2351
- const tag = reader.uint32();
2352
- switch (tag >>> 3) {
2353
- case 1: {
2354
- if (tag !== 8) {
2355
- break;
2356
- }
2357
- message.maxLength = reader.int32();
2358
- continue;
2359
- }
2360
- case 2: {
2361
- if (tag !== 16) {
2362
- break;
2363
- }
2364
- message.supportsMultiple = reader.bool();
2365
- continue;
2366
- }
2367
- case 3: {
2368
- if (tag !== 24) {
2369
- break;
2370
- }
2371
- message.supportsCaching = reader.bool();
2372
- continue;
2373
- }
2374
- case 4: {
2375
- if (tag !== 32) {
2376
- break;
2377
- }
2378
- message.format = reader.int32();
2379
- continue;
2380
- }
2381
- }
2382
- if ((tag & 7) === 4 || tag === 0) {
2383
- break;
2384
- }
2385
- reader.skip(tag & 7);
2386
- }
2387
- return message;
2388
- },
2389
- fromJSON(object) {
2390
- return {
2391
- maxLength: isSet(object.maxLength)
2392
- ? globalThis.Number(object.maxLength)
2393
- : isSet(object.max_length)
2394
- ? globalThis.Number(object.max_length)
2395
- : 0,
2396
- supportsMultiple: isSet(object.supportsMultiple)
2397
- ? globalThis.Boolean(object.supportsMultiple)
2398
- : isSet(object.supports_multiple)
2399
- ? globalThis.Boolean(object.supports_multiple)
2400
- : false,
2401
- supportsCaching: isSet(object.supportsCaching)
2402
- ? globalThis.Boolean(object.supportsCaching)
2403
- : isSet(object.supports_caching)
2404
- ? globalThis.Boolean(object.supports_caching)
2405
- : false,
2406
- format: isSet(object.format) ? dataFormatFromJSON(object.format) : 0,
2407
- };
2408
- },
2409
- toJSON(message) {
2410
- const obj = {};
2411
- if (message.maxLength !== 0) {
2412
- obj.maxLength = Math.round(message.maxLength);
2413
- }
2414
- if (message.supportsMultiple !== false) {
2415
- obj.supportsMultiple = message.supportsMultiple;
2416
- }
2417
- if (message.supportsCaching !== false) {
2418
- obj.supportsCaching = message.supportsCaching;
2419
- }
2420
- if (message.format !== 0) {
2421
- obj.format = dataFormatToJSON(message.format);
2422
- }
2423
- return obj;
2424
- },
2425
- create(base) {
2426
- return exports.SystemPrompt.fromPartial(base !== null && base !== void 0 ? base : {});
2427
- },
2428
- fromPartial(object) {
2429
- var _a, _b, _c, _d;
2430
- const message = createBaseSystemPrompt();
2431
- message.maxLength = (_a = object.maxLength) !== null && _a !== void 0 ? _a : 0;
2432
- message.supportsMultiple = (_b = object.supportsMultiple) !== null && _b !== void 0 ? _b : false;
2433
- message.supportsCaching = (_c = object.supportsCaching) !== null && _c !== void 0 ? _c : false;
2434
- message.format = (_d = object.format) !== null && _d !== void 0 ? _d : 0;
2435
- return message;
2436
- },
2437
- };
2438
- function createBaseCaching() {
2439
- return {
2440
- cacheKeyStrategy: 0,
2441
- maxCacheSizeBytes: 0,
2442
- cacheTtlSeconds: 0,
2443
- supportsContextCaching: false,
2444
- supportsPromptCaching: false,
2445
- minCacheableTokens: 0,
2446
- };
2447
- }
2448
- exports.Caching = {
2449
- encode(message, writer = new wire_1.BinaryWriter()) {
2450
- if (message.cacheKeyStrategy !== 0) {
2451
- writer.uint32(8).int32(message.cacheKeyStrategy);
2452
- }
2453
- if (message.maxCacheSizeBytes !== 0) {
2454
- writer.uint32(16).int64(message.maxCacheSizeBytes);
2455
- }
2456
- if (message.cacheTtlSeconds !== 0) {
2457
- writer.uint32(24).int32(message.cacheTtlSeconds);
2458
- }
2459
- if (message.supportsContextCaching !== false) {
2460
- writer.uint32(32).bool(message.supportsContextCaching);
2461
- }
2462
- if (message.supportsPromptCaching !== false) {
2463
- writer.uint32(40).bool(message.supportsPromptCaching);
2464
- }
2465
- if (message.minCacheableTokens !== 0) {
2466
- writer.uint32(48).int32(message.minCacheableTokens);
2467
- }
2468
- return writer;
2469
- },
2470
- decode(input, length) {
2471
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2472
- const end = length === undefined ? reader.len : reader.pos + length;
2473
- const message = createBaseCaching();
2474
- while (reader.pos < end) {
2475
- const tag = reader.uint32();
2476
- switch (tag >>> 3) {
2477
- case 1: {
2478
- if (tag !== 8) {
2479
- break;
2480
- }
2481
- message.cacheKeyStrategy = reader.int32();
2482
- continue;
2483
- }
2484
- case 2: {
2485
- if (tag !== 16) {
2486
- break;
2487
- }
2488
- message.maxCacheSizeBytes = longToNumber(reader.int64());
2489
- continue;
2490
- }
2491
- case 3: {
2492
- if (tag !== 24) {
2493
- break;
2494
- }
2495
- message.cacheTtlSeconds = reader.int32();
2496
- continue;
2497
- }
2498
- case 4: {
2499
- if (tag !== 32) {
2500
- break;
2501
- }
2502
- message.supportsContextCaching = reader.bool();
2503
- continue;
2504
- }
2505
- case 5: {
2506
- if (tag !== 40) {
2507
- break;
2508
- }
2509
- message.supportsPromptCaching = reader.bool();
2510
- continue;
2511
- }
2512
- case 6: {
2513
- if (tag !== 48) {
2514
- break;
2515
- }
2516
- message.minCacheableTokens = reader.int32();
2517
- continue;
2518
- }
2519
- }
2520
- if ((tag & 7) === 4 || tag === 0) {
2521
- break;
2522
- }
2523
- reader.skip(tag & 7);
2524
- }
2525
- return message;
2526
- },
2527
- fromJSON(object) {
2528
- return {
2529
- cacheKeyStrategy: isSet(object.cacheKeyStrategy)
2530
- ? cacheStrategyFromJSON(object.cacheKeyStrategy)
2531
- : isSet(object.cache_key_strategy)
2532
- ? cacheStrategyFromJSON(object.cache_key_strategy)
2533
- : 0,
2534
- maxCacheSizeBytes: isSet(object.maxCacheSizeBytes)
2535
- ? globalThis.Number(object.maxCacheSizeBytes)
2536
- : isSet(object.max_cache_size_bytes)
2537
- ? globalThis.Number(object.max_cache_size_bytes)
2538
- : 0,
2539
- cacheTtlSeconds: isSet(object.cacheTtlSeconds)
2540
- ? globalThis.Number(object.cacheTtlSeconds)
2541
- : isSet(object.cache_ttl_seconds)
2542
- ? globalThis.Number(object.cache_ttl_seconds)
2543
- : 0,
2544
- supportsContextCaching: isSet(object.supportsContextCaching)
2545
- ? globalThis.Boolean(object.supportsContextCaching)
2546
- : isSet(object.supports_context_caching)
2547
- ? globalThis.Boolean(object.supports_context_caching)
2548
- : false,
2549
- supportsPromptCaching: isSet(object.supportsPromptCaching)
2550
- ? globalThis.Boolean(object.supportsPromptCaching)
2551
- : isSet(object.supports_prompt_caching)
2552
- ? globalThis.Boolean(object.supports_prompt_caching)
2553
- : false,
2554
- minCacheableTokens: isSet(object.minCacheableTokens)
2555
- ? globalThis.Number(object.minCacheableTokens)
2556
- : isSet(object.min_cacheable_tokens)
2557
- ? globalThis.Number(object.min_cacheable_tokens)
2558
- : 0,
2559
- };
2560
- },
2561
- toJSON(message) {
2562
- const obj = {};
2563
- if (message.cacheKeyStrategy !== 0) {
2564
- obj.cacheKeyStrategy = cacheStrategyToJSON(message.cacheKeyStrategy);
2565
- }
2566
- if (message.maxCacheSizeBytes !== 0) {
2567
- obj.maxCacheSizeBytes = Math.round(message.maxCacheSizeBytes);
2568
- }
2569
- if (message.cacheTtlSeconds !== 0) {
2570
- obj.cacheTtlSeconds = Math.round(message.cacheTtlSeconds);
2571
- }
2572
- if (message.supportsContextCaching !== false) {
2573
- obj.supportsContextCaching = message.supportsContextCaching;
2574
- }
2575
- if (message.supportsPromptCaching !== false) {
2576
- obj.supportsPromptCaching = message.supportsPromptCaching;
2577
- }
2578
- if (message.minCacheableTokens !== 0) {
2579
- obj.minCacheableTokens = Math.round(message.minCacheableTokens);
2580
- }
2581
- return obj;
2582
- },
2583
- create(base) {
2584
- return exports.Caching.fromPartial(base !== null && base !== void 0 ? base : {});
2585
- },
2586
- fromPartial(object) {
2587
- var _a, _b, _c, _d, _e, _f;
2588
- const message = createBaseCaching();
2589
- message.cacheKeyStrategy = (_a = object.cacheKeyStrategy) !== null && _a !== void 0 ? _a : 0;
2590
- message.maxCacheSizeBytes = (_b = object.maxCacheSizeBytes) !== null && _b !== void 0 ? _b : 0;
2591
- message.cacheTtlSeconds = (_c = object.cacheTtlSeconds) !== null && _c !== void 0 ? _c : 0;
2592
- message.supportsContextCaching = (_d = object.supportsContextCaching) !== null && _d !== void 0 ? _d : false;
2593
- message.supportsPromptCaching = (_e = object.supportsPromptCaching) !== null && _e !== void 0 ? _e : false;
2594
- message.minCacheableTokens = (_f = object.minCacheableTokens) !== null && _f !== void 0 ? _f : 0;
2595
- return message;
2596
- },
2597
- };
2598
- function createBaseReasoning() {
2599
- return {
2600
- supportsChainOfThought: false,
2601
- supportsStepTracking: false,
2602
- maxReasoningSteps: 0,
2603
- supportsSelfCorrection: false,
2604
- reasoningStrategies: [],
2605
- };
2606
- }
2607
- exports.Reasoning = {
2608
- encode(message, writer = new wire_1.BinaryWriter()) {
2609
- if (message.supportsChainOfThought !== false) {
2610
- writer.uint32(8).bool(message.supportsChainOfThought);
2611
- }
2612
- if (message.supportsStepTracking !== false) {
2613
- writer.uint32(16).bool(message.supportsStepTracking);
2614
- }
2615
- if (message.maxReasoningSteps !== 0) {
2616
- writer.uint32(24).int32(message.maxReasoningSteps);
2617
- }
2618
- if (message.supportsSelfCorrection !== false) {
2619
- writer.uint32(32).bool(message.supportsSelfCorrection);
2620
- }
2621
- writer.uint32(42).fork();
2622
- for (const v of message.reasoningStrategies) {
2623
- writer.int32(v);
2624
- }
2625
- writer.join();
2626
- return writer;
2627
- },
2628
- decode(input, length) {
2629
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2630
- const end = length === undefined ? reader.len : reader.pos + length;
2631
- const message = createBaseReasoning();
2632
- while (reader.pos < end) {
2633
- const tag = reader.uint32();
2634
- switch (tag >>> 3) {
2635
- case 1: {
2636
- if (tag !== 8) {
2637
- break;
2638
- }
2639
- message.supportsChainOfThought = reader.bool();
2640
- continue;
2641
- }
2642
- case 2: {
2643
- if (tag !== 16) {
2644
- break;
2645
- }
2646
- message.supportsStepTracking = reader.bool();
2647
- continue;
2648
- }
2649
- case 3: {
2650
- if (tag !== 24) {
2651
- break;
2652
- }
2653
- message.maxReasoningSteps = reader.int32();
2654
- continue;
2655
- }
2656
- case 4: {
2657
- if (tag !== 32) {
2658
- break;
2659
- }
2660
- message.supportsSelfCorrection = reader.bool();
2661
- continue;
2662
- }
2663
- case 5: {
2664
- if (tag === 40) {
2665
- message.reasoningStrategies.push(reader.int32());
2666
- continue;
2667
- }
2668
- if (tag === 42) {
2669
- const end2 = reader.uint32() + reader.pos;
2670
- while (reader.pos < end2) {
2671
- message.reasoningStrategies.push(reader.int32());
2672
- }
2673
- continue;
2674
- }
2675
- break;
2676
- }
2677
- }
2678
- if ((tag & 7) === 4 || tag === 0) {
2679
- break;
2680
- }
2681
- reader.skip(tag & 7);
2682
- }
2683
- return message;
2684
- },
2685
- fromJSON(object) {
2686
- return {
2687
- supportsChainOfThought: isSet(object.supportsChainOfThought)
2688
- ? globalThis.Boolean(object.supportsChainOfThought)
2689
- : isSet(object.supports_chain_of_thought)
2690
- ? globalThis.Boolean(object.supports_chain_of_thought)
2691
- : false,
2692
- supportsStepTracking: isSet(object.supportsStepTracking)
2693
- ? globalThis.Boolean(object.supportsStepTracking)
2694
- : isSet(object.supports_step_tracking)
2695
- ? globalThis.Boolean(object.supports_step_tracking)
2696
- : false,
2697
- maxReasoningSteps: isSet(object.maxReasoningSteps)
2698
- ? globalThis.Number(object.maxReasoningSteps)
2699
- : isSet(object.max_reasoning_steps)
2700
- ? globalThis.Number(object.max_reasoning_steps)
2701
- : 0,
2702
- supportsSelfCorrection: isSet(object.supportsSelfCorrection)
2703
- ? globalThis.Boolean(object.supportsSelfCorrection)
2704
- : isSet(object.supports_self_correction)
2705
- ? globalThis.Boolean(object.supports_self_correction)
2706
- : false,
2707
- reasoningStrategies: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.reasoningStrategies)
2708
- ? object.reasoningStrategies.map((e) => reasoningStrategyFromJSON(e))
2709
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.reasoning_strategies)
2710
- ? object.reasoning_strategies.map((e) => reasoningStrategyFromJSON(e))
2711
- : [],
2712
- };
2713
- },
2714
- toJSON(message) {
2715
- var _a;
2716
- const obj = {};
2717
- if (message.supportsChainOfThought !== false) {
2718
- obj.supportsChainOfThought = message.supportsChainOfThought;
2719
- }
2720
- if (message.supportsStepTracking !== false) {
2721
- obj.supportsStepTracking = message.supportsStepTracking;
2722
- }
2723
- if (message.maxReasoningSteps !== 0) {
2724
- obj.maxReasoningSteps = Math.round(message.maxReasoningSteps);
2725
- }
2726
- if (message.supportsSelfCorrection !== false) {
2727
- obj.supportsSelfCorrection = message.supportsSelfCorrection;
2728
- }
2729
- if ((_a = message.reasoningStrategies) === null || _a === void 0 ? void 0 : _a.length) {
2730
- obj.reasoningStrategies = message.reasoningStrategies.map((e) => reasoningStrategyToJSON(e));
2731
- }
2732
- return obj;
2733
- },
2734
- create(base) {
2735
- return exports.Reasoning.fromPartial(base !== null && base !== void 0 ? base : {});
2736
- },
2737
- fromPartial(object) {
2738
- var _a;
2739
- var _b, _c, _d, _e;
2740
- const message = createBaseReasoning();
2741
- message.supportsChainOfThought = (_b = object.supportsChainOfThought) !== null && _b !== void 0 ? _b : false;
2742
- message.supportsStepTracking = (_c = object.supportsStepTracking) !== null && _c !== void 0 ? _c : false;
2743
- message.maxReasoningSteps = (_d = object.maxReasoningSteps) !== null && _d !== void 0 ? _d : 0;
2744
- message.supportsSelfCorrection = (_e = object.supportsSelfCorrection) !== null && _e !== void 0 ? _e : false;
2745
- message.reasoningStrategies = ((_a = object.reasoningStrategies) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
2746
- return message;
2747
- },
2748
- };
2749
- function createBaseAudio() {
2750
- return {
2751
- direction: 0,
2752
- supportedFormats: [],
2753
- maxDurationSeconds: 0,
2754
- maxFileSizeBytes: 0,
2755
- supportedLanguages: [],
2756
- supportsStreaming: false,
2757
- supportsVoiceSelection: false,
2758
- };
2759
- }
2760
- exports.Audio = {
2761
- encode(message, writer = new wire_1.BinaryWriter()) {
2762
- if (message.direction !== 0) {
2763
- writer.uint32(8).int32(message.direction);
2764
- }
2765
- writer.uint32(18).fork();
2766
- for (const v of message.supportedFormats) {
2767
- writer.int32(v);
2768
- }
2769
- writer.join();
2770
- if (message.maxDurationSeconds !== 0) {
2771
- writer.uint32(24).int32(message.maxDurationSeconds);
2772
- }
2773
- if (message.maxFileSizeBytes !== 0) {
2774
- writer.uint32(32).int64(message.maxFileSizeBytes);
2775
- }
2776
- for (const v of message.supportedLanguages) {
2777
- writer.uint32(42).string(v);
2778
- }
2779
- if (message.supportsStreaming !== false) {
2780
- writer.uint32(48).bool(message.supportsStreaming);
2781
- }
2782
- if (message.supportsVoiceSelection !== false) {
2783
- writer.uint32(56).bool(message.supportsVoiceSelection);
2784
- }
2785
- return writer;
2786
- },
2787
- decode(input, length) {
2788
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2789
- const end = length === undefined ? reader.len : reader.pos + length;
2790
- const message = createBaseAudio();
2791
- while (reader.pos < end) {
2792
- const tag = reader.uint32();
2793
- switch (tag >>> 3) {
2794
- case 1: {
2795
- if (tag !== 8) {
2796
- break;
2797
- }
2798
- message.direction = reader.int32();
2799
- continue;
2800
- }
2801
- case 2: {
2802
- if (tag === 16) {
2803
- message.supportedFormats.push(reader.int32());
2804
- continue;
2805
- }
2806
- if (tag === 18) {
2807
- const end2 = reader.uint32() + reader.pos;
2808
- while (reader.pos < end2) {
2809
- message.supportedFormats.push(reader.int32());
2810
- }
2811
- continue;
2812
- }
2813
- break;
2814
- }
2815
- case 3: {
2816
- if (tag !== 24) {
2817
- break;
2818
- }
2819
- message.maxDurationSeconds = reader.int32();
2820
- continue;
2821
- }
2822
- case 4: {
2823
- if (tag !== 32) {
2824
- break;
2825
- }
2826
- message.maxFileSizeBytes = longToNumber(reader.int64());
2827
- continue;
2828
- }
2829
- case 5: {
2830
- if (tag !== 42) {
2831
- break;
2832
- }
2833
- message.supportedLanguages.push(reader.string());
2834
- continue;
2835
- }
2836
- case 6: {
2837
- if (tag !== 48) {
2838
- break;
2839
- }
2840
- message.supportsStreaming = reader.bool();
2841
- continue;
2842
- }
2843
- case 7: {
2844
- if (tag !== 56) {
2845
- break;
2846
- }
2847
- message.supportsVoiceSelection = reader.bool();
2848
- continue;
2849
- }
2850
- }
2851
- if ((tag & 7) === 4 || tag === 0) {
2852
- break;
2853
- }
2854
- reader.skip(tag & 7);
2855
- }
2856
- return message;
2857
- },
2858
- fromJSON(object) {
2859
- return {
2860
- direction: isSet(object.direction) ? modalityDirectionFromJSON(object.direction) : 0,
2861
- supportedFormats: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supportedFormats)
2862
- ? object.supportedFormats.map((e) => audioFormatFromJSON(e))
2863
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supported_formats)
2864
- ? object.supported_formats.map((e) => audioFormatFromJSON(e))
2865
- : [],
2866
- maxDurationSeconds: isSet(object.maxDurationSeconds)
2867
- ? globalThis.Number(object.maxDurationSeconds)
2868
- : isSet(object.max_duration_seconds)
2869
- ? globalThis.Number(object.max_duration_seconds)
2870
- : 0,
2871
- maxFileSizeBytes: isSet(object.maxFileSizeBytes)
2872
- ? globalThis.Number(object.maxFileSizeBytes)
2873
- : isSet(object.max_file_size_bytes)
2874
- ? globalThis.Number(object.max_file_size_bytes)
2875
- : 0,
2876
- supportedLanguages: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supportedLanguages)
2877
- ? object.supportedLanguages.map((e) => globalThis.String(e))
2878
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supported_languages)
2879
- ? object.supported_languages.map((e) => globalThis.String(e))
2880
- : [],
2881
- supportsStreaming: isSet(object.supportsStreaming)
2882
- ? globalThis.Boolean(object.supportsStreaming)
2883
- : isSet(object.supports_streaming)
2884
- ? globalThis.Boolean(object.supports_streaming)
2885
- : false,
2886
- supportsVoiceSelection: isSet(object.supportsVoiceSelection)
2887
- ? globalThis.Boolean(object.supportsVoiceSelection)
2888
- : isSet(object.supports_voice_selection)
2889
- ? globalThis.Boolean(object.supports_voice_selection)
2890
- : false,
2891
- };
2892
- },
2893
- toJSON(message) {
2894
- var _a, _b;
2895
- const obj = {};
2896
- if (message.direction !== 0) {
2897
- obj.direction = modalityDirectionToJSON(message.direction);
2898
- }
2899
- if ((_a = message.supportedFormats) === null || _a === void 0 ? void 0 : _a.length) {
2900
- obj.supportedFormats = message.supportedFormats.map((e) => audioFormatToJSON(e));
2901
- }
2902
- if (message.maxDurationSeconds !== 0) {
2903
- obj.maxDurationSeconds = Math.round(message.maxDurationSeconds);
2904
- }
2905
- if (message.maxFileSizeBytes !== 0) {
2906
- obj.maxFileSizeBytes = Math.round(message.maxFileSizeBytes);
2907
- }
2908
- if ((_b = message.supportedLanguages) === null || _b === void 0 ? void 0 : _b.length) {
2909
- obj.supportedLanguages = message.supportedLanguages;
2910
- }
2911
- if (message.supportsStreaming !== false) {
2912
- obj.supportsStreaming = message.supportsStreaming;
2913
- }
2914
- if (message.supportsVoiceSelection !== false) {
2915
- obj.supportsVoiceSelection = message.supportsVoiceSelection;
2916
- }
2917
- return obj;
2918
- },
2919
- create(base) {
2920
- return exports.Audio.fromPartial(base !== null && base !== void 0 ? base : {});
2921
- },
2922
- fromPartial(object) {
2923
- var _a, _b;
2924
- var _c, _d, _e, _f, _g;
2925
- const message = createBaseAudio();
2926
- message.direction = (_c = object.direction) !== null && _c !== void 0 ? _c : 0;
2927
- message.supportedFormats = ((_a = object.supportedFormats) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
2928
- message.maxDurationSeconds = (_d = object.maxDurationSeconds) !== null && _d !== void 0 ? _d : 0;
2929
- message.maxFileSizeBytes = (_e = object.maxFileSizeBytes) !== null && _e !== void 0 ? _e : 0;
2930
- message.supportedLanguages = ((_b = object.supportedLanguages) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
2931
- message.supportsStreaming = (_f = object.supportsStreaming) !== null && _f !== void 0 ? _f : false;
2932
- message.supportsVoiceSelection = (_g = object.supportsVoiceSelection) !== null && _g !== void 0 ? _g : false;
2933
- return message;
2934
- },
2935
- };
2936
- function createBaseVideo() {
2937
- return {
2938
- direction: 0,
2939
- supportedFormats: [],
2940
- maxDurationSeconds: 0,
2941
- maxFileSizeBytes: 0,
2942
- maxFps: 0,
2943
- supportsFrameExtraction: false,
2944
- maxFrames: 0,
2945
- };
2946
- }
2947
- exports.Video = {
2948
- encode(message, writer = new wire_1.BinaryWriter()) {
2949
- if (message.direction !== 0) {
2950
- writer.uint32(8).int32(message.direction);
2951
- }
2952
- writer.uint32(18).fork();
2953
- for (const v of message.supportedFormats) {
2954
- writer.int32(v);
2955
- }
2956
- writer.join();
2957
- if (message.maxDurationSeconds !== 0) {
2958
- writer.uint32(24).int32(message.maxDurationSeconds);
2959
- }
2960
- if (message.maxFileSizeBytes !== 0) {
2961
- writer.uint32(32).int64(message.maxFileSizeBytes);
2962
- }
2963
- if (message.maxFps !== 0) {
2964
- writer.uint32(40).int32(message.maxFps);
2965
- }
2966
- if (message.supportsFrameExtraction !== false) {
2967
- writer.uint32(48).bool(message.supportsFrameExtraction);
2968
- }
2969
- if (message.maxFrames !== 0) {
2970
- writer.uint32(56).int32(message.maxFrames);
2971
- }
2972
- return writer;
2973
- },
2974
- decode(input, length) {
2975
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2976
- const end = length === undefined ? reader.len : reader.pos + length;
2977
- const message = createBaseVideo();
2978
- while (reader.pos < end) {
2979
- const tag = reader.uint32();
2980
- switch (tag >>> 3) {
2981
- case 1: {
2982
- if (tag !== 8) {
2983
- break;
2984
- }
2985
- message.direction = reader.int32();
2986
- continue;
2987
- }
2988
- case 2: {
2989
- if (tag === 16) {
2990
- message.supportedFormats.push(reader.int32());
2991
- continue;
2992
- }
2993
- if (tag === 18) {
2994
- const end2 = reader.uint32() + reader.pos;
2995
- while (reader.pos < end2) {
2996
- message.supportedFormats.push(reader.int32());
2997
- }
2998
- continue;
2999
- }
3000
- break;
3001
- }
3002
- case 3: {
3003
- if (tag !== 24) {
3004
- break;
3005
- }
3006
- message.maxDurationSeconds = reader.int32();
3007
- continue;
3008
- }
3009
- case 4: {
3010
- if (tag !== 32) {
3011
- break;
3012
- }
3013
- message.maxFileSizeBytes = longToNumber(reader.int64());
3014
- continue;
3015
- }
3016
- case 5: {
3017
- if (tag !== 40) {
3018
- break;
3019
- }
3020
- message.maxFps = reader.int32();
3021
- continue;
3022
- }
3023
- case 6: {
3024
- if (tag !== 48) {
3025
- break;
3026
- }
3027
- message.supportsFrameExtraction = reader.bool();
3028
- continue;
3029
- }
3030
- case 7: {
3031
- if (tag !== 56) {
3032
- break;
3033
- }
3034
- message.maxFrames = reader.int32();
3035
- continue;
3036
- }
3037
- }
3038
- if ((tag & 7) === 4 || tag === 0) {
3039
- break;
3040
- }
3041
- reader.skip(tag & 7);
3042
- }
3043
- return message;
3044
- },
3045
- fromJSON(object) {
3046
- return {
3047
- direction: isSet(object.direction) ? modalityDirectionFromJSON(object.direction) : 0,
3048
- supportedFormats: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supportedFormats)
3049
- ? object.supportedFormats.map((e) => videoFormatFromJSON(e))
3050
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supported_formats)
3051
- ? object.supported_formats.map((e) => videoFormatFromJSON(e))
3052
- : [],
3053
- maxDurationSeconds: isSet(object.maxDurationSeconds)
3054
- ? globalThis.Number(object.maxDurationSeconds)
3055
- : isSet(object.max_duration_seconds)
3056
- ? globalThis.Number(object.max_duration_seconds)
3057
- : 0,
3058
- maxFileSizeBytes: isSet(object.maxFileSizeBytes)
3059
- ? globalThis.Number(object.maxFileSizeBytes)
3060
- : isSet(object.max_file_size_bytes)
3061
- ? globalThis.Number(object.max_file_size_bytes)
3062
- : 0,
3063
- maxFps: isSet(object.maxFps)
3064
- ? globalThis.Number(object.maxFps)
3065
- : isSet(object.max_fps)
3066
- ? globalThis.Number(object.max_fps)
3067
- : 0,
3068
- supportsFrameExtraction: isSet(object.supportsFrameExtraction)
3069
- ? globalThis.Boolean(object.supportsFrameExtraction)
3070
- : isSet(object.supports_frame_extraction)
3071
- ? globalThis.Boolean(object.supports_frame_extraction)
3072
- : false,
3073
- maxFrames: isSet(object.maxFrames)
3074
- ? globalThis.Number(object.maxFrames)
3075
- : isSet(object.max_frames)
3076
- ? globalThis.Number(object.max_frames)
3077
- : 0,
3078
- };
3079
- },
3080
- toJSON(message) {
3081
- var _a;
3082
- const obj = {};
3083
- if (message.direction !== 0) {
3084
- obj.direction = modalityDirectionToJSON(message.direction);
3085
- }
3086
- if ((_a = message.supportedFormats) === null || _a === void 0 ? void 0 : _a.length) {
3087
- obj.supportedFormats = message.supportedFormats.map((e) => videoFormatToJSON(e));
3088
- }
3089
- if (message.maxDurationSeconds !== 0) {
3090
- obj.maxDurationSeconds = Math.round(message.maxDurationSeconds);
3091
- }
3092
- if (message.maxFileSizeBytes !== 0) {
3093
- obj.maxFileSizeBytes = Math.round(message.maxFileSizeBytes);
3094
- }
3095
- if (message.maxFps !== 0) {
3096
- obj.maxFps = Math.round(message.maxFps);
3097
- }
3098
- if (message.supportsFrameExtraction !== false) {
3099
- obj.supportsFrameExtraction = message.supportsFrameExtraction;
3100
- }
3101
- if (message.maxFrames !== 0) {
3102
- obj.maxFrames = Math.round(message.maxFrames);
3103
- }
3104
- return obj;
3105
- },
3106
- create(base) {
3107
- return exports.Video.fromPartial(base !== null && base !== void 0 ? base : {});
3108
- },
3109
- fromPartial(object) {
3110
- var _a;
3111
- var _b, _c, _d, _e, _f, _g;
3112
- const message = createBaseVideo();
3113
- message.direction = (_b = object.direction) !== null && _b !== void 0 ? _b : 0;
3114
- message.supportedFormats = ((_a = object.supportedFormats) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
3115
- message.maxDurationSeconds = (_c = object.maxDurationSeconds) !== null && _c !== void 0 ? _c : 0;
3116
- message.maxFileSizeBytes = (_d = object.maxFileSizeBytes) !== null && _d !== void 0 ? _d : 0;
3117
- message.maxFps = (_e = object.maxFps) !== null && _e !== void 0 ? _e : 0;
3118
- message.supportsFrameExtraction = (_f = object.supportsFrameExtraction) !== null && _f !== void 0 ? _f : false;
3119
- message.maxFrames = (_g = object.maxFrames) !== null && _g !== void 0 ? _g : 0;
3120
- return message;
3121
- },
3122
- };
3123
- function createBaseEmbeddings() {
3124
- return { embeddingDimensions: 0, maxInputTokens: 0, supportsBatch: false, maxBatchSize: 0, distanceMetrics: [] };
3125
- }
3126
- exports.Embeddings = {
3127
- encode(message, writer = new wire_1.BinaryWriter()) {
3128
- if (message.embeddingDimensions !== 0) {
3129
- writer.uint32(8).int32(message.embeddingDimensions);
3130
- }
3131
- if (message.maxInputTokens !== 0) {
3132
- writer.uint32(16).int32(message.maxInputTokens);
3133
- }
3134
- if (message.supportsBatch !== false) {
3135
- writer.uint32(24).bool(message.supportsBatch);
3136
- }
3137
- if (message.maxBatchSize !== 0) {
3138
- writer.uint32(32).int32(message.maxBatchSize);
3139
- }
3140
- writer.uint32(42).fork();
3141
- for (const v of message.distanceMetrics) {
3142
- writer.int32(v);
3143
- }
3144
- writer.join();
3145
- return writer;
3146
- },
3147
- decode(input, length) {
3148
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3149
- const end = length === undefined ? reader.len : reader.pos + length;
3150
- const message = createBaseEmbeddings();
3151
- while (reader.pos < end) {
3152
- const tag = reader.uint32();
3153
- switch (tag >>> 3) {
3154
- case 1: {
3155
- if (tag !== 8) {
3156
- break;
3157
- }
3158
- message.embeddingDimensions = reader.int32();
3159
- continue;
3160
- }
3161
- case 2: {
3162
- if (tag !== 16) {
3163
- break;
3164
- }
3165
- message.maxInputTokens = reader.int32();
3166
- continue;
3167
- }
3168
- case 3: {
3169
- if (tag !== 24) {
3170
- break;
3171
- }
3172
- message.supportsBatch = reader.bool();
3173
- continue;
3174
- }
3175
- case 4: {
3176
- if (tag !== 32) {
3177
- break;
3178
- }
3179
- message.maxBatchSize = reader.int32();
3180
- continue;
3181
- }
3182
- case 5: {
3183
- if (tag === 40) {
3184
- message.distanceMetrics.push(reader.int32());
3185
- continue;
3186
- }
3187
- if (tag === 42) {
3188
- const end2 = reader.uint32() + reader.pos;
3189
- while (reader.pos < end2) {
3190
- message.distanceMetrics.push(reader.int32());
3191
- }
3192
- continue;
3193
- }
3194
- break;
3195
- }
3196
- }
3197
- if ((tag & 7) === 4 || tag === 0) {
3198
- break;
3199
- }
3200
- reader.skip(tag & 7);
3201
- }
3202
- return message;
3203
- },
3204
- fromJSON(object) {
3205
- return {
3206
- embeddingDimensions: isSet(object.embeddingDimensions)
3207
- ? globalThis.Number(object.embeddingDimensions)
3208
- : isSet(object.embedding_dimensions)
3209
- ? globalThis.Number(object.embedding_dimensions)
3210
- : 0,
3211
- maxInputTokens: isSet(object.maxInputTokens)
3212
- ? globalThis.Number(object.maxInputTokens)
3213
- : isSet(object.max_input_tokens)
3214
- ? globalThis.Number(object.max_input_tokens)
3215
- : 0,
3216
- supportsBatch: isSet(object.supportsBatch)
3217
- ? globalThis.Boolean(object.supportsBatch)
3218
- : isSet(object.supports_batch)
3219
- ? globalThis.Boolean(object.supports_batch)
3220
- : false,
3221
- maxBatchSize: isSet(object.maxBatchSize)
3222
- ? globalThis.Number(object.maxBatchSize)
3223
- : isSet(object.max_batch_size)
3224
- ? globalThis.Number(object.max_batch_size)
3225
- : 0,
3226
- distanceMetrics: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.distanceMetrics)
3227
- ? object.distanceMetrics.map((e) => distanceMetricFromJSON(e))
3228
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.distance_metrics)
3229
- ? object.distance_metrics.map((e) => distanceMetricFromJSON(e))
3230
- : [],
3231
- };
3232
- },
3233
- toJSON(message) {
3234
- var _a;
3235
- const obj = {};
3236
- if (message.embeddingDimensions !== 0) {
3237
- obj.embeddingDimensions = Math.round(message.embeddingDimensions);
3238
- }
3239
- if (message.maxInputTokens !== 0) {
3240
- obj.maxInputTokens = Math.round(message.maxInputTokens);
3241
- }
3242
- if (message.supportsBatch !== false) {
3243
- obj.supportsBatch = message.supportsBatch;
3244
- }
3245
- if (message.maxBatchSize !== 0) {
3246
- obj.maxBatchSize = Math.round(message.maxBatchSize);
3247
- }
3248
- if ((_a = message.distanceMetrics) === null || _a === void 0 ? void 0 : _a.length) {
3249
- obj.distanceMetrics = message.distanceMetrics.map((e) => distanceMetricToJSON(e));
3250
- }
3251
- return obj;
3252
- },
3253
- create(base) {
3254
- return exports.Embeddings.fromPartial(base !== null && base !== void 0 ? base : {});
3255
- },
3256
- fromPartial(object) {
3257
- var _a;
3258
- var _b, _c, _d, _e;
3259
- const message = createBaseEmbeddings();
3260
- message.embeddingDimensions = (_b = object.embeddingDimensions) !== null && _b !== void 0 ? _b : 0;
3261
- message.maxInputTokens = (_c = object.maxInputTokens) !== null && _c !== void 0 ? _c : 0;
3262
- message.supportsBatch = (_d = object.supportsBatch) !== null && _d !== void 0 ? _d : false;
3263
- message.maxBatchSize = (_e = object.maxBatchSize) !== null && _e !== void 0 ? _e : 0;
3264
- message.distanceMetrics = ((_a = object.distanceMetrics) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
3265
- return message;
3266
- },
3267
- };
3268
- function createBaseFineTuning() {
3269
- return {
3270
- minExamples: 0,
3271
- maxExamples: 0,
3272
- supportedFormats: [],
3273
- maxFileSizeMb: 0,
3274
- supportsValidationSet: false,
3275
- hyperparameters: [],
3276
- };
3277
- }
3278
- exports.FineTuning = {
3279
- encode(message, writer = new wire_1.BinaryWriter()) {
3280
- if (message.minExamples !== 0) {
3281
- writer.uint32(8).int32(message.minExamples);
3282
- }
3283
- if (message.maxExamples !== 0) {
3284
- writer.uint32(16).int32(message.maxExamples);
3285
- }
3286
- writer.uint32(26).fork();
3287
- for (const v of message.supportedFormats) {
3288
- writer.int32(v);
3289
- }
3290
- writer.join();
3291
- if (message.maxFileSizeMb !== 0) {
3292
- writer.uint32(32).int32(message.maxFileSizeMb);
3293
- }
3294
- if (message.supportsValidationSet !== false) {
3295
- writer.uint32(40).bool(message.supportsValidationSet);
3296
- }
3297
- writer.uint32(50).fork();
3298
- for (const v of message.hyperparameters) {
3299
- writer.int32(v);
3300
- }
3301
- writer.join();
3302
- return writer;
3303
- },
3304
- decode(input, length) {
3305
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3306
- const end = length === undefined ? reader.len : reader.pos + length;
3307
- const message = createBaseFineTuning();
3308
- while (reader.pos < end) {
3309
- const tag = reader.uint32();
3310
- switch (tag >>> 3) {
3311
- case 1: {
3312
- if (tag !== 8) {
3313
- break;
3314
- }
3315
- message.minExamples = reader.int32();
3316
- continue;
3317
- }
3318
- case 2: {
3319
- if (tag !== 16) {
3320
- break;
3321
- }
3322
- message.maxExamples = reader.int32();
3323
- continue;
3324
- }
3325
- case 3: {
3326
- if (tag === 24) {
3327
- message.supportedFormats.push(reader.int32());
3328
- continue;
3329
- }
3330
- if (tag === 26) {
3331
- const end2 = reader.uint32() + reader.pos;
3332
- while (reader.pos < end2) {
3333
- message.supportedFormats.push(reader.int32());
3334
- }
3335
- continue;
3336
- }
3337
- break;
3338
- }
3339
- case 4: {
3340
- if (tag !== 32) {
3341
- break;
3342
- }
3343
- message.maxFileSizeMb = reader.int32();
3344
- continue;
3345
- }
3346
- case 5: {
3347
- if (tag !== 40) {
3348
- break;
3349
- }
3350
- message.supportsValidationSet = reader.bool();
3351
- continue;
3352
- }
3353
- case 6: {
3354
- if (tag === 48) {
3355
- message.hyperparameters.push(reader.int32());
3356
- continue;
3357
- }
3358
- if (tag === 50) {
3359
- const end2 = reader.uint32() + reader.pos;
3360
- while (reader.pos < end2) {
3361
- message.hyperparameters.push(reader.int32());
3362
- }
3363
- continue;
3364
- }
3365
- break;
3366
- }
3367
- }
3368
- if ((tag & 7) === 4 || tag === 0) {
3369
- break;
3370
- }
3371
- reader.skip(tag & 7);
3372
- }
3373
- return message;
3374
- },
3375
- fromJSON(object) {
3376
- return {
3377
- minExamples: isSet(object.minExamples)
3378
- ? globalThis.Number(object.minExamples)
3379
- : isSet(object.min_examples)
3380
- ? globalThis.Number(object.min_examples)
3381
- : 0,
3382
- maxExamples: isSet(object.maxExamples)
3383
- ? globalThis.Number(object.maxExamples)
3384
- : isSet(object.max_examples)
3385
- ? globalThis.Number(object.max_examples)
3386
- : 0,
3387
- supportedFormats: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supportedFormats)
3388
- ? object.supportedFormats.map((e) => dataFormatFromJSON(e))
3389
- : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.supported_formats)
3390
- ? object.supported_formats.map((e) => dataFormatFromJSON(e))
3391
- : [],
3392
- maxFileSizeMb: isSet(object.maxFileSizeMb)
3393
- ? globalThis.Number(object.maxFileSizeMb)
3394
- : isSet(object.max_file_size_mb)
3395
- ? globalThis.Number(object.max_file_size_mb)
3396
- : 0,
3397
- supportsValidationSet: isSet(object.supportsValidationSet)
3398
- ? globalThis.Boolean(object.supportsValidationSet)
3399
- : isSet(object.supports_validation_set)
3400
- ? globalThis.Boolean(object.supports_validation_set)
3401
- : false,
3402
- hyperparameters: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.hyperparameters)
3403
- ? object.hyperparameters.map((e) => hyperparameterFromJSON(e))
3404
- : [],
3405
- };
3406
- },
3407
- toJSON(message) {
3408
- var _a, _b;
3409
- const obj = {};
3410
- if (message.minExamples !== 0) {
3411
- obj.minExamples = Math.round(message.minExamples);
3412
- }
3413
- if (message.maxExamples !== 0) {
3414
- obj.maxExamples = Math.round(message.maxExamples);
3415
- }
3416
- if ((_a = message.supportedFormats) === null || _a === void 0 ? void 0 : _a.length) {
3417
- obj.supportedFormats = message.supportedFormats.map((e) => dataFormatToJSON(e));
3418
- }
3419
- if (message.maxFileSizeMb !== 0) {
3420
- obj.maxFileSizeMb = Math.round(message.maxFileSizeMb);
3421
- }
3422
- if (message.supportsValidationSet !== false) {
3423
- obj.supportsValidationSet = message.supportsValidationSet;
3424
- }
3425
- if ((_b = message.hyperparameters) === null || _b === void 0 ? void 0 : _b.length) {
3426
- obj.hyperparameters = message.hyperparameters.map((e) => hyperparameterToJSON(e));
3427
- }
3428
- return obj;
3429
- },
3430
- create(base) {
3431
- return exports.FineTuning.fromPartial(base !== null && base !== void 0 ? base : {});
3432
- },
3433
- fromPartial(object) {
3434
- var _a, _b;
3435
- var _c, _d, _e, _f;
3436
- const message = createBaseFineTuning();
3437
- message.minExamples = (_c = object.minExamples) !== null && _c !== void 0 ? _c : 0;
3438
- message.maxExamples = (_d = object.maxExamples) !== null && _d !== void 0 ? _d : 0;
3439
- message.supportedFormats = ((_a = object.supportedFormats) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
3440
- message.maxFileSizeMb = (_e = object.maxFileSizeMb) !== null && _e !== void 0 ? _e : 0;
3441
- message.supportsValidationSet = (_f = object.supportsValidationSet) !== null && _f !== void 0 ? _f : false;
3442
- message.hyperparameters = ((_b = object.hyperparameters) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
3443
- return message;
3444
- },
3445
- };
3446
- function longToNumber(int64) {
3447
- const num = globalThis.Number(int64.toString());
3448
- if (num > globalThis.Number.MAX_SAFE_INTEGER) {
3449
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
3450
- }
3451
- if (num < globalThis.Number.MIN_SAFE_INTEGER) {
3452
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
3453
- }
3454
- return num;
3455
- }
3456
- function isSet(value) {
3457
- return value !== null && value !== undefined;
3458
- }