@world-engines/protocol-ts 0.1.0-alpha.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/LICENSE +46 -0
- package/dist/entity-prop-envelope.d.ts +36 -0
- package/dist/entity-prop-envelope.js +50 -0
- package/dist/gen/v1/auth.d.ts +46 -0
- package/dist/gen/v1/auth.js +278 -0
- package/dist/gen/v1/billing.d.ts +71 -0
- package/dist/gen/v1/billing.js +521 -0
- package/dist/gen/v1/common.d.ts +65 -0
- package/dist/gen/v1/common.js +387 -0
- package/dist/gen/v1/llm.d.ts +317 -0
- package/dist/gen/v1/llm.js +3557 -0
- package/dist/gen/v1/mcp.d.ts +373 -0
- package/dist/gen/v1/mcp.js +3190 -0
- package/dist/gen/v1/moderation.d.ts +51 -0
- package/dist/gen/v1/moderation.js +368 -0
- package/dist/gen/v1/neutral_scenario_source.d.ts +80 -0
- package/dist/gen/v1/neutral_scenario_source.js +569 -0
- package/dist/gen/v1/relation_kind.d.ts +105 -0
- package/dist/gen/v1/relation_kind.js +562 -0
- package/dist/gen/v1/rest/admin.d.ts +432 -0
- package/dist/gen/v1/rest/admin.js +4957 -0
- package/dist/gen/v1/rest/asset.d.ts +205 -0
- package/dist/gen/v1/rest/asset.js +2200 -0
- package/dist/gen/v1/rest/auth.d.ts +275 -0
- package/dist/gen/v1/rest/auth.js +2896 -0
- package/dist/gen/v1/rest/billing.d.ts +101 -0
- package/dist/gen/v1/rest/billing.js +866 -0
- package/dist/gen/v1/rest/common.d.ts +179 -0
- package/dist/gen/v1/rest/common.js +1358 -0
- package/dist/gen/v1/rest/creator.d.ts +354 -0
- package/dist/gen/v1/rest/creator.js +4169 -0
- package/dist/gen/v1/rest/messaging.d.ts +190 -0
- package/dist/gen/v1/rest/messaging.js +2017 -0
- package/dist/gen/v1/rest/moderation.d.ts +61 -0
- package/dist/gen/v1/rest/moderation.js +569 -0
- package/dist/gen/v1/rest/pet.d.ts +98 -0
- package/dist/gen/v1/rest/pet.js +698 -0
- package/dist/gen/v1/rest/project_transfer.d.ts +470 -0
- package/dist/gen/v1/rest/project_transfer.js +5266 -0
- package/dist/gen/v1/rest/scenario.d.ts +756 -0
- package/dist/gen/v1/rest/scenario.js +8768 -0
- package/dist/gen/v1/rest/stock_bounty.d.ts +154 -0
- package/dist/gen/v1/rest/stock_bounty.js +1547 -0
- package/dist/gen/v1/rest/stocks.d.ts +465 -0
- package/dist/gen/v1/rest/stocks.js +5200 -0
- package/dist/gen/v1/rest/support_ticket.d.ts +61 -0
- package/dist/gen/v1/rest/support_ticket.js +511 -0
- package/dist/gen/v1/rest/users.d.ts +292 -0
- package/dist/gen/v1/rest/users.js +2879 -0
- package/dist/gen/v1/rest/violations.d.ts +52 -0
- package/dist/gen/v1/rest/violations.js +338 -0
- package/dist/gen/v1/sav.d.ts +987 -0
- package/dist/gen/v1/sav.js +12327 -0
- package/dist/gen/v1/save.d.ts +68 -0
- package/dist/gen/v1/save.js +595 -0
- package/dist/gen/v1/scenario_part_source.d.ts +94 -0
- package/dist/gen/v1/scenario_part_source.js +913 -0
- package/dist/gen/v1/session.d.ts +49 -0
- package/dist/gen/v1/session.js +311 -0
- package/dist/gen/v1/view_state.d.ts +267 -0
- package/dist/gen/v1/view_state.js +3239 -0
- package/dist/gen/v1/world.d.ts +82 -0
- package/dist/gen/v1/world.js +707 -0
- package/dist/gen/v1/world_memory.d.ts +545 -0
- package/dist/gen/v1/world_memory.js +5816 -0
- package/dist/gen/v1/world_memory_privacy.d.ts +96 -0
- package/dist/gen/v1/world_memory_privacy.js +994 -0
- package/dist/gen/v1/ws_frame.d.ts +1626 -0
- package/dist/gen/v1/ws_frame.js +18253 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -0
- package/dist/ladybug-extraction.d.ts +36 -0
- package/dist/ladybug-extraction.js +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,4169 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.12.0
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: v1/rest/creator.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
import { AttachmentRef, ErrorInfo } from "../common.js";
|
|
9
|
+
export var EmbeddingOperationStatus;
|
|
10
|
+
(function (EmbeddingOperationStatus) {
|
|
11
|
+
EmbeddingOperationStatus[EmbeddingOperationStatus["EMBEDDING_OPERATION_STATUS_UNSPECIFIED"] = 0] = "EMBEDDING_OPERATION_STATUS_UNSPECIFIED";
|
|
12
|
+
EmbeddingOperationStatus[EmbeddingOperationStatus["EMBEDDING_OPERATION_STATUS_PENDING"] = 1] = "EMBEDDING_OPERATION_STATUS_PENDING";
|
|
13
|
+
EmbeddingOperationStatus[EmbeddingOperationStatus["EMBEDDING_OPERATION_STATUS_SETTLED"] = 2] = "EMBEDDING_OPERATION_STATUS_SETTLED";
|
|
14
|
+
EmbeddingOperationStatus[EmbeddingOperationStatus["EMBEDDING_OPERATION_STATUS_FAILED"] = 3] = "EMBEDDING_OPERATION_STATUS_FAILED";
|
|
15
|
+
EmbeddingOperationStatus[EmbeddingOperationStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
16
|
+
})(EmbeddingOperationStatus || (EmbeddingOperationStatus = {}));
|
|
17
|
+
export function embeddingOperationStatusFromJSON(object) {
|
|
18
|
+
switch (object) {
|
|
19
|
+
case 0:
|
|
20
|
+
case "EMBEDDING_OPERATION_STATUS_UNSPECIFIED":
|
|
21
|
+
return EmbeddingOperationStatus.EMBEDDING_OPERATION_STATUS_UNSPECIFIED;
|
|
22
|
+
case 1:
|
|
23
|
+
case "EMBEDDING_OPERATION_STATUS_PENDING":
|
|
24
|
+
return EmbeddingOperationStatus.EMBEDDING_OPERATION_STATUS_PENDING;
|
|
25
|
+
case 2:
|
|
26
|
+
case "EMBEDDING_OPERATION_STATUS_SETTLED":
|
|
27
|
+
return EmbeddingOperationStatus.EMBEDDING_OPERATION_STATUS_SETTLED;
|
|
28
|
+
case 3:
|
|
29
|
+
case "EMBEDDING_OPERATION_STATUS_FAILED":
|
|
30
|
+
return EmbeddingOperationStatus.EMBEDDING_OPERATION_STATUS_FAILED;
|
|
31
|
+
case -1:
|
|
32
|
+
case "UNRECOGNIZED":
|
|
33
|
+
default:
|
|
34
|
+
return EmbeddingOperationStatus.UNRECOGNIZED;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export function embeddingOperationStatusToJSON(object) {
|
|
38
|
+
switch (object) {
|
|
39
|
+
case EmbeddingOperationStatus.EMBEDDING_OPERATION_STATUS_UNSPECIFIED:
|
|
40
|
+
return "EMBEDDING_OPERATION_STATUS_UNSPECIFIED";
|
|
41
|
+
case EmbeddingOperationStatus.EMBEDDING_OPERATION_STATUS_PENDING:
|
|
42
|
+
return "EMBEDDING_OPERATION_STATUS_PENDING";
|
|
43
|
+
case EmbeddingOperationStatus.EMBEDDING_OPERATION_STATUS_SETTLED:
|
|
44
|
+
return "EMBEDDING_OPERATION_STATUS_SETTLED";
|
|
45
|
+
case EmbeddingOperationStatus.EMBEDDING_OPERATION_STATUS_FAILED:
|
|
46
|
+
return "EMBEDDING_OPERATION_STATUS_FAILED";
|
|
47
|
+
case EmbeddingOperationStatus.UNRECOGNIZED:
|
|
48
|
+
default:
|
|
49
|
+
return "UNRECOGNIZED";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export var EmbeddingInputKind;
|
|
53
|
+
(function (EmbeddingInputKind) {
|
|
54
|
+
EmbeddingInputKind[EmbeddingInputKind["EMBEDDING_INPUT_KIND_UNSPECIFIED"] = 0] = "EMBEDDING_INPUT_KIND_UNSPECIFIED";
|
|
55
|
+
EmbeddingInputKind[EmbeddingInputKind["EMBEDDING_INPUT_KIND_DOCUMENT"] = 1] = "EMBEDDING_INPUT_KIND_DOCUMENT";
|
|
56
|
+
EmbeddingInputKind[EmbeddingInputKind["EMBEDDING_INPUT_KIND_QUERY"] = 2] = "EMBEDDING_INPUT_KIND_QUERY";
|
|
57
|
+
EmbeddingInputKind[EmbeddingInputKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
58
|
+
})(EmbeddingInputKind || (EmbeddingInputKind = {}));
|
|
59
|
+
export function embeddingInputKindFromJSON(object) {
|
|
60
|
+
switch (object) {
|
|
61
|
+
case 0:
|
|
62
|
+
case "EMBEDDING_INPUT_KIND_UNSPECIFIED":
|
|
63
|
+
return EmbeddingInputKind.EMBEDDING_INPUT_KIND_UNSPECIFIED;
|
|
64
|
+
case 1:
|
|
65
|
+
case "EMBEDDING_INPUT_KIND_DOCUMENT":
|
|
66
|
+
return EmbeddingInputKind.EMBEDDING_INPUT_KIND_DOCUMENT;
|
|
67
|
+
case 2:
|
|
68
|
+
case "EMBEDDING_INPUT_KIND_QUERY":
|
|
69
|
+
return EmbeddingInputKind.EMBEDDING_INPUT_KIND_QUERY;
|
|
70
|
+
case -1:
|
|
71
|
+
case "UNRECOGNIZED":
|
|
72
|
+
default:
|
|
73
|
+
return EmbeddingInputKind.UNRECOGNIZED;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export function embeddingInputKindToJSON(object) {
|
|
77
|
+
switch (object) {
|
|
78
|
+
case EmbeddingInputKind.EMBEDDING_INPUT_KIND_UNSPECIFIED:
|
|
79
|
+
return "EMBEDDING_INPUT_KIND_UNSPECIFIED";
|
|
80
|
+
case EmbeddingInputKind.EMBEDDING_INPUT_KIND_DOCUMENT:
|
|
81
|
+
return "EMBEDDING_INPUT_KIND_DOCUMENT";
|
|
82
|
+
case EmbeddingInputKind.EMBEDDING_INPUT_KIND_QUERY:
|
|
83
|
+
return "EMBEDDING_INPUT_KIND_QUERY";
|
|
84
|
+
case EmbeddingInputKind.UNRECOGNIZED:
|
|
85
|
+
default:
|
|
86
|
+
return "UNRECOGNIZED";
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function createBaseAiGenerateRequest() {
|
|
90
|
+
return {
|
|
91
|
+
prompt: "",
|
|
92
|
+
model_id: "",
|
|
93
|
+
context_scenario_id: "",
|
|
94
|
+
extra_json: new Uint8Array(0),
|
|
95
|
+
max_tokens: 0,
|
|
96
|
+
temperature: 0,
|
|
97
|
+
attachments: [],
|
|
98
|
+
idempotency_key: "",
|
|
99
|
+
_unknownFields: {},
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
export const AiGenerateRequest = {
|
|
103
|
+
encode(message, writer = new BinaryWriter()) {
|
|
104
|
+
if (message.prompt !== "") {
|
|
105
|
+
writer.uint32(10).string(message.prompt);
|
|
106
|
+
}
|
|
107
|
+
if (message.model_id !== "") {
|
|
108
|
+
writer.uint32(18).string(message.model_id);
|
|
109
|
+
}
|
|
110
|
+
if (message.context_scenario_id !== "") {
|
|
111
|
+
writer.uint32(26).string(message.context_scenario_id);
|
|
112
|
+
}
|
|
113
|
+
if (message.extra_json.length !== 0) {
|
|
114
|
+
writer.uint32(34).bytes(message.extra_json);
|
|
115
|
+
}
|
|
116
|
+
if (message.max_tokens !== 0) {
|
|
117
|
+
writer.uint32(40).int32(message.max_tokens);
|
|
118
|
+
}
|
|
119
|
+
if (message.temperature !== 0) {
|
|
120
|
+
writer.uint32(49).double(message.temperature);
|
|
121
|
+
}
|
|
122
|
+
for (const v of message.attachments) {
|
|
123
|
+
AttachmentRef.encode(v, writer.uint32(58).fork()).join();
|
|
124
|
+
}
|
|
125
|
+
if (message.idempotency_key !== "") {
|
|
126
|
+
writer.uint32(66).string(message.idempotency_key);
|
|
127
|
+
}
|
|
128
|
+
if (message._unknownFields !== undefined) {
|
|
129
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
130
|
+
const tag = parseInt(key, 10);
|
|
131
|
+
for (const value of values) {
|
|
132
|
+
writer.uint32(tag).raw(value);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return writer;
|
|
137
|
+
},
|
|
138
|
+
decode(input, length) {
|
|
139
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
140
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
141
|
+
const message = createBaseAiGenerateRequest();
|
|
142
|
+
while (reader.pos < end) {
|
|
143
|
+
const tag = reader.uint32();
|
|
144
|
+
switch (tag >>> 3) {
|
|
145
|
+
case 1: {
|
|
146
|
+
if (tag !== 10) {
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
message.prompt = reader.string();
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
case 2: {
|
|
153
|
+
if (tag !== 18) {
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
message.model_id = reader.string();
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
case 3: {
|
|
160
|
+
if (tag !== 26) {
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
message.context_scenario_id = reader.string();
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
case 4: {
|
|
167
|
+
if (tag !== 34) {
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
message.extra_json = reader.bytes();
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
case 5: {
|
|
174
|
+
if (tag !== 40) {
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
message.max_tokens = reader.int32();
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
case 6: {
|
|
181
|
+
if (tag !== 49) {
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
message.temperature = reader.double();
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
case 7: {
|
|
188
|
+
if (tag !== 58) {
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
message.attachments.push(AttachmentRef.decode(reader, reader.uint32()));
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
case 8: {
|
|
195
|
+
if (tag !== 66) {
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
message.idempotency_key = reader.string();
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
const buf = reader.skip(tag & 7);
|
|
206
|
+
const list = message._unknownFields[tag];
|
|
207
|
+
if (list === undefined) {
|
|
208
|
+
message._unknownFields[tag] = [buf];
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
list.push(buf);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return message;
|
|
215
|
+
},
|
|
216
|
+
fromJSON(object) {
|
|
217
|
+
return {
|
|
218
|
+
prompt: isSet(object.prompt) ? globalThis.String(object.prompt) : "",
|
|
219
|
+
model_id: isSet(object.modelId)
|
|
220
|
+
? globalThis.String(object.modelId)
|
|
221
|
+
: isSet(object.model_id)
|
|
222
|
+
? globalThis.String(object.model_id)
|
|
223
|
+
: "",
|
|
224
|
+
context_scenario_id: isSet(object.contextScenarioId)
|
|
225
|
+
? globalThis.String(object.contextScenarioId)
|
|
226
|
+
: isSet(object.context_scenario_id)
|
|
227
|
+
? globalThis.String(object.context_scenario_id)
|
|
228
|
+
: "",
|
|
229
|
+
extra_json: isSet(object.extraJson)
|
|
230
|
+
? bytesFromBase64(object.extraJson)
|
|
231
|
+
: isSet(object.extra_json)
|
|
232
|
+
? bytesFromBase64(object.extra_json)
|
|
233
|
+
: new Uint8Array(0),
|
|
234
|
+
max_tokens: isSet(object.maxTokens)
|
|
235
|
+
? globalThis.Number(object.maxTokens)
|
|
236
|
+
: isSet(object.max_tokens)
|
|
237
|
+
? globalThis.Number(object.max_tokens)
|
|
238
|
+
: 0,
|
|
239
|
+
temperature: isSet(object.temperature) ? globalThis.Number(object.temperature) : 0,
|
|
240
|
+
attachments: globalThis.Array.isArray(object?.attachments)
|
|
241
|
+
? object.attachments.map((e) => AttachmentRef.fromJSON(e))
|
|
242
|
+
: [],
|
|
243
|
+
idempotency_key: isSet(object.idempotencyKey)
|
|
244
|
+
? globalThis.String(object.idempotencyKey)
|
|
245
|
+
: isSet(object.idempotency_key)
|
|
246
|
+
? globalThis.String(object.idempotency_key)
|
|
247
|
+
: "",
|
|
248
|
+
};
|
|
249
|
+
},
|
|
250
|
+
toJSON(message) {
|
|
251
|
+
const obj = {};
|
|
252
|
+
if (message.prompt !== "") {
|
|
253
|
+
obj.prompt = message.prompt;
|
|
254
|
+
}
|
|
255
|
+
if (message.model_id !== "") {
|
|
256
|
+
obj.modelId = message.model_id;
|
|
257
|
+
}
|
|
258
|
+
if (message.context_scenario_id !== "") {
|
|
259
|
+
obj.contextScenarioId = message.context_scenario_id;
|
|
260
|
+
}
|
|
261
|
+
if (message.extra_json.length !== 0) {
|
|
262
|
+
obj.extraJson = base64FromBytes(message.extra_json);
|
|
263
|
+
}
|
|
264
|
+
if (message.max_tokens !== 0) {
|
|
265
|
+
obj.maxTokens = Math.round(message.max_tokens);
|
|
266
|
+
}
|
|
267
|
+
if (message.temperature !== 0) {
|
|
268
|
+
obj.temperature = message.temperature;
|
|
269
|
+
}
|
|
270
|
+
if (message.attachments?.length) {
|
|
271
|
+
obj.attachments = message.attachments.map((e) => AttachmentRef.toJSON(e));
|
|
272
|
+
}
|
|
273
|
+
if (message.idempotency_key !== "") {
|
|
274
|
+
obj.idempotencyKey = message.idempotency_key;
|
|
275
|
+
}
|
|
276
|
+
return obj;
|
|
277
|
+
},
|
|
278
|
+
create(base) {
|
|
279
|
+
return AiGenerateRequest.fromPartial(base ?? {});
|
|
280
|
+
},
|
|
281
|
+
fromPartial(object) {
|
|
282
|
+
const message = createBaseAiGenerateRequest();
|
|
283
|
+
message.prompt = object.prompt ?? "";
|
|
284
|
+
message.model_id = object.model_id ?? "";
|
|
285
|
+
message.context_scenario_id = object.context_scenario_id ?? "";
|
|
286
|
+
message.extra_json = object.extra_json ?? new Uint8Array(0);
|
|
287
|
+
message.max_tokens = object.max_tokens ?? 0;
|
|
288
|
+
message.temperature = object.temperature ?? 0;
|
|
289
|
+
message.attachments = object.attachments?.map((e) => AttachmentRef.fromPartial(e)) || [];
|
|
290
|
+
message.idempotency_key = object.idempotency_key ?? "";
|
|
291
|
+
return message;
|
|
292
|
+
},
|
|
293
|
+
};
|
|
294
|
+
function createBaseAiGenerateResponse() {
|
|
295
|
+
return {
|
|
296
|
+
text: "",
|
|
297
|
+
input_tokens: "0",
|
|
298
|
+
output_tokens: "0",
|
|
299
|
+
finish_reason: "",
|
|
300
|
+
charged_units: "0",
|
|
301
|
+
error: undefined,
|
|
302
|
+
_unknownFields: {},
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
export const AiGenerateResponse = {
|
|
306
|
+
encode(message, writer = new BinaryWriter()) {
|
|
307
|
+
if (message.text !== "") {
|
|
308
|
+
writer.uint32(10).string(message.text);
|
|
309
|
+
}
|
|
310
|
+
if (message.input_tokens !== "0") {
|
|
311
|
+
writer.uint32(16).int64(message.input_tokens);
|
|
312
|
+
}
|
|
313
|
+
if (message.output_tokens !== "0") {
|
|
314
|
+
writer.uint32(24).int64(message.output_tokens);
|
|
315
|
+
}
|
|
316
|
+
if (message.finish_reason !== "") {
|
|
317
|
+
writer.uint32(34).string(message.finish_reason);
|
|
318
|
+
}
|
|
319
|
+
if (message.charged_units !== "0") {
|
|
320
|
+
writer.uint32(40).int64(message.charged_units);
|
|
321
|
+
}
|
|
322
|
+
if (message.error !== undefined) {
|
|
323
|
+
ErrorInfo.encode(message.error, writer.uint32(122).fork()).join();
|
|
324
|
+
}
|
|
325
|
+
if (message._unknownFields !== undefined) {
|
|
326
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
327
|
+
const tag = parseInt(key, 10);
|
|
328
|
+
for (const value of values) {
|
|
329
|
+
writer.uint32(tag).raw(value);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return writer;
|
|
334
|
+
},
|
|
335
|
+
decode(input, length) {
|
|
336
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
337
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
338
|
+
const message = createBaseAiGenerateResponse();
|
|
339
|
+
while (reader.pos < end) {
|
|
340
|
+
const tag = reader.uint32();
|
|
341
|
+
switch (tag >>> 3) {
|
|
342
|
+
case 1: {
|
|
343
|
+
if (tag !== 10) {
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
message.text = reader.string();
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
case 2: {
|
|
350
|
+
if (tag !== 16) {
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
message.input_tokens = reader.int64().toString();
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
case 3: {
|
|
357
|
+
if (tag !== 24) {
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
message.output_tokens = reader.int64().toString();
|
|
361
|
+
continue;
|
|
362
|
+
}
|
|
363
|
+
case 4: {
|
|
364
|
+
if (tag !== 34) {
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
message.finish_reason = reader.string();
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
case 5: {
|
|
371
|
+
if (tag !== 40) {
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
message.charged_units = reader.int64().toString();
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
case 15: {
|
|
378
|
+
if (tag !== 122) {
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
message.error = ErrorInfo.decode(reader, reader.uint32());
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
const buf = reader.skip(tag & 7);
|
|
389
|
+
const list = message._unknownFields[tag];
|
|
390
|
+
if (list === undefined) {
|
|
391
|
+
message._unknownFields[tag] = [buf];
|
|
392
|
+
}
|
|
393
|
+
else {
|
|
394
|
+
list.push(buf);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
return message;
|
|
398
|
+
},
|
|
399
|
+
fromJSON(object) {
|
|
400
|
+
return {
|
|
401
|
+
text: isSet(object.text) ? globalThis.String(object.text) : "",
|
|
402
|
+
input_tokens: isSet(object.inputTokens)
|
|
403
|
+
? globalThis.String(object.inputTokens)
|
|
404
|
+
: isSet(object.input_tokens)
|
|
405
|
+
? globalThis.String(object.input_tokens)
|
|
406
|
+
: "0",
|
|
407
|
+
output_tokens: isSet(object.outputTokens)
|
|
408
|
+
? globalThis.String(object.outputTokens)
|
|
409
|
+
: isSet(object.output_tokens)
|
|
410
|
+
? globalThis.String(object.output_tokens)
|
|
411
|
+
: "0",
|
|
412
|
+
finish_reason: isSet(object.finishReason)
|
|
413
|
+
? globalThis.String(object.finishReason)
|
|
414
|
+
: isSet(object.finish_reason)
|
|
415
|
+
? globalThis.String(object.finish_reason)
|
|
416
|
+
: "",
|
|
417
|
+
charged_units: isSet(object.chargedUnits)
|
|
418
|
+
? globalThis.String(object.chargedUnits)
|
|
419
|
+
: isSet(object.charged_units)
|
|
420
|
+
? globalThis.String(object.charged_units)
|
|
421
|
+
: "0",
|
|
422
|
+
error: isSet(object.error) ? ErrorInfo.fromJSON(object.error) : undefined,
|
|
423
|
+
};
|
|
424
|
+
},
|
|
425
|
+
toJSON(message) {
|
|
426
|
+
const obj = {};
|
|
427
|
+
if (message.text !== "") {
|
|
428
|
+
obj.text = message.text;
|
|
429
|
+
}
|
|
430
|
+
if (message.input_tokens !== "0") {
|
|
431
|
+
obj.inputTokens = message.input_tokens;
|
|
432
|
+
}
|
|
433
|
+
if (message.output_tokens !== "0") {
|
|
434
|
+
obj.outputTokens = message.output_tokens;
|
|
435
|
+
}
|
|
436
|
+
if (message.finish_reason !== "") {
|
|
437
|
+
obj.finishReason = message.finish_reason;
|
|
438
|
+
}
|
|
439
|
+
if (message.charged_units !== "0") {
|
|
440
|
+
obj.chargedUnits = message.charged_units;
|
|
441
|
+
}
|
|
442
|
+
if (message.error !== undefined) {
|
|
443
|
+
obj.error = ErrorInfo.toJSON(message.error);
|
|
444
|
+
}
|
|
445
|
+
return obj;
|
|
446
|
+
},
|
|
447
|
+
create(base) {
|
|
448
|
+
return AiGenerateResponse.fromPartial(base ?? {});
|
|
449
|
+
},
|
|
450
|
+
fromPartial(object) {
|
|
451
|
+
const message = createBaseAiGenerateResponse();
|
|
452
|
+
message.text = object.text ?? "";
|
|
453
|
+
message.input_tokens = object.input_tokens ?? "0";
|
|
454
|
+
message.output_tokens = object.output_tokens ?? "0";
|
|
455
|
+
message.finish_reason = object.finish_reason ?? "";
|
|
456
|
+
message.charged_units = object.charged_units ?? "0";
|
|
457
|
+
message.error = (object.error !== undefined && object.error !== null)
|
|
458
|
+
? ErrorInfo.fromPartial(object.error)
|
|
459
|
+
: undefined;
|
|
460
|
+
return message;
|
|
461
|
+
},
|
|
462
|
+
};
|
|
463
|
+
function createBaseAiProxyRequest() {
|
|
464
|
+
return {
|
|
465
|
+
upstream: "",
|
|
466
|
+
raw_payload: new Uint8Array(0),
|
|
467
|
+
headers: {},
|
|
468
|
+
upstream_path: "",
|
|
469
|
+
method: "",
|
|
470
|
+
attachments: [],
|
|
471
|
+
_unknownFields: {},
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
export const AiProxyRequest = {
|
|
475
|
+
encode(message, writer = new BinaryWriter()) {
|
|
476
|
+
if (message.upstream !== "") {
|
|
477
|
+
writer.uint32(10).string(message.upstream);
|
|
478
|
+
}
|
|
479
|
+
if (message.raw_payload.length !== 0) {
|
|
480
|
+
writer.uint32(18).bytes(message.raw_payload);
|
|
481
|
+
}
|
|
482
|
+
globalThis.Object.entries(message.headers).forEach(([key, value]) => {
|
|
483
|
+
AiProxyRequest_HeadersEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
|
|
484
|
+
});
|
|
485
|
+
if (message.upstream_path !== "") {
|
|
486
|
+
writer.uint32(34).string(message.upstream_path);
|
|
487
|
+
}
|
|
488
|
+
if (message.method !== "") {
|
|
489
|
+
writer.uint32(42).string(message.method);
|
|
490
|
+
}
|
|
491
|
+
for (const v of message.attachments) {
|
|
492
|
+
AttachmentRef.encode(v, writer.uint32(50).fork()).join();
|
|
493
|
+
}
|
|
494
|
+
if (message._unknownFields !== undefined) {
|
|
495
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
496
|
+
const tag = parseInt(key, 10);
|
|
497
|
+
for (const value of values) {
|
|
498
|
+
writer.uint32(tag).raw(value);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
return writer;
|
|
503
|
+
},
|
|
504
|
+
decode(input, length) {
|
|
505
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
506
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
507
|
+
const message = createBaseAiProxyRequest();
|
|
508
|
+
while (reader.pos < end) {
|
|
509
|
+
const tag = reader.uint32();
|
|
510
|
+
switch (tag >>> 3) {
|
|
511
|
+
case 1: {
|
|
512
|
+
if (tag !== 10) {
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
515
|
+
message.upstream = reader.string();
|
|
516
|
+
continue;
|
|
517
|
+
}
|
|
518
|
+
case 2: {
|
|
519
|
+
if (tag !== 18) {
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
message.raw_payload = reader.bytes();
|
|
523
|
+
continue;
|
|
524
|
+
}
|
|
525
|
+
case 3: {
|
|
526
|
+
if (tag !== 26) {
|
|
527
|
+
break;
|
|
528
|
+
}
|
|
529
|
+
const entry3 = AiProxyRequest_HeadersEntry.decode(reader, reader.uint32());
|
|
530
|
+
if (entry3.value !== undefined) {
|
|
531
|
+
message.headers[entry3.key] = entry3.value;
|
|
532
|
+
}
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
535
|
+
case 4: {
|
|
536
|
+
if (tag !== 34) {
|
|
537
|
+
break;
|
|
538
|
+
}
|
|
539
|
+
message.upstream_path = reader.string();
|
|
540
|
+
continue;
|
|
541
|
+
}
|
|
542
|
+
case 5: {
|
|
543
|
+
if (tag !== 42) {
|
|
544
|
+
break;
|
|
545
|
+
}
|
|
546
|
+
message.method = reader.string();
|
|
547
|
+
continue;
|
|
548
|
+
}
|
|
549
|
+
case 6: {
|
|
550
|
+
if (tag !== 50) {
|
|
551
|
+
break;
|
|
552
|
+
}
|
|
553
|
+
message.attachments.push(AttachmentRef.decode(reader, reader.uint32()));
|
|
554
|
+
continue;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
558
|
+
break;
|
|
559
|
+
}
|
|
560
|
+
const buf = reader.skip(tag & 7);
|
|
561
|
+
const list = message._unknownFields[tag];
|
|
562
|
+
if (list === undefined) {
|
|
563
|
+
message._unknownFields[tag] = [buf];
|
|
564
|
+
}
|
|
565
|
+
else {
|
|
566
|
+
list.push(buf);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
return message;
|
|
570
|
+
},
|
|
571
|
+
fromJSON(object) {
|
|
572
|
+
return {
|
|
573
|
+
upstream: isSet(object.upstream) ? globalThis.String(object.upstream) : "",
|
|
574
|
+
raw_payload: isSet(object.rawPayload)
|
|
575
|
+
? bytesFromBase64(object.rawPayload)
|
|
576
|
+
: isSet(object.raw_payload)
|
|
577
|
+
? bytesFromBase64(object.raw_payload)
|
|
578
|
+
: new Uint8Array(0),
|
|
579
|
+
headers: isObject(object.headers)
|
|
580
|
+
? globalThis.Object.entries(object.headers).reduce((acc, [key, value]) => {
|
|
581
|
+
acc[key] = globalThis.String(value);
|
|
582
|
+
return acc;
|
|
583
|
+
}, {})
|
|
584
|
+
: {},
|
|
585
|
+
upstream_path: isSet(object.upstreamPath)
|
|
586
|
+
? globalThis.String(object.upstreamPath)
|
|
587
|
+
: isSet(object.upstream_path)
|
|
588
|
+
? globalThis.String(object.upstream_path)
|
|
589
|
+
: "",
|
|
590
|
+
method: isSet(object.method) ? globalThis.String(object.method) : "",
|
|
591
|
+
attachments: globalThis.Array.isArray(object?.attachments)
|
|
592
|
+
? object.attachments.map((e) => AttachmentRef.fromJSON(e))
|
|
593
|
+
: [],
|
|
594
|
+
};
|
|
595
|
+
},
|
|
596
|
+
toJSON(message) {
|
|
597
|
+
const obj = {};
|
|
598
|
+
if (message.upstream !== "") {
|
|
599
|
+
obj.upstream = message.upstream;
|
|
600
|
+
}
|
|
601
|
+
if (message.raw_payload.length !== 0) {
|
|
602
|
+
obj.rawPayload = base64FromBytes(message.raw_payload);
|
|
603
|
+
}
|
|
604
|
+
if (message.headers) {
|
|
605
|
+
const entries = globalThis.Object.entries(message.headers);
|
|
606
|
+
if (entries.length > 0) {
|
|
607
|
+
obj.headers = {};
|
|
608
|
+
entries.forEach(([k, v]) => {
|
|
609
|
+
obj.headers[k] = v;
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
if (message.upstream_path !== "") {
|
|
614
|
+
obj.upstreamPath = message.upstream_path;
|
|
615
|
+
}
|
|
616
|
+
if (message.method !== "") {
|
|
617
|
+
obj.method = message.method;
|
|
618
|
+
}
|
|
619
|
+
if (message.attachments?.length) {
|
|
620
|
+
obj.attachments = message.attachments.map((e) => AttachmentRef.toJSON(e));
|
|
621
|
+
}
|
|
622
|
+
return obj;
|
|
623
|
+
},
|
|
624
|
+
create(base) {
|
|
625
|
+
return AiProxyRequest.fromPartial(base ?? {});
|
|
626
|
+
},
|
|
627
|
+
fromPartial(object) {
|
|
628
|
+
const message = createBaseAiProxyRequest();
|
|
629
|
+
message.upstream = object.upstream ?? "";
|
|
630
|
+
message.raw_payload = object.raw_payload ?? new Uint8Array(0);
|
|
631
|
+
message.headers = globalThis.Object.entries(object.headers ?? {}).reduce((acc, [key, value]) => {
|
|
632
|
+
if (value !== undefined) {
|
|
633
|
+
acc[key] = globalThis.String(value);
|
|
634
|
+
}
|
|
635
|
+
return acc;
|
|
636
|
+
}, {});
|
|
637
|
+
message.upstream_path = object.upstream_path ?? "";
|
|
638
|
+
message.method = object.method ?? "";
|
|
639
|
+
message.attachments = object.attachments?.map((e) => AttachmentRef.fromPartial(e)) || [];
|
|
640
|
+
return message;
|
|
641
|
+
},
|
|
642
|
+
};
|
|
643
|
+
function createBaseAiProxyRequest_HeadersEntry() {
|
|
644
|
+
return { key: "", value: "", _unknownFields: {} };
|
|
645
|
+
}
|
|
646
|
+
export const AiProxyRequest_HeadersEntry = {
|
|
647
|
+
encode(message, writer = new BinaryWriter()) {
|
|
648
|
+
if (message.key !== "") {
|
|
649
|
+
writer.uint32(10).string(message.key);
|
|
650
|
+
}
|
|
651
|
+
if (message.value !== "") {
|
|
652
|
+
writer.uint32(18).string(message.value);
|
|
653
|
+
}
|
|
654
|
+
if (message._unknownFields !== undefined) {
|
|
655
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
656
|
+
const tag = parseInt(key, 10);
|
|
657
|
+
for (const value of values) {
|
|
658
|
+
writer.uint32(tag).raw(value);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
return writer;
|
|
663
|
+
},
|
|
664
|
+
decode(input, length) {
|
|
665
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
666
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
667
|
+
const message = createBaseAiProxyRequest_HeadersEntry();
|
|
668
|
+
while (reader.pos < end) {
|
|
669
|
+
const tag = reader.uint32();
|
|
670
|
+
switch (tag >>> 3) {
|
|
671
|
+
case 1: {
|
|
672
|
+
if (tag !== 10) {
|
|
673
|
+
break;
|
|
674
|
+
}
|
|
675
|
+
message.key = reader.string();
|
|
676
|
+
continue;
|
|
677
|
+
}
|
|
678
|
+
case 2: {
|
|
679
|
+
if (tag !== 18) {
|
|
680
|
+
break;
|
|
681
|
+
}
|
|
682
|
+
message.value = reader.string();
|
|
683
|
+
continue;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
687
|
+
break;
|
|
688
|
+
}
|
|
689
|
+
const buf = reader.skip(tag & 7);
|
|
690
|
+
const list = message._unknownFields[tag];
|
|
691
|
+
if (list === undefined) {
|
|
692
|
+
message._unknownFields[tag] = [buf];
|
|
693
|
+
}
|
|
694
|
+
else {
|
|
695
|
+
list.push(buf);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
return message;
|
|
699
|
+
},
|
|
700
|
+
fromJSON(object) {
|
|
701
|
+
return {
|
|
702
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
703
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
704
|
+
};
|
|
705
|
+
},
|
|
706
|
+
toJSON(message) {
|
|
707
|
+
const obj = {};
|
|
708
|
+
if (message.key !== "") {
|
|
709
|
+
obj.key = message.key;
|
|
710
|
+
}
|
|
711
|
+
if (message.value !== "") {
|
|
712
|
+
obj.value = message.value;
|
|
713
|
+
}
|
|
714
|
+
return obj;
|
|
715
|
+
},
|
|
716
|
+
create(base) {
|
|
717
|
+
return AiProxyRequest_HeadersEntry.fromPartial(base ?? {});
|
|
718
|
+
},
|
|
719
|
+
fromPartial(object) {
|
|
720
|
+
const message = createBaseAiProxyRequest_HeadersEntry();
|
|
721
|
+
message.key = object.key ?? "";
|
|
722
|
+
message.value = object.value ?? "";
|
|
723
|
+
return message;
|
|
724
|
+
},
|
|
725
|
+
};
|
|
726
|
+
function createBaseAiProxyResponse() {
|
|
727
|
+
return {
|
|
728
|
+
raw_response: new Uint8Array(0),
|
|
729
|
+
status_code: 0,
|
|
730
|
+
response_headers: {},
|
|
731
|
+
input_tokens: "0",
|
|
732
|
+
output_tokens: "0",
|
|
733
|
+
error: undefined,
|
|
734
|
+
_unknownFields: {},
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
export const AiProxyResponse = {
|
|
738
|
+
encode(message, writer = new BinaryWriter()) {
|
|
739
|
+
if (message.raw_response.length !== 0) {
|
|
740
|
+
writer.uint32(10).bytes(message.raw_response);
|
|
741
|
+
}
|
|
742
|
+
if (message.status_code !== 0) {
|
|
743
|
+
writer.uint32(16).int32(message.status_code);
|
|
744
|
+
}
|
|
745
|
+
globalThis.Object.entries(message.response_headers).forEach(([key, value]) => {
|
|
746
|
+
AiProxyResponse_ResponseHeadersEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
|
|
747
|
+
});
|
|
748
|
+
if (message.input_tokens !== "0") {
|
|
749
|
+
writer.uint32(32).int64(message.input_tokens);
|
|
750
|
+
}
|
|
751
|
+
if (message.output_tokens !== "0") {
|
|
752
|
+
writer.uint32(40).int64(message.output_tokens);
|
|
753
|
+
}
|
|
754
|
+
if (message.error !== undefined) {
|
|
755
|
+
ErrorInfo.encode(message.error, writer.uint32(122).fork()).join();
|
|
756
|
+
}
|
|
757
|
+
if (message._unknownFields !== undefined) {
|
|
758
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
759
|
+
const tag = parseInt(key, 10);
|
|
760
|
+
for (const value of values) {
|
|
761
|
+
writer.uint32(tag).raw(value);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
return writer;
|
|
766
|
+
},
|
|
767
|
+
decode(input, length) {
|
|
768
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
769
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
770
|
+
const message = createBaseAiProxyResponse();
|
|
771
|
+
while (reader.pos < end) {
|
|
772
|
+
const tag = reader.uint32();
|
|
773
|
+
switch (tag >>> 3) {
|
|
774
|
+
case 1: {
|
|
775
|
+
if (tag !== 10) {
|
|
776
|
+
break;
|
|
777
|
+
}
|
|
778
|
+
message.raw_response = reader.bytes();
|
|
779
|
+
continue;
|
|
780
|
+
}
|
|
781
|
+
case 2: {
|
|
782
|
+
if (tag !== 16) {
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
message.status_code = reader.int32();
|
|
786
|
+
continue;
|
|
787
|
+
}
|
|
788
|
+
case 3: {
|
|
789
|
+
if (tag !== 26) {
|
|
790
|
+
break;
|
|
791
|
+
}
|
|
792
|
+
const entry3 = AiProxyResponse_ResponseHeadersEntry.decode(reader, reader.uint32());
|
|
793
|
+
if (entry3.value !== undefined) {
|
|
794
|
+
message.response_headers[entry3.key] = entry3.value;
|
|
795
|
+
}
|
|
796
|
+
continue;
|
|
797
|
+
}
|
|
798
|
+
case 4: {
|
|
799
|
+
if (tag !== 32) {
|
|
800
|
+
break;
|
|
801
|
+
}
|
|
802
|
+
message.input_tokens = reader.int64().toString();
|
|
803
|
+
continue;
|
|
804
|
+
}
|
|
805
|
+
case 5: {
|
|
806
|
+
if (tag !== 40) {
|
|
807
|
+
break;
|
|
808
|
+
}
|
|
809
|
+
message.output_tokens = reader.int64().toString();
|
|
810
|
+
continue;
|
|
811
|
+
}
|
|
812
|
+
case 15: {
|
|
813
|
+
if (tag !== 122) {
|
|
814
|
+
break;
|
|
815
|
+
}
|
|
816
|
+
message.error = ErrorInfo.decode(reader, reader.uint32());
|
|
817
|
+
continue;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
821
|
+
break;
|
|
822
|
+
}
|
|
823
|
+
const buf = reader.skip(tag & 7);
|
|
824
|
+
const list = message._unknownFields[tag];
|
|
825
|
+
if (list === undefined) {
|
|
826
|
+
message._unknownFields[tag] = [buf];
|
|
827
|
+
}
|
|
828
|
+
else {
|
|
829
|
+
list.push(buf);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
return message;
|
|
833
|
+
},
|
|
834
|
+
fromJSON(object) {
|
|
835
|
+
return {
|
|
836
|
+
raw_response: isSet(object.rawResponse)
|
|
837
|
+
? bytesFromBase64(object.rawResponse)
|
|
838
|
+
: isSet(object.raw_response)
|
|
839
|
+
? bytesFromBase64(object.raw_response)
|
|
840
|
+
: new Uint8Array(0),
|
|
841
|
+
status_code: isSet(object.statusCode)
|
|
842
|
+
? globalThis.Number(object.statusCode)
|
|
843
|
+
: isSet(object.status_code)
|
|
844
|
+
? globalThis.Number(object.status_code)
|
|
845
|
+
: 0,
|
|
846
|
+
response_headers: isObject(object.responseHeaders)
|
|
847
|
+
? globalThis.Object.entries(object.responseHeaders).reduce((acc, [key, value]) => {
|
|
848
|
+
acc[key] = globalThis.String(value);
|
|
849
|
+
return acc;
|
|
850
|
+
}, {})
|
|
851
|
+
: isObject(object.response_headers)
|
|
852
|
+
? globalThis.Object.entries(object.response_headers).reduce((acc, [key, value]) => {
|
|
853
|
+
acc[key] = globalThis.String(value);
|
|
854
|
+
return acc;
|
|
855
|
+
}, {})
|
|
856
|
+
: {},
|
|
857
|
+
input_tokens: isSet(object.inputTokens)
|
|
858
|
+
? globalThis.String(object.inputTokens)
|
|
859
|
+
: isSet(object.input_tokens)
|
|
860
|
+
? globalThis.String(object.input_tokens)
|
|
861
|
+
: "0",
|
|
862
|
+
output_tokens: isSet(object.outputTokens)
|
|
863
|
+
? globalThis.String(object.outputTokens)
|
|
864
|
+
: isSet(object.output_tokens)
|
|
865
|
+
? globalThis.String(object.output_tokens)
|
|
866
|
+
: "0",
|
|
867
|
+
error: isSet(object.error) ? ErrorInfo.fromJSON(object.error) : undefined,
|
|
868
|
+
};
|
|
869
|
+
},
|
|
870
|
+
toJSON(message) {
|
|
871
|
+
const obj = {};
|
|
872
|
+
if (message.raw_response.length !== 0) {
|
|
873
|
+
obj.rawResponse = base64FromBytes(message.raw_response);
|
|
874
|
+
}
|
|
875
|
+
if (message.status_code !== 0) {
|
|
876
|
+
obj.statusCode = Math.round(message.status_code);
|
|
877
|
+
}
|
|
878
|
+
if (message.response_headers) {
|
|
879
|
+
const entries = globalThis.Object.entries(message.response_headers);
|
|
880
|
+
if (entries.length > 0) {
|
|
881
|
+
obj.responseHeaders = {};
|
|
882
|
+
entries.forEach(([k, v]) => {
|
|
883
|
+
obj.responseHeaders[k] = v;
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
if (message.input_tokens !== "0") {
|
|
888
|
+
obj.inputTokens = message.input_tokens;
|
|
889
|
+
}
|
|
890
|
+
if (message.output_tokens !== "0") {
|
|
891
|
+
obj.outputTokens = message.output_tokens;
|
|
892
|
+
}
|
|
893
|
+
if (message.error !== undefined) {
|
|
894
|
+
obj.error = ErrorInfo.toJSON(message.error);
|
|
895
|
+
}
|
|
896
|
+
return obj;
|
|
897
|
+
},
|
|
898
|
+
create(base) {
|
|
899
|
+
return AiProxyResponse.fromPartial(base ?? {});
|
|
900
|
+
},
|
|
901
|
+
fromPartial(object) {
|
|
902
|
+
const message = createBaseAiProxyResponse();
|
|
903
|
+
message.raw_response = object.raw_response ?? new Uint8Array(0);
|
|
904
|
+
message.status_code = object.status_code ?? 0;
|
|
905
|
+
message.response_headers = globalThis.Object.entries(object.response_headers ?? {}).reduce((acc, [key, value]) => {
|
|
906
|
+
if (value !== undefined) {
|
|
907
|
+
acc[key] = globalThis.String(value);
|
|
908
|
+
}
|
|
909
|
+
return acc;
|
|
910
|
+
}, {});
|
|
911
|
+
message.input_tokens = object.input_tokens ?? "0";
|
|
912
|
+
message.output_tokens = object.output_tokens ?? "0";
|
|
913
|
+
message.error = (object.error !== undefined && object.error !== null)
|
|
914
|
+
? ErrorInfo.fromPartial(object.error)
|
|
915
|
+
: undefined;
|
|
916
|
+
return message;
|
|
917
|
+
},
|
|
918
|
+
};
|
|
919
|
+
function createBaseAiProxyResponse_ResponseHeadersEntry() {
|
|
920
|
+
return { key: "", value: "", _unknownFields: {} };
|
|
921
|
+
}
|
|
922
|
+
export const AiProxyResponse_ResponseHeadersEntry = {
|
|
923
|
+
encode(message, writer = new BinaryWriter()) {
|
|
924
|
+
if (message.key !== "") {
|
|
925
|
+
writer.uint32(10).string(message.key);
|
|
926
|
+
}
|
|
927
|
+
if (message.value !== "") {
|
|
928
|
+
writer.uint32(18).string(message.value);
|
|
929
|
+
}
|
|
930
|
+
if (message._unknownFields !== undefined) {
|
|
931
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
932
|
+
const tag = parseInt(key, 10);
|
|
933
|
+
for (const value of values) {
|
|
934
|
+
writer.uint32(tag).raw(value);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
return writer;
|
|
939
|
+
},
|
|
940
|
+
decode(input, length) {
|
|
941
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
942
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
943
|
+
const message = createBaseAiProxyResponse_ResponseHeadersEntry();
|
|
944
|
+
while (reader.pos < end) {
|
|
945
|
+
const tag = reader.uint32();
|
|
946
|
+
switch (tag >>> 3) {
|
|
947
|
+
case 1: {
|
|
948
|
+
if (tag !== 10) {
|
|
949
|
+
break;
|
|
950
|
+
}
|
|
951
|
+
message.key = reader.string();
|
|
952
|
+
continue;
|
|
953
|
+
}
|
|
954
|
+
case 2: {
|
|
955
|
+
if (tag !== 18) {
|
|
956
|
+
break;
|
|
957
|
+
}
|
|
958
|
+
message.value = reader.string();
|
|
959
|
+
continue;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
963
|
+
break;
|
|
964
|
+
}
|
|
965
|
+
const buf = reader.skip(tag & 7);
|
|
966
|
+
const list = message._unknownFields[tag];
|
|
967
|
+
if (list === undefined) {
|
|
968
|
+
message._unknownFields[tag] = [buf];
|
|
969
|
+
}
|
|
970
|
+
else {
|
|
971
|
+
list.push(buf);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
return message;
|
|
975
|
+
},
|
|
976
|
+
fromJSON(object) {
|
|
977
|
+
return {
|
|
978
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
979
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
980
|
+
};
|
|
981
|
+
},
|
|
982
|
+
toJSON(message) {
|
|
983
|
+
const obj = {};
|
|
984
|
+
if (message.key !== "") {
|
|
985
|
+
obj.key = message.key;
|
|
986
|
+
}
|
|
987
|
+
if (message.value !== "") {
|
|
988
|
+
obj.value = message.value;
|
|
989
|
+
}
|
|
990
|
+
return obj;
|
|
991
|
+
},
|
|
992
|
+
create(base) {
|
|
993
|
+
return AiProxyResponse_ResponseHeadersEntry.fromPartial(base ?? {});
|
|
994
|
+
},
|
|
995
|
+
fromPartial(object) {
|
|
996
|
+
const message = createBaseAiProxyResponse_ResponseHeadersEntry();
|
|
997
|
+
message.key = object.key ?? "";
|
|
998
|
+
message.value = object.value ?? "";
|
|
999
|
+
return message;
|
|
1000
|
+
},
|
|
1001
|
+
};
|
|
1002
|
+
function createBaseEmbeddingRequest() {
|
|
1003
|
+
return {
|
|
1004
|
+
inputs: [],
|
|
1005
|
+
model_id: "",
|
|
1006
|
+
operation_id: undefined,
|
|
1007
|
+
idempotency_key_sha256: undefined,
|
|
1008
|
+
expected_descriptor_sha256: undefined,
|
|
1009
|
+
input_kind: 0,
|
|
1010
|
+
request_instance_id: "",
|
|
1011
|
+
quote_category: "",
|
|
1012
|
+
quote_provider_model_id: "",
|
|
1013
|
+
quote_revision: "0",
|
|
1014
|
+
quote_snapshot_sha256: "",
|
|
1015
|
+
_unknownFields: {},
|
|
1016
|
+
};
|
|
1017
|
+
}
|
|
1018
|
+
export const EmbeddingRequest = {
|
|
1019
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1020
|
+
for (const v of message.inputs) {
|
|
1021
|
+
writer.uint32(10).string(v);
|
|
1022
|
+
}
|
|
1023
|
+
if (message.model_id !== "") {
|
|
1024
|
+
writer.uint32(18).string(message.model_id);
|
|
1025
|
+
}
|
|
1026
|
+
if (message.operation_id !== undefined) {
|
|
1027
|
+
writer.uint32(26).string(message.operation_id);
|
|
1028
|
+
}
|
|
1029
|
+
if (message.idempotency_key_sha256 !== undefined) {
|
|
1030
|
+
writer.uint32(34).string(message.idempotency_key_sha256);
|
|
1031
|
+
}
|
|
1032
|
+
if (message.expected_descriptor_sha256 !== undefined) {
|
|
1033
|
+
writer.uint32(42).string(message.expected_descriptor_sha256);
|
|
1034
|
+
}
|
|
1035
|
+
if (message.input_kind !== 0) {
|
|
1036
|
+
writer.uint32(48).int32(message.input_kind);
|
|
1037
|
+
}
|
|
1038
|
+
if (message.request_instance_id !== "") {
|
|
1039
|
+
writer.uint32(58).string(message.request_instance_id);
|
|
1040
|
+
}
|
|
1041
|
+
if (message.quote_category !== "") {
|
|
1042
|
+
writer.uint32(66).string(message.quote_category);
|
|
1043
|
+
}
|
|
1044
|
+
if (message.quote_provider_model_id !== "") {
|
|
1045
|
+
writer.uint32(74).string(message.quote_provider_model_id);
|
|
1046
|
+
}
|
|
1047
|
+
if (message.quote_revision !== "0") {
|
|
1048
|
+
writer.uint32(80).int64(message.quote_revision);
|
|
1049
|
+
}
|
|
1050
|
+
if (message.quote_snapshot_sha256 !== "") {
|
|
1051
|
+
writer.uint32(90).string(message.quote_snapshot_sha256);
|
|
1052
|
+
}
|
|
1053
|
+
if (message._unknownFields !== undefined) {
|
|
1054
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
1055
|
+
const tag = parseInt(key, 10);
|
|
1056
|
+
for (const value of values) {
|
|
1057
|
+
writer.uint32(tag).raw(value);
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
return writer;
|
|
1062
|
+
},
|
|
1063
|
+
decode(input, length) {
|
|
1064
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1065
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1066
|
+
const message = createBaseEmbeddingRequest();
|
|
1067
|
+
while (reader.pos < end) {
|
|
1068
|
+
const tag = reader.uint32();
|
|
1069
|
+
switch (tag >>> 3) {
|
|
1070
|
+
case 1: {
|
|
1071
|
+
if (tag !== 10) {
|
|
1072
|
+
break;
|
|
1073
|
+
}
|
|
1074
|
+
message.inputs.push(reader.string());
|
|
1075
|
+
continue;
|
|
1076
|
+
}
|
|
1077
|
+
case 2: {
|
|
1078
|
+
if (tag !== 18) {
|
|
1079
|
+
break;
|
|
1080
|
+
}
|
|
1081
|
+
message.model_id = reader.string();
|
|
1082
|
+
continue;
|
|
1083
|
+
}
|
|
1084
|
+
case 3: {
|
|
1085
|
+
if (tag !== 26) {
|
|
1086
|
+
break;
|
|
1087
|
+
}
|
|
1088
|
+
message.operation_id = reader.string();
|
|
1089
|
+
continue;
|
|
1090
|
+
}
|
|
1091
|
+
case 4: {
|
|
1092
|
+
if (tag !== 34) {
|
|
1093
|
+
break;
|
|
1094
|
+
}
|
|
1095
|
+
message.idempotency_key_sha256 = reader.string();
|
|
1096
|
+
continue;
|
|
1097
|
+
}
|
|
1098
|
+
case 5: {
|
|
1099
|
+
if (tag !== 42) {
|
|
1100
|
+
break;
|
|
1101
|
+
}
|
|
1102
|
+
message.expected_descriptor_sha256 = reader.string();
|
|
1103
|
+
continue;
|
|
1104
|
+
}
|
|
1105
|
+
case 6: {
|
|
1106
|
+
if (tag !== 48) {
|
|
1107
|
+
break;
|
|
1108
|
+
}
|
|
1109
|
+
message.input_kind = reader.int32();
|
|
1110
|
+
continue;
|
|
1111
|
+
}
|
|
1112
|
+
case 7: {
|
|
1113
|
+
if (tag !== 58) {
|
|
1114
|
+
break;
|
|
1115
|
+
}
|
|
1116
|
+
message.request_instance_id = reader.string();
|
|
1117
|
+
continue;
|
|
1118
|
+
}
|
|
1119
|
+
case 8: {
|
|
1120
|
+
if (tag !== 66) {
|
|
1121
|
+
break;
|
|
1122
|
+
}
|
|
1123
|
+
message.quote_category = reader.string();
|
|
1124
|
+
continue;
|
|
1125
|
+
}
|
|
1126
|
+
case 9: {
|
|
1127
|
+
if (tag !== 74) {
|
|
1128
|
+
break;
|
|
1129
|
+
}
|
|
1130
|
+
message.quote_provider_model_id = reader.string();
|
|
1131
|
+
continue;
|
|
1132
|
+
}
|
|
1133
|
+
case 10: {
|
|
1134
|
+
if (tag !== 80) {
|
|
1135
|
+
break;
|
|
1136
|
+
}
|
|
1137
|
+
message.quote_revision = reader.int64().toString();
|
|
1138
|
+
continue;
|
|
1139
|
+
}
|
|
1140
|
+
case 11: {
|
|
1141
|
+
if (tag !== 90) {
|
|
1142
|
+
break;
|
|
1143
|
+
}
|
|
1144
|
+
message.quote_snapshot_sha256 = reader.string();
|
|
1145
|
+
continue;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1149
|
+
break;
|
|
1150
|
+
}
|
|
1151
|
+
const buf = reader.skip(tag & 7);
|
|
1152
|
+
const list = message._unknownFields[tag];
|
|
1153
|
+
if (list === undefined) {
|
|
1154
|
+
message._unknownFields[tag] = [buf];
|
|
1155
|
+
}
|
|
1156
|
+
else {
|
|
1157
|
+
list.push(buf);
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
return message;
|
|
1161
|
+
},
|
|
1162
|
+
fromJSON(object) {
|
|
1163
|
+
return {
|
|
1164
|
+
inputs: globalThis.Array.isArray(object?.inputs) ? object.inputs.map((e) => globalThis.String(e)) : [],
|
|
1165
|
+
model_id: isSet(object.modelId)
|
|
1166
|
+
? globalThis.String(object.modelId)
|
|
1167
|
+
: isSet(object.model_id)
|
|
1168
|
+
? globalThis.String(object.model_id)
|
|
1169
|
+
: "",
|
|
1170
|
+
operation_id: isSet(object.operationId)
|
|
1171
|
+
? globalThis.String(object.operationId)
|
|
1172
|
+
: isSet(object.operation_id)
|
|
1173
|
+
? globalThis.String(object.operation_id)
|
|
1174
|
+
: undefined,
|
|
1175
|
+
idempotency_key_sha256: isSet(object.idempotencyKeySha256)
|
|
1176
|
+
? globalThis.String(object.idempotencyKeySha256)
|
|
1177
|
+
: isSet(object.idempotency_key_sha256)
|
|
1178
|
+
? globalThis.String(object.idempotency_key_sha256)
|
|
1179
|
+
: undefined,
|
|
1180
|
+
expected_descriptor_sha256: isSet(object.expectedDescriptorSha256)
|
|
1181
|
+
? globalThis.String(object.expectedDescriptorSha256)
|
|
1182
|
+
: isSet(object.expected_descriptor_sha256)
|
|
1183
|
+
? globalThis.String(object.expected_descriptor_sha256)
|
|
1184
|
+
: undefined,
|
|
1185
|
+
input_kind: isSet(object.inputKind)
|
|
1186
|
+
? embeddingInputKindFromJSON(object.inputKind)
|
|
1187
|
+
: isSet(object.input_kind)
|
|
1188
|
+
? embeddingInputKindFromJSON(object.input_kind)
|
|
1189
|
+
: 0,
|
|
1190
|
+
request_instance_id: isSet(object.requestInstanceId)
|
|
1191
|
+
? globalThis.String(object.requestInstanceId)
|
|
1192
|
+
: isSet(object.request_instance_id)
|
|
1193
|
+
? globalThis.String(object.request_instance_id)
|
|
1194
|
+
: "",
|
|
1195
|
+
quote_category: isSet(object.quoteCategory)
|
|
1196
|
+
? globalThis.String(object.quoteCategory)
|
|
1197
|
+
: isSet(object.quote_category)
|
|
1198
|
+
? globalThis.String(object.quote_category)
|
|
1199
|
+
: "",
|
|
1200
|
+
quote_provider_model_id: isSet(object.quoteProviderModelId)
|
|
1201
|
+
? globalThis.String(object.quoteProviderModelId)
|
|
1202
|
+
: isSet(object.quote_provider_model_id)
|
|
1203
|
+
? globalThis.String(object.quote_provider_model_id)
|
|
1204
|
+
: "",
|
|
1205
|
+
quote_revision: isSet(object.quoteRevision)
|
|
1206
|
+
? globalThis.String(object.quoteRevision)
|
|
1207
|
+
: isSet(object.quote_revision)
|
|
1208
|
+
? globalThis.String(object.quote_revision)
|
|
1209
|
+
: "0",
|
|
1210
|
+
quote_snapshot_sha256: isSet(object.quoteSnapshotSha256)
|
|
1211
|
+
? globalThis.String(object.quoteSnapshotSha256)
|
|
1212
|
+
: isSet(object.quote_snapshot_sha256)
|
|
1213
|
+
? globalThis.String(object.quote_snapshot_sha256)
|
|
1214
|
+
: "",
|
|
1215
|
+
};
|
|
1216
|
+
},
|
|
1217
|
+
toJSON(message) {
|
|
1218
|
+
const obj = {};
|
|
1219
|
+
if (message.inputs?.length) {
|
|
1220
|
+
obj.inputs = message.inputs;
|
|
1221
|
+
}
|
|
1222
|
+
if (message.model_id !== "") {
|
|
1223
|
+
obj.modelId = message.model_id;
|
|
1224
|
+
}
|
|
1225
|
+
if (message.operation_id !== undefined) {
|
|
1226
|
+
obj.operationId = message.operation_id;
|
|
1227
|
+
}
|
|
1228
|
+
if (message.idempotency_key_sha256 !== undefined) {
|
|
1229
|
+
obj.idempotencyKeySha256 = message.idempotency_key_sha256;
|
|
1230
|
+
}
|
|
1231
|
+
if (message.expected_descriptor_sha256 !== undefined) {
|
|
1232
|
+
obj.expectedDescriptorSha256 = message.expected_descriptor_sha256;
|
|
1233
|
+
}
|
|
1234
|
+
if (message.input_kind !== 0) {
|
|
1235
|
+
obj.inputKind = embeddingInputKindToJSON(message.input_kind);
|
|
1236
|
+
}
|
|
1237
|
+
if (message.request_instance_id !== "") {
|
|
1238
|
+
obj.requestInstanceId = message.request_instance_id;
|
|
1239
|
+
}
|
|
1240
|
+
if (message.quote_category !== "") {
|
|
1241
|
+
obj.quoteCategory = message.quote_category;
|
|
1242
|
+
}
|
|
1243
|
+
if (message.quote_provider_model_id !== "") {
|
|
1244
|
+
obj.quoteProviderModelId = message.quote_provider_model_id;
|
|
1245
|
+
}
|
|
1246
|
+
if (message.quote_revision !== "0") {
|
|
1247
|
+
obj.quoteRevision = message.quote_revision;
|
|
1248
|
+
}
|
|
1249
|
+
if (message.quote_snapshot_sha256 !== "") {
|
|
1250
|
+
obj.quoteSnapshotSha256 = message.quote_snapshot_sha256;
|
|
1251
|
+
}
|
|
1252
|
+
return obj;
|
|
1253
|
+
},
|
|
1254
|
+
create(base) {
|
|
1255
|
+
return EmbeddingRequest.fromPartial(base ?? {});
|
|
1256
|
+
},
|
|
1257
|
+
fromPartial(object) {
|
|
1258
|
+
const message = createBaseEmbeddingRequest();
|
|
1259
|
+
message.inputs = object.inputs?.map((e) => e) || [];
|
|
1260
|
+
message.model_id = object.model_id ?? "";
|
|
1261
|
+
message.operation_id = object.operation_id ?? undefined;
|
|
1262
|
+
message.idempotency_key_sha256 = object.idempotency_key_sha256 ?? undefined;
|
|
1263
|
+
message.expected_descriptor_sha256 = object.expected_descriptor_sha256 ?? undefined;
|
|
1264
|
+
message.input_kind = object.input_kind ?? 0;
|
|
1265
|
+
message.request_instance_id = object.request_instance_id ?? "";
|
|
1266
|
+
message.quote_category = object.quote_category ?? "";
|
|
1267
|
+
message.quote_provider_model_id = object.quote_provider_model_id ?? "";
|
|
1268
|
+
message.quote_revision = object.quote_revision ?? "0";
|
|
1269
|
+
message.quote_snapshot_sha256 = object.quote_snapshot_sha256 ?? "";
|
|
1270
|
+
return message;
|
|
1271
|
+
},
|
|
1272
|
+
};
|
|
1273
|
+
function createBaseEmbeddingQueryRequest() {
|
|
1274
|
+
return { operation_id: "", idempotency_key_sha256: "", _unknownFields: {} };
|
|
1275
|
+
}
|
|
1276
|
+
export const EmbeddingQueryRequest = {
|
|
1277
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1278
|
+
if (message.operation_id !== "") {
|
|
1279
|
+
writer.uint32(10).string(message.operation_id);
|
|
1280
|
+
}
|
|
1281
|
+
if (message.idempotency_key_sha256 !== "") {
|
|
1282
|
+
writer.uint32(18).string(message.idempotency_key_sha256);
|
|
1283
|
+
}
|
|
1284
|
+
if (message._unknownFields !== undefined) {
|
|
1285
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
1286
|
+
const tag = parseInt(key, 10);
|
|
1287
|
+
for (const value of values) {
|
|
1288
|
+
writer.uint32(tag).raw(value);
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
return writer;
|
|
1293
|
+
},
|
|
1294
|
+
decode(input, length) {
|
|
1295
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1296
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1297
|
+
const message = createBaseEmbeddingQueryRequest();
|
|
1298
|
+
while (reader.pos < end) {
|
|
1299
|
+
const tag = reader.uint32();
|
|
1300
|
+
switch (tag >>> 3) {
|
|
1301
|
+
case 1: {
|
|
1302
|
+
if (tag !== 10) {
|
|
1303
|
+
break;
|
|
1304
|
+
}
|
|
1305
|
+
message.operation_id = reader.string();
|
|
1306
|
+
continue;
|
|
1307
|
+
}
|
|
1308
|
+
case 2: {
|
|
1309
|
+
if (tag !== 18) {
|
|
1310
|
+
break;
|
|
1311
|
+
}
|
|
1312
|
+
message.idempotency_key_sha256 = reader.string();
|
|
1313
|
+
continue;
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1317
|
+
break;
|
|
1318
|
+
}
|
|
1319
|
+
const buf = reader.skip(tag & 7);
|
|
1320
|
+
const list = message._unknownFields[tag];
|
|
1321
|
+
if (list === undefined) {
|
|
1322
|
+
message._unknownFields[tag] = [buf];
|
|
1323
|
+
}
|
|
1324
|
+
else {
|
|
1325
|
+
list.push(buf);
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
return message;
|
|
1329
|
+
},
|
|
1330
|
+
fromJSON(object) {
|
|
1331
|
+
return {
|
|
1332
|
+
operation_id: isSet(object.operationId)
|
|
1333
|
+
? globalThis.String(object.operationId)
|
|
1334
|
+
: isSet(object.operation_id)
|
|
1335
|
+
? globalThis.String(object.operation_id)
|
|
1336
|
+
: "",
|
|
1337
|
+
idempotency_key_sha256: isSet(object.idempotencyKeySha256)
|
|
1338
|
+
? globalThis.String(object.idempotencyKeySha256)
|
|
1339
|
+
: isSet(object.idempotency_key_sha256)
|
|
1340
|
+
? globalThis.String(object.idempotency_key_sha256)
|
|
1341
|
+
: "",
|
|
1342
|
+
};
|
|
1343
|
+
},
|
|
1344
|
+
toJSON(message) {
|
|
1345
|
+
const obj = {};
|
|
1346
|
+
if (message.operation_id !== "") {
|
|
1347
|
+
obj.operationId = message.operation_id;
|
|
1348
|
+
}
|
|
1349
|
+
if (message.idempotency_key_sha256 !== "") {
|
|
1350
|
+
obj.idempotencyKeySha256 = message.idempotency_key_sha256;
|
|
1351
|
+
}
|
|
1352
|
+
return obj;
|
|
1353
|
+
},
|
|
1354
|
+
create(base) {
|
|
1355
|
+
return EmbeddingQueryRequest.fromPartial(base ?? {});
|
|
1356
|
+
},
|
|
1357
|
+
fromPartial(object) {
|
|
1358
|
+
const message = createBaseEmbeddingQueryRequest();
|
|
1359
|
+
message.operation_id = object.operation_id ?? "";
|
|
1360
|
+
message.idempotency_key_sha256 = object.idempotency_key_sha256 ?? "";
|
|
1361
|
+
return message;
|
|
1362
|
+
},
|
|
1363
|
+
};
|
|
1364
|
+
function createBaseEmbeddingDescriptorPolicyRequest() {
|
|
1365
|
+
return { runtime_lease_id: "", reviewed_artifact_sha256: "", input_kind: 0, _unknownFields: {} };
|
|
1366
|
+
}
|
|
1367
|
+
export const EmbeddingDescriptorPolicyRequest = {
|
|
1368
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1369
|
+
if (message.runtime_lease_id !== "") {
|
|
1370
|
+
writer.uint32(10).string(message.runtime_lease_id);
|
|
1371
|
+
}
|
|
1372
|
+
if (message.reviewed_artifact_sha256 !== "") {
|
|
1373
|
+
writer.uint32(18).string(message.reviewed_artifact_sha256);
|
|
1374
|
+
}
|
|
1375
|
+
if (message.input_kind !== 0) {
|
|
1376
|
+
writer.uint32(24).int32(message.input_kind);
|
|
1377
|
+
}
|
|
1378
|
+
if (message._unknownFields !== undefined) {
|
|
1379
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
1380
|
+
const tag = parseInt(key, 10);
|
|
1381
|
+
for (const value of values) {
|
|
1382
|
+
writer.uint32(tag).raw(value);
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
return writer;
|
|
1387
|
+
},
|
|
1388
|
+
decode(input, length) {
|
|
1389
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1390
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1391
|
+
const message = createBaseEmbeddingDescriptorPolicyRequest();
|
|
1392
|
+
while (reader.pos < end) {
|
|
1393
|
+
const tag = reader.uint32();
|
|
1394
|
+
switch (tag >>> 3) {
|
|
1395
|
+
case 1: {
|
|
1396
|
+
if (tag !== 10) {
|
|
1397
|
+
break;
|
|
1398
|
+
}
|
|
1399
|
+
message.runtime_lease_id = reader.string();
|
|
1400
|
+
continue;
|
|
1401
|
+
}
|
|
1402
|
+
case 2: {
|
|
1403
|
+
if (tag !== 18) {
|
|
1404
|
+
break;
|
|
1405
|
+
}
|
|
1406
|
+
message.reviewed_artifact_sha256 = reader.string();
|
|
1407
|
+
continue;
|
|
1408
|
+
}
|
|
1409
|
+
case 3: {
|
|
1410
|
+
if (tag !== 24) {
|
|
1411
|
+
break;
|
|
1412
|
+
}
|
|
1413
|
+
message.input_kind = reader.int32();
|
|
1414
|
+
continue;
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1418
|
+
break;
|
|
1419
|
+
}
|
|
1420
|
+
const buf = reader.skip(tag & 7);
|
|
1421
|
+
const list = message._unknownFields[tag];
|
|
1422
|
+
if (list === undefined) {
|
|
1423
|
+
message._unknownFields[tag] = [buf];
|
|
1424
|
+
}
|
|
1425
|
+
else {
|
|
1426
|
+
list.push(buf);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
return message;
|
|
1430
|
+
},
|
|
1431
|
+
fromJSON(object) {
|
|
1432
|
+
return {
|
|
1433
|
+
runtime_lease_id: isSet(object.runtimeLeaseId)
|
|
1434
|
+
? globalThis.String(object.runtimeLeaseId)
|
|
1435
|
+
: isSet(object.runtime_lease_id)
|
|
1436
|
+
? globalThis.String(object.runtime_lease_id)
|
|
1437
|
+
: "",
|
|
1438
|
+
reviewed_artifact_sha256: isSet(object.reviewedArtifactSha256)
|
|
1439
|
+
? globalThis.String(object.reviewedArtifactSha256)
|
|
1440
|
+
: isSet(object.reviewed_artifact_sha256)
|
|
1441
|
+
? globalThis.String(object.reviewed_artifact_sha256)
|
|
1442
|
+
: "",
|
|
1443
|
+
input_kind: isSet(object.inputKind)
|
|
1444
|
+
? embeddingInputKindFromJSON(object.inputKind)
|
|
1445
|
+
: isSet(object.input_kind)
|
|
1446
|
+
? embeddingInputKindFromJSON(object.input_kind)
|
|
1447
|
+
: 0,
|
|
1448
|
+
};
|
|
1449
|
+
},
|
|
1450
|
+
toJSON(message) {
|
|
1451
|
+
const obj = {};
|
|
1452
|
+
if (message.runtime_lease_id !== "") {
|
|
1453
|
+
obj.runtimeLeaseId = message.runtime_lease_id;
|
|
1454
|
+
}
|
|
1455
|
+
if (message.reviewed_artifact_sha256 !== "") {
|
|
1456
|
+
obj.reviewedArtifactSha256 = message.reviewed_artifact_sha256;
|
|
1457
|
+
}
|
|
1458
|
+
if (message.input_kind !== 0) {
|
|
1459
|
+
obj.inputKind = embeddingInputKindToJSON(message.input_kind);
|
|
1460
|
+
}
|
|
1461
|
+
return obj;
|
|
1462
|
+
},
|
|
1463
|
+
create(base) {
|
|
1464
|
+
return EmbeddingDescriptorPolicyRequest.fromPartial(base ?? {});
|
|
1465
|
+
},
|
|
1466
|
+
fromPartial(object) {
|
|
1467
|
+
const message = createBaseEmbeddingDescriptorPolicyRequest();
|
|
1468
|
+
message.runtime_lease_id = object.runtime_lease_id ?? "";
|
|
1469
|
+
message.reviewed_artifact_sha256 = object.reviewed_artifact_sha256 ?? "";
|
|
1470
|
+
message.input_kind = object.input_kind ?? 0;
|
|
1471
|
+
return message;
|
|
1472
|
+
},
|
|
1473
|
+
};
|
|
1474
|
+
function createBaseEmbeddingPolicyDescriptorV1() {
|
|
1475
|
+
return {
|
|
1476
|
+
provider: "",
|
|
1477
|
+
model: "",
|
|
1478
|
+
dimension: 0,
|
|
1479
|
+
metric: "",
|
|
1480
|
+
source_schema: "",
|
|
1481
|
+
normalization: "",
|
|
1482
|
+
input_kind: 0,
|
|
1483
|
+
prompt_version: "",
|
|
1484
|
+
policy_revision: "",
|
|
1485
|
+
routing_policy_sha256: "",
|
|
1486
|
+
descriptor_sha256: "",
|
|
1487
|
+
_unknownFields: {},
|
|
1488
|
+
};
|
|
1489
|
+
}
|
|
1490
|
+
export const EmbeddingPolicyDescriptorV1 = {
|
|
1491
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1492
|
+
if (message.provider !== "") {
|
|
1493
|
+
writer.uint32(10).string(message.provider);
|
|
1494
|
+
}
|
|
1495
|
+
if (message.model !== "") {
|
|
1496
|
+
writer.uint32(18).string(message.model);
|
|
1497
|
+
}
|
|
1498
|
+
if (message.dimension !== 0) {
|
|
1499
|
+
writer.uint32(24).uint32(message.dimension);
|
|
1500
|
+
}
|
|
1501
|
+
if (message.metric !== "") {
|
|
1502
|
+
writer.uint32(34).string(message.metric);
|
|
1503
|
+
}
|
|
1504
|
+
if (message.source_schema !== "") {
|
|
1505
|
+
writer.uint32(42).string(message.source_schema);
|
|
1506
|
+
}
|
|
1507
|
+
if (message.normalization !== "") {
|
|
1508
|
+
writer.uint32(50).string(message.normalization);
|
|
1509
|
+
}
|
|
1510
|
+
if (message.input_kind !== 0) {
|
|
1511
|
+
writer.uint32(56).int32(message.input_kind);
|
|
1512
|
+
}
|
|
1513
|
+
if (message.prompt_version !== "") {
|
|
1514
|
+
writer.uint32(66).string(message.prompt_version);
|
|
1515
|
+
}
|
|
1516
|
+
if (message.policy_revision !== "") {
|
|
1517
|
+
writer.uint32(74).string(message.policy_revision);
|
|
1518
|
+
}
|
|
1519
|
+
if (message.routing_policy_sha256 !== "") {
|
|
1520
|
+
writer.uint32(82).string(message.routing_policy_sha256);
|
|
1521
|
+
}
|
|
1522
|
+
if (message.descriptor_sha256 !== "") {
|
|
1523
|
+
writer.uint32(90).string(message.descriptor_sha256);
|
|
1524
|
+
}
|
|
1525
|
+
if (message._unknownFields !== undefined) {
|
|
1526
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
1527
|
+
const tag = parseInt(key, 10);
|
|
1528
|
+
for (const value of values) {
|
|
1529
|
+
writer.uint32(tag).raw(value);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
return writer;
|
|
1534
|
+
},
|
|
1535
|
+
decode(input, length) {
|
|
1536
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1537
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1538
|
+
const message = createBaseEmbeddingPolicyDescriptorV1();
|
|
1539
|
+
while (reader.pos < end) {
|
|
1540
|
+
const tag = reader.uint32();
|
|
1541
|
+
switch (tag >>> 3) {
|
|
1542
|
+
case 1: {
|
|
1543
|
+
if (tag !== 10) {
|
|
1544
|
+
break;
|
|
1545
|
+
}
|
|
1546
|
+
message.provider = reader.string();
|
|
1547
|
+
continue;
|
|
1548
|
+
}
|
|
1549
|
+
case 2: {
|
|
1550
|
+
if (tag !== 18) {
|
|
1551
|
+
break;
|
|
1552
|
+
}
|
|
1553
|
+
message.model = reader.string();
|
|
1554
|
+
continue;
|
|
1555
|
+
}
|
|
1556
|
+
case 3: {
|
|
1557
|
+
if (tag !== 24) {
|
|
1558
|
+
break;
|
|
1559
|
+
}
|
|
1560
|
+
message.dimension = reader.uint32();
|
|
1561
|
+
continue;
|
|
1562
|
+
}
|
|
1563
|
+
case 4: {
|
|
1564
|
+
if (tag !== 34) {
|
|
1565
|
+
break;
|
|
1566
|
+
}
|
|
1567
|
+
message.metric = reader.string();
|
|
1568
|
+
continue;
|
|
1569
|
+
}
|
|
1570
|
+
case 5: {
|
|
1571
|
+
if (tag !== 42) {
|
|
1572
|
+
break;
|
|
1573
|
+
}
|
|
1574
|
+
message.source_schema = reader.string();
|
|
1575
|
+
continue;
|
|
1576
|
+
}
|
|
1577
|
+
case 6: {
|
|
1578
|
+
if (tag !== 50) {
|
|
1579
|
+
break;
|
|
1580
|
+
}
|
|
1581
|
+
message.normalization = reader.string();
|
|
1582
|
+
continue;
|
|
1583
|
+
}
|
|
1584
|
+
case 7: {
|
|
1585
|
+
if (tag !== 56) {
|
|
1586
|
+
break;
|
|
1587
|
+
}
|
|
1588
|
+
message.input_kind = reader.int32();
|
|
1589
|
+
continue;
|
|
1590
|
+
}
|
|
1591
|
+
case 8: {
|
|
1592
|
+
if (tag !== 66) {
|
|
1593
|
+
break;
|
|
1594
|
+
}
|
|
1595
|
+
message.prompt_version = reader.string();
|
|
1596
|
+
continue;
|
|
1597
|
+
}
|
|
1598
|
+
case 9: {
|
|
1599
|
+
if (tag !== 74) {
|
|
1600
|
+
break;
|
|
1601
|
+
}
|
|
1602
|
+
message.policy_revision = reader.string();
|
|
1603
|
+
continue;
|
|
1604
|
+
}
|
|
1605
|
+
case 10: {
|
|
1606
|
+
if (tag !== 82) {
|
|
1607
|
+
break;
|
|
1608
|
+
}
|
|
1609
|
+
message.routing_policy_sha256 = reader.string();
|
|
1610
|
+
continue;
|
|
1611
|
+
}
|
|
1612
|
+
case 11: {
|
|
1613
|
+
if (tag !== 90) {
|
|
1614
|
+
break;
|
|
1615
|
+
}
|
|
1616
|
+
message.descriptor_sha256 = reader.string();
|
|
1617
|
+
continue;
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1621
|
+
break;
|
|
1622
|
+
}
|
|
1623
|
+
const buf = reader.skip(tag & 7);
|
|
1624
|
+
const list = message._unknownFields[tag];
|
|
1625
|
+
if (list === undefined) {
|
|
1626
|
+
message._unknownFields[tag] = [buf];
|
|
1627
|
+
}
|
|
1628
|
+
else {
|
|
1629
|
+
list.push(buf);
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
return message;
|
|
1633
|
+
},
|
|
1634
|
+
fromJSON(object) {
|
|
1635
|
+
return {
|
|
1636
|
+
provider: isSet(object.provider) ? globalThis.String(object.provider) : "",
|
|
1637
|
+
model: isSet(object.model) ? globalThis.String(object.model) : "",
|
|
1638
|
+
dimension: isSet(object.dimension) ? globalThis.Number(object.dimension) : 0,
|
|
1639
|
+
metric: isSet(object.metric) ? globalThis.String(object.metric) : "",
|
|
1640
|
+
source_schema: isSet(object.sourceSchema)
|
|
1641
|
+
? globalThis.String(object.sourceSchema)
|
|
1642
|
+
: isSet(object.source_schema)
|
|
1643
|
+
? globalThis.String(object.source_schema)
|
|
1644
|
+
: "",
|
|
1645
|
+
normalization: isSet(object.normalization) ? globalThis.String(object.normalization) : "",
|
|
1646
|
+
input_kind: isSet(object.inputKind)
|
|
1647
|
+
? embeddingInputKindFromJSON(object.inputKind)
|
|
1648
|
+
: isSet(object.input_kind)
|
|
1649
|
+
? embeddingInputKindFromJSON(object.input_kind)
|
|
1650
|
+
: 0,
|
|
1651
|
+
prompt_version: isSet(object.promptVersion)
|
|
1652
|
+
? globalThis.String(object.promptVersion)
|
|
1653
|
+
: isSet(object.prompt_version)
|
|
1654
|
+
? globalThis.String(object.prompt_version)
|
|
1655
|
+
: "",
|
|
1656
|
+
policy_revision: isSet(object.policyRevision)
|
|
1657
|
+
? globalThis.String(object.policyRevision)
|
|
1658
|
+
: isSet(object.policy_revision)
|
|
1659
|
+
? globalThis.String(object.policy_revision)
|
|
1660
|
+
: "",
|
|
1661
|
+
routing_policy_sha256: isSet(object.routingPolicySha256)
|
|
1662
|
+
? globalThis.String(object.routingPolicySha256)
|
|
1663
|
+
: isSet(object.routing_policy_sha256)
|
|
1664
|
+
? globalThis.String(object.routing_policy_sha256)
|
|
1665
|
+
: "",
|
|
1666
|
+
descriptor_sha256: isSet(object.descriptorSha256)
|
|
1667
|
+
? globalThis.String(object.descriptorSha256)
|
|
1668
|
+
: isSet(object.descriptor_sha256)
|
|
1669
|
+
? globalThis.String(object.descriptor_sha256)
|
|
1670
|
+
: "",
|
|
1671
|
+
};
|
|
1672
|
+
},
|
|
1673
|
+
toJSON(message) {
|
|
1674
|
+
const obj = {};
|
|
1675
|
+
if (message.provider !== "") {
|
|
1676
|
+
obj.provider = message.provider;
|
|
1677
|
+
}
|
|
1678
|
+
if (message.model !== "") {
|
|
1679
|
+
obj.model = message.model;
|
|
1680
|
+
}
|
|
1681
|
+
if (message.dimension !== 0) {
|
|
1682
|
+
obj.dimension = Math.round(message.dimension);
|
|
1683
|
+
}
|
|
1684
|
+
if (message.metric !== "") {
|
|
1685
|
+
obj.metric = message.metric;
|
|
1686
|
+
}
|
|
1687
|
+
if (message.source_schema !== "") {
|
|
1688
|
+
obj.sourceSchema = message.source_schema;
|
|
1689
|
+
}
|
|
1690
|
+
if (message.normalization !== "") {
|
|
1691
|
+
obj.normalization = message.normalization;
|
|
1692
|
+
}
|
|
1693
|
+
if (message.input_kind !== 0) {
|
|
1694
|
+
obj.inputKind = embeddingInputKindToJSON(message.input_kind);
|
|
1695
|
+
}
|
|
1696
|
+
if (message.prompt_version !== "") {
|
|
1697
|
+
obj.promptVersion = message.prompt_version;
|
|
1698
|
+
}
|
|
1699
|
+
if (message.policy_revision !== "") {
|
|
1700
|
+
obj.policyRevision = message.policy_revision;
|
|
1701
|
+
}
|
|
1702
|
+
if (message.routing_policy_sha256 !== "") {
|
|
1703
|
+
obj.routingPolicySha256 = message.routing_policy_sha256;
|
|
1704
|
+
}
|
|
1705
|
+
if (message.descriptor_sha256 !== "") {
|
|
1706
|
+
obj.descriptorSha256 = message.descriptor_sha256;
|
|
1707
|
+
}
|
|
1708
|
+
return obj;
|
|
1709
|
+
},
|
|
1710
|
+
create(base) {
|
|
1711
|
+
return EmbeddingPolicyDescriptorV1.fromPartial(base ?? {});
|
|
1712
|
+
},
|
|
1713
|
+
fromPartial(object) {
|
|
1714
|
+
const message = createBaseEmbeddingPolicyDescriptorV1();
|
|
1715
|
+
message.provider = object.provider ?? "";
|
|
1716
|
+
message.model = object.model ?? "";
|
|
1717
|
+
message.dimension = object.dimension ?? 0;
|
|
1718
|
+
message.metric = object.metric ?? "";
|
|
1719
|
+
message.source_schema = object.source_schema ?? "";
|
|
1720
|
+
message.normalization = object.normalization ?? "";
|
|
1721
|
+
message.input_kind = object.input_kind ?? 0;
|
|
1722
|
+
message.prompt_version = object.prompt_version ?? "";
|
|
1723
|
+
message.policy_revision = object.policy_revision ?? "";
|
|
1724
|
+
message.routing_policy_sha256 = object.routing_policy_sha256 ?? "";
|
|
1725
|
+
message.descriptor_sha256 = object.descriptor_sha256 ?? "";
|
|
1726
|
+
return message;
|
|
1727
|
+
},
|
|
1728
|
+
};
|
|
1729
|
+
function createBaseEmbeddingDescriptorPolicyResponse() {
|
|
1730
|
+
return {
|
|
1731
|
+
descriptor: undefined,
|
|
1732
|
+
runtime_lease_id: "",
|
|
1733
|
+
reviewed_artifact_sha256: "",
|
|
1734
|
+
receipt_sha256: "",
|
|
1735
|
+
error: undefined,
|
|
1736
|
+
_unknownFields: {},
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
export const EmbeddingDescriptorPolicyResponse = {
|
|
1740
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1741
|
+
if (message.descriptor !== undefined) {
|
|
1742
|
+
EmbeddingPolicyDescriptorV1.encode(message.descriptor, writer.uint32(10).fork()).join();
|
|
1743
|
+
}
|
|
1744
|
+
if (message.runtime_lease_id !== "") {
|
|
1745
|
+
writer.uint32(18).string(message.runtime_lease_id);
|
|
1746
|
+
}
|
|
1747
|
+
if (message.reviewed_artifact_sha256 !== "") {
|
|
1748
|
+
writer.uint32(26).string(message.reviewed_artifact_sha256);
|
|
1749
|
+
}
|
|
1750
|
+
if (message.receipt_sha256 !== "") {
|
|
1751
|
+
writer.uint32(34).string(message.receipt_sha256);
|
|
1752
|
+
}
|
|
1753
|
+
if (message.error !== undefined) {
|
|
1754
|
+
ErrorInfo.encode(message.error, writer.uint32(122).fork()).join();
|
|
1755
|
+
}
|
|
1756
|
+
if (message._unknownFields !== undefined) {
|
|
1757
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
1758
|
+
const tag = parseInt(key, 10);
|
|
1759
|
+
for (const value of values) {
|
|
1760
|
+
writer.uint32(tag).raw(value);
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
return writer;
|
|
1765
|
+
},
|
|
1766
|
+
decode(input, length) {
|
|
1767
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1768
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1769
|
+
const message = createBaseEmbeddingDescriptorPolicyResponse();
|
|
1770
|
+
while (reader.pos < end) {
|
|
1771
|
+
const tag = reader.uint32();
|
|
1772
|
+
switch (tag >>> 3) {
|
|
1773
|
+
case 1: {
|
|
1774
|
+
if (tag !== 10) {
|
|
1775
|
+
break;
|
|
1776
|
+
}
|
|
1777
|
+
message.descriptor = EmbeddingPolicyDescriptorV1.decode(reader, reader.uint32());
|
|
1778
|
+
continue;
|
|
1779
|
+
}
|
|
1780
|
+
case 2: {
|
|
1781
|
+
if (tag !== 18) {
|
|
1782
|
+
break;
|
|
1783
|
+
}
|
|
1784
|
+
message.runtime_lease_id = reader.string();
|
|
1785
|
+
continue;
|
|
1786
|
+
}
|
|
1787
|
+
case 3: {
|
|
1788
|
+
if (tag !== 26) {
|
|
1789
|
+
break;
|
|
1790
|
+
}
|
|
1791
|
+
message.reviewed_artifact_sha256 = reader.string();
|
|
1792
|
+
continue;
|
|
1793
|
+
}
|
|
1794
|
+
case 4: {
|
|
1795
|
+
if (tag !== 34) {
|
|
1796
|
+
break;
|
|
1797
|
+
}
|
|
1798
|
+
message.receipt_sha256 = reader.string();
|
|
1799
|
+
continue;
|
|
1800
|
+
}
|
|
1801
|
+
case 15: {
|
|
1802
|
+
if (tag !== 122) {
|
|
1803
|
+
break;
|
|
1804
|
+
}
|
|
1805
|
+
message.error = ErrorInfo.decode(reader, reader.uint32());
|
|
1806
|
+
continue;
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1810
|
+
break;
|
|
1811
|
+
}
|
|
1812
|
+
const buf = reader.skip(tag & 7);
|
|
1813
|
+
const list = message._unknownFields[tag];
|
|
1814
|
+
if (list === undefined) {
|
|
1815
|
+
message._unknownFields[tag] = [buf];
|
|
1816
|
+
}
|
|
1817
|
+
else {
|
|
1818
|
+
list.push(buf);
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
return message;
|
|
1822
|
+
},
|
|
1823
|
+
fromJSON(object) {
|
|
1824
|
+
return {
|
|
1825
|
+
descriptor: isSet(object.descriptor) ? EmbeddingPolicyDescriptorV1.fromJSON(object.descriptor) : undefined,
|
|
1826
|
+
runtime_lease_id: isSet(object.runtimeLeaseId)
|
|
1827
|
+
? globalThis.String(object.runtimeLeaseId)
|
|
1828
|
+
: isSet(object.runtime_lease_id)
|
|
1829
|
+
? globalThis.String(object.runtime_lease_id)
|
|
1830
|
+
: "",
|
|
1831
|
+
reviewed_artifact_sha256: isSet(object.reviewedArtifactSha256)
|
|
1832
|
+
? globalThis.String(object.reviewedArtifactSha256)
|
|
1833
|
+
: isSet(object.reviewed_artifact_sha256)
|
|
1834
|
+
? globalThis.String(object.reviewed_artifact_sha256)
|
|
1835
|
+
: "",
|
|
1836
|
+
receipt_sha256: isSet(object.receiptSha256)
|
|
1837
|
+
? globalThis.String(object.receiptSha256)
|
|
1838
|
+
: isSet(object.receipt_sha256)
|
|
1839
|
+
? globalThis.String(object.receipt_sha256)
|
|
1840
|
+
: "",
|
|
1841
|
+
error: isSet(object.error) ? ErrorInfo.fromJSON(object.error) : undefined,
|
|
1842
|
+
};
|
|
1843
|
+
},
|
|
1844
|
+
toJSON(message) {
|
|
1845
|
+
const obj = {};
|
|
1846
|
+
if (message.descriptor !== undefined) {
|
|
1847
|
+
obj.descriptor = EmbeddingPolicyDescriptorV1.toJSON(message.descriptor);
|
|
1848
|
+
}
|
|
1849
|
+
if (message.runtime_lease_id !== "") {
|
|
1850
|
+
obj.runtimeLeaseId = message.runtime_lease_id;
|
|
1851
|
+
}
|
|
1852
|
+
if (message.reviewed_artifact_sha256 !== "") {
|
|
1853
|
+
obj.reviewedArtifactSha256 = message.reviewed_artifact_sha256;
|
|
1854
|
+
}
|
|
1855
|
+
if (message.receipt_sha256 !== "") {
|
|
1856
|
+
obj.receiptSha256 = message.receipt_sha256;
|
|
1857
|
+
}
|
|
1858
|
+
if (message.error !== undefined) {
|
|
1859
|
+
obj.error = ErrorInfo.toJSON(message.error);
|
|
1860
|
+
}
|
|
1861
|
+
return obj;
|
|
1862
|
+
},
|
|
1863
|
+
create(base) {
|
|
1864
|
+
return EmbeddingDescriptorPolicyResponse.fromPartial(base ?? {});
|
|
1865
|
+
},
|
|
1866
|
+
fromPartial(object) {
|
|
1867
|
+
const message = createBaseEmbeddingDescriptorPolicyResponse();
|
|
1868
|
+
message.descriptor = (object.descriptor !== undefined && object.descriptor !== null)
|
|
1869
|
+
? EmbeddingPolicyDescriptorV1.fromPartial(object.descriptor)
|
|
1870
|
+
: undefined;
|
|
1871
|
+
message.runtime_lease_id = object.runtime_lease_id ?? "";
|
|
1872
|
+
message.reviewed_artifact_sha256 = object.reviewed_artifact_sha256 ?? "";
|
|
1873
|
+
message.receipt_sha256 = object.receipt_sha256 ?? "";
|
|
1874
|
+
message.error = (object.error !== undefined && object.error !== null)
|
|
1875
|
+
? ErrorInfo.fromPartial(object.error)
|
|
1876
|
+
: undefined;
|
|
1877
|
+
return message;
|
|
1878
|
+
},
|
|
1879
|
+
};
|
|
1880
|
+
function createBaseEmbeddingVector() {
|
|
1881
|
+
return { values: [], _unknownFields: {} };
|
|
1882
|
+
}
|
|
1883
|
+
export const EmbeddingVector = {
|
|
1884
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1885
|
+
writer.uint32(10).fork();
|
|
1886
|
+
for (const v of message.values) {
|
|
1887
|
+
writer.float(v);
|
|
1888
|
+
}
|
|
1889
|
+
writer.join();
|
|
1890
|
+
if (message._unknownFields !== undefined) {
|
|
1891
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
1892
|
+
const tag = parseInt(key, 10);
|
|
1893
|
+
for (const value of values) {
|
|
1894
|
+
writer.uint32(tag).raw(value);
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
return writer;
|
|
1899
|
+
},
|
|
1900
|
+
decode(input, length) {
|
|
1901
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1902
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1903
|
+
const message = createBaseEmbeddingVector();
|
|
1904
|
+
while (reader.pos < end) {
|
|
1905
|
+
const tag = reader.uint32();
|
|
1906
|
+
switch (tag >>> 3) {
|
|
1907
|
+
case 1: {
|
|
1908
|
+
if (tag === 13) {
|
|
1909
|
+
message.values.push(reader.float());
|
|
1910
|
+
continue;
|
|
1911
|
+
}
|
|
1912
|
+
if (tag === 10) {
|
|
1913
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1914
|
+
while (reader.pos < end2) {
|
|
1915
|
+
message.values.push(reader.float());
|
|
1916
|
+
}
|
|
1917
|
+
continue;
|
|
1918
|
+
}
|
|
1919
|
+
break;
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1923
|
+
break;
|
|
1924
|
+
}
|
|
1925
|
+
const buf = reader.skip(tag & 7);
|
|
1926
|
+
const list = message._unknownFields[tag];
|
|
1927
|
+
if (list === undefined) {
|
|
1928
|
+
message._unknownFields[tag] = [buf];
|
|
1929
|
+
}
|
|
1930
|
+
else {
|
|
1931
|
+
list.push(buf);
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
return message;
|
|
1935
|
+
},
|
|
1936
|
+
fromJSON(object) {
|
|
1937
|
+
return {
|
|
1938
|
+
values: globalThis.Array.isArray(object?.values) ? object.values.map((e) => globalThis.Number(e)) : [],
|
|
1939
|
+
};
|
|
1940
|
+
},
|
|
1941
|
+
toJSON(message) {
|
|
1942
|
+
const obj = {};
|
|
1943
|
+
if (message.values?.length) {
|
|
1944
|
+
obj.values = message.values;
|
|
1945
|
+
}
|
|
1946
|
+
return obj;
|
|
1947
|
+
},
|
|
1948
|
+
create(base) {
|
|
1949
|
+
return EmbeddingVector.fromPartial(base ?? {});
|
|
1950
|
+
},
|
|
1951
|
+
fromPartial(object) {
|
|
1952
|
+
const message = createBaseEmbeddingVector();
|
|
1953
|
+
message.values = object.values?.map((e) => e) || [];
|
|
1954
|
+
return message;
|
|
1955
|
+
},
|
|
1956
|
+
};
|
|
1957
|
+
function createBaseEmbeddingResponse() {
|
|
1958
|
+
return {
|
|
1959
|
+
vectors: [],
|
|
1960
|
+
input_tokens: "0",
|
|
1961
|
+
charged_units: "0",
|
|
1962
|
+
descriptor_sha256: undefined,
|
|
1963
|
+
operation_status: 0,
|
|
1964
|
+
operation_id: undefined,
|
|
1965
|
+
idempotency_key_sha256: undefined,
|
|
1966
|
+
canonical_request_sha256: undefined,
|
|
1967
|
+
provider_request_sha256: undefined,
|
|
1968
|
+
authorization_receipt_sha256: undefined,
|
|
1969
|
+
settlement_receipt_sha256: undefined,
|
|
1970
|
+
provider_receipt_sha256: undefined,
|
|
1971
|
+
currency: undefined,
|
|
1972
|
+
ledger_unit_scale: undefined,
|
|
1973
|
+
error: undefined,
|
|
1974
|
+
ledger_version: undefined,
|
|
1975
|
+
failure_code: undefined,
|
|
1976
|
+
retryable: undefined,
|
|
1977
|
+
_unknownFields: {},
|
|
1978
|
+
};
|
|
1979
|
+
}
|
|
1980
|
+
export const EmbeddingResponse = {
|
|
1981
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1982
|
+
for (const v of message.vectors) {
|
|
1983
|
+
EmbeddingVector.encode(v, writer.uint32(10).fork()).join();
|
|
1984
|
+
}
|
|
1985
|
+
if (message.input_tokens !== "0") {
|
|
1986
|
+
writer.uint32(16).int64(message.input_tokens);
|
|
1987
|
+
}
|
|
1988
|
+
if (message.charged_units !== "0") {
|
|
1989
|
+
writer.uint32(24).int64(message.charged_units);
|
|
1990
|
+
}
|
|
1991
|
+
if (message.descriptor_sha256 !== undefined) {
|
|
1992
|
+
writer.uint32(34).string(message.descriptor_sha256);
|
|
1993
|
+
}
|
|
1994
|
+
if (message.operation_status !== 0) {
|
|
1995
|
+
writer.uint32(40).int32(message.operation_status);
|
|
1996
|
+
}
|
|
1997
|
+
if (message.operation_id !== undefined) {
|
|
1998
|
+
writer.uint32(50).string(message.operation_id);
|
|
1999
|
+
}
|
|
2000
|
+
if (message.idempotency_key_sha256 !== undefined) {
|
|
2001
|
+
writer.uint32(58).string(message.idempotency_key_sha256);
|
|
2002
|
+
}
|
|
2003
|
+
if (message.canonical_request_sha256 !== undefined) {
|
|
2004
|
+
writer.uint32(66).string(message.canonical_request_sha256);
|
|
2005
|
+
}
|
|
2006
|
+
if (message.provider_request_sha256 !== undefined) {
|
|
2007
|
+
writer.uint32(74).string(message.provider_request_sha256);
|
|
2008
|
+
}
|
|
2009
|
+
if (message.authorization_receipt_sha256 !== undefined) {
|
|
2010
|
+
writer.uint32(82).string(message.authorization_receipt_sha256);
|
|
2011
|
+
}
|
|
2012
|
+
if (message.settlement_receipt_sha256 !== undefined) {
|
|
2013
|
+
writer.uint32(90).string(message.settlement_receipt_sha256);
|
|
2014
|
+
}
|
|
2015
|
+
if (message.provider_receipt_sha256 !== undefined) {
|
|
2016
|
+
writer.uint32(98).string(message.provider_receipt_sha256);
|
|
2017
|
+
}
|
|
2018
|
+
if (message.currency !== undefined) {
|
|
2019
|
+
writer.uint32(106).string(message.currency);
|
|
2020
|
+
}
|
|
2021
|
+
if (message.ledger_unit_scale !== undefined) {
|
|
2022
|
+
writer.uint32(112).uint32(message.ledger_unit_scale);
|
|
2023
|
+
}
|
|
2024
|
+
if (message.error !== undefined) {
|
|
2025
|
+
ErrorInfo.encode(message.error, writer.uint32(122).fork()).join();
|
|
2026
|
+
}
|
|
2027
|
+
if (message.ledger_version !== undefined) {
|
|
2028
|
+
writer.uint32(128).uint32(message.ledger_version);
|
|
2029
|
+
}
|
|
2030
|
+
if (message.failure_code !== undefined) {
|
|
2031
|
+
writer.uint32(138).string(message.failure_code);
|
|
2032
|
+
}
|
|
2033
|
+
if (message.retryable !== undefined) {
|
|
2034
|
+
writer.uint32(144).bool(message.retryable);
|
|
2035
|
+
}
|
|
2036
|
+
if (message._unknownFields !== undefined) {
|
|
2037
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
2038
|
+
const tag = parseInt(key, 10);
|
|
2039
|
+
for (const value of values) {
|
|
2040
|
+
writer.uint32(tag).raw(value);
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
return writer;
|
|
2045
|
+
},
|
|
2046
|
+
decode(input, length) {
|
|
2047
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2048
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2049
|
+
const message = createBaseEmbeddingResponse();
|
|
2050
|
+
while (reader.pos < end) {
|
|
2051
|
+
const tag = reader.uint32();
|
|
2052
|
+
switch (tag >>> 3) {
|
|
2053
|
+
case 1: {
|
|
2054
|
+
if (tag !== 10) {
|
|
2055
|
+
break;
|
|
2056
|
+
}
|
|
2057
|
+
message.vectors.push(EmbeddingVector.decode(reader, reader.uint32()));
|
|
2058
|
+
continue;
|
|
2059
|
+
}
|
|
2060
|
+
case 2: {
|
|
2061
|
+
if (tag !== 16) {
|
|
2062
|
+
break;
|
|
2063
|
+
}
|
|
2064
|
+
message.input_tokens = reader.int64().toString();
|
|
2065
|
+
continue;
|
|
2066
|
+
}
|
|
2067
|
+
case 3: {
|
|
2068
|
+
if (tag !== 24) {
|
|
2069
|
+
break;
|
|
2070
|
+
}
|
|
2071
|
+
message.charged_units = reader.int64().toString();
|
|
2072
|
+
continue;
|
|
2073
|
+
}
|
|
2074
|
+
case 4: {
|
|
2075
|
+
if (tag !== 34) {
|
|
2076
|
+
break;
|
|
2077
|
+
}
|
|
2078
|
+
message.descriptor_sha256 = reader.string();
|
|
2079
|
+
continue;
|
|
2080
|
+
}
|
|
2081
|
+
case 5: {
|
|
2082
|
+
if (tag !== 40) {
|
|
2083
|
+
break;
|
|
2084
|
+
}
|
|
2085
|
+
message.operation_status = reader.int32();
|
|
2086
|
+
continue;
|
|
2087
|
+
}
|
|
2088
|
+
case 6: {
|
|
2089
|
+
if (tag !== 50) {
|
|
2090
|
+
break;
|
|
2091
|
+
}
|
|
2092
|
+
message.operation_id = reader.string();
|
|
2093
|
+
continue;
|
|
2094
|
+
}
|
|
2095
|
+
case 7: {
|
|
2096
|
+
if (tag !== 58) {
|
|
2097
|
+
break;
|
|
2098
|
+
}
|
|
2099
|
+
message.idempotency_key_sha256 = reader.string();
|
|
2100
|
+
continue;
|
|
2101
|
+
}
|
|
2102
|
+
case 8: {
|
|
2103
|
+
if (tag !== 66) {
|
|
2104
|
+
break;
|
|
2105
|
+
}
|
|
2106
|
+
message.canonical_request_sha256 = reader.string();
|
|
2107
|
+
continue;
|
|
2108
|
+
}
|
|
2109
|
+
case 9: {
|
|
2110
|
+
if (tag !== 74) {
|
|
2111
|
+
break;
|
|
2112
|
+
}
|
|
2113
|
+
message.provider_request_sha256 = reader.string();
|
|
2114
|
+
continue;
|
|
2115
|
+
}
|
|
2116
|
+
case 10: {
|
|
2117
|
+
if (tag !== 82) {
|
|
2118
|
+
break;
|
|
2119
|
+
}
|
|
2120
|
+
message.authorization_receipt_sha256 = reader.string();
|
|
2121
|
+
continue;
|
|
2122
|
+
}
|
|
2123
|
+
case 11: {
|
|
2124
|
+
if (tag !== 90) {
|
|
2125
|
+
break;
|
|
2126
|
+
}
|
|
2127
|
+
message.settlement_receipt_sha256 = reader.string();
|
|
2128
|
+
continue;
|
|
2129
|
+
}
|
|
2130
|
+
case 12: {
|
|
2131
|
+
if (tag !== 98) {
|
|
2132
|
+
break;
|
|
2133
|
+
}
|
|
2134
|
+
message.provider_receipt_sha256 = reader.string();
|
|
2135
|
+
continue;
|
|
2136
|
+
}
|
|
2137
|
+
case 13: {
|
|
2138
|
+
if (tag !== 106) {
|
|
2139
|
+
break;
|
|
2140
|
+
}
|
|
2141
|
+
message.currency = reader.string();
|
|
2142
|
+
continue;
|
|
2143
|
+
}
|
|
2144
|
+
case 14: {
|
|
2145
|
+
if (tag !== 112) {
|
|
2146
|
+
break;
|
|
2147
|
+
}
|
|
2148
|
+
message.ledger_unit_scale = reader.uint32();
|
|
2149
|
+
continue;
|
|
2150
|
+
}
|
|
2151
|
+
case 15: {
|
|
2152
|
+
if (tag !== 122) {
|
|
2153
|
+
break;
|
|
2154
|
+
}
|
|
2155
|
+
message.error = ErrorInfo.decode(reader, reader.uint32());
|
|
2156
|
+
continue;
|
|
2157
|
+
}
|
|
2158
|
+
case 16: {
|
|
2159
|
+
if (tag !== 128) {
|
|
2160
|
+
break;
|
|
2161
|
+
}
|
|
2162
|
+
message.ledger_version = reader.uint32();
|
|
2163
|
+
continue;
|
|
2164
|
+
}
|
|
2165
|
+
case 17: {
|
|
2166
|
+
if (tag !== 138) {
|
|
2167
|
+
break;
|
|
2168
|
+
}
|
|
2169
|
+
message.failure_code = reader.string();
|
|
2170
|
+
continue;
|
|
2171
|
+
}
|
|
2172
|
+
case 18: {
|
|
2173
|
+
if (tag !== 144) {
|
|
2174
|
+
break;
|
|
2175
|
+
}
|
|
2176
|
+
message.retryable = reader.bool();
|
|
2177
|
+
continue;
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2181
|
+
break;
|
|
2182
|
+
}
|
|
2183
|
+
const buf = reader.skip(tag & 7);
|
|
2184
|
+
const list = message._unknownFields[tag];
|
|
2185
|
+
if (list === undefined) {
|
|
2186
|
+
message._unknownFields[tag] = [buf];
|
|
2187
|
+
}
|
|
2188
|
+
else {
|
|
2189
|
+
list.push(buf);
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
return message;
|
|
2193
|
+
},
|
|
2194
|
+
fromJSON(object) {
|
|
2195
|
+
return {
|
|
2196
|
+
vectors: globalThis.Array.isArray(object?.vectors)
|
|
2197
|
+
? object.vectors.map((e) => EmbeddingVector.fromJSON(e))
|
|
2198
|
+
: [],
|
|
2199
|
+
input_tokens: isSet(object.inputTokens)
|
|
2200
|
+
? globalThis.String(object.inputTokens)
|
|
2201
|
+
: isSet(object.input_tokens)
|
|
2202
|
+
? globalThis.String(object.input_tokens)
|
|
2203
|
+
: "0",
|
|
2204
|
+
charged_units: isSet(object.chargedUnits)
|
|
2205
|
+
? globalThis.String(object.chargedUnits)
|
|
2206
|
+
: isSet(object.charged_units)
|
|
2207
|
+
? globalThis.String(object.charged_units)
|
|
2208
|
+
: "0",
|
|
2209
|
+
descriptor_sha256: isSet(object.descriptorSha256)
|
|
2210
|
+
? globalThis.String(object.descriptorSha256)
|
|
2211
|
+
: isSet(object.descriptor_sha256)
|
|
2212
|
+
? globalThis.String(object.descriptor_sha256)
|
|
2213
|
+
: undefined,
|
|
2214
|
+
operation_status: isSet(object.operationStatus)
|
|
2215
|
+
? embeddingOperationStatusFromJSON(object.operationStatus)
|
|
2216
|
+
: isSet(object.operation_status)
|
|
2217
|
+
? embeddingOperationStatusFromJSON(object.operation_status)
|
|
2218
|
+
: 0,
|
|
2219
|
+
operation_id: isSet(object.operationId)
|
|
2220
|
+
? globalThis.String(object.operationId)
|
|
2221
|
+
: isSet(object.operation_id)
|
|
2222
|
+
? globalThis.String(object.operation_id)
|
|
2223
|
+
: undefined,
|
|
2224
|
+
idempotency_key_sha256: isSet(object.idempotencyKeySha256)
|
|
2225
|
+
? globalThis.String(object.idempotencyKeySha256)
|
|
2226
|
+
: isSet(object.idempotency_key_sha256)
|
|
2227
|
+
? globalThis.String(object.idempotency_key_sha256)
|
|
2228
|
+
: undefined,
|
|
2229
|
+
canonical_request_sha256: isSet(object.canonicalRequestSha256)
|
|
2230
|
+
? globalThis.String(object.canonicalRequestSha256)
|
|
2231
|
+
: isSet(object.canonical_request_sha256)
|
|
2232
|
+
? globalThis.String(object.canonical_request_sha256)
|
|
2233
|
+
: undefined,
|
|
2234
|
+
provider_request_sha256: isSet(object.providerRequestSha256)
|
|
2235
|
+
? globalThis.String(object.providerRequestSha256)
|
|
2236
|
+
: isSet(object.provider_request_sha256)
|
|
2237
|
+
? globalThis.String(object.provider_request_sha256)
|
|
2238
|
+
: undefined,
|
|
2239
|
+
authorization_receipt_sha256: isSet(object.authorizationReceiptSha256)
|
|
2240
|
+
? globalThis.String(object.authorizationReceiptSha256)
|
|
2241
|
+
: isSet(object.authorization_receipt_sha256)
|
|
2242
|
+
? globalThis.String(object.authorization_receipt_sha256)
|
|
2243
|
+
: undefined,
|
|
2244
|
+
settlement_receipt_sha256: isSet(object.settlementReceiptSha256)
|
|
2245
|
+
? globalThis.String(object.settlementReceiptSha256)
|
|
2246
|
+
: isSet(object.settlement_receipt_sha256)
|
|
2247
|
+
? globalThis.String(object.settlement_receipt_sha256)
|
|
2248
|
+
: undefined,
|
|
2249
|
+
provider_receipt_sha256: isSet(object.providerReceiptSha256)
|
|
2250
|
+
? globalThis.String(object.providerReceiptSha256)
|
|
2251
|
+
: isSet(object.provider_receipt_sha256)
|
|
2252
|
+
? globalThis.String(object.provider_receipt_sha256)
|
|
2253
|
+
: undefined,
|
|
2254
|
+
currency: isSet(object.currency) ? globalThis.String(object.currency) : undefined,
|
|
2255
|
+
ledger_unit_scale: isSet(object.ledgerUnitScale)
|
|
2256
|
+
? globalThis.Number(object.ledgerUnitScale)
|
|
2257
|
+
: isSet(object.ledger_unit_scale)
|
|
2258
|
+
? globalThis.Number(object.ledger_unit_scale)
|
|
2259
|
+
: undefined,
|
|
2260
|
+
error: isSet(object.error) ? ErrorInfo.fromJSON(object.error) : undefined,
|
|
2261
|
+
ledger_version: isSet(object.ledgerVersion)
|
|
2262
|
+
? globalThis.Number(object.ledgerVersion)
|
|
2263
|
+
: isSet(object.ledger_version)
|
|
2264
|
+
? globalThis.Number(object.ledger_version)
|
|
2265
|
+
: undefined,
|
|
2266
|
+
failure_code: isSet(object.failureCode)
|
|
2267
|
+
? globalThis.String(object.failureCode)
|
|
2268
|
+
: isSet(object.failure_code)
|
|
2269
|
+
? globalThis.String(object.failure_code)
|
|
2270
|
+
: undefined,
|
|
2271
|
+
retryable: isSet(object.retryable) ? globalThis.Boolean(object.retryable) : undefined,
|
|
2272
|
+
};
|
|
2273
|
+
},
|
|
2274
|
+
toJSON(message) {
|
|
2275
|
+
const obj = {};
|
|
2276
|
+
if (message.vectors?.length) {
|
|
2277
|
+
obj.vectors = message.vectors.map((e) => EmbeddingVector.toJSON(e));
|
|
2278
|
+
}
|
|
2279
|
+
if (message.input_tokens !== "0") {
|
|
2280
|
+
obj.inputTokens = message.input_tokens;
|
|
2281
|
+
}
|
|
2282
|
+
if (message.charged_units !== "0") {
|
|
2283
|
+
obj.chargedUnits = message.charged_units;
|
|
2284
|
+
}
|
|
2285
|
+
if (message.descriptor_sha256 !== undefined) {
|
|
2286
|
+
obj.descriptorSha256 = message.descriptor_sha256;
|
|
2287
|
+
}
|
|
2288
|
+
if (message.operation_status !== 0) {
|
|
2289
|
+
obj.operationStatus = embeddingOperationStatusToJSON(message.operation_status);
|
|
2290
|
+
}
|
|
2291
|
+
if (message.operation_id !== undefined) {
|
|
2292
|
+
obj.operationId = message.operation_id;
|
|
2293
|
+
}
|
|
2294
|
+
if (message.idempotency_key_sha256 !== undefined) {
|
|
2295
|
+
obj.idempotencyKeySha256 = message.idempotency_key_sha256;
|
|
2296
|
+
}
|
|
2297
|
+
if (message.canonical_request_sha256 !== undefined) {
|
|
2298
|
+
obj.canonicalRequestSha256 = message.canonical_request_sha256;
|
|
2299
|
+
}
|
|
2300
|
+
if (message.provider_request_sha256 !== undefined) {
|
|
2301
|
+
obj.providerRequestSha256 = message.provider_request_sha256;
|
|
2302
|
+
}
|
|
2303
|
+
if (message.authorization_receipt_sha256 !== undefined) {
|
|
2304
|
+
obj.authorizationReceiptSha256 = message.authorization_receipt_sha256;
|
|
2305
|
+
}
|
|
2306
|
+
if (message.settlement_receipt_sha256 !== undefined) {
|
|
2307
|
+
obj.settlementReceiptSha256 = message.settlement_receipt_sha256;
|
|
2308
|
+
}
|
|
2309
|
+
if (message.provider_receipt_sha256 !== undefined) {
|
|
2310
|
+
obj.providerReceiptSha256 = message.provider_receipt_sha256;
|
|
2311
|
+
}
|
|
2312
|
+
if (message.currency !== undefined) {
|
|
2313
|
+
obj.currency = message.currency;
|
|
2314
|
+
}
|
|
2315
|
+
if (message.ledger_unit_scale !== undefined) {
|
|
2316
|
+
obj.ledgerUnitScale = Math.round(message.ledger_unit_scale);
|
|
2317
|
+
}
|
|
2318
|
+
if (message.error !== undefined) {
|
|
2319
|
+
obj.error = ErrorInfo.toJSON(message.error);
|
|
2320
|
+
}
|
|
2321
|
+
if (message.ledger_version !== undefined) {
|
|
2322
|
+
obj.ledgerVersion = Math.round(message.ledger_version);
|
|
2323
|
+
}
|
|
2324
|
+
if (message.failure_code !== undefined) {
|
|
2325
|
+
obj.failureCode = message.failure_code;
|
|
2326
|
+
}
|
|
2327
|
+
if (message.retryable !== undefined) {
|
|
2328
|
+
obj.retryable = message.retryable;
|
|
2329
|
+
}
|
|
2330
|
+
return obj;
|
|
2331
|
+
},
|
|
2332
|
+
create(base) {
|
|
2333
|
+
return EmbeddingResponse.fromPartial(base ?? {});
|
|
2334
|
+
},
|
|
2335
|
+
fromPartial(object) {
|
|
2336
|
+
const message = createBaseEmbeddingResponse();
|
|
2337
|
+
message.vectors = object.vectors?.map((e) => EmbeddingVector.fromPartial(e)) || [];
|
|
2338
|
+
message.input_tokens = object.input_tokens ?? "0";
|
|
2339
|
+
message.charged_units = object.charged_units ?? "0";
|
|
2340
|
+
message.descriptor_sha256 = object.descriptor_sha256 ?? undefined;
|
|
2341
|
+
message.operation_status = object.operation_status ?? 0;
|
|
2342
|
+
message.operation_id = object.operation_id ?? undefined;
|
|
2343
|
+
message.idempotency_key_sha256 = object.idempotency_key_sha256 ?? undefined;
|
|
2344
|
+
message.canonical_request_sha256 = object.canonical_request_sha256 ?? undefined;
|
|
2345
|
+
message.provider_request_sha256 = object.provider_request_sha256 ?? undefined;
|
|
2346
|
+
message.authorization_receipt_sha256 = object.authorization_receipt_sha256 ?? undefined;
|
|
2347
|
+
message.settlement_receipt_sha256 = object.settlement_receipt_sha256 ?? undefined;
|
|
2348
|
+
message.provider_receipt_sha256 = object.provider_receipt_sha256 ?? undefined;
|
|
2349
|
+
message.currency = object.currency ?? undefined;
|
|
2350
|
+
message.ledger_unit_scale = object.ledger_unit_scale ?? undefined;
|
|
2351
|
+
message.error = (object.error !== undefined && object.error !== null)
|
|
2352
|
+
? ErrorInfo.fromPartial(object.error)
|
|
2353
|
+
: undefined;
|
|
2354
|
+
message.ledger_version = object.ledger_version ?? undefined;
|
|
2355
|
+
message.failure_code = object.failure_code ?? undefined;
|
|
2356
|
+
message.retryable = object.retryable ?? undefined;
|
|
2357
|
+
return message;
|
|
2358
|
+
},
|
|
2359
|
+
};
|
|
2360
|
+
function createBaseEmbeddingRetrievalEffect() {
|
|
2361
|
+
return { benchmark: "", score_bps: 0, retention_bps: 0, source_url: "", _unknownFields: {} };
|
|
2362
|
+
}
|
|
2363
|
+
export const EmbeddingRetrievalEffect = {
|
|
2364
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2365
|
+
if (message.benchmark !== "") {
|
|
2366
|
+
writer.uint32(10).string(message.benchmark);
|
|
2367
|
+
}
|
|
2368
|
+
if (message.score_bps !== 0) {
|
|
2369
|
+
writer.uint32(16).uint32(message.score_bps);
|
|
2370
|
+
}
|
|
2371
|
+
if (message.retention_bps !== 0) {
|
|
2372
|
+
writer.uint32(24).uint32(message.retention_bps);
|
|
2373
|
+
}
|
|
2374
|
+
if (message.source_url !== "") {
|
|
2375
|
+
writer.uint32(34).string(message.source_url);
|
|
2376
|
+
}
|
|
2377
|
+
if (message._unknownFields !== undefined) {
|
|
2378
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
2379
|
+
const tag = parseInt(key, 10);
|
|
2380
|
+
for (const value of values) {
|
|
2381
|
+
writer.uint32(tag).raw(value);
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
return writer;
|
|
2386
|
+
},
|
|
2387
|
+
decode(input, length) {
|
|
2388
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2389
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2390
|
+
const message = createBaseEmbeddingRetrievalEffect();
|
|
2391
|
+
while (reader.pos < end) {
|
|
2392
|
+
const tag = reader.uint32();
|
|
2393
|
+
switch (tag >>> 3) {
|
|
2394
|
+
case 1: {
|
|
2395
|
+
if (tag !== 10) {
|
|
2396
|
+
break;
|
|
2397
|
+
}
|
|
2398
|
+
message.benchmark = reader.string();
|
|
2399
|
+
continue;
|
|
2400
|
+
}
|
|
2401
|
+
case 2: {
|
|
2402
|
+
if (tag !== 16) {
|
|
2403
|
+
break;
|
|
2404
|
+
}
|
|
2405
|
+
message.score_bps = reader.uint32();
|
|
2406
|
+
continue;
|
|
2407
|
+
}
|
|
2408
|
+
case 3: {
|
|
2409
|
+
if (tag !== 24) {
|
|
2410
|
+
break;
|
|
2411
|
+
}
|
|
2412
|
+
message.retention_bps = reader.uint32();
|
|
2413
|
+
continue;
|
|
2414
|
+
}
|
|
2415
|
+
case 4: {
|
|
2416
|
+
if (tag !== 34) {
|
|
2417
|
+
break;
|
|
2418
|
+
}
|
|
2419
|
+
message.source_url = reader.string();
|
|
2420
|
+
continue;
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2424
|
+
break;
|
|
2425
|
+
}
|
|
2426
|
+
const buf = reader.skip(tag & 7);
|
|
2427
|
+
const list = message._unknownFields[tag];
|
|
2428
|
+
if (list === undefined) {
|
|
2429
|
+
message._unknownFields[tag] = [buf];
|
|
2430
|
+
}
|
|
2431
|
+
else {
|
|
2432
|
+
list.push(buf);
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
return message;
|
|
2436
|
+
},
|
|
2437
|
+
fromJSON(object) {
|
|
2438
|
+
return {
|
|
2439
|
+
benchmark: isSet(object.benchmark) ? globalThis.String(object.benchmark) : "",
|
|
2440
|
+
score_bps: isSet(object.scoreBps)
|
|
2441
|
+
? globalThis.Number(object.scoreBps)
|
|
2442
|
+
: isSet(object.score_bps)
|
|
2443
|
+
? globalThis.Number(object.score_bps)
|
|
2444
|
+
: 0,
|
|
2445
|
+
retention_bps: isSet(object.retentionBps)
|
|
2446
|
+
? globalThis.Number(object.retentionBps)
|
|
2447
|
+
: isSet(object.retention_bps)
|
|
2448
|
+
? globalThis.Number(object.retention_bps)
|
|
2449
|
+
: 0,
|
|
2450
|
+
source_url: isSet(object.sourceUrl)
|
|
2451
|
+
? globalThis.String(object.sourceUrl)
|
|
2452
|
+
: isSet(object.source_url)
|
|
2453
|
+
? globalThis.String(object.source_url)
|
|
2454
|
+
: "",
|
|
2455
|
+
};
|
|
2456
|
+
},
|
|
2457
|
+
toJSON(message) {
|
|
2458
|
+
const obj = {};
|
|
2459
|
+
if (message.benchmark !== "") {
|
|
2460
|
+
obj.benchmark = message.benchmark;
|
|
2461
|
+
}
|
|
2462
|
+
if (message.score_bps !== 0) {
|
|
2463
|
+
obj.scoreBps = Math.round(message.score_bps);
|
|
2464
|
+
}
|
|
2465
|
+
if (message.retention_bps !== 0) {
|
|
2466
|
+
obj.retentionBps = Math.round(message.retention_bps);
|
|
2467
|
+
}
|
|
2468
|
+
if (message.source_url !== "") {
|
|
2469
|
+
obj.sourceUrl = message.source_url;
|
|
2470
|
+
}
|
|
2471
|
+
return obj;
|
|
2472
|
+
},
|
|
2473
|
+
create(base) {
|
|
2474
|
+
return EmbeddingRetrievalEffect.fromPartial(base ?? {});
|
|
2475
|
+
},
|
|
2476
|
+
fromPartial(object) {
|
|
2477
|
+
const message = createBaseEmbeddingRetrievalEffect();
|
|
2478
|
+
message.benchmark = object.benchmark ?? "";
|
|
2479
|
+
message.score_bps = object.score_bps ?? 0;
|
|
2480
|
+
message.retention_bps = object.retention_bps ?? 0;
|
|
2481
|
+
message.source_url = object.source_url ?? "";
|
|
2482
|
+
return message;
|
|
2483
|
+
},
|
|
2484
|
+
};
|
|
2485
|
+
function createBaseEmbeddingDimensionProfile() {
|
|
2486
|
+
return { dimension: 0, runtime_bytes_per_object: 0, retrieval_effect: undefined, _unknownFields: {} };
|
|
2487
|
+
}
|
|
2488
|
+
export const EmbeddingDimensionProfile = {
|
|
2489
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2490
|
+
if (message.dimension !== 0) {
|
|
2491
|
+
writer.uint32(8).uint32(message.dimension);
|
|
2492
|
+
}
|
|
2493
|
+
if (message.runtime_bytes_per_object !== 0) {
|
|
2494
|
+
writer.uint32(16).uint32(message.runtime_bytes_per_object);
|
|
2495
|
+
}
|
|
2496
|
+
if (message.retrieval_effect !== undefined) {
|
|
2497
|
+
EmbeddingRetrievalEffect.encode(message.retrieval_effect, writer.uint32(26).fork()).join();
|
|
2498
|
+
}
|
|
2499
|
+
if (message._unknownFields !== undefined) {
|
|
2500
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
2501
|
+
const tag = parseInt(key, 10);
|
|
2502
|
+
for (const value of values) {
|
|
2503
|
+
writer.uint32(tag).raw(value);
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
return writer;
|
|
2508
|
+
},
|
|
2509
|
+
decode(input, length) {
|
|
2510
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2511
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2512
|
+
const message = createBaseEmbeddingDimensionProfile();
|
|
2513
|
+
while (reader.pos < end) {
|
|
2514
|
+
const tag = reader.uint32();
|
|
2515
|
+
switch (tag >>> 3) {
|
|
2516
|
+
case 1: {
|
|
2517
|
+
if (tag !== 8) {
|
|
2518
|
+
break;
|
|
2519
|
+
}
|
|
2520
|
+
message.dimension = reader.uint32();
|
|
2521
|
+
continue;
|
|
2522
|
+
}
|
|
2523
|
+
case 2: {
|
|
2524
|
+
if (tag !== 16) {
|
|
2525
|
+
break;
|
|
2526
|
+
}
|
|
2527
|
+
message.runtime_bytes_per_object = reader.uint32();
|
|
2528
|
+
continue;
|
|
2529
|
+
}
|
|
2530
|
+
case 3: {
|
|
2531
|
+
if (tag !== 26) {
|
|
2532
|
+
break;
|
|
2533
|
+
}
|
|
2534
|
+
message.retrieval_effect = EmbeddingRetrievalEffect.decode(reader, reader.uint32());
|
|
2535
|
+
continue;
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2539
|
+
break;
|
|
2540
|
+
}
|
|
2541
|
+
const buf = reader.skip(tag & 7);
|
|
2542
|
+
const list = message._unknownFields[tag];
|
|
2543
|
+
if (list === undefined) {
|
|
2544
|
+
message._unknownFields[tag] = [buf];
|
|
2545
|
+
}
|
|
2546
|
+
else {
|
|
2547
|
+
list.push(buf);
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
return message;
|
|
2551
|
+
},
|
|
2552
|
+
fromJSON(object) {
|
|
2553
|
+
return {
|
|
2554
|
+
dimension: isSet(object.dimension) ? globalThis.Number(object.dimension) : 0,
|
|
2555
|
+
runtime_bytes_per_object: isSet(object.runtimeBytesPerObject)
|
|
2556
|
+
? globalThis.Number(object.runtimeBytesPerObject)
|
|
2557
|
+
: isSet(object.runtime_bytes_per_object)
|
|
2558
|
+
? globalThis.Number(object.runtime_bytes_per_object)
|
|
2559
|
+
: 0,
|
|
2560
|
+
retrieval_effect: isSet(object.retrievalEffect)
|
|
2561
|
+
? EmbeddingRetrievalEffect.fromJSON(object.retrievalEffect)
|
|
2562
|
+
: isSet(object.retrieval_effect)
|
|
2563
|
+
? EmbeddingRetrievalEffect.fromJSON(object.retrieval_effect)
|
|
2564
|
+
: undefined,
|
|
2565
|
+
};
|
|
2566
|
+
},
|
|
2567
|
+
toJSON(message) {
|
|
2568
|
+
const obj = {};
|
|
2569
|
+
if (message.dimension !== 0) {
|
|
2570
|
+
obj.dimension = Math.round(message.dimension);
|
|
2571
|
+
}
|
|
2572
|
+
if (message.runtime_bytes_per_object !== 0) {
|
|
2573
|
+
obj.runtimeBytesPerObject = Math.round(message.runtime_bytes_per_object);
|
|
2574
|
+
}
|
|
2575
|
+
if (message.retrieval_effect !== undefined) {
|
|
2576
|
+
obj.retrievalEffect = EmbeddingRetrievalEffect.toJSON(message.retrieval_effect);
|
|
2577
|
+
}
|
|
2578
|
+
return obj;
|
|
2579
|
+
},
|
|
2580
|
+
create(base) {
|
|
2581
|
+
return EmbeddingDimensionProfile.fromPartial(base ?? {});
|
|
2582
|
+
},
|
|
2583
|
+
fromPartial(object) {
|
|
2584
|
+
const message = createBaseEmbeddingDimensionProfile();
|
|
2585
|
+
message.dimension = object.dimension ?? 0;
|
|
2586
|
+
message.runtime_bytes_per_object = object.runtime_bytes_per_object ?? 0;
|
|
2587
|
+
message.retrieval_effect = (object.retrieval_effect !== undefined && object.retrieval_effect !== null)
|
|
2588
|
+
? EmbeddingRetrievalEffect.fromPartial(object.retrieval_effect)
|
|
2589
|
+
: undefined;
|
|
2590
|
+
return message;
|
|
2591
|
+
},
|
|
2592
|
+
};
|
|
2593
|
+
function createBaseEmbeddingRevisionAttestationV1() {
|
|
2594
|
+
return {
|
|
2595
|
+
revision_kind: "",
|
|
2596
|
+
routing_policy_sha256: "",
|
|
2597
|
+
probe_schema: "",
|
|
2598
|
+
probe_input_sha256: "",
|
|
2599
|
+
vector_canonicalization: "",
|
|
2600
|
+
probe_vector_sha256: "",
|
|
2601
|
+
_unknownFields: {},
|
|
2602
|
+
};
|
|
2603
|
+
}
|
|
2604
|
+
export const EmbeddingRevisionAttestationV1 = {
|
|
2605
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2606
|
+
if (message.revision_kind !== "") {
|
|
2607
|
+
writer.uint32(10).string(message.revision_kind);
|
|
2608
|
+
}
|
|
2609
|
+
if (message.routing_policy_sha256 !== "") {
|
|
2610
|
+
writer.uint32(18).string(message.routing_policy_sha256);
|
|
2611
|
+
}
|
|
2612
|
+
if (message.probe_schema !== "") {
|
|
2613
|
+
writer.uint32(26).string(message.probe_schema);
|
|
2614
|
+
}
|
|
2615
|
+
if (message.probe_input_sha256 !== "") {
|
|
2616
|
+
writer.uint32(34).string(message.probe_input_sha256);
|
|
2617
|
+
}
|
|
2618
|
+
if (message.vector_canonicalization !== "") {
|
|
2619
|
+
writer.uint32(42).string(message.vector_canonicalization);
|
|
2620
|
+
}
|
|
2621
|
+
if (message.probe_vector_sha256 !== "") {
|
|
2622
|
+
writer.uint32(50).string(message.probe_vector_sha256);
|
|
2623
|
+
}
|
|
2624
|
+
if (message._unknownFields !== undefined) {
|
|
2625
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
2626
|
+
const tag = parseInt(key, 10);
|
|
2627
|
+
for (const value of values) {
|
|
2628
|
+
writer.uint32(tag).raw(value);
|
|
2629
|
+
}
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
return writer;
|
|
2633
|
+
},
|
|
2634
|
+
decode(input, length) {
|
|
2635
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2636
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2637
|
+
const message = createBaseEmbeddingRevisionAttestationV1();
|
|
2638
|
+
while (reader.pos < end) {
|
|
2639
|
+
const tag = reader.uint32();
|
|
2640
|
+
switch (tag >>> 3) {
|
|
2641
|
+
case 1: {
|
|
2642
|
+
if (tag !== 10) {
|
|
2643
|
+
break;
|
|
2644
|
+
}
|
|
2645
|
+
message.revision_kind = reader.string();
|
|
2646
|
+
continue;
|
|
2647
|
+
}
|
|
2648
|
+
case 2: {
|
|
2649
|
+
if (tag !== 18) {
|
|
2650
|
+
break;
|
|
2651
|
+
}
|
|
2652
|
+
message.routing_policy_sha256 = reader.string();
|
|
2653
|
+
continue;
|
|
2654
|
+
}
|
|
2655
|
+
case 3: {
|
|
2656
|
+
if (tag !== 26) {
|
|
2657
|
+
break;
|
|
2658
|
+
}
|
|
2659
|
+
message.probe_schema = reader.string();
|
|
2660
|
+
continue;
|
|
2661
|
+
}
|
|
2662
|
+
case 4: {
|
|
2663
|
+
if (tag !== 34) {
|
|
2664
|
+
break;
|
|
2665
|
+
}
|
|
2666
|
+
message.probe_input_sha256 = reader.string();
|
|
2667
|
+
continue;
|
|
2668
|
+
}
|
|
2669
|
+
case 5: {
|
|
2670
|
+
if (tag !== 42) {
|
|
2671
|
+
break;
|
|
2672
|
+
}
|
|
2673
|
+
message.vector_canonicalization = reader.string();
|
|
2674
|
+
continue;
|
|
2675
|
+
}
|
|
2676
|
+
case 6: {
|
|
2677
|
+
if (tag !== 50) {
|
|
2678
|
+
break;
|
|
2679
|
+
}
|
|
2680
|
+
message.probe_vector_sha256 = reader.string();
|
|
2681
|
+
continue;
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2685
|
+
break;
|
|
2686
|
+
}
|
|
2687
|
+
const buf = reader.skip(tag & 7);
|
|
2688
|
+
const list = message._unknownFields[tag];
|
|
2689
|
+
if (list === undefined) {
|
|
2690
|
+
message._unknownFields[tag] = [buf];
|
|
2691
|
+
}
|
|
2692
|
+
else {
|
|
2693
|
+
list.push(buf);
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
return message;
|
|
2697
|
+
},
|
|
2698
|
+
fromJSON(object) {
|
|
2699
|
+
return {
|
|
2700
|
+
revision_kind: isSet(object.revisionKind)
|
|
2701
|
+
? globalThis.String(object.revisionKind)
|
|
2702
|
+
: isSet(object.revision_kind)
|
|
2703
|
+
? globalThis.String(object.revision_kind)
|
|
2704
|
+
: "",
|
|
2705
|
+
routing_policy_sha256: isSet(object.routingPolicySha256)
|
|
2706
|
+
? globalThis.String(object.routingPolicySha256)
|
|
2707
|
+
: isSet(object.routing_policy_sha256)
|
|
2708
|
+
? globalThis.String(object.routing_policy_sha256)
|
|
2709
|
+
: "",
|
|
2710
|
+
probe_schema: isSet(object.probeSchema)
|
|
2711
|
+
? globalThis.String(object.probeSchema)
|
|
2712
|
+
: isSet(object.probe_schema)
|
|
2713
|
+
? globalThis.String(object.probe_schema)
|
|
2714
|
+
: "",
|
|
2715
|
+
probe_input_sha256: isSet(object.probeInputSha256)
|
|
2716
|
+
? globalThis.String(object.probeInputSha256)
|
|
2717
|
+
: isSet(object.probe_input_sha256)
|
|
2718
|
+
? globalThis.String(object.probe_input_sha256)
|
|
2719
|
+
: "",
|
|
2720
|
+
vector_canonicalization: isSet(object.vectorCanonicalization)
|
|
2721
|
+
? globalThis.String(object.vectorCanonicalization)
|
|
2722
|
+
: isSet(object.vector_canonicalization)
|
|
2723
|
+
? globalThis.String(object.vector_canonicalization)
|
|
2724
|
+
: "",
|
|
2725
|
+
probe_vector_sha256: isSet(object.probeVectorSha256)
|
|
2726
|
+
? globalThis.String(object.probeVectorSha256)
|
|
2727
|
+
: isSet(object.probe_vector_sha256)
|
|
2728
|
+
? globalThis.String(object.probe_vector_sha256)
|
|
2729
|
+
: "",
|
|
2730
|
+
};
|
|
2731
|
+
},
|
|
2732
|
+
toJSON(message) {
|
|
2733
|
+
const obj = {};
|
|
2734
|
+
if (message.revision_kind !== "") {
|
|
2735
|
+
obj.revisionKind = message.revision_kind;
|
|
2736
|
+
}
|
|
2737
|
+
if (message.routing_policy_sha256 !== "") {
|
|
2738
|
+
obj.routingPolicySha256 = message.routing_policy_sha256;
|
|
2739
|
+
}
|
|
2740
|
+
if (message.probe_schema !== "") {
|
|
2741
|
+
obj.probeSchema = message.probe_schema;
|
|
2742
|
+
}
|
|
2743
|
+
if (message.probe_input_sha256 !== "") {
|
|
2744
|
+
obj.probeInputSha256 = message.probe_input_sha256;
|
|
2745
|
+
}
|
|
2746
|
+
if (message.vector_canonicalization !== "") {
|
|
2747
|
+
obj.vectorCanonicalization = message.vector_canonicalization;
|
|
2748
|
+
}
|
|
2749
|
+
if (message.probe_vector_sha256 !== "") {
|
|
2750
|
+
obj.probeVectorSha256 = message.probe_vector_sha256;
|
|
2751
|
+
}
|
|
2752
|
+
return obj;
|
|
2753
|
+
},
|
|
2754
|
+
create(base) {
|
|
2755
|
+
return EmbeddingRevisionAttestationV1.fromPartial(base ?? {});
|
|
2756
|
+
},
|
|
2757
|
+
fromPartial(object) {
|
|
2758
|
+
const message = createBaseEmbeddingRevisionAttestationV1();
|
|
2759
|
+
message.revision_kind = object.revision_kind ?? "";
|
|
2760
|
+
message.routing_policy_sha256 = object.routing_policy_sha256 ?? "";
|
|
2761
|
+
message.probe_schema = object.probe_schema ?? "";
|
|
2762
|
+
message.probe_input_sha256 = object.probe_input_sha256 ?? "";
|
|
2763
|
+
message.vector_canonicalization = object.vector_canonicalization ?? "";
|
|
2764
|
+
message.probe_vector_sha256 = object.probe_vector_sha256 ?? "";
|
|
2765
|
+
return message;
|
|
2766
|
+
},
|
|
2767
|
+
};
|
|
2768
|
+
function createBaseEmbeddingDescriptorV1() {
|
|
2769
|
+
return {
|
|
2770
|
+
provider: "",
|
|
2771
|
+
model: "",
|
|
2772
|
+
model_revision: "",
|
|
2773
|
+
dimension: 0,
|
|
2774
|
+
metric: "",
|
|
2775
|
+
source_schema: "",
|
|
2776
|
+
normalization: "",
|
|
2777
|
+
descriptor_sha256: "",
|
|
2778
|
+
revision_attestation: undefined,
|
|
2779
|
+
_unknownFields: {},
|
|
2780
|
+
};
|
|
2781
|
+
}
|
|
2782
|
+
export const EmbeddingDescriptorV1 = {
|
|
2783
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2784
|
+
if (message.provider !== "") {
|
|
2785
|
+
writer.uint32(10).string(message.provider);
|
|
2786
|
+
}
|
|
2787
|
+
if (message.model !== "") {
|
|
2788
|
+
writer.uint32(18).string(message.model);
|
|
2789
|
+
}
|
|
2790
|
+
if (message.model_revision !== "") {
|
|
2791
|
+
writer.uint32(26).string(message.model_revision);
|
|
2792
|
+
}
|
|
2793
|
+
if (message.dimension !== 0) {
|
|
2794
|
+
writer.uint32(32).uint32(message.dimension);
|
|
2795
|
+
}
|
|
2796
|
+
if (message.metric !== "") {
|
|
2797
|
+
writer.uint32(42).string(message.metric);
|
|
2798
|
+
}
|
|
2799
|
+
if (message.source_schema !== "") {
|
|
2800
|
+
writer.uint32(50).string(message.source_schema);
|
|
2801
|
+
}
|
|
2802
|
+
if (message.normalization !== "") {
|
|
2803
|
+
writer.uint32(58).string(message.normalization);
|
|
2804
|
+
}
|
|
2805
|
+
if (message.descriptor_sha256 !== "") {
|
|
2806
|
+
writer.uint32(66).string(message.descriptor_sha256);
|
|
2807
|
+
}
|
|
2808
|
+
if (message.revision_attestation !== undefined) {
|
|
2809
|
+
EmbeddingRevisionAttestationV1.encode(message.revision_attestation, writer.uint32(74).fork()).join();
|
|
2810
|
+
}
|
|
2811
|
+
if (message._unknownFields !== undefined) {
|
|
2812
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
2813
|
+
const tag = parseInt(key, 10);
|
|
2814
|
+
for (const value of values) {
|
|
2815
|
+
writer.uint32(tag).raw(value);
|
|
2816
|
+
}
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
return writer;
|
|
2820
|
+
},
|
|
2821
|
+
decode(input, length) {
|
|
2822
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2823
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2824
|
+
const message = createBaseEmbeddingDescriptorV1();
|
|
2825
|
+
while (reader.pos < end) {
|
|
2826
|
+
const tag = reader.uint32();
|
|
2827
|
+
switch (tag >>> 3) {
|
|
2828
|
+
case 1: {
|
|
2829
|
+
if (tag !== 10) {
|
|
2830
|
+
break;
|
|
2831
|
+
}
|
|
2832
|
+
message.provider = reader.string();
|
|
2833
|
+
continue;
|
|
2834
|
+
}
|
|
2835
|
+
case 2: {
|
|
2836
|
+
if (tag !== 18) {
|
|
2837
|
+
break;
|
|
2838
|
+
}
|
|
2839
|
+
message.model = reader.string();
|
|
2840
|
+
continue;
|
|
2841
|
+
}
|
|
2842
|
+
case 3: {
|
|
2843
|
+
if (tag !== 26) {
|
|
2844
|
+
break;
|
|
2845
|
+
}
|
|
2846
|
+
message.model_revision = reader.string();
|
|
2847
|
+
continue;
|
|
2848
|
+
}
|
|
2849
|
+
case 4: {
|
|
2850
|
+
if (tag !== 32) {
|
|
2851
|
+
break;
|
|
2852
|
+
}
|
|
2853
|
+
message.dimension = reader.uint32();
|
|
2854
|
+
continue;
|
|
2855
|
+
}
|
|
2856
|
+
case 5: {
|
|
2857
|
+
if (tag !== 42) {
|
|
2858
|
+
break;
|
|
2859
|
+
}
|
|
2860
|
+
message.metric = reader.string();
|
|
2861
|
+
continue;
|
|
2862
|
+
}
|
|
2863
|
+
case 6: {
|
|
2864
|
+
if (tag !== 50) {
|
|
2865
|
+
break;
|
|
2866
|
+
}
|
|
2867
|
+
message.source_schema = reader.string();
|
|
2868
|
+
continue;
|
|
2869
|
+
}
|
|
2870
|
+
case 7: {
|
|
2871
|
+
if (tag !== 58) {
|
|
2872
|
+
break;
|
|
2873
|
+
}
|
|
2874
|
+
message.normalization = reader.string();
|
|
2875
|
+
continue;
|
|
2876
|
+
}
|
|
2877
|
+
case 8: {
|
|
2878
|
+
if (tag !== 66) {
|
|
2879
|
+
break;
|
|
2880
|
+
}
|
|
2881
|
+
message.descriptor_sha256 = reader.string();
|
|
2882
|
+
continue;
|
|
2883
|
+
}
|
|
2884
|
+
case 9: {
|
|
2885
|
+
if (tag !== 74) {
|
|
2886
|
+
break;
|
|
2887
|
+
}
|
|
2888
|
+
message.revision_attestation = EmbeddingRevisionAttestationV1.decode(reader, reader.uint32());
|
|
2889
|
+
continue;
|
|
2890
|
+
}
|
|
2891
|
+
}
|
|
2892
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2893
|
+
break;
|
|
2894
|
+
}
|
|
2895
|
+
const buf = reader.skip(tag & 7);
|
|
2896
|
+
const list = message._unknownFields[tag];
|
|
2897
|
+
if (list === undefined) {
|
|
2898
|
+
message._unknownFields[tag] = [buf];
|
|
2899
|
+
}
|
|
2900
|
+
else {
|
|
2901
|
+
list.push(buf);
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
return message;
|
|
2905
|
+
},
|
|
2906
|
+
fromJSON(object) {
|
|
2907
|
+
return {
|
|
2908
|
+
provider: isSet(object.provider) ? globalThis.String(object.provider) : "",
|
|
2909
|
+
model: isSet(object.model) ? globalThis.String(object.model) : "",
|
|
2910
|
+
model_revision: isSet(object.modelRevision)
|
|
2911
|
+
? globalThis.String(object.modelRevision)
|
|
2912
|
+
: isSet(object.model_revision)
|
|
2913
|
+
? globalThis.String(object.model_revision)
|
|
2914
|
+
: "",
|
|
2915
|
+
dimension: isSet(object.dimension) ? globalThis.Number(object.dimension) : 0,
|
|
2916
|
+
metric: isSet(object.metric) ? globalThis.String(object.metric) : "",
|
|
2917
|
+
source_schema: isSet(object.sourceSchema)
|
|
2918
|
+
? globalThis.String(object.sourceSchema)
|
|
2919
|
+
: isSet(object.source_schema)
|
|
2920
|
+
? globalThis.String(object.source_schema)
|
|
2921
|
+
: "",
|
|
2922
|
+
normalization: isSet(object.normalization) ? globalThis.String(object.normalization) : "",
|
|
2923
|
+
descriptor_sha256: isSet(object.descriptorSha256)
|
|
2924
|
+
? globalThis.String(object.descriptorSha256)
|
|
2925
|
+
: isSet(object.descriptor_sha256)
|
|
2926
|
+
? globalThis.String(object.descriptor_sha256)
|
|
2927
|
+
: "",
|
|
2928
|
+
revision_attestation: isSet(object.revisionAttestation)
|
|
2929
|
+
? EmbeddingRevisionAttestationV1.fromJSON(object.revisionAttestation)
|
|
2930
|
+
: isSet(object.revision_attestation)
|
|
2931
|
+
? EmbeddingRevisionAttestationV1.fromJSON(object.revision_attestation)
|
|
2932
|
+
: undefined,
|
|
2933
|
+
};
|
|
2934
|
+
},
|
|
2935
|
+
toJSON(message) {
|
|
2936
|
+
const obj = {};
|
|
2937
|
+
if (message.provider !== "") {
|
|
2938
|
+
obj.provider = message.provider;
|
|
2939
|
+
}
|
|
2940
|
+
if (message.model !== "") {
|
|
2941
|
+
obj.model = message.model;
|
|
2942
|
+
}
|
|
2943
|
+
if (message.model_revision !== "") {
|
|
2944
|
+
obj.modelRevision = message.model_revision;
|
|
2945
|
+
}
|
|
2946
|
+
if (message.dimension !== 0) {
|
|
2947
|
+
obj.dimension = Math.round(message.dimension);
|
|
2948
|
+
}
|
|
2949
|
+
if (message.metric !== "") {
|
|
2950
|
+
obj.metric = message.metric;
|
|
2951
|
+
}
|
|
2952
|
+
if (message.source_schema !== "") {
|
|
2953
|
+
obj.sourceSchema = message.source_schema;
|
|
2954
|
+
}
|
|
2955
|
+
if (message.normalization !== "") {
|
|
2956
|
+
obj.normalization = message.normalization;
|
|
2957
|
+
}
|
|
2958
|
+
if (message.descriptor_sha256 !== "") {
|
|
2959
|
+
obj.descriptorSha256 = message.descriptor_sha256;
|
|
2960
|
+
}
|
|
2961
|
+
if (message.revision_attestation !== undefined) {
|
|
2962
|
+
obj.revisionAttestation = EmbeddingRevisionAttestationV1.toJSON(message.revision_attestation);
|
|
2963
|
+
}
|
|
2964
|
+
return obj;
|
|
2965
|
+
},
|
|
2966
|
+
create(base) {
|
|
2967
|
+
return EmbeddingDescriptorV1.fromPartial(base ?? {});
|
|
2968
|
+
},
|
|
2969
|
+
fromPartial(object) {
|
|
2970
|
+
const message = createBaseEmbeddingDescriptorV1();
|
|
2971
|
+
message.provider = object.provider ?? "";
|
|
2972
|
+
message.model = object.model ?? "";
|
|
2973
|
+
message.model_revision = object.model_revision ?? "";
|
|
2974
|
+
message.dimension = object.dimension ?? 0;
|
|
2975
|
+
message.metric = object.metric ?? "";
|
|
2976
|
+
message.source_schema = object.source_schema ?? "";
|
|
2977
|
+
message.normalization = object.normalization ?? "";
|
|
2978
|
+
message.descriptor_sha256 = object.descriptor_sha256 ?? "";
|
|
2979
|
+
message.revision_attestation = (object.revision_attestation !== undefined && object.revision_attestation !== null)
|
|
2980
|
+
? EmbeddingRevisionAttestationV1.fromPartial(object.revision_attestation)
|
|
2981
|
+
: undefined;
|
|
2982
|
+
return message;
|
|
2983
|
+
},
|
|
2984
|
+
};
|
|
2985
|
+
function createBaseEmbeddingAttestationPolicyV1() {
|
|
2986
|
+
return {
|
|
2987
|
+
expected_provider_slug: "",
|
|
2988
|
+
exact_quantization: "",
|
|
2989
|
+
probe_schema: "",
|
|
2990
|
+
probe_input_sha256: "",
|
|
2991
|
+
vector_canonicalization: "",
|
|
2992
|
+
_unknownFields: {},
|
|
2993
|
+
};
|
|
2994
|
+
}
|
|
2995
|
+
export const EmbeddingAttestationPolicyV1 = {
|
|
2996
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2997
|
+
if (message.expected_provider_slug !== "") {
|
|
2998
|
+
writer.uint32(10).string(message.expected_provider_slug);
|
|
2999
|
+
}
|
|
3000
|
+
if (message.exact_quantization !== "") {
|
|
3001
|
+
writer.uint32(18).string(message.exact_quantization);
|
|
3002
|
+
}
|
|
3003
|
+
if (message.probe_schema !== "") {
|
|
3004
|
+
writer.uint32(26).string(message.probe_schema);
|
|
3005
|
+
}
|
|
3006
|
+
if (message.probe_input_sha256 !== "") {
|
|
3007
|
+
writer.uint32(34).string(message.probe_input_sha256);
|
|
3008
|
+
}
|
|
3009
|
+
if (message.vector_canonicalization !== "") {
|
|
3010
|
+
writer.uint32(42).string(message.vector_canonicalization);
|
|
3011
|
+
}
|
|
3012
|
+
if (message._unknownFields !== undefined) {
|
|
3013
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
3014
|
+
const tag = parseInt(key, 10);
|
|
3015
|
+
for (const value of values) {
|
|
3016
|
+
writer.uint32(tag).raw(value);
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
return writer;
|
|
3021
|
+
},
|
|
3022
|
+
decode(input, length) {
|
|
3023
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3024
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3025
|
+
const message = createBaseEmbeddingAttestationPolicyV1();
|
|
3026
|
+
while (reader.pos < end) {
|
|
3027
|
+
const tag = reader.uint32();
|
|
3028
|
+
switch (tag >>> 3) {
|
|
3029
|
+
case 1: {
|
|
3030
|
+
if (tag !== 10) {
|
|
3031
|
+
break;
|
|
3032
|
+
}
|
|
3033
|
+
message.expected_provider_slug = reader.string();
|
|
3034
|
+
continue;
|
|
3035
|
+
}
|
|
3036
|
+
case 2: {
|
|
3037
|
+
if (tag !== 18) {
|
|
3038
|
+
break;
|
|
3039
|
+
}
|
|
3040
|
+
message.exact_quantization = reader.string();
|
|
3041
|
+
continue;
|
|
3042
|
+
}
|
|
3043
|
+
case 3: {
|
|
3044
|
+
if (tag !== 26) {
|
|
3045
|
+
break;
|
|
3046
|
+
}
|
|
3047
|
+
message.probe_schema = reader.string();
|
|
3048
|
+
continue;
|
|
3049
|
+
}
|
|
3050
|
+
case 4: {
|
|
3051
|
+
if (tag !== 34) {
|
|
3052
|
+
break;
|
|
3053
|
+
}
|
|
3054
|
+
message.probe_input_sha256 = reader.string();
|
|
3055
|
+
continue;
|
|
3056
|
+
}
|
|
3057
|
+
case 5: {
|
|
3058
|
+
if (tag !== 42) {
|
|
3059
|
+
break;
|
|
3060
|
+
}
|
|
3061
|
+
message.vector_canonicalization = reader.string();
|
|
3062
|
+
continue;
|
|
3063
|
+
}
|
|
3064
|
+
}
|
|
3065
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3066
|
+
break;
|
|
3067
|
+
}
|
|
3068
|
+
const buf = reader.skip(tag & 7);
|
|
3069
|
+
const list = message._unknownFields[tag];
|
|
3070
|
+
if (list === undefined) {
|
|
3071
|
+
message._unknownFields[tag] = [buf];
|
|
3072
|
+
}
|
|
3073
|
+
else {
|
|
3074
|
+
list.push(buf);
|
|
3075
|
+
}
|
|
3076
|
+
}
|
|
3077
|
+
return message;
|
|
3078
|
+
},
|
|
3079
|
+
fromJSON(object) {
|
|
3080
|
+
return {
|
|
3081
|
+
expected_provider_slug: isSet(object.expectedProviderSlug)
|
|
3082
|
+
? globalThis.String(object.expectedProviderSlug)
|
|
3083
|
+
: isSet(object.expected_provider_slug)
|
|
3084
|
+
? globalThis.String(object.expected_provider_slug)
|
|
3085
|
+
: "",
|
|
3086
|
+
exact_quantization: isSet(object.exactQuantization)
|
|
3087
|
+
? globalThis.String(object.exactQuantization)
|
|
3088
|
+
: isSet(object.exact_quantization)
|
|
3089
|
+
? globalThis.String(object.exact_quantization)
|
|
3090
|
+
: "",
|
|
3091
|
+
probe_schema: isSet(object.probeSchema)
|
|
3092
|
+
? globalThis.String(object.probeSchema)
|
|
3093
|
+
: isSet(object.probe_schema)
|
|
3094
|
+
? globalThis.String(object.probe_schema)
|
|
3095
|
+
: "",
|
|
3096
|
+
probe_input_sha256: isSet(object.probeInputSha256)
|
|
3097
|
+
? globalThis.String(object.probeInputSha256)
|
|
3098
|
+
: isSet(object.probe_input_sha256)
|
|
3099
|
+
? globalThis.String(object.probe_input_sha256)
|
|
3100
|
+
: "",
|
|
3101
|
+
vector_canonicalization: isSet(object.vectorCanonicalization)
|
|
3102
|
+
? globalThis.String(object.vectorCanonicalization)
|
|
3103
|
+
: isSet(object.vector_canonicalization)
|
|
3104
|
+
? globalThis.String(object.vector_canonicalization)
|
|
3105
|
+
: "",
|
|
3106
|
+
};
|
|
3107
|
+
},
|
|
3108
|
+
toJSON(message) {
|
|
3109
|
+
const obj = {};
|
|
3110
|
+
if (message.expected_provider_slug !== "") {
|
|
3111
|
+
obj.expectedProviderSlug = message.expected_provider_slug;
|
|
3112
|
+
}
|
|
3113
|
+
if (message.exact_quantization !== "") {
|
|
3114
|
+
obj.exactQuantization = message.exact_quantization;
|
|
3115
|
+
}
|
|
3116
|
+
if (message.probe_schema !== "") {
|
|
3117
|
+
obj.probeSchema = message.probe_schema;
|
|
3118
|
+
}
|
|
3119
|
+
if (message.probe_input_sha256 !== "") {
|
|
3120
|
+
obj.probeInputSha256 = message.probe_input_sha256;
|
|
3121
|
+
}
|
|
3122
|
+
if (message.vector_canonicalization !== "") {
|
|
3123
|
+
obj.vectorCanonicalization = message.vector_canonicalization;
|
|
3124
|
+
}
|
|
3125
|
+
return obj;
|
|
3126
|
+
},
|
|
3127
|
+
create(base) {
|
|
3128
|
+
return EmbeddingAttestationPolicyV1.fromPartial(base ?? {});
|
|
3129
|
+
},
|
|
3130
|
+
fromPartial(object) {
|
|
3131
|
+
const message = createBaseEmbeddingAttestationPolicyV1();
|
|
3132
|
+
message.expected_provider_slug = object.expected_provider_slug ?? "";
|
|
3133
|
+
message.exact_quantization = object.exact_quantization ?? "";
|
|
3134
|
+
message.probe_schema = object.probe_schema ?? "";
|
|
3135
|
+
message.probe_input_sha256 = object.probe_input_sha256 ?? "";
|
|
3136
|
+
message.vector_canonicalization = object.vector_canonicalization ?? "";
|
|
3137
|
+
return message;
|
|
3138
|
+
},
|
|
3139
|
+
};
|
|
3140
|
+
function createBaseEmbeddingCatalogEntry() {
|
|
3141
|
+
return {
|
|
3142
|
+
model_id: "",
|
|
3143
|
+
display_name: "",
|
|
3144
|
+
model_type: "",
|
|
3145
|
+
base_model_id: "",
|
|
3146
|
+
parameter_count_label: "",
|
|
3147
|
+
layer_count: 0,
|
|
3148
|
+
context_length_label: "",
|
|
3149
|
+
default_dimension: 0,
|
|
3150
|
+
min_dimension: 0,
|
|
3151
|
+
max_dimension: 0,
|
|
3152
|
+
supports_custom_dimensions: false,
|
|
3153
|
+
bytes_per_component: 0,
|
|
3154
|
+
metric: "",
|
|
3155
|
+
api_kind: "",
|
|
3156
|
+
sample_dimension_profiles: [],
|
|
3157
|
+
model_card_url: "",
|
|
3158
|
+
technical_report_url: "",
|
|
3159
|
+
retention_unavailable_reason: "",
|
|
3160
|
+
component_type: "",
|
|
3161
|
+
attestation_policy: undefined,
|
|
3162
|
+
_unknownFields: {},
|
|
3163
|
+
};
|
|
3164
|
+
}
|
|
3165
|
+
export const EmbeddingCatalogEntry = {
|
|
3166
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3167
|
+
if (message.model_id !== "") {
|
|
3168
|
+
writer.uint32(10).string(message.model_id);
|
|
3169
|
+
}
|
|
3170
|
+
if (message.display_name !== "") {
|
|
3171
|
+
writer.uint32(18).string(message.display_name);
|
|
3172
|
+
}
|
|
3173
|
+
if (message.model_type !== "") {
|
|
3174
|
+
writer.uint32(26).string(message.model_type);
|
|
3175
|
+
}
|
|
3176
|
+
if (message.base_model_id !== "") {
|
|
3177
|
+
writer.uint32(34).string(message.base_model_id);
|
|
3178
|
+
}
|
|
3179
|
+
if (message.parameter_count_label !== "") {
|
|
3180
|
+
writer.uint32(42).string(message.parameter_count_label);
|
|
3181
|
+
}
|
|
3182
|
+
if (message.layer_count !== 0) {
|
|
3183
|
+
writer.uint32(48).uint32(message.layer_count);
|
|
3184
|
+
}
|
|
3185
|
+
if (message.context_length_label !== "") {
|
|
3186
|
+
writer.uint32(58).string(message.context_length_label);
|
|
3187
|
+
}
|
|
3188
|
+
if (message.default_dimension !== 0) {
|
|
3189
|
+
writer.uint32(64).uint32(message.default_dimension);
|
|
3190
|
+
}
|
|
3191
|
+
if (message.min_dimension !== 0) {
|
|
3192
|
+
writer.uint32(72).uint32(message.min_dimension);
|
|
3193
|
+
}
|
|
3194
|
+
if (message.max_dimension !== 0) {
|
|
3195
|
+
writer.uint32(80).uint32(message.max_dimension);
|
|
3196
|
+
}
|
|
3197
|
+
if (message.supports_custom_dimensions !== false) {
|
|
3198
|
+
writer.uint32(88).bool(message.supports_custom_dimensions);
|
|
3199
|
+
}
|
|
3200
|
+
if (message.bytes_per_component !== 0) {
|
|
3201
|
+
writer.uint32(96).uint32(message.bytes_per_component);
|
|
3202
|
+
}
|
|
3203
|
+
if (message.metric !== "") {
|
|
3204
|
+
writer.uint32(106).string(message.metric);
|
|
3205
|
+
}
|
|
3206
|
+
if (message.api_kind !== "") {
|
|
3207
|
+
writer.uint32(114).string(message.api_kind);
|
|
3208
|
+
}
|
|
3209
|
+
for (const v of message.sample_dimension_profiles) {
|
|
3210
|
+
EmbeddingDimensionProfile.encode(v, writer.uint32(122).fork()).join();
|
|
3211
|
+
}
|
|
3212
|
+
if (message.model_card_url !== "") {
|
|
3213
|
+
writer.uint32(130).string(message.model_card_url);
|
|
3214
|
+
}
|
|
3215
|
+
if (message.technical_report_url !== "") {
|
|
3216
|
+
writer.uint32(138).string(message.technical_report_url);
|
|
3217
|
+
}
|
|
3218
|
+
if (message.retention_unavailable_reason !== "") {
|
|
3219
|
+
writer.uint32(146).string(message.retention_unavailable_reason);
|
|
3220
|
+
}
|
|
3221
|
+
if (message.component_type !== "") {
|
|
3222
|
+
writer.uint32(154).string(message.component_type);
|
|
3223
|
+
}
|
|
3224
|
+
if (message.attestation_policy !== undefined) {
|
|
3225
|
+
EmbeddingAttestationPolicyV1.encode(message.attestation_policy, writer.uint32(162).fork()).join();
|
|
3226
|
+
}
|
|
3227
|
+
if (message._unknownFields !== undefined) {
|
|
3228
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
3229
|
+
const tag = parseInt(key, 10);
|
|
3230
|
+
for (const value of values) {
|
|
3231
|
+
writer.uint32(tag).raw(value);
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
return writer;
|
|
3236
|
+
},
|
|
3237
|
+
decode(input, length) {
|
|
3238
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3239
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3240
|
+
const message = createBaseEmbeddingCatalogEntry();
|
|
3241
|
+
while (reader.pos < end) {
|
|
3242
|
+
const tag = reader.uint32();
|
|
3243
|
+
switch (tag >>> 3) {
|
|
3244
|
+
case 1: {
|
|
3245
|
+
if (tag !== 10) {
|
|
3246
|
+
break;
|
|
3247
|
+
}
|
|
3248
|
+
message.model_id = reader.string();
|
|
3249
|
+
continue;
|
|
3250
|
+
}
|
|
3251
|
+
case 2: {
|
|
3252
|
+
if (tag !== 18) {
|
|
3253
|
+
break;
|
|
3254
|
+
}
|
|
3255
|
+
message.display_name = reader.string();
|
|
3256
|
+
continue;
|
|
3257
|
+
}
|
|
3258
|
+
case 3: {
|
|
3259
|
+
if (tag !== 26) {
|
|
3260
|
+
break;
|
|
3261
|
+
}
|
|
3262
|
+
message.model_type = reader.string();
|
|
3263
|
+
continue;
|
|
3264
|
+
}
|
|
3265
|
+
case 4: {
|
|
3266
|
+
if (tag !== 34) {
|
|
3267
|
+
break;
|
|
3268
|
+
}
|
|
3269
|
+
message.base_model_id = reader.string();
|
|
3270
|
+
continue;
|
|
3271
|
+
}
|
|
3272
|
+
case 5: {
|
|
3273
|
+
if (tag !== 42) {
|
|
3274
|
+
break;
|
|
3275
|
+
}
|
|
3276
|
+
message.parameter_count_label = reader.string();
|
|
3277
|
+
continue;
|
|
3278
|
+
}
|
|
3279
|
+
case 6: {
|
|
3280
|
+
if (tag !== 48) {
|
|
3281
|
+
break;
|
|
3282
|
+
}
|
|
3283
|
+
message.layer_count = reader.uint32();
|
|
3284
|
+
continue;
|
|
3285
|
+
}
|
|
3286
|
+
case 7: {
|
|
3287
|
+
if (tag !== 58) {
|
|
3288
|
+
break;
|
|
3289
|
+
}
|
|
3290
|
+
message.context_length_label = reader.string();
|
|
3291
|
+
continue;
|
|
3292
|
+
}
|
|
3293
|
+
case 8: {
|
|
3294
|
+
if (tag !== 64) {
|
|
3295
|
+
break;
|
|
3296
|
+
}
|
|
3297
|
+
message.default_dimension = reader.uint32();
|
|
3298
|
+
continue;
|
|
3299
|
+
}
|
|
3300
|
+
case 9: {
|
|
3301
|
+
if (tag !== 72) {
|
|
3302
|
+
break;
|
|
3303
|
+
}
|
|
3304
|
+
message.min_dimension = reader.uint32();
|
|
3305
|
+
continue;
|
|
3306
|
+
}
|
|
3307
|
+
case 10: {
|
|
3308
|
+
if (tag !== 80) {
|
|
3309
|
+
break;
|
|
3310
|
+
}
|
|
3311
|
+
message.max_dimension = reader.uint32();
|
|
3312
|
+
continue;
|
|
3313
|
+
}
|
|
3314
|
+
case 11: {
|
|
3315
|
+
if (tag !== 88) {
|
|
3316
|
+
break;
|
|
3317
|
+
}
|
|
3318
|
+
message.supports_custom_dimensions = reader.bool();
|
|
3319
|
+
continue;
|
|
3320
|
+
}
|
|
3321
|
+
case 12: {
|
|
3322
|
+
if (tag !== 96) {
|
|
3323
|
+
break;
|
|
3324
|
+
}
|
|
3325
|
+
message.bytes_per_component = reader.uint32();
|
|
3326
|
+
continue;
|
|
3327
|
+
}
|
|
3328
|
+
case 13: {
|
|
3329
|
+
if (tag !== 106) {
|
|
3330
|
+
break;
|
|
3331
|
+
}
|
|
3332
|
+
message.metric = reader.string();
|
|
3333
|
+
continue;
|
|
3334
|
+
}
|
|
3335
|
+
case 14: {
|
|
3336
|
+
if (tag !== 114) {
|
|
3337
|
+
break;
|
|
3338
|
+
}
|
|
3339
|
+
message.api_kind = reader.string();
|
|
3340
|
+
continue;
|
|
3341
|
+
}
|
|
3342
|
+
case 15: {
|
|
3343
|
+
if (tag !== 122) {
|
|
3344
|
+
break;
|
|
3345
|
+
}
|
|
3346
|
+
message.sample_dimension_profiles.push(EmbeddingDimensionProfile.decode(reader, reader.uint32()));
|
|
3347
|
+
continue;
|
|
3348
|
+
}
|
|
3349
|
+
case 16: {
|
|
3350
|
+
if (tag !== 130) {
|
|
3351
|
+
break;
|
|
3352
|
+
}
|
|
3353
|
+
message.model_card_url = reader.string();
|
|
3354
|
+
continue;
|
|
3355
|
+
}
|
|
3356
|
+
case 17: {
|
|
3357
|
+
if (tag !== 138) {
|
|
3358
|
+
break;
|
|
3359
|
+
}
|
|
3360
|
+
message.technical_report_url = reader.string();
|
|
3361
|
+
continue;
|
|
3362
|
+
}
|
|
3363
|
+
case 18: {
|
|
3364
|
+
if (tag !== 146) {
|
|
3365
|
+
break;
|
|
3366
|
+
}
|
|
3367
|
+
message.retention_unavailable_reason = reader.string();
|
|
3368
|
+
continue;
|
|
3369
|
+
}
|
|
3370
|
+
case 19: {
|
|
3371
|
+
if (tag !== 154) {
|
|
3372
|
+
break;
|
|
3373
|
+
}
|
|
3374
|
+
message.component_type = reader.string();
|
|
3375
|
+
continue;
|
|
3376
|
+
}
|
|
3377
|
+
case 20: {
|
|
3378
|
+
if (tag !== 162) {
|
|
3379
|
+
break;
|
|
3380
|
+
}
|
|
3381
|
+
message.attestation_policy = EmbeddingAttestationPolicyV1.decode(reader, reader.uint32());
|
|
3382
|
+
continue;
|
|
3383
|
+
}
|
|
3384
|
+
}
|
|
3385
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3386
|
+
break;
|
|
3387
|
+
}
|
|
3388
|
+
const buf = reader.skip(tag & 7);
|
|
3389
|
+
const list = message._unknownFields[tag];
|
|
3390
|
+
if (list === undefined) {
|
|
3391
|
+
message._unknownFields[tag] = [buf];
|
|
3392
|
+
}
|
|
3393
|
+
else {
|
|
3394
|
+
list.push(buf);
|
|
3395
|
+
}
|
|
3396
|
+
}
|
|
3397
|
+
return message;
|
|
3398
|
+
},
|
|
3399
|
+
fromJSON(object) {
|
|
3400
|
+
return {
|
|
3401
|
+
model_id: isSet(object.modelId)
|
|
3402
|
+
? globalThis.String(object.modelId)
|
|
3403
|
+
: isSet(object.model_id)
|
|
3404
|
+
? globalThis.String(object.model_id)
|
|
3405
|
+
: "",
|
|
3406
|
+
display_name: isSet(object.displayName)
|
|
3407
|
+
? globalThis.String(object.displayName)
|
|
3408
|
+
: isSet(object.display_name)
|
|
3409
|
+
? globalThis.String(object.display_name)
|
|
3410
|
+
: "",
|
|
3411
|
+
model_type: isSet(object.modelType)
|
|
3412
|
+
? globalThis.String(object.modelType)
|
|
3413
|
+
: isSet(object.model_type)
|
|
3414
|
+
? globalThis.String(object.model_type)
|
|
3415
|
+
: "",
|
|
3416
|
+
base_model_id: isSet(object.baseModelId)
|
|
3417
|
+
? globalThis.String(object.baseModelId)
|
|
3418
|
+
: isSet(object.base_model_id)
|
|
3419
|
+
? globalThis.String(object.base_model_id)
|
|
3420
|
+
: "",
|
|
3421
|
+
parameter_count_label: isSet(object.parameterCountLabel)
|
|
3422
|
+
? globalThis.String(object.parameterCountLabel)
|
|
3423
|
+
: isSet(object.parameter_count_label)
|
|
3424
|
+
? globalThis.String(object.parameter_count_label)
|
|
3425
|
+
: "",
|
|
3426
|
+
layer_count: isSet(object.layerCount)
|
|
3427
|
+
? globalThis.Number(object.layerCount)
|
|
3428
|
+
: isSet(object.layer_count)
|
|
3429
|
+
? globalThis.Number(object.layer_count)
|
|
3430
|
+
: 0,
|
|
3431
|
+
context_length_label: isSet(object.contextLengthLabel)
|
|
3432
|
+
? globalThis.String(object.contextLengthLabel)
|
|
3433
|
+
: isSet(object.context_length_label)
|
|
3434
|
+
? globalThis.String(object.context_length_label)
|
|
3435
|
+
: "",
|
|
3436
|
+
default_dimension: isSet(object.defaultDimension)
|
|
3437
|
+
? globalThis.Number(object.defaultDimension)
|
|
3438
|
+
: isSet(object.default_dimension)
|
|
3439
|
+
? globalThis.Number(object.default_dimension)
|
|
3440
|
+
: 0,
|
|
3441
|
+
min_dimension: isSet(object.minDimension)
|
|
3442
|
+
? globalThis.Number(object.minDimension)
|
|
3443
|
+
: isSet(object.min_dimension)
|
|
3444
|
+
? globalThis.Number(object.min_dimension)
|
|
3445
|
+
: 0,
|
|
3446
|
+
max_dimension: isSet(object.maxDimension)
|
|
3447
|
+
? globalThis.Number(object.maxDimension)
|
|
3448
|
+
: isSet(object.max_dimension)
|
|
3449
|
+
? globalThis.Number(object.max_dimension)
|
|
3450
|
+
: 0,
|
|
3451
|
+
supports_custom_dimensions: isSet(object.supportsCustomDimensions)
|
|
3452
|
+
? globalThis.Boolean(object.supportsCustomDimensions)
|
|
3453
|
+
: isSet(object.supports_custom_dimensions)
|
|
3454
|
+
? globalThis.Boolean(object.supports_custom_dimensions)
|
|
3455
|
+
: false,
|
|
3456
|
+
bytes_per_component: isSet(object.bytesPerComponent)
|
|
3457
|
+
? globalThis.Number(object.bytesPerComponent)
|
|
3458
|
+
: isSet(object.bytes_per_component)
|
|
3459
|
+
? globalThis.Number(object.bytes_per_component)
|
|
3460
|
+
: 0,
|
|
3461
|
+
metric: isSet(object.metric) ? globalThis.String(object.metric) : "",
|
|
3462
|
+
api_kind: isSet(object.apiKind)
|
|
3463
|
+
? globalThis.String(object.apiKind)
|
|
3464
|
+
: isSet(object.api_kind)
|
|
3465
|
+
? globalThis.String(object.api_kind)
|
|
3466
|
+
: "",
|
|
3467
|
+
sample_dimension_profiles: globalThis.Array.isArray(object?.sampleDimensionProfiles)
|
|
3468
|
+
? object.sampleDimensionProfiles.map((e) => EmbeddingDimensionProfile.fromJSON(e))
|
|
3469
|
+
: globalThis.Array.isArray(object?.sample_dimension_profiles)
|
|
3470
|
+
? object.sample_dimension_profiles.map((e) => EmbeddingDimensionProfile.fromJSON(e))
|
|
3471
|
+
: [],
|
|
3472
|
+
model_card_url: isSet(object.modelCardUrl)
|
|
3473
|
+
? globalThis.String(object.modelCardUrl)
|
|
3474
|
+
: isSet(object.model_card_url)
|
|
3475
|
+
? globalThis.String(object.model_card_url)
|
|
3476
|
+
: "",
|
|
3477
|
+
technical_report_url: isSet(object.technicalReportUrl)
|
|
3478
|
+
? globalThis.String(object.technicalReportUrl)
|
|
3479
|
+
: isSet(object.technical_report_url)
|
|
3480
|
+
? globalThis.String(object.technical_report_url)
|
|
3481
|
+
: "",
|
|
3482
|
+
retention_unavailable_reason: isSet(object.retentionUnavailableReason)
|
|
3483
|
+
? globalThis.String(object.retentionUnavailableReason)
|
|
3484
|
+
: isSet(object.retention_unavailable_reason)
|
|
3485
|
+
? globalThis.String(object.retention_unavailable_reason)
|
|
3486
|
+
: "",
|
|
3487
|
+
component_type: isSet(object.componentType)
|
|
3488
|
+
? globalThis.String(object.componentType)
|
|
3489
|
+
: isSet(object.component_type)
|
|
3490
|
+
? globalThis.String(object.component_type)
|
|
3491
|
+
: "",
|
|
3492
|
+
attestation_policy: isSet(object.attestationPolicy)
|
|
3493
|
+
? EmbeddingAttestationPolicyV1.fromJSON(object.attestationPolicy)
|
|
3494
|
+
: isSet(object.attestation_policy)
|
|
3495
|
+
? EmbeddingAttestationPolicyV1.fromJSON(object.attestation_policy)
|
|
3496
|
+
: undefined,
|
|
3497
|
+
};
|
|
3498
|
+
},
|
|
3499
|
+
toJSON(message) {
|
|
3500
|
+
const obj = {};
|
|
3501
|
+
if (message.model_id !== "") {
|
|
3502
|
+
obj.modelId = message.model_id;
|
|
3503
|
+
}
|
|
3504
|
+
if (message.display_name !== "") {
|
|
3505
|
+
obj.displayName = message.display_name;
|
|
3506
|
+
}
|
|
3507
|
+
if (message.model_type !== "") {
|
|
3508
|
+
obj.modelType = message.model_type;
|
|
3509
|
+
}
|
|
3510
|
+
if (message.base_model_id !== "") {
|
|
3511
|
+
obj.baseModelId = message.base_model_id;
|
|
3512
|
+
}
|
|
3513
|
+
if (message.parameter_count_label !== "") {
|
|
3514
|
+
obj.parameterCountLabel = message.parameter_count_label;
|
|
3515
|
+
}
|
|
3516
|
+
if (message.layer_count !== 0) {
|
|
3517
|
+
obj.layerCount = Math.round(message.layer_count);
|
|
3518
|
+
}
|
|
3519
|
+
if (message.context_length_label !== "") {
|
|
3520
|
+
obj.contextLengthLabel = message.context_length_label;
|
|
3521
|
+
}
|
|
3522
|
+
if (message.default_dimension !== 0) {
|
|
3523
|
+
obj.defaultDimension = Math.round(message.default_dimension);
|
|
3524
|
+
}
|
|
3525
|
+
if (message.min_dimension !== 0) {
|
|
3526
|
+
obj.minDimension = Math.round(message.min_dimension);
|
|
3527
|
+
}
|
|
3528
|
+
if (message.max_dimension !== 0) {
|
|
3529
|
+
obj.maxDimension = Math.round(message.max_dimension);
|
|
3530
|
+
}
|
|
3531
|
+
if (message.supports_custom_dimensions !== false) {
|
|
3532
|
+
obj.supportsCustomDimensions = message.supports_custom_dimensions;
|
|
3533
|
+
}
|
|
3534
|
+
if (message.bytes_per_component !== 0) {
|
|
3535
|
+
obj.bytesPerComponent = Math.round(message.bytes_per_component);
|
|
3536
|
+
}
|
|
3537
|
+
if (message.metric !== "") {
|
|
3538
|
+
obj.metric = message.metric;
|
|
3539
|
+
}
|
|
3540
|
+
if (message.api_kind !== "") {
|
|
3541
|
+
obj.apiKind = message.api_kind;
|
|
3542
|
+
}
|
|
3543
|
+
if (message.sample_dimension_profiles?.length) {
|
|
3544
|
+
obj.sampleDimensionProfiles = message.sample_dimension_profiles.map((e) => EmbeddingDimensionProfile.toJSON(e));
|
|
3545
|
+
}
|
|
3546
|
+
if (message.model_card_url !== "") {
|
|
3547
|
+
obj.modelCardUrl = message.model_card_url;
|
|
3548
|
+
}
|
|
3549
|
+
if (message.technical_report_url !== "") {
|
|
3550
|
+
obj.technicalReportUrl = message.technical_report_url;
|
|
3551
|
+
}
|
|
3552
|
+
if (message.retention_unavailable_reason !== "") {
|
|
3553
|
+
obj.retentionUnavailableReason = message.retention_unavailable_reason;
|
|
3554
|
+
}
|
|
3555
|
+
if (message.component_type !== "") {
|
|
3556
|
+
obj.componentType = message.component_type;
|
|
3557
|
+
}
|
|
3558
|
+
if (message.attestation_policy !== undefined) {
|
|
3559
|
+
obj.attestationPolicy = EmbeddingAttestationPolicyV1.toJSON(message.attestation_policy);
|
|
3560
|
+
}
|
|
3561
|
+
return obj;
|
|
3562
|
+
},
|
|
3563
|
+
create(base) {
|
|
3564
|
+
return EmbeddingCatalogEntry.fromPartial(base ?? {});
|
|
3565
|
+
},
|
|
3566
|
+
fromPartial(object) {
|
|
3567
|
+
const message = createBaseEmbeddingCatalogEntry();
|
|
3568
|
+
message.model_id = object.model_id ?? "";
|
|
3569
|
+
message.display_name = object.display_name ?? "";
|
|
3570
|
+
message.model_type = object.model_type ?? "";
|
|
3571
|
+
message.base_model_id = object.base_model_id ?? "";
|
|
3572
|
+
message.parameter_count_label = object.parameter_count_label ?? "";
|
|
3573
|
+
message.layer_count = object.layer_count ?? 0;
|
|
3574
|
+
message.context_length_label = object.context_length_label ?? "";
|
|
3575
|
+
message.default_dimension = object.default_dimension ?? 0;
|
|
3576
|
+
message.min_dimension = object.min_dimension ?? 0;
|
|
3577
|
+
message.max_dimension = object.max_dimension ?? 0;
|
|
3578
|
+
message.supports_custom_dimensions = object.supports_custom_dimensions ?? false;
|
|
3579
|
+
message.bytes_per_component = object.bytes_per_component ?? 0;
|
|
3580
|
+
message.metric = object.metric ?? "";
|
|
3581
|
+
message.api_kind = object.api_kind ?? "";
|
|
3582
|
+
message.sample_dimension_profiles =
|
|
3583
|
+
object.sample_dimension_profiles?.map((e) => EmbeddingDimensionProfile.fromPartial(e)) || [];
|
|
3584
|
+
message.model_card_url = object.model_card_url ?? "";
|
|
3585
|
+
message.technical_report_url = object.technical_report_url ?? "";
|
|
3586
|
+
message.retention_unavailable_reason = object.retention_unavailable_reason ?? "";
|
|
3587
|
+
message.component_type = object.component_type ?? "";
|
|
3588
|
+
message.attestation_policy = (object.attestation_policy !== undefined && object.attestation_policy !== null)
|
|
3589
|
+
? EmbeddingAttestationPolicyV1.fromPartial(object.attestation_policy)
|
|
3590
|
+
: undefined;
|
|
3591
|
+
return message;
|
|
3592
|
+
},
|
|
3593
|
+
};
|
|
3594
|
+
function createBaseEmbeddingCatalogResponse() {
|
|
3595
|
+
return { entry: undefined, error: undefined, _unknownFields: {} };
|
|
3596
|
+
}
|
|
3597
|
+
export const EmbeddingCatalogResponse = {
|
|
3598
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3599
|
+
if (message.entry !== undefined) {
|
|
3600
|
+
EmbeddingCatalogEntry.encode(message.entry, writer.uint32(10).fork()).join();
|
|
3601
|
+
}
|
|
3602
|
+
if (message.error !== undefined) {
|
|
3603
|
+
ErrorInfo.encode(message.error, writer.uint32(122).fork()).join();
|
|
3604
|
+
}
|
|
3605
|
+
if (message._unknownFields !== undefined) {
|
|
3606
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
3607
|
+
const tag = parseInt(key, 10);
|
|
3608
|
+
for (const value of values) {
|
|
3609
|
+
writer.uint32(tag).raw(value);
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3612
|
+
}
|
|
3613
|
+
return writer;
|
|
3614
|
+
},
|
|
3615
|
+
decode(input, length) {
|
|
3616
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3617
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3618
|
+
const message = createBaseEmbeddingCatalogResponse();
|
|
3619
|
+
while (reader.pos < end) {
|
|
3620
|
+
const tag = reader.uint32();
|
|
3621
|
+
switch (tag >>> 3) {
|
|
3622
|
+
case 1: {
|
|
3623
|
+
if (tag !== 10) {
|
|
3624
|
+
break;
|
|
3625
|
+
}
|
|
3626
|
+
message.entry = EmbeddingCatalogEntry.decode(reader, reader.uint32());
|
|
3627
|
+
continue;
|
|
3628
|
+
}
|
|
3629
|
+
case 15: {
|
|
3630
|
+
if (tag !== 122) {
|
|
3631
|
+
break;
|
|
3632
|
+
}
|
|
3633
|
+
message.error = ErrorInfo.decode(reader, reader.uint32());
|
|
3634
|
+
continue;
|
|
3635
|
+
}
|
|
3636
|
+
}
|
|
3637
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3638
|
+
break;
|
|
3639
|
+
}
|
|
3640
|
+
const buf = reader.skip(tag & 7);
|
|
3641
|
+
const list = message._unknownFields[tag];
|
|
3642
|
+
if (list === undefined) {
|
|
3643
|
+
message._unknownFields[tag] = [buf];
|
|
3644
|
+
}
|
|
3645
|
+
else {
|
|
3646
|
+
list.push(buf);
|
|
3647
|
+
}
|
|
3648
|
+
}
|
|
3649
|
+
return message;
|
|
3650
|
+
},
|
|
3651
|
+
fromJSON(object) {
|
|
3652
|
+
return {
|
|
3653
|
+
entry: isSet(object.entry) ? EmbeddingCatalogEntry.fromJSON(object.entry) : undefined,
|
|
3654
|
+
error: isSet(object.error) ? ErrorInfo.fromJSON(object.error) : undefined,
|
|
3655
|
+
};
|
|
3656
|
+
},
|
|
3657
|
+
toJSON(message) {
|
|
3658
|
+
const obj = {};
|
|
3659
|
+
if (message.entry !== undefined) {
|
|
3660
|
+
obj.entry = EmbeddingCatalogEntry.toJSON(message.entry);
|
|
3661
|
+
}
|
|
3662
|
+
if (message.error !== undefined) {
|
|
3663
|
+
obj.error = ErrorInfo.toJSON(message.error);
|
|
3664
|
+
}
|
|
3665
|
+
return obj;
|
|
3666
|
+
},
|
|
3667
|
+
create(base) {
|
|
3668
|
+
return EmbeddingCatalogResponse.fromPartial(base ?? {});
|
|
3669
|
+
},
|
|
3670
|
+
fromPartial(object) {
|
|
3671
|
+
const message = createBaseEmbeddingCatalogResponse();
|
|
3672
|
+
message.entry = (object.entry !== undefined && object.entry !== null)
|
|
3673
|
+
? EmbeddingCatalogEntry.fromPartial(object.entry)
|
|
3674
|
+
: undefined;
|
|
3675
|
+
message.error = (object.error !== undefined && object.error !== null)
|
|
3676
|
+
? ErrorInfo.fromPartial(object.error)
|
|
3677
|
+
: undefined;
|
|
3678
|
+
return message;
|
|
3679
|
+
},
|
|
3680
|
+
};
|
|
3681
|
+
function createBaseReleaseCapabilitySnapshot() {
|
|
3682
|
+
return {
|
|
3683
|
+
schema_version: 0,
|
|
3684
|
+
revision: "0",
|
|
3685
|
+
canonical_digest: "",
|
|
3686
|
+
previous_canonical_digest: undefined,
|
|
3687
|
+
author_alpha: false,
|
|
3688
|
+
player_ga: false,
|
|
3689
|
+
suno_enabled: false,
|
|
3690
|
+
gpu_textoon_enabled: false,
|
|
3691
|
+
author_alpha_release_receipt_sha256: undefined,
|
|
3692
|
+
player_ga_release_receipt_sha256: undefined,
|
|
3693
|
+
suno_qualification_receipt_sha256: undefined,
|
|
3694
|
+
suno_producer_receipt_sha256: undefined,
|
|
3695
|
+
gpu_textoon_qualification_receipt_sha256: undefined,
|
|
3696
|
+
gpu_textoon_producer_receipt_sha256: undefined,
|
|
3697
|
+
updated_by: "",
|
|
3698
|
+
updated_at_ms: "0",
|
|
3699
|
+
_unknownFields: {},
|
|
3700
|
+
};
|
|
3701
|
+
}
|
|
3702
|
+
export const ReleaseCapabilitySnapshot = {
|
|
3703
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3704
|
+
if (message.schema_version !== 0) {
|
|
3705
|
+
writer.uint32(8).uint32(message.schema_version);
|
|
3706
|
+
}
|
|
3707
|
+
if (message.revision !== "0") {
|
|
3708
|
+
writer.uint32(16).uint64(message.revision);
|
|
3709
|
+
}
|
|
3710
|
+
if (message.canonical_digest !== "") {
|
|
3711
|
+
writer.uint32(26).string(message.canonical_digest);
|
|
3712
|
+
}
|
|
3713
|
+
if (message.previous_canonical_digest !== undefined) {
|
|
3714
|
+
writer.uint32(34).string(message.previous_canonical_digest);
|
|
3715
|
+
}
|
|
3716
|
+
if (message.author_alpha !== false) {
|
|
3717
|
+
writer.uint32(40).bool(message.author_alpha);
|
|
3718
|
+
}
|
|
3719
|
+
if (message.player_ga !== false) {
|
|
3720
|
+
writer.uint32(48).bool(message.player_ga);
|
|
3721
|
+
}
|
|
3722
|
+
if (message.suno_enabled !== false) {
|
|
3723
|
+
writer.uint32(56).bool(message.suno_enabled);
|
|
3724
|
+
}
|
|
3725
|
+
if (message.gpu_textoon_enabled !== false) {
|
|
3726
|
+
writer.uint32(64).bool(message.gpu_textoon_enabled);
|
|
3727
|
+
}
|
|
3728
|
+
if (message.author_alpha_release_receipt_sha256 !== undefined) {
|
|
3729
|
+
writer.uint32(74).string(message.author_alpha_release_receipt_sha256);
|
|
3730
|
+
}
|
|
3731
|
+
if (message.player_ga_release_receipt_sha256 !== undefined) {
|
|
3732
|
+
writer.uint32(82).string(message.player_ga_release_receipt_sha256);
|
|
3733
|
+
}
|
|
3734
|
+
if (message.suno_qualification_receipt_sha256 !== undefined) {
|
|
3735
|
+
writer.uint32(90).string(message.suno_qualification_receipt_sha256);
|
|
3736
|
+
}
|
|
3737
|
+
if (message.suno_producer_receipt_sha256 !== undefined) {
|
|
3738
|
+
writer.uint32(98).string(message.suno_producer_receipt_sha256);
|
|
3739
|
+
}
|
|
3740
|
+
if (message.gpu_textoon_qualification_receipt_sha256 !== undefined) {
|
|
3741
|
+
writer.uint32(106).string(message.gpu_textoon_qualification_receipt_sha256);
|
|
3742
|
+
}
|
|
3743
|
+
if (message.gpu_textoon_producer_receipt_sha256 !== undefined) {
|
|
3744
|
+
writer.uint32(114).string(message.gpu_textoon_producer_receipt_sha256);
|
|
3745
|
+
}
|
|
3746
|
+
if (message.updated_by !== "") {
|
|
3747
|
+
writer.uint32(130).string(message.updated_by);
|
|
3748
|
+
}
|
|
3749
|
+
if (message.updated_at_ms !== "0") {
|
|
3750
|
+
writer.uint32(136).int64(message.updated_at_ms);
|
|
3751
|
+
}
|
|
3752
|
+
if (message._unknownFields !== undefined) {
|
|
3753
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
3754
|
+
const tag = parseInt(key, 10);
|
|
3755
|
+
for (const value of values) {
|
|
3756
|
+
writer.uint32(tag).raw(value);
|
|
3757
|
+
}
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3760
|
+
return writer;
|
|
3761
|
+
},
|
|
3762
|
+
decode(input, length) {
|
|
3763
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3764
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3765
|
+
const message = createBaseReleaseCapabilitySnapshot();
|
|
3766
|
+
while (reader.pos < end) {
|
|
3767
|
+
const tag = reader.uint32();
|
|
3768
|
+
switch (tag >>> 3) {
|
|
3769
|
+
case 1: {
|
|
3770
|
+
if (tag !== 8) {
|
|
3771
|
+
break;
|
|
3772
|
+
}
|
|
3773
|
+
message.schema_version = reader.uint32();
|
|
3774
|
+
continue;
|
|
3775
|
+
}
|
|
3776
|
+
case 2: {
|
|
3777
|
+
if (tag !== 16) {
|
|
3778
|
+
break;
|
|
3779
|
+
}
|
|
3780
|
+
message.revision = reader.uint64().toString();
|
|
3781
|
+
continue;
|
|
3782
|
+
}
|
|
3783
|
+
case 3: {
|
|
3784
|
+
if (tag !== 26) {
|
|
3785
|
+
break;
|
|
3786
|
+
}
|
|
3787
|
+
message.canonical_digest = reader.string();
|
|
3788
|
+
continue;
|
|
3789
|
+
}
|
|
3790
|
+
case 4: {
|
|
3791
|
+
if (tag !== 34) {
|
|
3792
|
+
break;
|
|
3793
|
+
}
|
|
3794
|
+
message.previous_canonical_digest = reader.string();
|
|
3795
|
+
continue;
|
|
3796
|
+
}
|
|
3797
|
+
case 5: {
|
|
3798
|
+
if (tag !== 40) {
|
|
3799
|
+
break;
|
|
3800
|
+
}
|
|
3801
|
+
message.author_alpha = reader.bool();
|
|
3802
|
+
continue;
|
|
3803
|
+
}
|
|
3804
|
+
case 6: {
|
|
3805
|
+
if (tag !== 48) {
|
|
3806
|
+
break;
|
|
3807
|
+
}
|
|
3808
|
+
message.player_ga = reader.bool();
|
|
3809
|
+
continue;
|
|
3810
|
+
}
|
|
3811
|
+
case 7: {
|
|
3812
|
+
if (tag !== 56) {
|
|
3813
|
+
break;
|
|
3814
|
+
}
|
|
3815
|
+
message.suno_enabled = reader.bool();
|
|
3816
|
+
continue;
|
|
3817
|
+
}
|
|
3818
|
+
case 8: {
|
|
3819
|
+
if (tag !== 64) {
|
|
3820
|
+
break;
|
|
3821
|
+
}
|
|
3822
|
+
message.gpu_textoon_enabled = reader.bool();
|
|
3823
|
+
continue;
|
|
3824
|
+
}
|
|
3825
|
+
case 9: {
|
|
3826
|
+
if (tag !== 74) {
|
|
3827
|
+
break;
|
|
3828
|
+
}
|
|
3829
|
+
message.author_alpha_release_receipt_sha256 = reader.string();
|
|
3830
|
+
continue;
|
|
3831
|
+
}
|
|
3832
|
+
case 10: {
|
|
3833
|
+
if (tag !== 82) {
|
|
3834
|
+
break;
|
|
3835
|
+
}
|
|
3836
|
+
message.player_ga_release_receipt_sha256 = reader.string();
|
|
3837
|
+
continue;
|
|
3838
|
+
}
|
|
3839
|
+
case 11: {
|
|
3840
|
+
if (tag !== 90) {
|
|
3841
|
+
break;
|
|
3842
|
+
}
|
|
3843
|
+
message.suno_qualification_receipt_sha256 = reader.string();
|
|
3844
|
+
continue;
|
|
3845
|
+
}
|
|
3846
|
+
case 12: {
|
|
3847
|
+
if (tag !== 98) {
|
|
3848
|
+
break;
|
|
3849
|
+
}
|
|
3850
|
+
message.suno_producer_receipt_sha256 = reader.string();
|
|
3851
|
+
continue;
|
|
3852
|
+
}
|
|
3853
|
+
case 13: {
|
|
3854
|
+
if (tag !== 106) {
|
|
3855
|
+
break;
|
|
3856
|
+
}
|
|
3857
|
+
message.gpu_textoon_qualification_receipt_sha256 = reader.string();
|
|
3858
|
+
continue;
|
|
3859
|
+
}
|
|
3860
|
+
case 14: {
|
|
3861
|
+
if (tag !== 114) {
|
|
3862
|
+
break;
|
|
3863
|
+
}
|
|
3864
|
+
message.gpu_textoon_producer_receipt_sha256 = reader.string();
|
|
3865
|
+
continue;
|
|
3866
|
+
}
|
|
3867
|
+
case 16: {
|
|
3868
|
+
if (tag !== 130) {
|
|
3869
|
+
break;
|
|
3870
|
+
}
|
|
3871
|
+
message.updated_by = reader.string();
|
|
3872
|
+
continue;
|
|
3873
|
+
}
|
|
3874
|
+
case 17: {
|
|
3875
|
+
if (tag !== 136) {
|
|
3876
|
+
break;
|
|
3877
|
+
}
|
|
3878
|
+
message.updated_at_ms = reader.int64().toString();
|
|
3879
|
+
continue;
|
|
3880
|
+
}
|
|
3881
|
+
}
|
|
3882
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3883
|
+
break;
|
|
3884
|
+
}
|
|
3885
|
+
const buf = reader.skip(tag & 7);
|
|
3886
|
+
const list = message._unknownFields[tag];
|
|
3887
|
+
if (list === undefined) {
|
|
3888
|
+
message._unknownFields[tag] = [buf];
|
|
3889
|
+
}
|
|
3890
|
+
else {
|
|
3891
|
+
list.push(buf);
|
|
3892
|
+
}
|
|
3893
|
+
}
|
|
3894
|
+
return message;
|
|
3895
|
+
},
|
|
3896
|
+
fromJSON(object) {
|
|
3897
|
+
return {
|
|
3898
|
+
schema_version: isSet(object.schemaVersion)
|
|
3899
|
+
? globalThis.Number(object.schemaVersion)
|
|
3900
|
+
: isSet(object.schema_version)
|
|
3901
|
+
? globalThis.Number(object.schema_version)
|
|
3902
|
+
: 0,
|
|
3903
|
+
revision: isSet(object.revision) ? globalThis.String(object.revision) : "0",
|
|
3904
|
+
canonical_digest: isSet(object.canonicalDigest)
|
|
3905
|
+
? globalThis.String(object.canonicalDigest)
|
|
3906
|
+
: isSet(object.canonical_digest)
|
|
3907
|
+
? globalThis.String(object.canonical_digest)
|
|
3908
|
+
: "",
|
|
3909
|
+
previous_canonical_digest: isSet(object.previousCanonicalDigest)
|
|
3910
|
+
? globalThis.String(object.previousCanonicalDigest)
|
|
3911
|
+
: isSet(object.previous_canonical_digest)
|
|
3912
|
+
? globalThis.String(object.previous_canonical_digest)
|
|
3913
|
+
: undefined,
|
|
3914
|
+
author_alpha: isSet(object.authorAlpha)
|
|
3915
|
+
? globalThis.Boolean(object.authorAlpha)
|
|
3916
|
+
: isSet(object.author_alpha)
|
|
3917
|
+
? globalThis.Boolean(object.author_alpha)
|
|
3918
|
+
: false,
|
|
3919
|
+
player_ga: isSet(object.playerGa)
|
|
3920
|
+
? globalThis.Boolean(object.playerGa)
|
|
3921
|
+
: isSet(object.player_ga)
|
|
3922
|
+
? globalThis.Boolean(object.player_ga)
|
|
3923
|
+
: false,
|
|
3924
|
+
suno_enabled: isSet(object.sunoEnabled)
|
|
3925
|
+
? globalThis.Boolean(object.sunoEnabled)
|
|
3926
|
+
: isSet(object.suno_enabled)
|
|
3927
|
+
? globalThis.Boolean(object.suno_enabled)
|
|
3928
|
+
: false,
|
|
3929
|
+
gpu_textoon_enabled: isSet(object.gpuTextoonEnabled)
|
|
3930
|
+
? globalThis.Boolean(object.gpuTextoonEnabled)
|
|
3931
|
+
: isSet(object.gpu_textoon_enabled)
|
|
3932
|
+
? globalThis.Boolean(object.gpu_textoon_enabled)
|
|
3933
|
+
: false,
|
|
3934
|
+
author_alpha_release_receipt_sha256: isSet(object.authorAlphaReleaseReceiptSha256)
|
|
3935
|
+
? globalThis.String(object.authorAlphaReleaseReceiptSha256)
|
|
3936
|
+
: isSet(object.author_alpha_release_receipt_sha256)
|
|
3937
|
+
? globalThis.String(object.author_alpha_release_receipt_sha256)
|
|
3938
|
+
: undefined,
|
|
3939
|
+
player_ga_release_receipt_sha256: isSet(object.playerGaReleaseReceiptSha256)
|
|
3940
|
+
? globalThis.String(object.playerGaReleaseReceiptSha256)
|
|
3941
|
+
: isSet(object.player_ga_release_receipt_sha256)
|
|
3942
|
+
? globalThis.String(object.player_ga_release_receipt_sha256)
|
|
3943
|
+
: undefined,
|
|
3944
|
+
suno_qualification_receipt_sha256: isSet(object.sunoQualificationReceiptSha256)
|
|
3945
|
+
? globalThis.String(object.sunoQualificationReceiptSha256)
|
|
3946
|
+
: isSet(object.suno_qualification_receipt_sha256)
|
|
3947
|
+
? globalThis.String(object.suno_qualification_receipt_sha256)
|
|
3948
|
+
: undefined,
|
|
3949
|
+
suno_producer_receipt_sha256: isSet(object.sunoProducerReceiptSha256)
|
|
3950
|
+
? globalThis.String(object.sunoProducerReceiptSha256)
|
|
3951
|
+
: isSet(object.suno_producer_receipt_sha256)
|
|
3952
|
+
? globalThis.String(object.suno_producer_receipt_sha256)
|
|
3953
|
+
: undefined,
|
|
3954
|
+
gpu_textoon_qualification_receipt_sha256: isSet(object.gpuTextoonQualificationReceiptSha256)
|
|
3955
|
+
? globalThis.String(object.gpuTextoonQualificationReceiptSha256)
|
|
3956
|
+
: isSet(object.gpu_textoon_qualification_receipt_sha256)
|
|
3957
|
+
? globalThis.String(object.gpu_textoon_qualification_receipt_sha256)
|
|
3958
|
+
: undefined,
|
|
3959
|
+
gpu_textoon_producer_receipt_sha256: isSet(object.gpuTextoonProducerReceiptSha256)
|
|
3960
|
+
? globalThis.String(object.gpuTextoonProducerReceiptSha256)
|
|
3961
|
+
: isSet(object.gpu_textoon_producer_receipt_sha256)
|
|
3962
|
+
? globalThis.String(object.gpu_textoon_producer_receipt_sha256)
|
|
3963
|
+
: undefined,
|
|
3964
|
+
updated_by: isSet(object.updatedBy)
|
|
3965
|
+
? globalThis.String(object.updatedBy)
|
|
3966
|
+
: isSet(object.updated_by)
|
|
3967
|
+
? globalThis.String(object.updated_by)
|
|
3968
|
+
: "",
|
|
3969
|
+
updated_at_ms: isSet(object.updatedAtMs)
|
|
3970
|
+
? globalThis.String(object.updatedAtMs)
|
|
3971
|
+
: isSet(object.updated_at_ms)
|
|
3972
|
+
? globalThis.String(object.updated_at_ms)
|
|
3973
|
+
: "0",
|
|
3974
|
+
};
|
|
3975
|
+
},
|
|
3976
|
+
toJSON(message) {
|
|
3977
|
+
const obj = {};
|
|
3978
|
+
if (message.schema_version !== 0) {
|
|
3979
|
+
obj.schemaVersion = Math.round(message.schema_version);
|
|
3980
|
+
}
|
|
3981
|
+
if (message.revision !== "0") {
|
|
3982
|
+
obj.revision = message.revision;
|
|
3983
|
+
}
|
|
3984
|
+
if (message.canonical_digest !== "") {
|
|
3985
|
+
obj.canonicalDigest = message.canonical_digest;
|
|
3986
|
+
}
|
|
3987
|
+
if (message.previous_canonical_digest !== undefined) {
|
|
3988
|
+
obj.previousCanonicalDigest = message.previous_canonical_digest;
|
|
3989
|
+
}
|
|
3990
|
+
if (message.author_alpha !== false) {
|
|
3991
|
+
obj.authorAlpha = message.author_alpha;
|
|
3992
|
+
}
|
|
3993
|
+
if (message.player_ga !== false) {
|
|
3994
|
+
obj.playerGa = message.player_ga;
|
|
3995
|
+
}
|
|
3996
|
+
if (message.suno_enabled !== false) {
|
|
3997
|
+
obj.sunoEnabled = message.suno_enabled;
|
|
3998
|
+
}
|
|
3999
|
+
if (message.gpu_textoon_enabled !== false) {
|
|
4000
|
+
obj.gpuTextoonEnabled = message.gpu_textoon_enabled;
|
|
4001
|
+
}
|
|
4002
|
+
if (message.author_alpha_release_receipt_sha256 !== undefined) {
|
|
4003
|
+
obj.authorAlphaReleaseReceiptSha256 = message.author_alpha_release_receipt_sha256;
|
|
4004
|
+
}
|
|
4005
|
+
if (message.player_ga_release_receipt_sha256 !== undefined) {
|
|
4006
|
+
obj.playerGaReleaseReceiptSha256 = message.player_ga_release_receipt_sha256;
|
|
4007
|
+
}
|
|
4008
|
+
if (message.suno_qualification_receipt_sha256 !== undefined) {
|
|
4009
|
+
obj.sunoQualificationReceiptSha256 = message.suno_qualification_receipt_sha256;
|
|
4010
|
+
}
|
|
4011
|
+
if (message.suno_producer_receipt_sha256 !== undefined) {
|
|
4012
|
+
obj.sunoProducerReceiptSha256 = message.suno_producer_receipt_sha256;
|
|
4013
|
+
}
|
|
4014
|
+
if (message.gpu_textoon_qualification_receipt_sha256 !== undefined) {
|
|
4015
|
+
obj.gpuTextoonQualificationReceiptSha256 = message.gpu_textoon_qualification_receipt_sha256;
|
|
4016
|
+
}
|
|
4017
|
+
if (message.gpu_textoon_producer_receipt_sha256 !== undefined) {
|
|
4018
|
+
obj.gpuTextoonProducerReceiptSha256 = message.gpu_textoon_producer_receipt_sha256;
|
|
4019
|
+
}
|
|
4020
|
+
if (message.updated_by !== "") {
|
|
4021
|
+
obj.updatedBy = message.updated_by;
|
|
4022
|
+
}
|
|
4023
|
+
if (message.updated_at_ms !== "0") {
|
|
4024
|
+
obj.updatedAtMs = message.updated_at_ms;
|
|
4025
|
+
}
|
|
4026
|
+
return obj;
|
|
4027
|
+
},
|
|
4028
|
+
create(base) {
|
|
4029
|
+
return ReleaseCapabilitySnapshot.fromPartial(base ?? {});
|
|
4030
|
+
},
|
|
4031
|
+
fromPartial(object) {
|
|
4032
|
+
const message = createBaseReleaseCapabilitySnapshot();
|
|
4033
|
+
message.schema_version = object.schema_version ?? 0;
|
|
4034
|
+
message.revision = object.revision ?? "0";
|
|
4035
|
+
message.canonical_digest = object.canonical_digest ?? "";
|
|
4036
|
+
message.previous_canonical_digest = object.previous_canonical_digest ?? undefined;
|
|
4037
|
+
message.author_alpha = object.author_alpha ?? false;
|
|
4038
|
+
message.player_ga = object.player_ga ?? false;
|
|
4039
|
+
message.suno_enabled = object.suno_enabled ?? false;
|
|
4040
|
+
message.gpu_textoon_enabled = object.gpu_textoon_enabled ?? false;
|
|
4041
|
+
message.author_alpha_release_receipt_sha256 = object.author_alpha_release_receipt_sha256 ?? undefined;
|
|
4042
|
+
message.player_ga_release_receipt_sha256 = object.player_ga_release_receipt_sha256 ?? undefined;
|
|
4043
|
+
message.suno_qualification_receipt_sha256 = object.suno_qualification_receipt_sha256 ?? undefined;
|
|
4044
|
+
message.suno_producer_receipt_sha256 = object.suno_producer_receipt_sha256 ?? undefined;
|
|
4045
|
+
message.gpu_textoon_qualification_receipt_sha256 = object.gpu_textoon_qualification_receipt_sha256 ?? undefined;
|
|
4046
|
+
message.gpu_textoon_producer_receipt_sha256 = object.gpu_textoon_producer_receipt_sha256 ?? undefined;
|
|
4047
|
+
message.updated_by = object.updated_by ?? "";
|
|
4048
|
+
message.updated_at_ms = object.updated_at_ms ?? "0";
|
|
4049
|
+
return message;
|
|
4050
|
+
},
|
|
4051
|
+
};
|
|
4052
|
+
function createBaseReleaseCapabilitiesResponse() {
|
|
4053
|
+
return { authority: undefined, error: undefined, _unknownFields: {} };
|
|
4054
|
+
}
|
|
4055
|
+
export const ReleaseCapabilitiesResponse = {
|
|
4056
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4057
|
+
if (message.authority !== undefined) {
|
|
4058
|
+
ReleaseCapabilitySnapshot.encode(message.authority, writer.uint32(10).fork()).join();
|
|
4059
|
+
}
|
|
4060
|
+
if (message.error !== undefined) {
|
|
4061
|
+
ErrorInfo.encode(message.error, writer.uint32(122).fork()).join();
|
|
4062
|
+
}
|
|
4063
|
+
if (message._unknownFields !== undefined) {
|
|
4064
|
+
for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
|
|
4065
|
+
const tag = parseInt(key, 10);
|
|
4066
|
+
for (const value of values) {
|
|
4067
|
+
writer.uint32(tag).raw(value);
|
|
4068
|
+
}
|
|
4069
|
+
}
|
|
4070
|
+
}
|
|
4071
|
+
return writer;
|
|
4072
|
+
},
|
|
4073
|
+
decode(input, length) {
|
|
4074
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4075
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4076
|
+
const message = createBaseReleaseCapabilitiesResponse();
|
|
4077
|
+
while (reader.pos < end) {
|
|
4078
|
+
const tag = reader.uint32();
|
|
4079
|
+
switch (tag >>> 3) {
|
|
4080
|
+
case 1: {
|
|
4081
|
+
if (tag !== 10) {
|
|
4082
|
+
break;
|
|
4083
|
+
}
|
|
4084
|
+
message.authority = ReleaseCapabilitySnapshot.decode(reader, reader.uint32());
|
|
4085
|
+
continue;
|
|
4086
|
+
}
|
|
4087
|
+
case 15: {
|
|
4088
|
+
if (tag !== 122) {
|
|
4089
|
+
break;
|
|
4090
|
+
}
|
|
4091
|
+
message.error = ErrorInfo.decode(reader, reader.uint32());
|
|
4092
|
+
continue;
|
|
4093
|
+
}
|
|
4094
|
+
}
|
|
4095
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4096
|
+
break;
|
|
4097
|
+
}
|
|
4098
|
+
const buf = reader.skip(tag & 7);
|
|
4099
|
+
const list = message._unknownFields[tag];
|
|
4100
|
+
if (list === undefined) {
|
|
4101
|
+
message._unknownFields[tag] = [buf];
|
|
4102
|
+
}
|
|
4103
|
+
else {
|
|
4104
|
+
list.push(buf);
|
|
4105
|
+
}
|
|
4106
|
+
}
|
|
4107
|
+
return message;
|
|
4108
|
+
},
|
|
4109
|
+
fromJSON(object) {
|
|
4110
|
+
return {
|
|
4111
|
+
authority: isSet(object.authority) ? ReleaseCapabilitySnapshot.fromJSON(object.authority) : undefined,
|
|
4112
|
+
error: isSet(object.error) ? ErrorInfo.fromJSON(object.error) : undefined,
|
|
4113
|
+
};
|
|
4114
|
+
},
|
|
4115
|
+
toJSON(message) {
|
|
4116
|
+
const obj = {};
|
|
4117
|
+
if (message.authority !== undefined) {
|
|
4118
|
+
obj.authority = ReleaseCapabilitySnapshot.toJSON(message.authority);
|
|
4119
|
+
}
|
|
4120
|
+
if (message.error !== undefined) {
|
|
4121
|
+
obj.error = ErrorInfo.toJSON(message.error);
|
|
4122
|
+
}
|
|
4123
|
+
return obj;
|
|
4124
|
+
},
|
|
4125
|
+
create(base) {
|
|
4126
|
+
return ReleaseCapabilitiesResponse.fromPartial(base ?? {});
|
|
4127
|
+
},
|
|
4128
|
+
fromPartial(object) {
|
|
4129
|
+
const message = createBaseReleaseCapabilitiesResponse();
|
|
4130
|
+
message.authority = (object.authority !== undefined && object.authority !== null)
|
|
4131
|
+
? ReleaseCapabilitySnapshot.fromPartial(object.authority)
|
|
4132
|
+
: undefined;
|
|
4133
|
+
message.error = (object.error !== undefined && object.error !== null)
|
|
4134
|
+
? ErrorInfo.fromPartial(object.error)
|
|
4135
|
+
: undefined;
|
|
4136
|
+
return message;
|
|
4137
|
+
},
|
|
4138
|
+
};
|
|
4139
|
+
function bytesFromBase64(b64) {
|
|
4140
|
+
if (globalThis.Buffer) {
|
|
4141
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
4142
|
+
}
|
|
4143
|
+
else {
|
|
4144
|
+
const bin = globalThis.atob(b64);
|
|
4145
|
+
const arr = new Uint8Array(bin.length);
|
|
4146
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
4147
|
+
arr[i] = bin.charCodeAt(i);
|
|
4148
|
+
}
|
|
4149
|
+
return arr;
|
|
4150
|
+
}
|
|
4151
|
+
}
|
|
4152
|
+
function base64FromBytes(arr) {
|
|
4153
|
+
if (globalThis.Buffer) {
|
|
4154
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
4155
|
+
}
|
|
4156
|
+
else {
|
|
4157
|
+
const bin = [];
|
|
4158
|
+
arr.forEach((byte) => {
|
|
4159
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
4160
|
+
});
|
|
4161
|
+
return globalThis.btoa(bin.join(""));
|
|
4162
|
+
}
|
|
4163
|
+
}
|
|
4164
|
+
function isObject(value) {
|
|
4165
|
+
return typeof value === "object" && value !== null;
|
|
4166
|
+
}
|
|
4167
|
+
function isSet(value) {
|
|
4168
|
+
return value !== null && value !== undefined;
|
|
4169
|
+
}
|