@dailydotdev/schema 0.1.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 +661 -0
- package/README.md +1 -0
- package/dist/bragi/pipelines_connect.cjs +133 -0
- package/dist/bragi/pipelines_connect.d.cts +113 -0
- package/dist/bragi/pipelines_connect.d.ts +113 -0
- package/dist/bragi/pipelines_connect.js +110 -0
- package/dist/bragi/pipelines_pb.cjs +842 -0
- package/dist/bragi/pipelines_pb.d.cts +467 -0
- package/dist/bragi/pipelines_pb.d.ts +467 -0
- package/dist/bragi/pipelines_pb.js +801 -0
- package/dist/bragi/proxy_connect.cjs +88 -0
- package/dist/bragi/proxy_connect.d.cts +68 -0
- package/dist/bragi/proxy_connect.d.ts +68 -0
- package/dist/bragi/proxy_connect.js +65 -0
- package/dist/bragi/proxy_pb.cjs +595 -0
- package/dist/bragi/proxy_pb.d.cts +332 -0
- package/dist/bragi/proxy_pb.d.ts +332 -0
- package/dist/bragi/proxy_pb.js +561 -0
- package/dist/daily-api/posts_connect.cjs +44 -0
- package/dist/daily-api/posts_connect.d.cts +24 -0
- package/dist/daily-api/posts_connect.d.ts +24 -0
- package/dist/daily-api/posts_connect.js +21 -0
- package/dist/daily-api/posts_pb.cjs +122 -0
- package/dist/daily-api/posts_pb.d.cts +50 -0
- package/dist/daily-api/posts_pb.d.ts +50 -0
- package/dist/daily-api/posts_pb.js +98 -0
- package/dist/feed/personalised/personalised_pb.cjs +122 -0
- package/dist/feed/personalised/personalised_pb.d.cts +50 -0
- package/dist/feed/personalised/personalised_pb.d.ts +50 -0
- package/dist/feed/personalised/personalised_pb.js +98 -0
- package/dist/index.cjs +39 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +10 -0
- package/dist/snotra/engagement/engagement_pb.cjs +201 -0
- package/dist/snotra/engagement/engagement_pb.d.cts +133 -0
- package/dist/snotra/engagement/engagement_pb.d.ts +133 -0
- package/dist/snotra/engagement/engagement_pb.js +175 -0
- package/dist/snotra/personalisation/personalisation_pb.cjs +431 -0
- package/dist/snotra/personalisation/personalisation_pb.d.cts +226 -0
- package/dist/snotra/personalisation/personalisation_pb.d.ts +226 -0
- package/dist/snotra/personalisation/personalisation_pb.js +400 -0
- package/dist/util/error_pb.cjs +71 -0
- package/dist/util/error_pb.d.cts +25 -0
- package/dist/util/error_pb.d.ts +25 -0
- package/dist/util/error_pb.js +48 -0
- package/package.json +44 -0
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var proxy_pb_exports = {};
|
|
19
|
+
__export(proxy_pb_exports, {
|
|
20
|
+
ChatAudit: () => ChatAudit,
|
|
21
|
+
ChatDelta: () => ChatDelta,
|
|
22
|
+
ChatMessage: () => ChatMessage,
|
|
23
|
+
ChatRequest: () => ChatRequest,
|
|
24
|
+
ChatResponse: () => ChatResponse,
|
|
25
|
+
ChatStreamResponse: () => ChatStreamResponse,
|
|
26
|
+
CompletionRequest: () => CompletionRequest,
|
|
27
|
+
Embedding: () => Embedding,
|
|
28
|
+
EmbeddingRequest: () => EmbeddingRequest,
|
|
29
|
+
EmbeddingResponse: () => EmbeddingResponse,
|
|
30
|
+
ModelProvider: () => ModelProvider,
|
|
31
|
+
Usage: () => Usage
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(proxy_pb_exports);
|
|
34
|
+
var import_protobuf = require("@bufbuild/protobuf");
|
|
35
|
+
var ModelProvider = /* @__PURE__ */ ((ModelProvider2) => {
|
|
36
|
+
ModelProvider2[ModelProvider2["OpenAI"] = 0] = "OpenAI";
|
|
37
|
+
ModelProvider2[ModelProvider2["Azure"] = 1] = "Azure";
|
|
38
|
+
return ModelProvider2;
|
|
39
|
+
})(ModelProvider || {});
|
|
40
|
+
import_protobuf.proto3.util.setEnumType(ModelProvider, "bragi.proxy.ModelProvider", [
|
|
41
|
+
{ no: 0, name: "OpenAI" },
|
|
42
|
+
{ no: 1, name: "Azure" }
|
|
43
|
+
]);
|
|
44
|
+
class ChatMessage extends import_protobuf.Message {
|
|
45
|
+
/**
|
|
46
|
+
* @generated from field: string role = 1;
|
|
47
|
+
*/
|
|
48
|
+
role = "";
|
|
49
|
+
/**
|
|
50
|
+
* @generated from field: string content = 2;
|
|
51
|
+
*/
|
|
52
|
+
content = "";
|
|
53
|
+
constructor(data) {
|
|
54
|
+
super();
|
|
55
|
+
import_protobuf.proto3.util.initPartial(data, this);
|
|
56
|
+
}
|
|
57
|
+
static runtime = import_protobuf.proto3;
|
|
58
|
+
static typeName = "bragi.proxy.ChatMessage";
|
|
59
|
+
static fields = import_protobuf.proto3.util.newFieldList(() => [
|
|
60
|
+
{
|
|
61
|
+
no: 1,
|
|
62
|
+
name: "role",
|
|
63
|
+
kind: "scalar",
|
|
64
|
+
T: 9
|
|
65
|
+
/* ScalarType.STRING */
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
no: 2,
|
|
69
|
+
name: "content",
|
|
70
|
+
kind: "scalar",
|
|
71
|
+
T: 9
|
|
72
|
+
/* ScalarType.STRING */
|
|
73
|
+
}
|
|
74
|
+
]);
|
|
75
|
+
static fromBinary(bytes, options) {
|
|
76
|
+
return new ChatMessage().fromBinary(bytes, options);
|
|
77
|
+
}
|
|
78
|
+
static fromJson(jsonValue, options) {
|
|
79
|
+
return new ChatMessage().fromJson(jsonValue, options);
|
|
80
|
+
}
|
|
81
|
+
static fromJsonString(jsonString, options) {
|
|
82
|
+
return new ChatMessage().fromJsonString(jsonString, options);
|
|
83
|
+
}
|
|
84
|
+
static equals(a, b) {
|
|
85
|
+
return import_protobuf.proto3.util.equals(ChatMessage, a, b);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
class ChatDelta extends import_protobuf.Message {
|
|
89
|
+
/**
|
|
90
|
+
* @generated from field: google.protobuf.StringValue role = 1;
|
|
91
|
+
*/
|
|
92
|
+
role;
|
|
93
|
+
/**
|
|
94
|
+
* @generated from field: google.protobuf.StringValue content = 2;
|
|
95
|
+
*/
|
|
96
|
+
content;
|
|
97
|
+
constructor(data) {
|
|
98
|
+
super();
|
|
99
|
+
import_protobuf.proto3.util.initPartial(data, this);
|
|
100
|
+
}
|
|
101
|
+
static runtime = import_protobuf.proto3;
|
|
102
|
+
static typeName = "bragi.proxy.ChatDelta";
|
|
103
|
+
static fields = import_protobuf.proto3.util.newFieldList(() => [
|
|
104
|
+
{ no: 1, name: "role", kind: "message", T: import_protobuf.StringValue },
|
|
105
|
+
{ no: 2, name: "content", kind: "message", T: import_protobuf.StringValue }
|
|
106
|
+
]);
|
|
107
|
+
static fromBinary(bytes, options) {
|
|
108
|
+
return new ChatDelta().fromBinary(bytes, options);
|
|
109
|
+
}
|
|
110
|
+
static fromJson(jsonValue, options) {
|
|
111
|
+
return new ChatDelta().fromJson(jsonValue, options);
|
|
112
|
+
}
|
|
113
|
+
static fromJsonString(jsonString, options) {
|
|
114
|
+
return new ChatDelta().fromJsonString(jsonString, options);
|
|
115
|
+
}
|
|
116
|
+
static equals(a, b) {
|
|
117
|
+
return import_protobuf.proto3.util.equals(ChatDelta, a, b);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
class Usage extends import_protobuf.Message {
|
|
121
|
+
/**
|
|
122
|
+
* @generated from field: uint32 prompt_tokens = 1;
|
|
123
|
+
*/
|
|
124
|
+
promptTokens = 0;
|
|
125
|
+
/**
|
|
126
|
+
* @generated from field: uint32 completion_tokens = 2;
|
|
127
|
+
*/
|
|
128
|
+
completionTokens = 0;
|
|
129
|
+
/**
|
|
130
|
+
* @generated from field: uint32 total_tokens = 3;
|
|
131
|
+
*/
|
|
132
|
+
totalTokens = 0;
|
|
133
|
+
constructor(data) {
|
|
134
|
+
super();
|
|
135
|
+
import_protobuf.proto3.util.initPartial(data, this);
|
|
136
|
+
}
|
|
137
|
+
static runtime = import_protobuf.proto3;
|
|
138
|
+
static typeName = "bragi.proxy.Usage";
|
|
139
|
+
static fields = import_protobuf.proto3.util.newFieldList(() => [
|
|
140
|
+
{
|
|
141
|
+
no: 1,
|
|
142
|
+
name: "prompt_tokens",
|
|
143
|
+
kind: "scalar",
|
|
144
|
+
T: 13
|
|
145
|
+
/* ScalarType.UINT32 */
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
no: 2,
|
|
149
|
+
name: "completion_tokens",
|
|
150
|
+
kind: "scalar",
|
|
151
|
+
T: 13
|
|
152
|
+
/* ScalarType.UINT32 */
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
no: 3,
|
|
156
|
+
name: "total_tokens",
|
|
157
|
+
kind: "scalar",
|
|
158
|
+
T: 13
|
|
159
|
+
/* ScalarType.UINT32 */
|
|
160
|
+
}
|
|
161
|
+
]);
|
|
162
|
+
static fromBinary(bytes, options) {
|
|
163
|
+
return new Usage().fromBinary(bytes, options);
|
|
164
|
+
}
|
|
165
|
+
static fromJson(jsonValue, options) {
|
|
166
|
+
return new Usage().fromJson(jsonValue, options);
|
|
167
|
+
}
|
|
168
|
+
static fromJsonString(jsonString, options) {
|
|
169
|
+
return new Usage().fromJsonString(jsonString, options);
|
|
170
|
+
}
|
|
171
|
+
static equals(a, b) {
|
|
172
|
+
return import_protobuf.proto3.util.equals(Usage, a, b);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
class CompletionRequest extends import_protobuf.Message {
|
|
176
|
+
/**
|
|
177
|
+
* Used to separate between different types of requests, mostly for future purposes (etc. search query, answer, content enrichment)
|
|
178
|
+
*
|
|
179
|
+
* @generated from field: string application = 1;
|
|
180
|
+
*/
|
|
181
|
+
application = "";
|
|
182
|
+
/**
|
|
183
|
+
* Model provider defaults to OpenAI
|
|
184
|
+
*
|
|
185
|
+
* @generated from field: bragi.proxy.ModelProvider provider = 2;
|
|
186
|
+
*/
|
|
187
|
+
provider = 0 /* OpenAI */;
|
|
188
|
+
/**
|
|
189
|
+
* Model name
|
|
190
|
+
*
|
|
191
|
+
* @generated from field: string model = 3;
|
|
192
|
+
*/
|
|
193
|
+
model = "";
|
|
194
|
+
/**
|
|
195
|
+
* Prompt text
|
|
196
|
+
*
|
|
197
|
+
* @generated from field: string prompt = 4;
|
|
198
|
+
*/
|
|
199
|
+
prompt = "";
|
|
200
|
+
/**
|
|
201
|
+
* Max output tokens (optional)
|
|
202
|
+
*
|
|
203
|
+
* @generated from field: optional google.protobuf.UInt32Value max_tokens = 5;
|
|
204
|
+
*/
|
|
205
|
+
maxTokens;
|
|
206
|
+
/**
|
|
207
|
+
* Model's temperature (optional)
|
|
208
|
+
*
|
|
209
|
+
* @generated from field: optional google.protobuf.FloatValue temperature = 6;
|
|
210
|
+
*/
|
|
211
|
+
temperature;
|
|
212
|
+
constructor(data) {
|
|
213
|
+
super();
|
|
214
|
+
import_protobuf.proto3.util.initPartial(data, this);
|
|
215
|
+
}
|
|
216
|
+
static runtime = import_protobuf.proto3;
|
|
217
|
+
static typeName = "bragi.proxy.CompletionRequest";
|
|
218
|
+
static fields = import_protobuf.proto3.util.newFieldList(() => [
|
|
219
|
+
{
|
|
220
|
+
no: 1,
|
|
221
|
+
name: "application",
|
|
222
|
+
kind: "scalar",
|
|
223
|
+
T: 9
|
|
224
|
+
/* ScalarType.STRING */
|
|
225
|
+
},
|
|
226
|
+
{ no: 2, name: "provider", kind: "enum", T: import_protobuf.proto3.getEnumType(ModelProvider) },
|
|
227
|
+
{
|
|
228
|
+
no: 3,
|
|
229
|
+
name: "model",
|
|
230
|
+
kind: "scalar",
|
|
231
|
+
T: 9
|
|
232
|
+
/* ScalarType.STRING */
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
no: 4,
|
|
236
|
+
name: "prompt",
|
|
237
|
+
kind: "scalar",
|
|
238
|
+
T: 9
|
|
239
|
+
/* ScalarType.STRING */
|
|
240
|
+
},
|
|
241
|
+
{ no: 5, name: "max_tokens", kind: "message", T: import_protobuf.UInt32Value, opt: true },
|
|
242
|
+
{ no: 6, name: "temperature", kind: "message", T: import_protobuf.FloatValue, opt: true }
|
|
243
|
+
]);
|
|
244
|
+
static fromBinary(bytes, options) {
|
|
245
|
+
return new CompletionRequest().fromBinary(bytes, options);
|
|
246
|
+
}
|
|
247
|
+
static fromJson(jsonValue, options) {
|
|
248
|
+
return new CompletionRequest().fromJson(jsonValue, options);
|
|
249
|
+
}
|
|
250
|
+
static fromJsonString(jsonString, options) {
|
|
251
|
+
return new CompletionRequest().fromJsonString(jsonString, options);
|
|
252
|
+
}
|
|
253
|
+
static equals(a, b) {
|
|
254
|
+
return import_protobuf.proto3.util.equals(CompletionRequest, a, b);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
class ChatRequest extends import_protobuf.Message {
|
|
258
|
+
/**
|
|
259
|
+
* Used to separate between different types of requests, mostly for future purposes (etc. search query, answer, content enrichment)
|
|
260
|
+
*
|
|
261
|
+
* @generated from field: string application = 1;
|
|
262
|
+
*/
|
|
263
|
+
application = "";
|
|
264
|
+
/**
|
|
265
|
+
* Model provider defaults to OpenAI
|
|
266
|
+
*
|
|
267
|
+
* @generated from field: bragi.proxy.ModelProvider provider = 2;
|
|
268
|
+
*/
|
|
269
|
+
provider = 0 /* OpenAI */;
|
|
270
|
+
/**
|
|
271
|
+
* Model name
|
|
272
|
+
*
|
|
273
|
+
* @generated from field: string model = 3;
|
|
274
|
+
*/
|
|
275
|
+
model = "";
|
|
276
|
+
/**
|
|
277
|
+
* Array of messages
|
|
278
|
+
*
|
|
279
|
+
* @generated from field: repeated bragi.proxy.ChatMessage messages = 4;
|
|
280
|
+
*/
|
|
281
|
+
messages = [];
|
|
282
|
+
/**
|
|
283
|
+
* Max output tokens (optional)
|
|
284
|
+
*
|
|
285
|
+
* @generated from field: optional google.protobuf.UInt32Value max_tokens = 5;
|
|
286
|
+
*/
|
|
287
|
+
maxTokens;
|
|
288
|
+
/**
|
|
289
|
+
* Model's temperature (optional)
|
|
290
|
+
*
|
|
291
|
+
* @generated from field: optional google.protobuf.FloatValue temperature = 6;
|
|
292
|
+
*/
|
|
293
|
+
temperature;
|
|
294
|
+
constructor(data) {
|
|
295
|
+
super();
|
|
296
|
+
import_protobuf.proto3.util.initPartial(data, this);
|
|
297
|
+
}
|
|
298
|
+
static runtime = import_protobuf.proto3;
|
|
299
|
+
static typeName = "bragi.proxy.ChatRequest";
|
|
300
|
+
static fields = import_protobuf.proto3.util.newFieldList(() => [
|
|
301
|
+
{
|
|
302
|
+
no: 1,
|
|
303
|
+
name: "application",
|
|
304
|
+
kind: "scalar",
|
|
305
|
+
T: 9
|
|
306
|
+
/* ScalarType.STRING */
|
|
307
|
+
},
|
|
308
|
+
{ no: 2, name: "provider", kind: "enum", T: import_protobuf.proto3.getEnumType(ModelProvider) },
|
|
309
|
+
{
|
|
310
|
+
no: 3,
|
|
311
|
+
name: "model",
|
|
312
|
+
kind: "scalar",
|
|
313
|
+
T: 9
|
|
314
|
+
/* ScalarType.STRING */
|
|
315
|
+
},
|
|
316
|
+
{ no: 4, name: "messages", kind: "message", T: ChatMessage, repeated: true },
|
|
317
|
+
{ no: 5, name: "max_tokens", kind: "message", T: import_protobuf.UInt32Value, opt: true },
|
|
318
|
+
{ no: 6, name: "temperature", kind: "message", T: import_protobuf.FloatValue, opt: true }
|
|
319
|
+
]);
|
|
320
|
+
static fromBinary(bytes, options) {
|
|
321
|
+
return new ChatRequest().fromBinary(bytes, options);
|
|
322
|
+
}
|
|
323
|
+
static fromJson(jsonValue, options) {
|
|
324
|
+
return new ChatRequest().fromJson(jsonValue, options);
|
|
325
|
+
}
|
|
326
|
+
static fromJsonString(jsonString, options) {
|
|
327
|
+
return new ChatRequest().fromJsonString(jsonString, options);
|
|
328
|
+
}
|
|
329
|
+
static equals(a, b) {
|
|
330
|
+
return import_protobuf.proto3.util.equals(ChatRequest, a, b);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
class ChatResponse extends import_protobuf.Message {
|
|
334
|
+
/**
|
|
335
|
+
* @generated from field: string id = 1;
|
|
336
|
+
*/
|
|
337
|
+
id = "";
|
|
338
|
+
/**
|
|
339
|
+
* @generated from field: bragi.proxy.ChatMessage message = 2;
|
|
340
|
+
*/
|
|
341
|
+
message;
|
|
342
|
+
/**
|
|
343
|
+
* @generated from field: string finish_reason = 3;
|
|
344
|
+
*/
|
|
345
|
+
finishReason = "";
|
|
346
|
+
/**
|
|
347
|
+
* @generated from field: bragi.proxy.Usage usage = 4;
|
|
348
|
+
*/
|
|
349
|
+
usage;
|
|
350
|
+
constructor(data) {
|
|
351
|
+
super();
|
|
352
|
+
import_protobuf.proto3.util.initPartial(data, this);
|
|
353
|
+
}
|
|
354
|
+
static runtime = import_protobuf.proto3;
|
|
355
|
+
static typeName = "bragi.proxy.ChatResponse";
|
|
356
|
+
static fields = import_protobuf.proto3.util.newFieldList(() => [
|
|
357
|
+
{
|
|
358
|
+
no: 1,
|
|
359
|
+
name: "id",
|
|
360
|
+
kind: "scalar",
|
|
361
|
+
T: 9
|
|
362
|
+
/* ScalarType.STRING */
|
|
363
|
+
},
|
|
364
|
+
{ no: 2, name: "message", kind: "message", T: ChatMessage },
|
|
365
|
+
{
|
|
366
|
+
no: 3,
|
|
367
|
+
name: "finish_reason",
|
|
368
|
+
kind: "scalar",
|
|
369
|
+
T: 9
|
|
370
|
+
/* ScalarType.STRING */
|
|
371
|
+
},
|
|
372
|
+
{ no: 4, name: "usage", kind: "message", T: Usage }
|
|
373
|
+
]);
|
|
374
|
+
static fromBinary(bytes, options) {
|
|
375
|
+
return new ChatResponse().fromBinary(bytes, options);
|
|
376
|
+
}
|
|
377
|
+
static fromJson(jsonValue, options) {
|
|
378
|
+
return new ChatResponse().fromJson(jsonValue, options);
|
|
379
|
+
}
|
|
380
|
+
static fromJsonString(jsonString, options) {
|
|
381
|
+
return new ChatResponse().fromJsonString(jsonString, options);
|
|
382
|
+
}
|
|
383
|
+
static equals(a, b) {
|
|
384
|
+
return import_protobuf.proto3.util.equals(ChatResponse, a, b);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
class ChatStreamResponse extends import_protobuf.Message {
|
|
388
|
+
/**
|
|
389
|
+
* @generated from field: string id = 1;
|
|
390
|
+
*/
|
|
391
|
+
id = "";
|
|
392
|
+
/**
|
|
393
|
+
* @generated from field: bragi.proxy.ChatDelta delta = 2;
|
|
394
|
+
*/
|
|
395
|
+
delta;
|
|
396
|
+
/**
|
|
397
|
+
* @generated from field: google.protobuf.StringValue finish_reason = 3;
|
|
398
|
+
*/
|
|
399
|
+
finishReason;
|
|
400
|
+
constructor(data) {
|
|
401
|
+
super();
|
|
402
|
+
import_protobuf.proto3.util.initPartial(data, this);
|
|
403
|
+
}
|
|
404
|
+
static runtime = import_protobuf.proto3;
|
|
405
|
+
static typeName = "bragi.proxy.ChatStreamResponse";
|
|
406
|
+
static fields = import_protobuf.proto3.util.newFieldList(() => [
|
|
407
|
+
{
|
|
408
|
+
no: 1,
|
|
409
|
+
name: "id",
|
|
410
|
+
kind: "scalar",
|
|
411
|
+
T: 9
|
|
412
|
+
/* ScalarType.STRING */
|
|
413
|
+
},
|
|
414
|
+
{ no: 2, name: "delta", kind: "message", T: ChatDelta },
|
|
415
|
+
{ no: 3, name: "finish_reason", kind: "message", T: import_protobuf.StringValue }
|
|
416
|
+
]);
|
|
417
|
+
static fromBinary(bytes, options) {
|
|
418
|
+
return new ChatStreamResponse().fromBinary(bytes, options);
|
|
419
|
+
}
|
|
420
|
+
static fromJson(jsonValue, options) {
|
|
421
|
+
return new ChatStreamResponse().fromJson(jsonValue, options);
|
|
422
|
+
}
|
|
423
|
+
static fromJsonString(jsonString, options) {
|
|
424
|
+
return new ChatStreamResponse().fromJsonString(jsonString, options);
|
|
425
|
+
}
|
|
426
|
+
static equals(a, b) {
|
|
427
|
+
return import_protobuf.proto3.util.equals(ChatStreamResponse, a, b);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
class EmbeddingRequest extends import_protobuf.Message {
|
|
431
|
+
/**
|
|
432
|
+
* Model provider defaults to OpenAI
|
|
433
|
+
*
|
|
434
|
+
* @generated from field: bragi.proxy.ModelProvider provider = 1;
|
|
435
|
+
*/
|
|
436
|
+
provider = 0 /* OpenAI */;
|
|
437
|
+
/**
|
|
438
|
+
* Model name
|
|
439
|
+
*
|
|
440
|
+
* @generated from field: string model = 2;
|
|
441
|
+
*/
|
|
442
|
+
model = "";
|
|
443
|
+
/**
|
|
444
|
+
* Array of input strings
|
|
445
|
+
*
|
|
446
|
+
* @generated from field: repeated string input = 3;
|
|
447
|
+
*/
|
|
448
|
+
input = [];
|
|
449
|
+
constructor(data) {
|
|
450
|
+
super();
|
|
451
|
+
import_protobuf.proto3.util.initPartial(data, this);
|
|
452
|
+
}
|
|
453
|
+
static runtime = import_protobuf.proto3;
|
|
454
|
+
static typeName = "bragi.proxy.EmbeddingRequest";
|
|
455
|
+
static fields = import_protobuf.proto3.util.newFieldList(() => [
|
|
456
|
+
{ no: 1, name: "provider", kind: "enum", T: import_protobuf.proto3.getEnumType(ModelProvider) },
|
|
457
|
+
{
|
|
458
|
+
no: 2,
|
|
459
|
+
name: "model",
|
|
460
|
+
kind: "scalar",
|
|
461
|
+
T: 9
|
|
462
|
+
/* ScalarType.STRING */
|
|
463
|
+
},
|
|
464
|
+
{ no: 3, name: "input", kind: "scalar", T: 9, repeated: true }
|
|
465
|
+
]);
|
|
466
|
+
static fromBinary(bytes, options) {
|
|
467
|
+
return new EmbeddingRequest().fromBinary(bytes, options);
|
|
468
|
+
}
|
|
469
|
+
static fromJson(jsonValue, options) {
|
|
470
|
+
return new EmbeddingRequest().fromJson(jsonValue, options);
|
|
471
|
+
}
|
|
472
|
+
static fromJsonString(jsonString, options) {
|
|
473
|
+
return new EmbeddingRequest().fromJsonString(jsonString, options);
|
|
474
|
+
}
|
|
475
|
+
static equals(a, b) {
|
|
476
|
+
return import_protobuf.proto3.util.equals(EmbeddingRequest, a, b);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
class Embedding extends import_protobuf.Message {
|
|
480
|
+
/**
|
|
481
|
+
* @generated from field: repeated float embedding = 1;
|
|
482
|
+
*/
|
|
483
|
+
embedding = [];
|
|
484
|
+
constructor(data) {
|
|
485
|
+
super();
|
|
486
|
+
import_protobuf.proto3.util.initPartial(data, this);
|
|
487
|
+
}
|
|
488
|
+
static runtime = import_protobuf.proto3;
|
|
489
|
+
static typeName = "bragi.proxy.Embedding";
|
|
490
|
+
static fields = import_protobuf.proto3.util.newFieldList(() => [
|
|
491
|
+
{ no: 1, name: "embedding", kind: "scalar", T: 2, repeated: true }
|
|
492
|
+
]);
|
|
493
|
+
static fromBinary(bytes, options) {
|
|
494
|
+
return new Embedding().fromBinary(bytes, options);
|
|
495
|
+
}
|
|
496
|
+
static fromJson(jsonValue, options) {
|
|
497
|
+
return new Embedding().fromJson(jsonValue, options);
|
|
498
|
+
}
|
|
499
|
+
static fromJsonString(jsonString, options) {
|
|
500
|
+
return new Embedding().fromJsonString(jsonString, options);
|
|
501
|
+
}
|
|
502
|
+
static equals(a, b) {
|
|
503
|
+
return import_protobuf.proto3.util.equals(Embedding, a, b);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
class EmbeddingResponse extends import_protobuf.Message {
|
|
507
|
+
/**
|
|
508
|
+
* @generated from field: repeated bragi.proxy.Embedding data = 1;
|
|
509
|
+
*/
|
|
510
|
+
data = [];
|
|
511
|
+
/**
|
|
512
|
+
* @generated from field: bragi.proxy.Usage usage = 2;
|
|
513
|
+
*/
|
|
514
|
+
usage;
|
|
515
|
+
constructor(data) {
|
|
516
|
+
super();
|
|
517
|
+
import_protobuf.proto3.util.initPartial(data, this);
|
|
518
|
+
}
|
|
519
|
+
static runtime = import_protobuf.proto3;
|
|
520
|
+
static typeName = "bragi.proxy.EmbeddingResponse";
|
|
521
|
+
static fields = import_protobuf.proto3.util.newFieldList(() => [
|
|
522
|
+
{ no: 1, name: "data", kind: "message", T: Embedding, repeated: true },
|
|
523
|
+
{ no: 2, name: "usage", kind: "message", T: Usage }
|
|
524
|
+
]);
|
|
525
|
+
static fromBinary(bytes, options) {
|
|
526
|
+
return new EmbeddingResponse().fromBinary(bytes, options);
|
|
527
|
+
}
|
|
528
|
+
static fromJson(jsonValue, options) {
|
|
529
|
+
return new EmbeddingResponse().fromJson(jsonValue, options);
|
|
530
|
+
}
|
|
531
|
+
static fromJsonString(jsonString, options) {
|
|
532
|
+
return new EmbeddingResponse().fromJsonString(jsonString, options);
|
|
533
|
+
}
|
|
534
|
+
static equals(a, b) {
|
|
535
|
+
return import_protobuf.proto3.util.equals(EmbeddingResponse, a, b);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
class ChatAudit extends import_protobuf.Message {
|
|
539
|
+
/**
|
|
540
|
+
* @generated from field: bragi.proxy.ChatRequest request = 1;
|
|
541
|
+
*/
|
|
542
|
+
request;
|
|
543
|
+
/**
|
|
544
|
+
* @generated from field: bragi.proxy.ChatResponse response = 2;
|
|
545
|
+
*/
|
|
546
|
+
response;
|
|
547
|
+
/**
|
|
548
|
+
* @generated from field: bool stream = 3;
|
|
549
|
+
*/
|
|
550
|
+
stream = false;
|
|
551
|
+
constructor(data) {
|
|
552
|
+
super();
|
|
553
|
+
import_protobuf.proto3.util.initPartial(data, this);
|
|
554
|
+
}
|
|
555
|
+
static runtime = import_protobuf.proto3;
|
|
556
|
+
static typeName = "bragi.proxy.ChatAudit";
|
|
557
|
+
static fields = import_protobuf.proto3.util.newFieldList(() => [
|
|
558
|
+
{ no: 1, name: "request", kind: "message", T: ChatRequest },
|
|
559
|
+
{ no: 2, name: "response", kind: "message", T: ChatResponse },
|
|
560
|
+
{
|
|
561
|
+
no: 3,
|
|
562
|
+
name: "stream",
|
|
563
|
+
kind: "scalar",
|
|
564
|
+
T: 8
|
|
565
|
+
/* ScalarType.BOOL */
|
|
566
|
+
}
|
|
567
|
+
]);
|
|
568
|
+
static fromBinary(bytes, options) {
|
|
569
|
+
return new ChatAudit().fromBinary(bytes, options);
|
|
570
|
+
}
|
|
571
|
+
static fromJson(jsonValue, options) {
|
|
572
|
+
return new ChatAudit().fromJson(jsonValue, options);
|
|
573
|
+
}
|
|
574
|
+
static fromJsonString(jsonString, options) {
|
|
575
|
+
return new ChatAudit().fromJsonString(jsonString, options);
|
|
576
|
+
}
|
|
577
|
+
static equals(a, b) {
|
|
578
|
+
return import_protobuf.proto3.util.equals(ChatAudit, a, b);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
582
|
+
0 && (module.exports = {
|
|
583
|
+
ChatAudit,
|
|
584
|
+
ChatDelta,
|
|
585
|
+
ChatMessage,
|
|
586
|
+
ChatRequest,
|
|
587
|
+
ChatResponse,
|
|
588
|
+
ChatStreamResponse,
|
|
589
|
+
CompletionRequest,
|
|
590
|
+
Embedding,
|
|
591
|
+
EmbeddingRequest,
|
|
592
|
+
EmbeddingResponse,
|
|
593
|
+
ModelProvider,
|
|
594
|
+
Usage
|
|
595
|
+
});
|