weave-typescript 0.4.5 → 0.5.1
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/google/protobuf/timestamp.pb.d.ts +128 -0
- package/dist/google/protobuf/timestamp.pb.js +93 -0
- package/dist/weaveapi/auth/v1/service.pb.d.ts +705 -0
- package/dist/weaveapi/auth/v1/service.pb.js +3910 -0
- package/dist/weaveapi/auth/v1/session.pb.d.ts +43 -0
- package/dist/weaveapi/auth/v1/session.pb.js +268 -0
- package/dist/weaveapi/auth/v1/usage.pb.d.ts +76 -0
- package/dist/weaveapi/auth/v1/usage.pb.js +761 -0
- package/dist/weaveapi/auth/v1/user.pb.d.ts +141 -0
- package/dist/weaveapi/auth/v1/user.pb.js +1439 -0
- package/dist/weaveapi/modex/v1/model.pb.d.ts +147 -0
- package/dist/weaveapi/modex/v1/model.pb.js +1655 -0
- package/dist/weaveapi/modex/v1/provider.pb.d.ts +35 -0
- package/dist/weaveapi/modex/v1/provider.pb.js +252 -0
- package/dist/weaveapi/modex/v1/service.pb.d.ts +517 -0
- package/dist/weaveapi/modex/v1/service.pb.js +4431 -0
- package/dist/weaveapi/payment/v1/invoice.pb.d.ts +92 -0
- package/dist/weaveapi/payment/v1/invoice.pb.js +899 -0
- package/dist/weaveapi/payment/v1/service.pb.d.ts +657 -0
- package/dist/weaveapi/payment/v1/service.pb.js +4153 -0
- package/dist/weaveapi/payment/v1/subscription.pb.d.ts +167 -0
- package/dist/weaveapi/payment/v1/subscription.pb.js +1747 -0
- package/package.json +10 -5
|
@@ -0,0 +1,1655 @@
|
|
|
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/modex/v1/model.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.Availability = exports.APIDetails = exports.Configuration = exports.Pricing = exports.TokenInfo = exports.ModelPerformance_BenchmarkScoresEntry = exports.ModelPerformance = exports.ModelClassification = exports.ModelCapabilities = exports.Model = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
|
|
12
|
+
exports.protobufPackage = "weaveapi.modex.v1";
|
|
13
|
+
function createBaseModel() {
|
|
14
|
+
return {
|
|
15
|
+
id: "",
|
|
16
|
+
providerId: "",
|
|
17
|
+
providerSlug: "",
|
|
18
|
+
providerName: "",
|
|
19
|
+
modelId: "",
|
|
20
|
+
slug: "",
|
|
21
|
+
name: "",
|
|
22
|
+
displayName: "",
|
|
23
|
+
description: "",
|
|
24
|
+
version: "",
|
|
25
|
+
releaseDate: undefined,
|
|
26
|
+
trainingDataCutoff: undefined,
|
|
27
|
+
deprecationDate: undefined,
|
|
28
|
+
capabilities: undefined,
|
|
29
|
+
classification: undefined,
|
|
30
|
+
performance: undefined,
|
|
31
|
+
tokens: undefined,
|
|
32
|
+
pricing: undefined,
|
|
33
|
+
configuration: undefined,
|
|
34
|
+
apiDetails: undefined,
|
|
35
|
+
availability: undefined,
|
|
36
|
+
lastScrapedAt: undefined,
|
|
37
|
+
dataSources: [],
|
|
38
|
+
isActive: false,
|
|
39
|
+
isDeprecated: false,
|
|
40
|
+
replacementModelId: "",
|
|
41
|
+
createdAt: undefined,
|
|
42
|
+
updatedAt: undefined,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
exports.Model = {
|
|
46
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
47
|
+
if (message.id !== "") {
|
|
48
|
+
writer.uint32(10).string(message.id);
|
|
49
|
+
}
|
|
50
|
+
if (message.providerId !== "") {
|
|
51
|
+
writer.uint32(18).string(message.providerId);
|
|
52
|
+
}
|
|
53
|
+
if (message.providerSlug !== "") {
|
|
54
|
+
writer.uint32(26).string(message.providerSlug);
|
|
55
|
+
}
|
|
56
|
+
if (message.providerName !== "") {
|
|
57
|
+
writer.uint32(34).string(message.providerName);
|
|
58
|
+
}
|
|
59
|
+
if (message.modelId !== "") {
|
|
60
|
+
writer.uint32(42).string(message.modelId);
|
|
61
|
+
}
|
|
62
|
+
if (message.slug !== "") {
|
|
63
|
+
writer.uint32(50).string(message.slug);
|
|
64
|
+
}
|
|
65
|
+
if (message.name !== "") {
|
|
66
|
+
writer.uint32(58).string(message.name);
|
|
67
|
+
}
|
|
68
|
+
if (message.displayName !== "") {
|
|
69
|
+
writer.uint32(66).string(message.displayName);
|
|
70
|
+
}
|
|
71
|
+
if (message.description !== "") {
|
|
72
|
+
writer.uint32(74).string(message.description);
|
|
73
|
+
}
|
|
74
|
+
if (message.version !== "") {
|
|
75
|
+
writer.uint32(82).string(message.version);
|
|
76
|
+
}
|
|
77
|
+
if (message.releaseDate !== undefined) {
|
|
78
|
+
timestamp_pb_1.Timestamp.encode(toTimestamp(message.releaseDate), writer.uint32(90).fork()).join();
|
|
79
|
+
}
|
|
80
|
+
if (message.trainingDataCutoff !== undefined) {
|
|
81
|
+
timestamp_pb_1.Timestamp.encode(toTimestamp(message.trainingDataCutoff), writer.uint32(98).fork()).join();
|
|
82
|
+
}
|
|
83
|
+
if (message.deprecationDate !== undefined) {
|
|
84
|
+
timestamp_pb_1.Timestamp.encode(toTimestamp(message.deprecationDate), writer.uint32(106).fork()).join();
|
|
85
|
+
}
|
|
86
|
+
if (message.capabilities !== undefined) {
|
|
87
|
+
exports.ModelCapabilities.encode(message.capabilities, writer.uint32(114).fork()).join();
|
|
88
|
+
}
|
|
89
|
+
if (message.classification !== undefined) {
|
|
90
|
+
exports.ModelClassification.encode(message.classification, writer.uint32(122).fork()).join();
|
|
91
|
+
}
|
|
92
|
+
if (message.performance !== undefined) {
|
|
93
|
+
exports.ModelPerformance.encode(message.performance, writer.uint32(130).fork()).join();
|
|
94
|
+
}
|
|
95
|
+
if (message.tokens !== undefined) {
|
|
96
|
+
exports.TokenInfo.encode(message.tokens, writer.uint32(138).fork()).join();
|
|
97
|
+
}
|
|
98
|
+
if (message.pricing !== undefined) {
|
|
99
|
+
exports.Pricing.encode(message.pricing, writer.uint32(146).fork()).join();
|
|
100
|
+
}
|
|
101
|
+
if (message.configuration !== undefined) {
|
|
102
|
+
exports.Configuration.encode(message.configuration, writer.uint32(154).fork()).join();
|
|
103
|
+
}
|
|
104
|
+
if (message.apiDetails !== undefined) {
|
|
105
|
+
exports.APIDetails.encode(message.apiDetails, writer.uint32(162).fork()).join();
|
|
106
|
+
}
|
|
107
|
+
if (message.availability !== undefined) {
|
|
108
|
+
exports.Availability.encode(message.availability, writer.uint32(170).fork()).join();
|
|
109
|
+
}
|
|
110
|
+
if (message.lastScrapedAt !== undefined) {
|
|
111
|
+
timestamp_pb_1.Timestamp.encode(toTimestamp(message.lastScrapedAt), writer.uint32(178).fork()).join();
|
|
112
|
+
}
|
|
113
|
+
for (const v of message.dataSources) {
|
|
114
|
+
writer.uint32(186).string(v);
|
|
115
|
+
}
|
|
116
|
+
if (message.isActive !== false) {
|
|
117
|
+
writer.uint32(192).bool(message.isActive);
|
|
118
|
+
}
|
|
119
|
+
if (message.isDeprecated !== false) {
|
|
120
|
+
writer.uint32(200).bool(message.isDeprecated);
|
|
121
|
+
}
|
|
122
|
+
if (message.replacementModelId !== "") {
|
|
123
|
+
writer.uint32(210).string(message.replacementModelId);
|
|
124
|
+
}
|
|
125
|
+
if (message.createdAt !== undefined) {
|
|
126
|
+
timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(218).fork()).join();
|
|
127
|
+
}
|
|
128
|
+
if (message.updatedAt !== undefined) {
|
|
129
|
+
timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(226).fork()).join();
|
|
130
|
+
}
|
|
131
|
+
return writer;
|
|
132
|
+
},
|
|
133
|
+
decode(input, length) {
|
|
134
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
135
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
136
|
+
const message = createBaseModel();
|
|
137
|
+
while (reader.pos < end) {
|
|
138
|
+
const tag = reader.uint32();
|
|
139
|
+
switch (tag >>> 3) {
|
|
140
|
+
case 1: {
|
|
141
|
+
if (tag !== 10) {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
message.id = reader.string();
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
case 2: {
|
|
148
|
+
if (tag !== 18) {
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
message.providerId = reader.string();
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
case 3: {
|
|
155
|
+
if (tag !== 26) {
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
message.providerSlug = reader.string();
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
case 4: {
|
|
162
|
+
if (tag !== 34) {
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
message.providerName = reader.string();
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
case 5: {
|
|
169
|
+
if (tag !== 42) {
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
message.modelId = reader.string();
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
case 6: {
|
|
176
|
+
if (tag !== 50) {
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
message.slug = reader.string();
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
case 7: {
|
|
183
|
+
if (tag !== 58) {
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
message.name = reader.string();
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
case 8: {
|
|
190
|
+
if (tag !== 66) {
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
message.displayName = reader.string();
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
case 9: {
|
|
197
|
+
if (tag !== 74) {
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
message.description = reader.string();
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
case 10: {
|
|
204
|
+
if (tag !== 82) {
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
message.version = reader.string();
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
case 11: {
|
|
211
|
+
if (tag !== 90) {
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
message.releaseDate = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
case 12: {
|
|
218
|
+
if (tag !== 98) {
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
message.trainingDataCutoff = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
case 13: {
|
|
225
|
+
if (tag !== 106) {
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
message.deprecationDate = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
case 14: {
|
|
232
|
+
if (tag !== 114) {
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
message.capabilities = exports.ModelCapabilities.decode(reader, reader.uint32());
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
case 15: {
|
|
239
|
+
if (tag !== 122) {
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
message.classification = exports.ModelClassification.decode(reader, reader.uint32());
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
case 16: {
|
|
246
|
+
if (tag !== 130) {
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
message.performance = exports.ModelPerformance.decode(reader, reader.uint32());
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
case 17: {
|
|
253
|
+
if (tag !== 138) {
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
message.tokens = exports.TokenInfo.decode(reader, reader.uint32());
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
case 18: {
|
|
260
|
+
if (tag !== 146) {
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
message.pricing = exports.Pricing.decode(reader, reader.uint32());
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
case 19: {
|
|
267
|
+
if (tag !== 154) {
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
message.configuration = exports.Configuration.decode(reader, reader.uint32());
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
case 20: {
|
|
274
|
+
if (tag !== 162) {
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
message.apiDetails = exports.APIDetails.decode(reader, reader.uint32());
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
case 21: {
|
|
281
|
+
if (tag !== 170) {
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
message.availability = exports.Availability.decode(reader, reader.uint32());
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
case 22: {
|
|
288
|
+
if (tag !== 178) {
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
message.lastScrapedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
case 23: {
|
|
295
|
+
if (tag !== 186) {
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
message.dataSources.push(reader.string());
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
case 24: {
|
|
302
|
+
if (tag !== 192) {
|
|
303
|
+
break;
|
|
304
|
+
}
|
|
305
|
+
message.isActive = reader.bool();
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
case 25: {
|
|
309
|
+
if (tag !== 200) {
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
message.isDeprecated = reader.bool();
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
case 26: {
|
|
316
|
+
if (tag !== 210) {
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
message.replacementModelId = reader.string();
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
case 27: {
|
|
323
|
+
if (tag !== 218) {
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
case 28: {
|
|
330
|
+
if (tag !== 226) {
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
reader.skip(tag & 7);
|
|
341
|
+
}
|
|
342
|
+
return message;
|
|
343
|
+
},
|
|
344
|
+
fromJSON(object) {
|
|
345
|
+
return {
|
|
346
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
347
|
+
providerId: isSet(object.providerId) ? globalThis.String(object.providerId) : "",
|
|
348
|
+
providerSlug: isSet(object.providerSlug) ? globalThis.String(object.providerSlug) : "",
|
|
349
|
+
providerName: isSet(object.providerName) ? globalThis.String(object.providerName) : "",
|
|
350
|
+
modelId: isSet(object.modelId) ? globalThis.String(object.modelId) : "",
|
|
351
|
+
slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
|
|
352
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
353
|
+
displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : "",
|
|
354
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
355
|
+
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
356
|
+
releaseDate: isSet(object.releaseDate) ? fromJsonTimestamp(object.releaseDate) : undefined,
|
|
357
|
+
trainingDataCutoff: isSet(object.trainingDataCutoff) ? fromJsonTimestamp(object.trainingDataCutoff) : undefined,
|
|
358
|
+
deprecationDate: isSet(object.deprecationDate) ? fromJsonTimestamp(object.deprecationDate) : undefined,
|
|
359
|
+
capabilities: isSet(object.capabilities) ? exports.ModelCapabilities.fromJSON(object.capabilities) : undefined,
|
|
360
|
+
classification: isSet(object.classification) ? exports.ModelClassification.fromJSON(object.classification) : undefined,
|
|
361
|
+
performance: isSet(object.performance) ? exports.ModelPerformance.fromJSON(object.performance) : undefined,
|
|
362
|
+
tokens: isSet(object.tokens) ? exports.TokenInfo.fromJSON(object.tokens) : undefined,
|
|
363
|
+
pricing: isSet(object.pricing) ? exports.Pricing.fromJSON(object.pricing) : undefined,
|
|
364
|
+
configuration: isSet(object.configuration) ? exports.Configuration.fromJSON(object.configuration) : undefined,
|
|
365
|
+
apiDetails: isSet(object.apiDetails) ? exports.APIDetails.fromJSON(object.apiDetails) : undefined,
|
|
366
|
+
availability: isSet(object.availability) ? exports.Availability.fromJSON(object.availability) : undefined,
|
|
367
|
+
lastScrapedAt: isSet(object.lastScrapedAt) ? fromJsonTimestamp(object.lastScrapedAt) : undefined,
|
|
368
|
+
dataSources: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.dataSources)
|
|
369
|
+
? object.dataSources.map((e) => globalThis.String(e))
|
|
370
|
+
: [],
|
|
371
|
+
isActive: isSet(object.isActive) ? globalThis.Boolean(object.isActive) : false,
|
|
372
|
+
isDeprecated: isSet(object.isDeprecated) ? globalThis.Boolean(object.isDeprecated) : false,
|
|
373
|
+
replacementModelId: isSet(object.replacementModelId) ? globalThis.String(object.replacementModelId) : "",
|
|
374
|
+
createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
|
|
375
|
+
updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
|
|
376
|
+
};
|
|
377
|
+
},
|
|
378
|
+
toJSON(message) {
|
|
379
|
+
var _a;
|
|
380
|
+
const obj = {};
|
|
381
|
+
if (message.id !== "") {
|
|
382
|
+
obj.id = message.id;
|
|
383
|
+
}
|
|
384
|
+
if (message.providerId !== "") {
|
|
385
|
+
obj.providerId = message.providerId;
|
|
386
|
+
}
|
|
387
|
+
if (message.providerSlug !== "") {
|
|
388
|
+
obj.providerSlug = message.providerSlug;
|
|
389
|
+
}
|
|
390
|
+
if (message.providerName !== "") {
|
|
391
|
+
obj.providerName = message.providerName;
|
|
392
|
+
}
|
|
393
|
+
if (message.modelId !== "") {
|
|
394
|
+
obj.modelId = message.modelId;
|
|
395
|
+
}
|
|
396
|
+
if (message.slug !== "") {
|
|
397
|
+
obj.slug = message.slug;
|
|
398
|
+
}
|
|
399
|
+
if (message.name !== "") {
|
|
400
|
+
obj.name = message.name;
|
|
401
|
+
}
|
|
402
|
+
if (message.displayName !== "") {
|
|
403
|
+
obj.displayName = message.displayName;
|
|
404
|
+
}
|
|
405
|
+
if (message.description !== "") {
|
|
406
|
+
obj.description = message.description;
|
|
407
|
+
}
|
|
408
|
+
if (message.version !== "") {
|
|
409
|
+
obj.version = message.version;
|
|
410
|
+
}
|
|
411
|
+
if (message.releaseDate !== undefined) {
|
|
412
|
+
obj.releaseDate = message.releaseDate.toISOString();
|
|
413
|
+
}
|
|
414
|
+
if (message.trainingDataCutoff !== undefined) {
|
|
415
|
+
obj.trainingDataCutoff = message.trainingDataCutoff.toISOString();
|
|
416
|
+
}
|
|
417
|
+
if (message.deprecationDate !== undefined) {
|
|
418
|
+
obj.deprecationDate = message.deprecationDate.toISOString();
|
|
419
|
+
}
|
|
420
|
+
if (message.capabilities !== undefined) {
|
|
421
|
+
obj.capabilities = exports.ModelCapabilities.toJSON(message.capabilities);
|
|
422
|
+
}
|
|
423
|
+
if (message.classification !== undefined) {
|
|
424
|
+
obj.classification = exports.ModelClassification.toJSON(message.classification);
|
|
425
|
+
}
|
|
426
|
+
if (message.performance !== undefined) {
|
|
427
|
+
obj.performance = exports.ModelPerformance.toJSON(message.performance);
|
|
428
|
+
}
|
|
429
|
+
if (message.tokens !== undefined) {
|
|
430
|
+
obj.tokens = exports.TokenInfo.toJSON(message.tokens);
|
|
431
|
+
}
|
|
432
|
+
if (message.pricing !== undefined) {
|
|
433
|
+
obj.pricing = exports.Pricing.toJSON(message.pricing);
|
|
434
|
+
}
|
|
435
|
+
if (message.configuration !== undefined) {
|
|
436
|
+
obj.configuration = exports.Configuration.toJSON(message.configuration);
|
|
437
|
+
}
|
|
438
|
+
if (message.apiDetails !== undefined) {
|
|
439
|
+
obj.apiDetails = exports.APIDetails.toJSON(message.apiDetails);
|
|
440
|
+
}
|
|
441
|
+
if (message.availability !== undefined) {
|
|
442
|
+
obj.availability = exports.Availability.toJSON(message.availability);
|
|
443
|
+
}
|
|
444
|
+
if (message.lastScrapedAt !== undefined) {
|
|
445
|
+
obj.lastScrapedAt = message.lastScrapedAt.toISOString();
|
|
446
|
+
}
|
|
447
|
+
if ((_a = message.dataSources) === null || _a === void 0 ? void 0 : _a.length) {
|
|
448
|
+
obj.dataSources = message.dataSources;
|
|
449
|
+
}
|
|
450
|
+
if (message.isActive !== false) {
|
|
451
|
+
obj.isActive = message.isActive;
|
|
452
|
+
}
|
|
453
|
+
if (message.isDeprecated !== false) {
|
|
454
|
+
obj.isDeprecated = message.isDeprecated;
|
|
455
|
+
}
|
|
456
|
+
if (message.replacementModelId !== "") {
|
|
457
|
+
obj.replacementModelId = message.replacementModelId;
|
|
458
|
+
}
|
|
459
|
+
if (message.createdAt !== undefined) {
|
|
460
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
461
|
+
}
|
|
462
|
+
if (message.updatedAt !== undefined) {
|
|
463
|
+
obj.updatedAt = message.updatedAt.toISOString();
|
|
464
|
+
}
|
|
465
|
+
return obj;
|
|
466
|
+
},
|
|
467
|
+
create(base) {
|
|
468
|
+
return exports.Model.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
469
|
+
},
|
|
470
|
+
fromPartial(object) {
|
|
471
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
472
|
+
const message = createBaseModel();
|
|
473
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
|
|
474
|
+
message.providerId = (_b = object.providerId) !== null && _b !== void 0 ? _b : "";
|
|
475
|
+
message.providerSlug = (_c = object.providerSlug) !== null && _c !== void 0 ? _c : "";
|
|
476
|
+
message.providerName = (_d = object.providerName) !== null && _d !== void 0 ? _d : "";
|
|
477
|
+
message.modelId = (_e = object.modelId) !== null && _e !== void 0 ? _e : "";
|
|
478
|
+
message.slug = (_f = object.slug) !== null && _f !== void 0 ? _f : "";
|
|
479
|
+
message.name = (_g = object.name) !== null && _g !== void 0 ? _g : "";
|
|
480
|
+
message.displayName = (_h = object.displayName) !== null && _h !== void 0 ? _h : "";
|
|
481
|
+
message.description = (_j = object.description) !== null && _j !== void 0 ? _j : "";
|
|
482
|
+
message.version = (_k = object.version) !== null && _k !== void 0 ? _k : "";
|
|
483
|
+
message.releaseDate = (_l = object.releaseDate) !== null && _l !== void 0 ? _l : undefined;
|
|
484
|
+
message.trainingDataCutoff = (_m = object.trainingDataCutoff) !== null && _m !== void 0 ? _m : undefined;
|
|
485
|
+
message.deprecationDate = (_o = object.deprecationDate) !== null && _o !== void 0 ? _o : undefined;
|
|
486
|
+
message.capabilities = (object.capabilities !== undefined && object.capabilities !== null)
|
|
487
|
+
? exports.ModelCapabilities.fromPartial(object.capabilities)
|
|
488
|
+
: undefined;
|
|
489
|
+
message.classification = (object.classification !== undefined && object.classification !== null)
|
|
490
|
+
? exports.ModelClassification.fromPartial(object.classification)
|
|
491
|
+
: undefined;
|
|
492
|
+
message.performance = (object.performance !== undefined && object.performance !== null)
|
|
493
|
+
? exports.ModelPerformance.fromPartial(object.performance)
|
|
494
|
+
: undefined;
|
|
495
|
+
message.tokens = (object.tokens !== undefined && object.tokens !== null)
|
|
496
|
+
? exports.TokenInfo.fromPartial(object.tokens)
|
|
497
|
+
: undefined;
|
|
498
|
+
message.pricing = (object.pricing !== undefined && object.pricing !== null)
|
|
499
|
+
? exports.Pricing.fromPartial(object.pricing)
|
|
500
|
+
: undefined;
|
|
501
|
+
message.configuration = (object.configuration !== undefined && object.configuration !== null)
|
|
502
|
+
? exports.Configuration.fromPartial(object.configuration)
|
|
503
|
+
: undefined;
|
|
504
|
+
message.apiDetails = (object.apiDetails !== undefined && object.apiDetails !== null)
|
|
505
|
+
? exports.APIDetails.fromPartial(object.apiDetails)
|
|
506
|
+
: undefined;
|
|
507
|
+
message.availability = (object.availability !== undefined && object.availability !== null)
|
|
508
|
+
? exports.Availability.fromPartial(object.availability)
|
|
509
|
+
: undefined;
|
|
510
|
+
message.lastScrapedAt = (_p = object.lastScrapedAt) !== null && _p !== void 0 ? _p : undefined;
|
|
511
|
+
message.dataSources = ((_q = object.dataSources) === null || _q === void 0 ? void 0 : _q.map((e) => e)) || [];
|
|
512
|
+
message.isActive = (_r = object.isActive) !== null && _r !== void 0 ? _r : false;
|
|
513
|
+
message.isDeprecated = (_s = object.isDeprecated) !== null && _s !== void 0 ? _s : false;
|
|
514
|
+
message.replacementModelId = (_t = object.replacementModelId) !== null && _t !== void 0 ? _t : "";
|
|
515
|
+
message.createdAt = (_u = object.createdAt) !== null && _u !== void 0 ? _u : undefined;
|
|
516
|
+
message.updatedAt = (_v = object.updatedAt) !== null && _v !== void 0 ? _v : undefined;
|
|
517
|
+
return message;
|
|
518
|
+
},
|
|
519
|
+
};
|
|
520
|
+
function createBaseModelCapabilities() {
|
|
521
|
+
return {
|
|
522
|
+
supportsChat: false,
|
|
523
|
+
supportsCompletion: false,
|
|
524
|
+
supportsEmbeddings: false,
|
|
525
|
+
supportsVision: false,
|
|
526
|
+
supportsAudio: false,
|
|
527
|
+
supportsVideo: false,
|
|
528
|
+
supportsToolCalls: false,
|
|
529
|
+
supportsFunctionCalls: false,
|
|
530
|
+
supportsJsonMode: false,
|
|
531
|
+
supportsStreaming: false,
|
|
532
|
+
supportsReasoning: false,
|
|
533
|
+
inputModalities: [],
|
|
534
|
+
outputModalities: [],
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
exports.ModelCapabilities = {
|
|
538
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
539
|
+
if (message.supportsChat !== false) {
|
|
540
|
+
writer.uint32(8).bool(message.supportsChat);
|
|
541
|
+
}
|
|
542
|
+
if (message.supportsCompletion !== false) {
|
|
543
|
+
writer.uint32(16).bool(message.supportsCompletion);
|
|
544
|
+
}
|
|
545
|
+
if (message.supportsEmbeddings !== false) {
|
|
546
|
+
writer.uint32(24).bool(message.supportsEmbeddings);
|
|
547
|
+
}
|
|
548
|
+
if (message.supportsVision !== false) {
|
|
549
|
+
writer.uint32(32).bool(message.supportsVision);
|
|
550
|
+
}
|
|
551
|
+
if (message.supportsAudio !== false) {
|
|
552
|
+
writer.uint32(40).bool(message.supportsAudio);
|
|
553
|
+
}
|
|
554
|
+
if (message.supportsVideo !== false) {
|
|
555
|
+
writer.uint32(48).bool(message.supportsVideo);
|
|
556
|
+
}
|
|
557
|
+
if (message.supportsToolCalls !== false) {
|
|
558
|
+
writer.uint32(56).bool(message.supportsToolCalls);
|
|
559
|
+
}
|
|
560
|
+
if (message.supportsFunctionCalls !== false) {
|
|
561
|
+
writer.uint32(64).bool(message.supportsFunctionCalls);
|
|
562
|
+
}
|
|
563
|
+
if (message.supportsJsonMode !== false) {
|
|
564
|
+
writer.uint32(72).bool(message.supportsJsonMode);
|
|
565
|
+
}
|
|
566
|
+
if (message.supportsStreaming !== false) {
|
|
567
|
+
writer.uint32(80).bool(message.supportsStreaming);
|
|
568
|
+
}
|
|
569
|
+
if (message.supportsReasoning !== false) {
|
|
570
|
+
writer.uint32(88).bool(message.supportsReasoning);
|
|
571
|
+
}
|
|
572
|
+
for (const v of message.inputModalities) {
|
|
573
|
+
writer.uint32(98).string(v);
|
|
574
|
+
}
|
|
575
|
+
for (const v of message.outputModalities) {
|
|
576
|
+
writer.uint32(106).string(v);
|
|
577
|
+
}
|
|
578
|
+
return writer;
|
|
579
|
+
},
|
|
580
|
+
decode(input, length) {
|
|
581
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
582
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
583
|
+
const message = createBaseModelCapabilities();
|
|
584
|
+
while (reader.pos < end) {
|
|
585
|
+
const tag = reader.uint32();
|
|
586
|
+
switch (tag >>> 3) {
|
|
587
|
+
case 1: {
|
|
588
|
+
if (tag !== 8) {
|
|
589
|
+
break;
|
|
590
|
+
}
|
|
591
|
+
message.supportsChat = reader.bool();
|
|
592
|
+
continue;
|
|
593
|
+
}
|
|
594
|
+
case 2: {
|
|
595
|
+
if (tag !== 16) {
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
message.supportsCompletion = reader.bool();
|
|
599
|
+
continue;
|
|
600
|
+
}
|
|
601
|
+
case 3: {
|
|
602
|
+
if (tag !== 24) {
|
|
603
|
+
break;
|
|
604
|
+
}
|
|
605
|
+
message.supportsEmbeddings = reader.bool();
|
|
606
|
+
continue;
|
|
607
|
+
}
|
|
608
|
+
case 4: {
|
|
609
|
+
if (tag !== 32) {
|
|
610
|
+
break;
|
|
611
|
+
}
|
|
612
|
+
message.supportsVision = reader.bool();
|
|
613
|
+
continue;
|
|
614
|
+
}
|
|
615
|
+
case 5: {
|
|
616
|
+
if (tag !== 40) {
|
|
617
|
+
break;
|
|
618
|
+
}
|
|
619
|
+
message.supportsAudio = reader.bool();
|
|
620
|
+
continue;
|
|
621
|
+
}
|
|
622
|
+
case 6: {
|
|
623
|
+
if (tag !== 48) {
|
|
624
|
+
break;
|
|
625
|
+
}
|
|
626
|
+
message.supportsVideo = reader.bool();
|
|
627
|
+
continue;
|
|
628
|
+
}
|
|
629
|
+
case 7: {
|
|
630
|
+
if (tag !== 56) {
|
|
631
|
+
break;
|
|
632
|
+
}
|
|
633
|
+
message.supportsToolCalls = reader.bool();
|
|
634
|
+
continue;
|
|
635
|
+
}
|
|
636
|
+
case 8: {
|
|
637
|
+
if (tag !== 64) {
|
|
638
|
+
break;
|
|
639
|
+
}
|
|
640
|
+
message.supportsFunctionCalls = reader.bool();
|
|
641
|
+
continue;
|
|
642
|
+
}
|
|
643
|
+
case 9: {
|
|
644
|
+
if (tag !== 72) {
|
|
645
|
+
break;
|
|
646
|
+
}
|
|
647
|
+
message.supportsJsonMode = reader.bool();
|
|
648
|
+
continue;
|
|
649
|
+
}
|
|
650
|
+
case 10: {
|
|
651
|
+
if (tag !== 80) {
|
|
652
|
+
break;
|
|
653
|
+
}
|
|
654
|
+
message.supportsStreaming = reader.bool();
|
|
655
|
+
continue;
|
|
656
|
+
}
|
|
657
|
+
case 11: {
|
|
658
|
+
if (tag !== 88) {
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
message.supportsReasoning = reader.bool();
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
case 12: {
|
|
665
|
+
if (tag !== 98) {
|
|
666
|
+
break;
|
|
667
|
+
}
|
|
668
|
+
message.inputModalities.push(reader.string());
|
|
669
|
+
continue;
|
|
670
|
+
}
|
|
671
|
+
case 13: {
|
|
672
|
+
if (tag !== 106) {
|
|
673
|
+
break;
|
|
674
|
+
}
|
|
675
|
+
message.outputModalities.push(reader.string());
|
|
676
|
+
continue;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
680
|
+
break;
|
|
681
|
+
}
|
|
682
|
+
reader.skip(tag & 7);
|
|
683
|
+
}
|
|
684
|
+
return message;
|
|
685
|
+
},
|
|
686
|
+
fromJSON(object) {
|
|
687
|
+
return {
|
|
688
|
+
supportsChat: isSet(object.supportsChat) ? globalThis.Boolean(object.supportsChat) : false,
|
|
689
|
+
supportsCompletion: isSet(object.supportsCompletion) ? globalThis.Boolean(object.supportsCompletion) : false,
|
|
690
|
+
supportsEmbeddings: isSet(object.supportsEmbeddings) ? globalThis.Boolean(object.supportsEmbeddings) : false,
|
|
691
|
+
supportsVision: isSet(object.supportsVision) ? globalThis.Boolean(object.supportsVision) : false,
|
|
692
|
+
supportsAudio: isSet(object.supportsAudio) ? globalThis.Boolean(object.supportsAudio) : false,
|
|
693
|
+
supportsVideo: isSet(object.supportsVideo) ? globalThis.Boolean(object.supportsVideo) : false,
|
|
694
|
+
supportsToolCalls: isSet(object.supportsToolCalls) ? globalThis.Boolean(object.supportsToolCalls) : false,
|
|
695
|
+
supportsFunctionCalls: isSet(object.supportsFunctionCalls)
|
|
696
|
+
? globalThis.Boolean(object.supportsFunctionCalls)
|
|
697
|
+
: false,
|
|
698
|
+
supportsJsonMode: isSet(object.supportsJsonMode) ? globalThis.Boolean(object.supportsJsonMode) : false,
|
|
699
|
+
supportsStreaming: isSet(object.supportsStreaming) ? globalThis.Boolean(object.supportsStreaming) : false,
|
|
700
|
+
supportsReasoning: isSet(object.supportsReasoning) ? globalThis.Boolean(object.supportsReasoning) : false,
|
|
701
|
+
inputModalities: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.inputModalities)
|
|
702
|
+
? object.inputModalities.map((e) => globalThis.String(e))
|
|
703
|
+
: [],
|
|
704
|
+
outputModalities: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.outputModalities)
|
|
705
|
+
? object.outputModalities.map((e) => globalThis.String(e))
|
|
706
|
+
: [],
|
|
707
|
+
};
|
|
708
|
+
},
|
|
709
|
+
toJSON(message) {
|
|
710
|
+
var _a, _b;
|
|
711
|
+
const obj = {};
|
|
712
|
+
if (message.supportsChat !== false) {
|
|
713
|
+
obj.supportsChat = message.supportsChat;
|
|
714
|
+
}
|
|
715
|
+
if (message.supportsCompletion !== false) {
|
|
716
|
+
obj.supportsCompletion = message.supportsCompletion;
|
|
717
|
+
}
|
|
718
|
+
if (message.supportsEmbeddings !== false) {
|
|
719
|
+
obj.supportsEmbeddings = message.supportsEmbeddings;
|
|
720
|
+
}
|
|
721
|
+
if (message.supportsVision !== false) {
|
|
722
|
+
obj.supportsVision = message.supportsVision;
|
|
723
|
+
}
|
|
724
|
+
if (message.supportsAudio !== false) {
|
|
725
|
+
obj.supportsAudio = message.supportsAudio;
|
|
726
|
+
}
|
|
727
|
+
if (message.supportsVideo !== false) {
|
|
728
|
+
obj.supportsVideo = message.supportsVideo;
|
|
729
|
+
}
|
|
730
|
+
if (message.supportsToolCalls !== false) {
|
|
731
|
+
obj.supportsToolCalls = message.supportsToolCalls;
|
|
732
|
+
}
|
|
733
|
+
if (message.supportsFunctionCalls !== false) {
|
|
734
|
+
obj.supportsFunctionCalls = message.supportsFunctionCalls;
|
|
735
|
+
}
|
|
736
|
+
if (message.supportsJsonMode !== false) {
|
|
737
|
+
obj.supportsJsonMode = message.supportsJsonMode;
|
|
738
|
+
}
|
|
739
|
+
if (message.supportsStreaming !== false) {
|
|
740
|
+
obj.supportsStreaming = message.supportsStreaming;
|
|
741
|
+
}
|
|
742
|
+
if (message.supportsReasoning !== false) {
|
|
743
|
+
obj.supportsReasoning = message.supportsReasoning;
|
|
744
|
+
}
|
|
745
|
+
if ((_a = message.inputModalities) === null || _a === void 0 ? void 0 : _a.length) {
|
|
746
|
+
obj.inputModalities = message.inputModalities;
|
|
747
|
+
}
|
|
748
|
+
if ((_b = message.outputModalities) === null || _b === void 0 ? void 0 : _b.length) {
|
|
749
|
+
obj.outputModalities = message.outputModalities;
|
|
750
|
+
}
|
|
751
|
+
return obj;
|
|
752
|
+
},
|
|
753
|
+
create(base) {
|
|
754
|
+
return exports.ModelCapabilities.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
755
|
+
},
|
|
756
|
+
fromPartial(object) {
|
|
757
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
758
|
+
const message = createBaseModelCapabilities();
|
|
759
|
+
message.supportsChat = (_a = object.supportsChat) !== null && _a !== void 0 ? _a : false;
|
|
760
|
+
message.supportsCompletion = (_b = object.supportsCompletion) !== null && _b !== void 0 ? _b : false;
|
|
761
|
+
message.supportsEmbeddings = (_c = object.supportsEmbeddings) !== null && _c !== void 0 ? _c : false;
|
|
762
|
+
message.supportsVision = (_d = object.supportsVision) !== null && _d !== void 0 ? _d : false;
|
|
763
|
+
message.supportsAudio = (_e = object.supportsAudio) !== null && _e !== void 0 ? _e : false;
|
|
764
|
+
message.supportsVideo = (_f = object.supportsVideo) !== null && _f !== void 0 ? _f : false;
|
|
765
|
+
message.supportsToolCalls = (_g = object.supportsToolCalls) !== null && _g !== void 0 ? _g : false;
|
|
766
|
+
message.supportsFunctionCalls = (_h = object.supportsFunctionCalls) !== null && _h !== void 0 ? _h : false;
|
|
767
|
+
message.supportsJsonMode = (_j = object.supportsJsonMode) !== null && _j !== void 0 ? _j : false;
|
|
768
|
+
message.supportsStreaming = (_k = object.supportsStreaming) !== null && _k !== void 0 ? _k : false;
|
|
769
|
+
message.supportsReasoning = (_l = object.supportsReasoning) !== null && _l !== void 0 ? _l : false;
|
|
770
|
+
message.inputModalities = ((_m = object.inputModalities) === null || _m === void 0 ? void 0 : _m.map((e) => e)) || [];
|
|
771
|
+
message.outputModalities = ((_o = object.outputModalities) === null || _o === void 0 ? void 0 : _o.map((e) => e)) || [];
|
|
772
|
+
return message;
|
|
773
|
+
},
|
|
774
|
+
};
|
|
775
|
+
function createBaseModelClassification() {
|
|
776
|
+
return { modelType: "", architecture: "", parameterCount: 0, isOpenSource: false, licenseType: "" };
|
|
777
|
+
}
|
|
778
|
+
exports.ModelClassification = {
|
|
779
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
780
|
+
if (message.modelType !== "") {
|
|
781
|
+
writer.uint32(10).string(message.modelType);
|
|
782
|
+
}
|
|
783
|
+
if (message.architecture !== "") {
|
|
784
|
+
writer.uint32(18).string(message.architecture);
|
|
785
|
+
}
|
|
786
|
+
if (message.parameterCount !== 0) {
|
|
787
|
+
writer.uint32(24).int64(message.parameterCount);
|
|
788
|
+
}
|
|
789
|
+
if (message.isOpenSource !== false) {
|
|
790
|
+
writer.uint32(32).bool(message.isOpenSource);
|
|
791
|
+
}
|
|
792
|
+
if (message.licenseType !== "") {
|
|
793
|
+
writer.uint32(42).string(message.licenseType);
|
|
794
|
+
}
|
|
795
|
+
return writer;
|
|
796
|
+
},
|
|
797
|
+
decode(input, length) {
|
|
798
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
799
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
800
|
+
const message = createBaseModelClassification();
|
|
801
|
+
while (reader.pos < end) {
|
|
802
|
+
const tag = reader.uint32();
|
|
803
|
+
switch (tag >>> 3) {
|
|
804
|
+
case 1: {
|
|
805
|
+
if (tag !== 10) {
|
|
806
|
+
break;
|
|
807
|
+
}
|
|
808
|
+
message.modelType = reader.string();
|
|
809
|
+
continue;
|
|
810
|
+
}
|
|
811
|
+
case 2: {
|
|
812
|
+
if (tag !== 18) {
|
|
813
|
+
break;
|
|
814
|
+
}
|
|
815
|
+
message.architecture = reader.string();
|
|
816
|
+
continue;
|
|
817
|
+
}
|
|
818
|
+
case 3: {
|
|
819
|
+
if (tag !== 24) {
|
|
820
|
+
break;
|
|
821
|
+
}
|
|
822
|
+
message.parameterCount = longToNumber(reader.int64());
|
|
823
|
+
continue;
|
|
824
|
+
}
|
|
825
|
+
case 4: {
|
|
826
|
+
if (tag !== 32) {
|
|
827
|
+
break;
|
|
828
|
+
}
|
|
829
|
+
message.isOpenSource = reader.bool();
|
|
830
|
+
continue;
|
|
831
|
+
}
|
|
832
|
+
case 5: {
|
|
833
|
+
if (tag !== 42) {
|
|
834
|
+
break;
|
|
835
|
+
}
|
|
836
|
+
message.licenseType = reader.string();
|
|
837
|
+
continue;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
841
|
+
break;
|
|
842
|
+
}
|
|
843
|
+
reader.skip(tag & 7);
|
|
844
|
+
}
|
|
845
|
+
return message;
|
|
846
|
+
},
|
|
847
|
+
fromJSON(object) {
|
|
848
|
+
return {
|
|
849
|
+
modelType: isSet(object.modelType) ? globalThis.String(object.modelType) : "",
|
|
850
|
+
architecture: isSet(object.architecture) ? globalThis.String(object.architecture) : "",
|
|
851
|
+
parameterCount: isSet(object.parameterCount) ? globalThis.Number(object.parameterCount) : 0,
|
|
852
|
+
isOpenSource: isSet(object.isOpenSource) ? globalThis.Boolean(object.isOpenSource) : false,
|
|
853
|
+
licenseType: isSet(object.licenseType) ? globalThis.String(object.licenseType) : "",
|
|
854
|
+
};
|
|
855
|
+
},
|
|
856
|
+
toJSON(message) {
|
|
857
|
+
const obj = {};
|
|
858
|
+
if (message.modelType !== "") {
|
|
859
|
+
obj.modelType = message.modelType;
|
|
860
|
+
}
|
|
861
|
+
if (message.architecture !== "") {
|
|
862
|
+
obj.architecture = message.architecture;
|
|
863
|
+
}
|
|
864
|
+
if (message.parameterCount !== 0) {
|
|
865
|
+
obj.parameterCount = Math.round(message.parameterCount);
|
|
866
|
+
}
|
|
867
|
+
if (message.isOpenSource !== false) {
|
|
868
|
+
obj.isOpenSource = message.isOpenSource;
|
|
869
|
+
}
|
|
870
|
+
if (message.licenseType !== "") {
|
|
871
|
+
obj.licenseType = message.licenseType;
|
|
872
|
+
}
|
|
873
|
+
return obj;
|
|
874
|
+
},
|
|
875
|
+
create(base) {
|
|
876
|
+
return exports.ModelClassification.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
877
|
+
},
|
|
878
|
+
fromPartial(object) {
|
|
879
|
+
var _a, _b, _c, _d, _e;
|
|
880
|
+
const message = createBaseModelClassification();
|
|
881
|
+
message.modelType = (_a = object.modelType) !== null && _a !== void 0 ? _a : "";
|
|
882
|
+
message.architecture = (_b = object.architecture) !== null && _b !== void 0 ? _b : "";
|
|
883
|
+
message.parameterCount = (_c = object.parameterCount) !== null && _c !== void 0 ? _c : 0;
|
|
884
|
+
message.isOpenSource = (_d = object.isOpenSource) !== null && _d !== void 0 ? _d : false;
|
|
885
|
+
message.licenseType = (_e = object.licenseType) !== null && _e !== void 0 ? _e : "";
|
|
886
|
+
return message;
|
|
887
|
+
},
|
|
888
|
+
};
|
|
889
|
+
function createBaseModelPerformance() {
|
|
890
|
+
return { reasoningScore: 0, codingScore: 0, creativeScore: 0, factualScore: 0, mathScore: 0, benchmarkScores: {} };
|
|
891
|
+
}
|
|
892
|
+
exports.ModelPerformance = {
|
|
893
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
894
|
+
if (message.reasoningScore !== 0) {
|
|
895
|
+
writer.uint32(9).double(message.reasoningScore);
|
|
896
|
+
}
|
|
897
|
+
if (message.codingScore !== 0) {
|
|
898
|
+
writer.uint32(17).double(message.codingScore);
|
|
899
|
+
}
|
|
900
|
+
if (message.creativeScore !== 0) {
|
|
901
|
+
writer.uint32(25).double(message.creativeScore);
|
|
902
|
+
}
|
|
903
|
+
if (message.factualScore !== 0) {
|
|
904
|
+
writer.uint32(33).double(message.factualScore);
|
|
905
|
+
}
|
|
906
|
+
if (message.mathScore !== 0) {
|
|
907
|
+
writer.uint32(41).double(message.mathScore);
|
|
908
|
+
}
|
|
909
|
+
Object.entries(message.benchmarkScores).forEach(([key, value]) => {
|
|
910
|
+
exports.ModelPerformance_BenchmarkScoresEntry.encode({ key: key, value }, writer.uint32(50).fork()).join();
|
|
911
|
+
});
|
|
912
|
+
return writer;
|
|
913
|
+
},
|
|
914
|
+
decode(input, length) {
|
|
915
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
916
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
917
|
+
const message = createBaseModelPerformance();
|
|
918
|
+
while (reader.pos < end) {
|
|
919
|
+
const tag = reader.uint32();
|
|
920
|
+
switch (tag >>> 3) {
|
|
921
|
+
case 1: {
|
|
922
|
+
if (tag !== 9) {
|
|
923
|
+
break;
|
|
924
|
+
}
|
|
925
|
+
message.reasoningScore = reader.double();
|
|
926
|
+
continue;
|
|
927
|
+
}
|
|
928
|
+
case 2: {
|
|
929
|
+
if (tag !== 17) {
|
|
930
|
+
break;
|
|
931
|
+
}
|
|
932
|
+
message.codingScore = reader.double();
|
|
933
|
+
continue;
|
|
934
|
+
}
|
|
935
|
+
case 3: {
|
|
936
|
+
if (tag !== 25) {
|
|
937
|
+
break;
|
|
938
|
+
}
|
|
939
|
+
message.creativeScore = reader.double();
|
|
940
|
+
continue;
|
|
941
|
+
}
|
|
942
|
+
case 4: {
|
|
943
|
+
if (tag !== 33) {
|
|
944
|
+
break;
|
|
945
|
+
}
|
|
946
|
+
message.factualScore = reader.double();
|
|
947
|
+
continue;
|
|
948
|
+
}
|
|
949
|
+
case 5: {
|
|
950
|
+
if (tag !== 41) {
|
|
951
|
+
break;
|
|
952
|
+
}
|
|
953
|
+
message.mathScore = reader.double();
|
|
954
|
+
continue;
|
|
955
|
+
}
|
|
956
|
+
case 6: {
|
|
957
|
+
if (tag !== 50) {
|
|
958
|
+
break;
|
|
959
|
+
}
|
|
960
|
+
const entry6 = exports.ModelPerformance_BenchmarkScoresEntry.decode(reader, reader.uint32());
|
|
961
|
+
if (entry6.value !== undefined) {
|
|
962
|
+
message.benchmarkScores[entry6.key] = entry6.value;
|
|
963
|
+
}
|
|
964
|
+
continue;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
968
|
+
break;
|
|
969
|
+
}
|
|
970
|
+
reader.skip(tag & 7);
|
|
971
|
+
}
|
|
972
|
+
return message;
|
|
973
|
+
},
|
|
974
|
+
fromJSON(object) {
|
|
975
|
+
return {
|
|
976
|
+
reasoningScore: isSet(object.reasoningScore) ? globalThis.Number(object.reasoningScore) : 0,
|
|
977
|
+
codingScore: isSet(object.codingScore) ? globalThis.Number(object.codingScore) : 0,
|
|
978
|
+
creativeScore: isSet(object.creativeScore) ? globalThis.Number(object.creativeScore) : 0,
|
|
979
|
+
factualScore: isSet(object.factualScore) ? globalThis.Number(object.factualScore) : 0,
|
|
980
|
+
mathScore: isSet(object.mathScore) ? globalThis.Number(object.mathScore) : 0,
|
|
981
|
+
benchmarkScores: isObject(object.benchmarkScores)
|
|
982
|
+
? Object.entries(object.benchmarkScores).reduce((acc, [key, value]) => {
|
|
983
|
+
acc[key] = Number(value);
|
|
984
|
+
return acc;
|
|
985
|
+
}, {})
|
|
986
|
+
: {},
|
|
987
|
+
};
|
|
988
|
+
},
|
|
989
|
+
toJSON(message) {
|
|
990
|
+
const obj = {};
|
|
991
|
+
if (message.reasoningScore !== 0) {
|
|
992
|
+
obj.reasoningScore = message.reasoningScore;
|
|
993
|
+
}
|
|
994
|
+
if (message.codingScore !== 0) {
|
|
995
|
+
obj.codingScore = message.codingScore;
|
|
996
|
+
}
|
|
997
|
+
if (message.creativeScore !== 0) {
|
|
998
|
+
obj.creativeScore = message.creativeScore;
|
|
999
|
+
}
|
|
1000
|
+
if (message.factualScore !== 0) {
|
|
1001
|
+
obj.factualScore = message.factualScore;
|
|
1002
|
+
}
|
|
1003
|
+
if (message.mathScore !== 0) {
|
|
1004
|
+
obj.mathScore = message.mathScore;
|
|
1005
|
+
}
|
|
1006
|
+
if (message.benchmarkScores) {
|
|
1007
|
+
const entries = Object.entries(message.benchmarkScores);
|
|
1008
|
+
if (entries.length > 0) {
|
|
1009
|
+
obj.benchmarkScores = {};
|
|
1010
|
+
entries.forEach(([k, v]) => {
|
|
1011
|
+
obj.benchmarkScores[k] = v;
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
return obj;
|
|
1016
|
+
},
|
|
1017
|
+
create(base) {
|
|
1018
|
+
return exports.ModelPerformance.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1019
|
+
},
|
|
1020
|
+
fromPartial(object) {
|
|
1021
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1022
|
+
const message = createBaseModelPerformance();
|
|
1023
|
+
message.reasoningScore = (_a = object.reasoningScore) !== null && _a !== void 0 ? _a : 0;
|
|
1024
|
+
message.codingScore = (_b = object.codingScore) !== null && _b !== void 0 ? _b : 0;
|
|
1025
|
+
message.creativeScore = (_c = object.creativeScore) !== null && _c !== void 0 ? _c : 0;
|
|
1026
|
+
message.factualScore = (_d = object.factualScore) !== null && _d !== void 0 ? _d : 0;
|
|
1027
|
+
message.mathScore = (_e = object.mathScore) !== null && _e !== void 0 ? _e : 0;
|
|
1028
|
+
message.benchmarkScores = Object.entries((_f = object.benchmarkScores) !== null && _f !== void 0 ? _f : {}).reduce((acc, [key, value]) => {
|
|
1029
|
+
if (value !== undefined) {
|
|
1030
|
+
acc[key] = globalThis.Number(value);
|
|
1031
|
+
}
|
|
1032
|
+
return acc;
|
|
1033
|
+
}, {});
|
|
1034
|
+
return message;
|
|
1035
|
+
},
|
|
1036
|
+
};
|
|
1037
|
+
function createBaseModelPerformance_BenchmarkScoresEntry() {
|
|
1038
|
+
return { key: "", value: 0 };
|
|
1039
|
+
}
|
|
1040
|
+
exports.ModelPerformance_BenchmarkScoresEntry = {
|
|
1041
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1042
|
+
if (message.key !== "") {
|
|
1043
|
+
writer.uint32(10).string(message.key);
|
|
1044
|
+
}
|
|
1045
|
+
if (message.value !== 0) {
|
|
1046
|
+
writer.uint32(17).double(message.value);
|
|
1047
|
+
}
|
|
1048
|
+
return writer;
|
|
1049
|
+
},
|
|
1050
|
+
decode(input, length) {
|
|
1051
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1052
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1053
|
+
const message = createBaseModelPerformance_BenchmarkScoresEntry();
|
|
1054
|
+
while (reader.pos < end) {
|
|
1055
|
+
const tag = reader.uint32();
|
|
1056
|
+
switch (tag >>> 3) {
|
|
1057
|
+
case 1: {
|
|
1058
|
+
if (tag !== 10) {
|
|
1059
|
+
break;
|
|
1060
|
+
}
|
|
1061
|
+
message.key = reader.string();
|
|
1062
|
+
continue;
|
|
1063
|
+
}
|
|
1064
|
+
case 2: {
|
|
1065
|
+
if (tag !== 17) {
|
|
1066
|
+
break;
|
|
1067
|
+
}
|
|
1068
|
+
message.value = reader.double();
|
|
1069
|
+
continue;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1073
|
+
break;
|
|
1074
|
+
}
|
|
1075
|
+
reader.skip(tag & 7);
|
|
1076
|
+
}
|
|
1077
|
+
return message;
|
|
1078
|
+
},
|
|
1079
|
+
fromJSON(object) {
|
|
1080
|
+
return {
|
|
1081
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1082
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
1083
|
+
};
|
|
1084
|
+
},
|
|
1085
|
+
toJSON(message) {
|
|
1086
|
+
const obj = {};
|
|
1087
|
+
if (message.key !== "") {
|
|
1088
|
+
obj.key = message.key;
|
|
1089
|
+
}
|
|
1090
|
+
if (message.value !== 0) {
|
|
1091
|
+
obj.value = message.value;
|
|
1092
|
+
}
|
|
1093
|
+
return obj;
|
|
1094
|
+
},
|
|
1095
|
+
create(base) {
|
|
1096
|
+
return exports.ModelPerformance_BenchmarkScoresEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1097
|
+
},
|
|
1098
|
+
fromPartial(object) {
|
|
1099
|
+
var _a, _b;
|
|
1100
|
+
const message = createBaseModelPerformance_BenchmarkScoresEntry();
|
|
1101
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
1102
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : 0;
|
|
1103
|
+
return message;
|
|
1104
|
+
},
|
|
1105
|
+
};
|
|
1106
|
+
function createBaseTokenInfo() {
|
|
1107
|
+
return { contextWindow: 0, maxOutputTokens: 0, tokenizer: "", tokensPerSecond: 0 };
|
|
1108
|
+
}
|
|
1109
|
+
exports.TokenInfo = {
|
|
1110
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1111
|
+
if (message.contextWindow !== 0) {
|
|
1112
|
+
writer.uint32(8).int32(message.contextWindow);
|
|
1113
|
+
}
|
|
1114
|
+
if (message.maxOutputTokens !== 0) {
|
|
1115
|
+
writer.uint32(16).int32(message.maxOutputTokens);
|
|
1116
|
+
}
|
|
1117
|
+
if (message.tokenizer !== "") {
|
|
1118
|
+
writer.uint32(26).string(message.tokenizer);
|
|
1119
|
+
}
|
|
1120
|
+
if (message.tokensPerSecond !== 0) {
|
|
1121
|
+
writer.uint32(32).int32(message.tokensPerSecond);
|
|
1122
|
+
}
|
|
1123
|
+
return writer;
|
|
1124
|
+
},
|
|
1125
|
+
decode(input, length) {
|
|
1126
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1127
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1128
|
+
const message = createBaseTokenInfo();
|
|
1129
|
+
while (reader.pos < end) {
|
|
1130
|
+
const tag = reader.uint32();
|
|
1131
|
+
switch (tag >>> 3) {
|
|
1132
|
+
case 1: {
|
|
1133
|
+
if (tag !== 8) {
|
|
1134
|
+
break;
|
|
1135
|
+
}
|
|
1136
|
+
message.contextWindow = reader.int32();
|
|
1137
|
+
continue;
|
|
1138
|
+
}
|
|
1139
|
+
case 2: {
|
|
1140
|
+
if (tag !== 16) {
|
|
1141
|
+
break;
|
|
1142
|
+
}
|
|
1143
|
+
message.maxOutputTokens = reader.int32();
|
|
1144
|
+
continue;
|
|
1145
|
+
}
|
|
1146
|
+
case 3: {
|
|
1147
|
+
if (tag !== 26) {
|
|
1148
|
+
break;
|
|
1149
|
+
}
|
|
1150
|
+
message.tokenizer = reader.string();
|
|
1151
|
+
continue;
|
|
1152
|
+
}
|
|
1153
|
+
case 4: {
|
|
1154
|
+
if (tag !== 32) {
|
|
1155
|
+
break;
|
|
1156
|
+
}
|
|
1157
|
+
message.tokensPerSecond = reader.int32();
|
|
1158
|
+
continue;
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1162
|
+
break;
|
|
1163
|
+
}
|
|
1164
|
+
reader.skip(tag & 7);
|
|
1165
|
+
}
|
|
1166
|
+
return message;
|
|
1167
|
+
},
|
|
1168
|
+
fromJSON(object) {
|
|
1169
|
+
return {
|
|
1170
|
+
contextWindow: isSet(object.contextWindow) ? globalThis.Number(object.contextWindow) : 0,
|
|
1171
|
+
maxOutputTokens: isSet(object.maxOutputTokens) ? globalThis.Number(object.maxOutputTokens) : 0,
|
|
1172
|
+
tokenizer: isSet(object.tokenizer) ? globalThis.String(object.tokenizer) : "",
|
|
1173
|
+
tokensPerSecond: isSet(object.tokensPerSecond) ? globalThis.Number(object.tokensPerSecond) : 0,
|
|
1174
|
+
};
|
|
1175
|
+
},
|
|
1176
|
+
toJSON(message) {
|
|
1177
|
+
const obj = {};
|
|
1178
|
+
if (message.contextWindow !== 0) {
|
|
1179
|
+
obj.contextWindow = Math.round(message.contextWindow);
|
|
1180
|
+
}
|
|
1181
|
+
if (message.maxOutputTokens !== 0) {
|
|
1182
|
+
obj.maxOutputTokens = Math.round(message.maxOutputTokens);
|
|
1183
|
+
}
|
|
1184
|
+
if (message.tokenizer !== "") {
|
|
1185
|
+
obj.tokenizer = message.tokenizer;
|
|
1186
|
+
}
|
|
1187
|
+
if (message.tokensPerSecond !== 0) {
|
|
1188
|
+
obj.tokensPerSecond = Math.round(message.tokensPerSecond);
|
|
1189
|
+
}
|
|
1190
|
+
return obj;
|
|
1191
|
+
},
|
|
1192
|
+
create(base) {
|
|
1193
|
+
return exports.TokenInfo.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1194
|
+
},
|
|
1195
|
+
fromPartial(object) {
|
|
1196
|
+
var _a, _b, _c, _d;
|
|
1197
|
+
const message = createBaseTokenInfo();
|
|
1198
|
+
message.contextWindow = (_a = object.contextWindow) !== null && _a !== void 0 ? _a : 0;
|
|
1199
|
+
message.maxOutputTokens = (_b = object.maxOutputTokens) !== null && _b !== void 0 ? _b : 0;
|
|
1200
|
+
message.tokenizer = (_c = object.tokenizer) !== null && _c !== void 0 ? _c : "";
|
|
1201
|
+
message.tokensPerSecond = (_d = object.tokensPerSecond) !== null && _d !== void 0 ? _d : 0;
|
|
1202
|
+
return message;
|
|
1203
|
+
},
|
|
1204
|
+
};
|
|
1205
|
+
function createBasePricing() {
|
|
1206
|
+
return { inputPrice: 0, outputPrice: 0, cacheReadPrice: 0, cacheWritePrice: 0, fineTuningPrice: 0, currency: "" };
|
|
1207
|
+
}
|
|
1208
|
+
exports.Pricing = {
|
|
1209
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1210
|
+
if (message.inputPrice !== 0) {
|
|
1211
|
+
writer.uint32(9).double(message.inputPrice);
|
|
1212
|
+
}
|
|
1213
|
+
if (message.outputPrice !== 0) {
|
|
1214
|
+
writer.uint32(17).double(message.outputPrice);
|
|
1215
|
+
}
|
|
1216
|
+
if (message.cacheReadPrice !== 0) {
|
|
1217
|
+
writer.uint32(25).double(message.cacheReadPrice);
|
|
1218
|
+
}
|
|
1219
|
+
if (message.cacheWritePrice !== 0) {
|
|
1220
|
+
writer.uint32(33).double(message.cacheWritePrice);
|
|
1221
|
+
}
|
|
1222
|
+
if (message.fineTuningPrice !== 0) {
|
|
1223
|
+
writer.uint32(41).double(message.fineTuningPrice);
|
|
1224
|
+
}
|
|
1225
|
+
if (message.currency !== "") {
|
|
1226
|
+
writer.uint32(50).string(message.currency);
|
|
1227
|
+
}
|
|
1228
|
+
return writer;
|
|
1229
|
+
},
|
|
1230
|
+
decode(input, length) {
|
|
1231
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1232
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1233
|
+
const message = createBasePricing();
|
|
1234
|
+
while (reader.pos < end) {
|
|
1235
|
+
const tag = reader.uint32();
|
|
1236
|
+
switch (tag >>> 3) {
|
|
1237
|
+
case 1: {
|
|
1238
|
+
if (tag !== 9) {
|
|
1239
|
+
break;
|
|
1240
|
+
}
|
|
1241
|
+
message.inputPrice = reader.double();
|
|
1242
|
+
continue;
|
|
1243
|
+
}
|
|
1244
|
+
case 2: {
|
|
1245
|
+
if (tag !== 17) {
|
|
1246
|
+
break;
|
|
1247
|
+
}
|
|
1248
|
+
message.outputPrice = reader.double();
|
|
1249
|
+
continue;
|
|
1250
|
+
}
|
|
1251
|
+
case 3: {
|
|
1252
|
+
if (tag !== 25) {
|
|
1253
|
+
break;
|
|
1254
|
+
}
|
|
1255
|
+
message.cacheReadPrice = reader.double();
|
|
1256
|
+
continue;
|
|
1257
|
+
}
|
|
1258
|
+
case 4: {
|
|
1259
|
+
if (tag !== 33) {
|
|
1260
|
+
break;
|
|
1261
|
+
}
|
|
1262
|
+
message.cacheWritePrice = reader.double();
|
|
1263
|
+
continue;
|
|
1264
|
+
}
|
|
1265
|
+
case 5: {
|
|
1266
|
+
if (tag !== 41) {
|
|
1267
|
+
break;
|
|
1268
|
+
}
|
|
1269
|
+
message.fineTuningPrice = reader.double();
|
|
1270
|
+
continue;
|
|
1271
|
+
}
|
|
1272
|
+
case 6: {
|
|
1273
|
+
if (tag !== 50) {
|
|
1274
|
+
break;
|
|
1275
|
+
}
|
|
1276
|
+
message.currency = reader.string();
|
|
1277
|
+
continue;
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1281
|
+
break;
|
|
1282
|
+
}
|
|
1283
|
+
reader.skip(tag & 7);
|
|
1284
|
+
}
|
|
1285
|
+
return message;
|
|
1286
|
+
},
|
|
1287
|
+
fromJSON(object) {
|
|
1288
|
+
return {
|
|
1289
|
+
inputPrice: isSet(object.inputPrice) ? globalThis.Number(object.inputPrice) : 0,
|
|
1290
|
+
outputPrice: isSet(object.outputPrice) ? globalThis.Number(object.outputPrice) : 0,
|
|
1291
|
+
cacheReadPrice: isSet(object.cacheReadPrice) ? globalThis.Number(object.cacheReadPrice) : 0,
|
|
1292
|
+
cacheWritePrice: isSet(object.cacheWritePrice) ? globalThis.Number(object.cacheWritePrice) : 0,
|
|
1293
|
+
fineTuningPrice: isSet(object.fineTuningPrice) ? globalThis.Number(object.fineTuningPrice) : 0,
|
|
1294
|
+
currency: isSet(object.currency) ? globalThis.String(object.currency) : "",
|
|
1295
|
+
};
|
|
1296
|
+
},
|
|
1297
|
+
toJSON(message) {
|
|
1298
|
+
const obj = {};
|
|
1299
|
+
if (message.inputPrice !== 0) {
|
|
1300
|
+
obj.inputPrice = message.inputPrice;
|
|
1301
|
+
}
|
|
1302
|
+
if (message.outputPrice !== 0) {
|
|
1303
|
+
obj.outputPrice = message.outputPrice;
|
|
1304
|
+
}
|
|
1305
|
+
if (message.cacheReadPrice !== 0) {
|
|
1306
|
+
obj.cacheReadPrice = message.cacheReadPrice;
|
|
1307
|
+
}
|
|
1308
|
+
if (message.cacheWritePrice !== 0) {
|
|
1309
|
+
obj.cacheWritePrice = message.cacheWritePrice;
|
|
1310
|
+
}
|
|
1311
|
+
if (message.fineTuningPrice !== 0) {
|
|
1312
|
+
obj.fineTuningPrice = message.fineTuningPrice;
|
|
1313
|
+
}
|
|
1314
|
+
if (message.currency !== "") {
|
|
1315
|
+
obj.currency = message.currency;
|
|
1316
|
+
}
|
|
1317
|
+
return obj;
|
|
1318
|
+
},
|
|
1319
|
+
create(base) {
|
|
1320
|
+
return exports.Pricing.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1321
|
+
},
|
|
1322
|
+
fromPartial(object) {
|
|
1323
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1324
|
+
const message = createBasePricing();
|
|
1325
|
+
message.inputPrice = (_a = object.inputPrice) !== null && _a !== void 0 ? _a : 0;
|
|
1326
|
+
message.outputPrice = (_b = object.outputPrice) !== null && _b !== void 0 ? _b : 0;
|
|
1327
|
+
message.cacheReadPrice = (_c = object.cacheReadPrice) !== null && _c !== void 0 ? _c : 0;
|
|
1328
|
+
message.cacheWritePrice = (_d = object.cacheWritePrice) !== null && _d !== void 0 ? _d : 0;
|
|
1329
|
+
message.fineTuningPrice = (_e = object.fineTuningPrice) !== null && _e !== void 0 ? _e : 0;
|
|
1330
|
+
message.currency = (_f = object.currency) !== null && _f !== void 0 ? _f : "";
|
|
1331
|
+
return message;
|
|
1332
|
+
},
|
|
1333
|
+
};
|
|
1334
|
+
function createBaseConfiguration() {
|
|
1335
|
+
return { temperatureMin: 0, temperatureMax: 0, temperatureDefault: 0, topPMin: 0, topPMax: 0 };
|
|
1336
|
+
}
|
|
1337
|
+
exports.Configuration = {
|
|
1338
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1339
|
+
if (message.temperatureMin !== 0) {
|
|
1340
|
+
writer.uint32(9).double(message.temperatureMin);
|
|
1341
|
+
}
|
|
1342
|
+
if (message.temperatureMax !== 0) {
|
|
1343
|
+
writer.uint32(17).double(message.temperatureMax);
|
|
1344
|
+
}
|
|
1345
|
+
if (message.temperatureDefault !== 0) {
|
|
1346
|
+
writer.uint32(25).double(message.temperatureDefault);
|
|
1347
|
+
}
|
|
1348
|
+
if (message.topPMin !== 0) {
|
|
1349
|
+
writer.uint32(33).double(message.topPMin);
|
|
1350
|
+
}
|
|
1351
|
+
if (message.topPMax !== 0) {
|
|
1352
|
+
writer.uint32(41).double(message.topPMax);
|
|
1353
|
+
}
|
|
1354
|
+
return writer;
|
|
1355
|
+
},
|
|
1356
|
+
decode(input, length) {
|
|
1357
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1358
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1359
|
+
const message = createBaseConfiguration();
|
|
1360
|
+
while (reader.pos < end) {
|
|
1361
|
+
const tag = reader.uint32();
|
|
1362
|
+
switch (tag >>> 3) {
|
|
1363
|
+
case 1: {
|
|
1364
|
+
if (tag !== 9) {
|
|
1365
|
+
break;
|
|
1366
|
+
}
|
|
1367
|
+
message.temperatureMin = reader.double();
|
|
1368
|
+
continue;
|
|
1369
|
+
}
|
|
1370
|
+
case 2: {
|
|
1371
|
+
if (tag !== 17) {
|
|
1372
|
+
break;
|
|
1373
|
+
}
|
|
1374
|
+
message.temperatureMax = reader.double();
|
|
1375
|
+
continue;
|
|
1376
|
+
}
|
|
1377
|
+
case 3: {
|
|
1378
|
+
if (tag !== 25) {
|
|
1379
|
+
break;
|
|
1380
|
+
}
|
|
1381
|
+
message.temperatureDefault = reader.double();
|
|
1382
|
+
continue;
|
|
1383
|
+
}
|
|
1384
|
+
case 4: {
|
|
1385
|
+
if (tag !== 33) {
|
|
1386
|
+
break;
|
|
1387
|
+
}
|
|
1388
|
+
message.topPMin = reader.double();
|
|
1389
|
+
continue;
|
|
1390
|
+
}
|
|
1391
|
+
case 5: {
|
|
1392
|
+
if (tag !== 41) {
|
|
1393
|
+
break;
|
|
1394
|
+
}
|
|
1395
|
+
message.topPMax = reader.double();
|
|
1396
|
+
continue;
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1400
|
+
break;
|
|
1401
|
+
}
|
|
1402
|
+
reader.skip(tag & 7);
|
|
1403
|
+
}
|
|
1404
|
+
return message;
|
|
1405
|
+
},
|
|
1406
|
+
fromJSON(object) {
|
|
1407
|
+
return {
|
|
1408
|
+
temperatureMin: isSet(object.temperatureMin) ? globalThis.Number(object.temperatureMin) : 0,
|
|
1409
|
+
temperatureMax: isSet(object.temperatureMax) ? globalThis.Number(object.temperatureMax) : 0,
|
|
1410
|
+
temperatureDefault: isSet(object.temperatureDefault) ? globalThis.Number(object.temperatureDefault) : 0,
|
|
1411
|
+
topPMin: isSet(object.topPMin) ? globalThis.Number(object.topPMin) : 0,
|
|
1412
|
+
topPMax: isSet(object.topPMax) ? globalThis.Number(object.topPMax) : 0,
|
|
1413
|
+
};
|
|
1414
|
+
},
|
|
1415
|
+
toJSON(message) {
|
|
1416
|
+
const obj = {};
|
|
1417
|
+
if (message.temperatureMin !== 0) {
|
|
1418
|
+
obj.temperatureMin = message.temperatureMin;
|
|
1419
|
+
}
|
|
1420
|
+
if (message.temperatureMax !== 0) {
|
|
1421
|
+
obj.temperatureMax = message.temperatureMax;
|
|
1422
|
+
}
|
|
1423
|
+
if (message.temperatureDefault !== 0) {
|
|
1424
|
+
obj.temperatureDefault = message.temperatureDefault;
|
|
1425
|
+
}
|
|
1426
|
+
if (message.topPMin !== 0) {
|
|
1427
|
+
obj.topPMin = message.topPMin;
|
|
1428
|
+
}
|
|
1429
|
+
if (message.topPMax !== 0) {
|
|
1430
|
+
obj.topPMax = message.topPMax;
|
|
1431
|
+
}
|
|
1432
|
+
return obj;
|
|
1433
|
+
},
|
|
1434
|
+
create(base) {
|
|
1435
|
+
return exports.Configuration.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1436
|
+
},
|
|
1437
|
+
fromPartial(object) {
|
|
1438
|
+
var _a, _b, _c, _d, _e;
|
|
1439
|
+
const message = createBaseConfiguration();
|
|
1440
|
+
message.temperatureMin = (_a = object.temperatureMin) !== null && _a !== void 0 ? _a : 0;
|
|
1441
|
+
message.temperatureMax = (_b = object.temperatureMax) !== null && _b !== void 0 ? _b : 0;
|
|
1442
|
+
message.temperatureDefault = (_c = object.temperatureDefault) !== null && _c !== void 0 ? _c : 0;
|
|
1443
|
+
message.topPMin = (_d = object.topPMin) !== null && _d !== void 0 ? _d : 0;
|
|
1444
|
+
message.topPMax = (_e = object.topPMax) !== null && _e !== void 0 ? _e : 0;
|
|
1445
|
+
return message;
|
|
1446
|
+
},
|
|
1447
|
+
};
|
|
1448
|
+
function createBaseAPIDetails() {
|
|
1449
|
+
return { endpoint: "", version: "", rateLimitRpm: 0, rateLimitTpm: 0 };
|
|
1450
|
+
}
|
|
1451
|
+
exports.APIDetails = {
|
|
1452
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1453
|
+
if (message.endpoint !== "") {
|
|
1454
|
+
writer.uint32(10).string(message.endpoint);
|
|
1455
|
+
}
|
|
1456
|
+
if (message.version !== "") {
|
|
1457
|
+
writer.uint32(18).string(message.version);
|
|
1458
|
+
}
|
|
1459
|
+
if (message.rateLimitRpm !== 0) {
|
|
1460
|
+
writer.uint32(24).int32(message.rateLimitRpm);
|
|
1461
|
+
}
|
|
1462
|
+
if (message.rateLimitTpm !== 0) {
|
|
1463
|
+
writer.uint32(32).int32(message.rateLimitTpm);
|
|
1464
|
+
}
|
|
1465
|
+
return writer;
|
|
1466
|
+
},
|
|
1467
|
+
decode(input, length) {
|
|
1468
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1469
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1470
|
+
const message = createBaseAPIDetails();
|
|
1471
|
+
while (reader.pos < end) {
|
|
1472
|
+
const tag = reader.uint32();
|
|
1473
|
+
switch (tag >>> 3) {
|
|
1474
|
+
case 1: {
|
|
1475
|
+
if (tag !== 10) {
|
|
1476
|
+
break;
|
|
1477
|
+
}
|
|
1478
|
+
message.endpoint = reader.string();
|
|
1479
|
+
continue;
|
|
1480
|
+
}
|
|
1481
|
+
case 2: {
|
|
1482
|
+
if (tag !== 18) {
|
|
1483
|
+
break;
|
|
1484
|
+
}
|
|
1485
|
+
message.version = reader.string();
|
|
1486
|
+
continue;
|
|
1487
|
+
}
|
|
1488
|
+
case 3: {
|
|
1489
|
+
if (tag !== 24) {
|
|
1490
|
+
break;
|
|
1491
|
+
}
|
|
1492
|
+
message.rateLimitRpm = reader.int32();
|
|
1493
|
+
continue;
|
|
1494
|
+
}
|
|
1495
|
+
case 4: {
|
|
1496
|
+
if (tag !== 32) {
|
|
1497
|
+
break;
|
|
1498
|
+
}
|
|
1499
|
+
message.rateLimitTpm = reader.int32();
|
|
1500
|
+
continue;
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1504
|
+
break;
|
|
1505
|
+
}
|
|
1506
|
+
reader.skip(tag & 7);
|
|
1507
|
+
}
|
|
1508
|
+
return message;
|
|
1509
|
+
},
|
|
1510
|
+
fromJSON(object) {
|
|
1511
|
+
return {
|
|
1512
|
+
endpoint: isSet(object.endpoint) ? globalThis.String(object.endpoint) : "",
|
|
1513
|
+
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
1514
|
+
rateLimitRpm: isSet(object.rateLimitRpm) ? globalThis.Number(object.rateLimitRpm) : 0,
|
|
1515
|
+
rateLimitTpm: isSet(object.rateLimitTpm) ? globalThis.Number(object.rateLimitTpm) : 0,
|
|
1516
|
+
};
|
|
1517
|
+
},
|
|
1518
|
+
toJSON(message) {
|
|
1519
|
+
const obj = {};
|
|
1520
|
+
if (message.endpoint !== "") {
|
|
1521
|
+
obj.endpoint = message.endpoint;
|
|
1522
|
+
}
|
|
1523
|
+
if (message.version !== "") {
|
|
1524
|
+
obj.version = message.version;
|
|
1525
|
+
}
|
|
1526
|
+
if (message.rateLimitRpm !== 0) {
|
|
1527
|
+
obj.rateLimitRpm = Math.round(message.rateLimitRpm);
|
|
1528
|
+
}
|
|
1529
|
+
if (message.rateLimitTpm !== 0) {
|
|
1530
|
+
obj.rateLimitTpm = Math.round(message.rateLimitTpm);
|
|
1531
|
+
}
|
|
1532
|
+
return obj;
|
|
1533
|
+
},
|
|
1534
|
+
create(base) {
|
|
1535
|
+
return exports.APIDetails.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1536
|
+
},
|
|
1537
|
+
fromPartial(object) {
|
|
1538
|
+
var _a, _b, _c, _d;
|
|
1539
|
+
const message = createBaseAPIDetails();
|
|
1540
|
+
message.endpoint = (_a = object.endpoint) !== null && _a !== void 0 ? _a : "";
|
|
1541
|
+
message.version = (_b = object.version) !== null && _b !== void 0 ? _b : "";
|
|
1542
|
+
message.rateLimitRpm = (_c = object.rateLimitRpm) !== null && _c !== void 0 ? _c : 0;
|
|
1543
|
+
message.rateLimitTpm = (_d = object.rateLimitTpm) !== null && _d !== void 0 ? _d : 0;
|
|
1544
|
+
return message;
|
|
1545
|
+
},
|
|
1546
|
+
};
|
|
1547
|
+
function createBaseAvailability() {
|
|
1548
|
+
return { regions: [], platforms: [] };
|
|
1549
|
+
}
|
|
1550
|
+
exports.Availability = {
|
|
1551
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1552
|
+
for (const v of message.regions) {
|
|
1553
|
+
writer.uint32(10).string(v);
|
|
1554
|
+
}
|
|
1555
|
+
for (const v of message.platforms) {
|
|
1556
|
+
writer.uint32(18).string(v);
|
|
1557
|
+
}
|
|
1558
|
+
return writer;
|
|
1559
|
+
},
|
|
1560
|
+
decode(input, length) {
|
|
1561
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1562
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1563
|
+
const message = createBaseAvailability();
|
|
1564
|
+
while (reader.pos < end) {
|
|
1565
|
+
const tag = reader.uint32();
|
|
1566
|
+
switch (tag >>> 3) {
|
|
1567
|
+
case 1: {
|
|
1568
|
+
if (tag !== 10) {
|
|
1569
|
+
break;
|
|
1570
|
+
}
|
|
1571
|
+
message.regions.push(reader.string());
|
|
1572
|
+
continue;
|
|
1573
|
+
}
|
|
1574
|
+
case 2: {
|
|
1575
|
+
if (tag !== 18) {
|
|
1576
|
+
break;
|
|
1577
|
+
}
|
|
1578
|
+
message.platforms.push(reader.string());
|
|
1579
|
+
continue;
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1583
|
+
break;
|
|
1584
|
+
}
|
|
1585
|
+
reader.skip(tag & 7);
|
|
1586
|
+
}
|
|
1587
|
+
return message;
|
|
1588
|
+
},
|
|
1589
|
+
fromJSON(object) {
|
|
1590
|
+
return {
|
|
1591
|
+
regions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.regions) ? object.regions.map((e) => globalThis.String(e)) : [],
|
|
1592
|
+
platforms: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.platforms)
|
|
1593
|
+
? object.platforms.map((e) => globalThis.String(e))
|
|
1594
|
+
: [],
|
|
1595
|
+
};
|
|
1596
|
+
},
|
|
1597
|
+
toJSON(message) {
|
|
1598
|
+
var _a, _b;
|
|
1599
|
+
const obj = {};
|
|
1600
|
+
if ((_a = message.regions) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1601
|
+
obj.regions = message.regions;
|
|
1602
|
+
}
|
|
1603
|
+
if ((_b = message.platforms) === null || _b === void 0 ? void 0 : _b.length) {
|
|
1604
|
+
obj.platforms = message.platforms;
|
|
1605
|
+
}
|
|
1606
|
+
return obj;
|
|
1607
|
+
},
|
|
1608
|
+
create(base) {
|
|
1609
|
+
return exports.Availability.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1610
|
+
},
|
|
1611
|
+
fromPartial(object) {
|
|
1612
|
+
var _a, _b;
|
|
1613
|
+
const message = createBaseAvailability();
|
|
1614
|
+
message.regions = ((_a = object.regions) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
1615
|
+
message.platforms = ((_b = object.platforms) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
1616
|
+
return message;
|
|
1617
|
+
},
|
|
1618
|
+
};
|
|
1619
|
+
function toTimestamp(date) {
|
|
1620
|
+
const seconds = Math.trunc(date.getTime() / 1000);
|
|
1621
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
1622
|
+
return { seconds, nanos };
|
|
1623
|
+
}
|
|
1624
|
+
function fromTimestamp(t) {
|
|
1625
|
+
let millis = (t.seconds || 0) * 1000;
|
|
1626
|
+
millis += (t.nanos || 0) / 1000000;
|
|
1627
|
+
return new globalThis.Date(millis);
|
|
1628
|
+
}
|
|
1629
|
+
function fromJsonTimestamp(o) {
|
|
1630
|
+
if (o instanceof globalThis.Date) {
|
|
1631
|
+
return o;
|
|
1632
|
+
}
|
|
1633
|
+
else if (typeof o === "string") {
|
|
1634
|
+
return new globalThis.Date(o);
|
|
1635
|
+
}
|
|
1636
|
+
else {
|
|
1637
|
+
return fromTimestamp(timestamp_pb_1.Timestamp.fromJSON(o));
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
function longToNumber(int64) {
|
|
1641
|
+
const num = globalThis.Number(int64.toString());
|
|
1642
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1643
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1644
|
+
}
|
|
1645
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1646
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1647
|
+
}
|
|
1648
|
+
return num;
|
|
1649
|
+
}
|
|
1650
|
+
function isObject(value) {
|
|
1651
|
+
return typeof value === "object" && value !== null;
|
|
1652
|
+
}
|
|
1653
|
+
function isSet(value) {
|
|
1654
|
+
return value !== null && value !== undefined;
|
|
1655
|
+
}
|