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