@abhishek944/pi-embeddings 0.1.0 → 0.2.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/README.md +18 -8
- package/dist/execute.js +36 -1
- package/dist/extension.js +6 -37
- package/dist/index.d.ts +1 -1
- package/dist/mcp-server.js +1 -14
- package/dist/providers.d.ts +9 -2
- package/dist/providers.js +153 -3
- package/dist/response.d.ts +6 -0
- package/dist/response.js +43 -0
- package/dist/runtime.d.ts +22 -2
- package/dist/runtime.js +12 -3
- package/dist/schemas.d.ts +408 -81
- package/dist/schemas.js +46 -16
- package/dist/settings.js +3 -1
- package/dist/tool-contracts.d.ts +327 -184
- package/dist/tool-contracts.js +2 -11
- package/package.json +1 -1
- package/src/execute.ts +40 -1
- package/src/extension.ts +10 -45
- package/src/index.ts +1 -2
- package/src/mcp-server.ts +0 -19
- package/src/providers.ts +185 -3
- package/src/response.ts +51 -0
- package/src/runtime.ts +44 -6
- package/src/schemas.ts +68 -26
- package/src/settings.ts +4 -0
- package/src/tool-contracts.ts +1 -13
package/dist/schemas.d.ts
CHANGED
|
@@ -7,18 +7,20 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Type, type Static } from 'typebox';
|
|
9
9
|
export declare const EMBEDDINGS_SETTINGS_KEY = "pi-embeddings";
|
|
10
|
-
export declare const EMBEDDINGS_PROTOCOL_VERSION =
|
|
10
|
+
export declare const EMBEDDINGS_PROTOCOL_VERSION = 2;
|
|
11
11
|
export declare const EMBEDDING_FORMAT_VERSION = "host-display-attributes-v1";
|
|
12
12
|
export declare const EMBEDDING_DOCUMENT_PREFIX = "title: none | text: ";
|
|
13
13
|
export declare const EMBEDDING_NORMALIZATION_VERSION = "finite-nonzero-l2-v1";
|
|
14
14
|
export declare const EMBEDDING_CONTEXT_META_KEY = "pi-embeddings/context";
|
|
15
|
-
export declare const EMBEDDING_ROUTE_IDS: readonly ["local", "openai", "sarvam", "gateway"];
|
|
15
|
+
export declare const EMBEDDING_ROUTE_IDS: readonly ["local", "openai", "sarvam", "gateway", "openrouter", "cloudflare"];
|
|
16
16
|
export type EmbeddingRouteId = (typeof EMBEDDING_ROUTE_IDS)[number];
|
|
17
17
|
export declare const GATEWAY_EMBEDDING_MODELS: readonly ["text-embedding-3-small", "openai/text-embedding-3-small"];
|
|
18
|
+
export declare const OPENROUTER_EMBEDDING_MODELS: readonly ["openai/text-embedding-3-small"];
|
|
19
|
+
export declare const CLOUDFLARE_EMBEDDING_MODELS: readonly ["@cf/baai/bge-base-en-v1.5"];
|
|
18
20
|
export declare const EMBEDDING_ERROR_CODES: readonly ["configuration-invalid", "route-unconfigured", "missing-credentials", "http-auth", "http-not-found", "http-rate-limit", "http-forbidden", "http-bad-request", "http-server-error", "transport-failed", "provider-response-invalid", "provider-response-mismatch", "vector-invalid", "vector-zero", "input-empty", "input-too-long", "tokenizer-roundtrip-failed", "attribution-unavailable", "local-resources-unavailable", "local-model-mismatch", "local-runtime-mismatch", "local-startup-failed", "local-cpu-startup-invalid", "cancelled", "unstarted"];
|
|
19
21
|
export type EmbeddingErrorCode = (typeof EMBEDDING_ERROR_CODES)[number];
|
|
20
22
|
export declare const embeddingRouteSchema: Type.TObject<{
|
|
21
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
23
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
22
24
|
model: Type.TString;
|
|
23
25
|
}>;
|
|
24
26
|
/**
|
|
@@ -55,19 +57,30 @@ export declare const embeddingSpaceSchema: Type.TUnion<[Type.TObject<{
|
|
|
55
57
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
56
58
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
57
59
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
60
|
+
}>, Type.TObject<{
|
|
61
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
62
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
63
|
+
revision: Type.TNull;
|
|
64
|
+
quantization: Type.TNull;
|
|
65
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
66
|
+
dimensions: Type.TLiteral<768>;
|
|
67
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
68
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
69
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
70
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
58
71
|
}>]>;
|
|
59
72
|
export declare const embeddingSettingsSchema: Type.TObject<{
|
|
60
73
|
version: Type.TOptional<Type.TLiteral<1>>;
|
|
61
74
|
default: Type.TObject<{
|
|
62
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
75
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
63
76
|
model: Type.TString;
|
|
64
77
|
}>;
|
|
65
78
|
fallback: Type.TOptional<Type.TArray<Type.TObject<{
|
|
66
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
79
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
67
80
|
model: Type.TString;
|
|
68
81
|
}>>>;
|
|
69
82
|
compare: Type.TOptional<Type.TArray<Type.TObject<{
|
|
70
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
83
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
71
84
|
model: Type.TString;
|
|
72
85
|
}>>>;
|
|
73
86
|
providers: Type.TOptional<Type.TObject<{
|
|
@@ -88,6 +101,16 @@ export declare const embeddingSettingsSchema: Type.TObject<{
|
|
|
88
101
|
model: Type.TUnion<[Type.TLiteral<"text-embedding-3-small">, Type.TLiteral<"openai/text-embedding-3-small">]>;
|
|
89
102
|
stage: Type.TUnion<[Type.TLiteral<"dev">, Type.TLiteral<"prod">]>;
|
|
90
103
|
}>>;
|
|
104
|
+
openrouter: Type.TOptional<Type.TObject<{
|
|
105
|
+
apiKey: Type.TOptional<Type.TString>;
|
|
106
|
+
}>>;
|
|
107
|
+
cloudflare: Type.TOptional<Type.TObject<{
|
|
108
|
+
accountId: Type.TOptional<Type.TString>;
|
|
109
|
+
apiKey: Type.TOptional<Type.TString>;
|
|
110
|
+
gatewayId: Type.TOptional<Type.TString>;
|
|
111
|
+
model: Type.TOptional<Type.TLiteral<"@cf/baai/bge-base-en-v1.5">>;
|
|
112
|
+
pooling: Type.TOptional<Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>>;
|
|
113
|
+
}>>;
|
|
91
114
|
}>>;
|
|
92
115
|
}>;
|
|
93
116
|
export declare const embeddingRequestSchema: Type.TObject<{
|
|
@@ -105,7 +128,7 @@ export declare const embeddingUsageSchema: Type.TObject<{
|
|
|
105
128
|
}>;
|
|
106
129
|
export declare const embeddingAttemptSchema: Type.TObject<{
|
|
107
130
|
id: Type.TString;
|
|
108
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
131
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
109
132
|
model: Type.TString;
|
|
110
133
|
routeIndex: Type.TInteger;
|
|
111
134
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|
|
@@ -120,7 +143,7 @@ export declare const embeddingOutcomeSchema: Type.TUnion<[Type.TObject<{
|
|
|
120
143
|
status: Type.TLiteral<"success">;
|
|
121
144
|
index: Type.TInteger;
|
|
122
145
|
vector: Type.TArray<Type.TNumber>;
|
|
123
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
146
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
124
147
|
model: Type.TString;
|
|
125
148
|
space: Type.TUnion<[Type.TObject<{
|
|
126
149
|
provider: Type.TLiteral<"local">;
|
|
@@ -152,6 +175,17 @@ export declare const embeddingOutcomeSchema: Type.TUnion<[Type.TObject<{
|
|
|
152
175
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
153
176
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
154
177
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
178
|
+
}>, Type.TObject<{
|
|
179
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
180
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
181
|
+
revision: Type.TNull;
|
|
182
|
+
quantization: Type.TNull;
|
|
183
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
184
|
+
dimensions: Type.TLiteral<768>;
|
|
185
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
186
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
187
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
188
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
155
189
|
}>]>;
|
|
156
190
|
attemptId: Type.TString;
|
|
157
191
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
@@ -161,13 +195,153 @@ export declare const embeddingOutcomeSchema: Type.TUnion<[Type.TObject<{
|
|
|
161
195
|
code: Type.TUnion<[Type.TLiteral<"configuration-invalid">, Type.TLiteral<"route-unconfigured">, Type.TLiteral<"missing-credentials">, Type.TLiteral<"http-auth">, Type.TLiteral<"http-not-found">, Type.TLiteral<"http-rate-limit">, Type.TLiteral<"http-forbidden">, Type.TLiteral<"http-bad-request">, Type.TLiteral<"http-server-error">, Type.TLiteral<"transport-failed">, Type.TLiteral<"provider-response-invalid">, Type.TLiteral<"provider-response-mismatch">, Type.TLiteral<"vector-invalid">, Type.TLiteral<"vector-zero">, Type.TLiteral<"input-empty">, Type.TLiteral<"input-too-long">, Type.TLiteral<"tokenizer-roundtrip-failed">, Type.TLiteral<"attribution-unavailable">, Type.TLiteral<"local-resources-unavailable">, Type.TLiteral<"local-model-mismatch">, Type.TLiteral<"local-runtime-mismatch">, Type.TLiteral<"local-startup-failed">, Type.TLiteral<"local-cpu-startup-invalid">, Type.TLiteral<"cancelled">, Type.TLiteral<"unstarted">]>;
|
|
162
196
|
attemptId: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
163
197
|
}>]>;
|
|
198
|
+
/**
|
|
199
|
+
* Actual generating identity observed on successful outcomes. `generations` is the complete set;
|
|
200
|
+
* the singular fields are populated only when every successful vector came from one generation.
|
|
201
|
+
*/
|
|
202
|
+
export declare const embeddingGenerationSchema: Type.TObject<{
|
|
203
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
204
|
+
model: Type.TString;
|
|
205
|
+
space: Type.TUnion<[Type.TObject<{
|
|
206
|
+
provider: Type.TLiteral<"local">;
|
|
207
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
208
|
+
revision: Type.TString;
|
|
209
|
+
quantization: Type.TLiteral<"Q8_0">;
|
|
210
|
+
runtime: Type.TString;
|
|
211
|
+
dimensions: Type.TLiteral<768>;
|
|
212
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
213
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
214
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
215
|
+
}>, Type.TObject<{
|
|
216
|
+
provider: Type.TLiteral<"openai">;
|
|
217
|
+
model: Type.TLiteral<"text-embedding-3-small">;
|
|
218
|
+
revision: Type.TNull;
|
|
219
|
+
quantization: Type.TNull;
|
|
220
|
+
runtime: Type.TNull;
|
|
221
|
+
dimensions: Type.TLiteral<1536>;
|
|
222
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
223
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
224
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
225
|
+
}>, Type.TObject<{
|
|
226
|
+
provider: Type.TLiteral<"sarvam">;
|
|
227
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
228
|
+
revision: Type.TNull;
|
|
229
|
+
quantization: Type.TNull;
|
|
230
|
+
runtime: Type.TLiteral<"sarvam-v2">;
|
|
231
|
+
dimensions: Type.TLiteral<768>;
|
|
232
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
233
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
234
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
235
|
+
}>, Type.TObject<{
|
|
236
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
237
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
238
|
+
revision: Type.TNull;
|
|
239
|
+
quantization: Type.TNull;
|
|
240
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
241
|
+
dimensions: Type.TLiteral<768>;
|
|
242
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
243
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
244
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
245
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
246
|
+
}>]>;
|
|
247
|
+
}>;
|
|
164
248
|
export declare const embeddingResultSchema: Type.TObject<{
|
|
165
|
-
schemaVersion: Type.TLiteral<
|
|
249
|
+
schemaVersion: Type.TLiteral<2>;
|
|
250
|
+
provider: Type.TUnion<[Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>, Type.TNull]>;
|
|
251
|
+
model: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
252
|
+
space: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
253
|
+
provider: Type.TLiteral<"local">;
|
|
254
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
255
|
+
revision: Type.TString;
|
|
256
|
+
quantization: Type.TLiteral<"Q8_0">;
|
|
257
|
+
runtime: Type.TString;
|
|
258
|
+
dimensions: Type.TLiteral<768>;
|
|
259
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
260
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
261
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
262
|
+
}>, Type.TObject<{
|
|
263
|
+
provider: Type.TLiteral<"openai">;
|
|
264
|
+
model: Type.TLiteral<"text-embedding-3-small">;
|
|
265
|
+
revision: Type.TNull;
|
|
266
|
+
quantization: Type.TNull;
|
|
267
|
+
runtime: Type.TNull;
|
|
268
|
+
dimensions: Type.TLiteral<1536>;
|
|
269
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
270
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
271
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
272
|
+
}>, Type.TObject<{
|
|
273
|
+
provider: Type.TLiteral<"sarvam">;
|
|
274
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
275
|
+
revision: Type.TNull;
|
|
276
|
+
quantization: Type.TNull;
|
|
277
|
+
runtime: Type.TLiteral<"sarvam-v2">;
|
|
278
|
+
dimensions: Type.TLiteral<768>;
|
|
279
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
280
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
281
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
282
|
+
}>, Type.TObject<{
|
|
283
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
284
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
285
|
+
revision: Type.TNull;
|
|
286
|
+
quantization: Type.TNull;
|
|
287
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
288
|
+
dimensions: Type.TLiteral<768>;
|
|
289
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
290
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
291
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
292
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
293
|
+
}>]>, Type.TNull]>;
|
|
294
|
+
generations: Type.TArray<Type.TObject<{
|
|
295
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
296
|
+
model: Type.TString;
|
|
297
|
+
space: Type.TUnion<[Type.TObject<{
|
|
298
|
+
provider: Type.TLiteral<"local">;
|
|
299
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
300
|
+
revision: Type.TString;
|
|
301
|
+
quantization: Type.TLiteral<"Q8_0">;
|
|
302
|
+
runtime: Type.TString;
|
|
303
|
+
dimensions: Type.TLiteral<768>;
|
|
304
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
305
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
306
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
307
|
+
}>, Type.TObject<{
|
|
308
|
+
provider: Type.TLiteral<"openai">;
|
|
309
|
+
model: Type.TLiteral<"text-embedding-3-small">;
|
|
310
|
+
revision: Type.TNull;
|
|
311
|
+
quantization: Type.TNull;
|
|
312
|
+
runtime: Type.TNull;
|
|
313
|
+
dimensions: Type.TLiteral<1536>;
|
|
314
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
315
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
316
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
317
|
+
}>, Type.TObject<{
|
|
318
|
+
provider: Type.TLiteral<"sarvam">;
|
|
319
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
320
|
+
revision: Type.TNull;
|
|
321
|
+
quantization: Type.TNull;
|
|
322
|
+
runtime: Type.TLiteral<"sarvam-v2">;
|
|
323
|
+
dimensions: Type.TLiteral<768>;
|
|
324
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
325
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
326
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
327
|
+
}>, Type.TObject<{
|
|
328
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
329
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
330
|
+
revision: Type.TNull;
|
|
331
|
+
quantization: Type.TNull;
|
|
332
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
333
|
+
dimensions: Type.TLiteral<768>;
|
|
334
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
335
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
336
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
337
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
338
|
+
}>]>;
|
|
339
|
+
}>>;
|
|
166
340
|
outcomes: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
167
341
|
status: Type.TLiteral<"success">;
|
|
168
342
|
index: Type.TInteger;
|
|
169
343
|
vector: Type.TArray<Type.TNumber>;
|
|
170
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
344
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
171
345
|
model: Type.TString;
|
|
172
346
|
space: Type.TUnion<[Type.TObject<{
|
|
173
347
|
provider: Type.TLiteral<"local">;
|
|
@@ -199,6 +373,17 @@ export declare const embeddingResultSchema: Type.TObject<{
|
|
|
199
373
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
200
374
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
201
375
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
376
|
+
}>, Type.TObject<{
|
|
377
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
378
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
379
|
+
revision: Type.TNull;
|
|
380
|
+
quantization: Type.TNull;
|
|
381
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
382
|
+
dimensions: Type.TLiteral<768>;
|
|
383
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
384
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
385
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
386
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
202
387
|
}>]>;
|
|
203
388
|
attemptId: Type.TString;
|
|
204
389
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
@@ -210,7 +395,7 @@ export declare const embeddingResultSchema: Type.TObject<{
|
|
|
210
395
|
}>]>>;
|
|
211
396
|
attempts: Type.TArray<Type.TObject<{
|
|
212
397
|
id: Type.TString;
|
|
213
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
398
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
214
399
|
model: Type.TString;
|
|
215
400
|
routeIndex: Type.TInteger;
|
|
216
401
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|
|
@@ -223,16 +408,106 @@ export declare const embeddingResultSchema: Type.TObject<{
|
|
|
223
408
|
}>>;
|
|
224
409
|
}>;
|
|
225
410
|
export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
226
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
411
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
227
412
|
model: Type.TString;
|
|
228
413
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|
|
229
414
|
result: Type.TObject<{
|
|
230
|
-
schemaVersion: Type.TLiteral<
|
|
415
|
+
schemaVersion: Type.TLiteral<2>;
|
|
416
|
+
provider: Type.TUnion<[Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>, Type.TNull]>;
|
|
417
|
+
model: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
418
|
+
space: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
419
|
+
provider: Type.TLiteral<"local">;
|
|
420
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
421
|
+
revision: Type.TString;
|
|
422
|
+
quantization: Type.TLiteral<"Q8_0">;
|
|
423
|
+
runtime: Type.TString;
|
|
424
|
+
dimensions: Type.TLiteral<768>;
|
|
425
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
426
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
427
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
428
|
+
}>, Type.TObject<{
|
|
429
|
+
provider: Type.TLiteral<"openai">;
|
|
430
|
+
model: Type.TLiteral<"text-embedding-3-small">;
|
|
431
|
+
revision: Type.TNull;
|
|
432
|
+
quantization: Type.TNull;
|
|
433
|
+
runtime: Type.TNull;
|
|
434
|
+
dimensions: Type.TLiteral<1536>;
|
|
435
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
436
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
437
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
438
|
+
}>, Type.TObject<{
|
|
439
|
+
provider: Type.TLiteral<"sarvam">;
|
|
440
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
441
|
+
revision: Type.TNull;
|
|
442
|
+
quantization: Type.TNull;
|
|
443
|
+
runtime: Type.TLiteral<"sarvam-v2">;
|
|
444
|
+
dimensions: Type.TLiteral<768>;
|
|
445
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
446
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
447
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
448
|
+
}>, Type.TObject<{
|
|
449
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
450
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
451
|
+
revision: Type.TNull;
|
|
452
|
+
quantization: Type.TNull;
|
|
453
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
454
|
+
dimensions: Type.TLiteral<768>;
|
|
455
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
456
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
457
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
458
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
459
|
+
}>]>, Type.TNull]>;
|
|
460
|
+
generations: Type.TArray<Type.TObject<{
|
|
461
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
462
|
+
model: Type.TString;
|
|
463
|
+
space: Type.TUnion<[Type.TObject<{
|
|
464
|
+
provider: Type.TLiteral<"local">;
|
|
465
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
466
|
+
revision: Type.TString;
|
|
467
|
+
quantization: Type.TLiteral<"Q8_0">;
|
|
468
|
+
runtime: Type.TString;
|
|
469
|
+
dimensions: Type.TLiteral<768>;
|
|
470
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
471
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
472
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
473
|
+
}>, Type.TObject<{
|
|
474
|
+
provider: Type.TLiteral<"openai">;
|
|
475
|
+
model: Type.TLiteral<"text-embedding-3-small">;
|
|
476
|
+
revision: Type.TNull;
|
|
477
|
+
quantization: Type.TNull;
|
|
478
|
+
runtime: Type.TNull;
|
|
479
|
+
dimensions: Type.TLiteral<1536>;
|
|
480
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
481
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
482
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
483
|
+
}>, Type.TObject<{
|
|
484
|
+
provider: Type.TLiteral<"sarvam">;
|
|
485
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
486
|
+
revision: Type.TNull;
|
|
487
|
+
quantization: Type.TNull;
|
|
488
|
+
runtime: Type.TLiteral<"sarvam-v2">;
|
|
489
|
+
dimensions: Type.TLiteral<768>;
|
|
490
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
491
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
492
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
493
|
+
}>, Type.TObject<{
|
|
494
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
495
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
496
|
+
revision: Type.TNull;
|
|
497
|
+
quantization: Type.TNull;
|
|
498
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
499
|
+
dimensions: Type.TLiteral<768>;
|
|
500
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
501
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
502
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
503
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
504
|
+
}>]>;
|
|
505
|
+
}>>;
|
|
231
506
|
outcomes: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
232
507
|
status: Type.TLiteral<"success">;
|
|
233
508
|
index: Type.TInteger;
|
|
234
509
|
vector: Type.TArray<Type.TNumber>;
|
|
235
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
510
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
236
511
|
model: Type.TString;
|
|
237
512
|
space: Type.TUnion<[Type.TObject<{
|
|
238
513
|
provider: Type.TLiteral<"local">;
|
|
@@ -264,6 +539,17 @@ export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
|
264
539
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
265
540
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
266
541
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
542
|
+
}>, Type.TObject<{
|
|
543
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
544
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
545
|
+
revision: Type.TNull;
|
|
546
|
+
quantization: Type.TNull;
|
|
547
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
548
|
+
dimensions: Type.TLiteral<768>;
|
|
549
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
550
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
551
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
552
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
267
553
|
}>]>;
|
|
268
554
|
attemptId: Type.TString;
|
|
269
555
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
@@ -275,7 +561,7 @@ export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
|
275
561
|
}>]>>;
|
|
276
562
|
attempts: Type.TArray<Type.TObject<{
|
|
277
563
|
id: Type.TString;
|
|
278
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
564
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
279
565
|
model: Type.TString;
|
|
280
566
|
routeIndex: Type.TInteger;
|
|
281
567
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|
|
@@ -289,18 +575,108 @@ export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
|
289
575
|
}>;
|
|
290
576
|
}>;
|
|
291
577
|
export declare const embeddingCompareResultSchema: Type.TObject<{
|
|
292
|
-
schemaVersion: Type.TLiteral<
|
|
578
|
+
schemaVersion: Type.TLiteral<2>;
|
|
293
579
|
entries: Type.TArray<Type.TObject<{
|
|
294
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
580
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
295
581
|
model: Type.TString;
|
|
296
582
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|
|
297
583
|
result: Type.TObject<{
|
|
298
|
-
schemaVersion: Type.TLiteral<
|
|
584
|
+
schemaVersion: Type.TLiteral<2>;
|
|
585
|
+
provider: Type.TUnion<[Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>, Type.TNull]>;
|
|
586
|
+
model: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
587
|
+
space: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
588
|
+
provider: Type.TLiteral<"local">;
|
|
589
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
590
|
+
revision: Type.TString;
|
|
591
|
+
quantization: Type.TLiteral<"Q8_0">;
|
|
592
|
+
runtime: Type.TString;
|
|
593
|
+
dimensions: Type.TLiteral<768>;
|
|
594
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
595
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
596
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
597
|
+
}>, Type.TObject<{
|
|
598
|
+
provider: Type.TLiteral<"openai">;
|
|
599
|
+
model: Type.TLiteral<"text-embedding-3-small">;
|
|
600
|
+
revision: Type.TNull;
|
|
601
|
+
quantization: Type.TNull;
|
|
602
|
+
runtime: Type.TNull;
|
|
603
|
+
dimensions: Type.TLiteral<1536>;
|
|
604
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
605
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
606
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
607
|
+
}>, Type.TObject<{
|
|
608
|
+
provider: Type.TLiteral<"sarvam">;
|
|
609
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
610
|
+
revision: Type.TNull;
|
|
611
|
+
quantization: Type.TNull;
|
|
612
|
+
runtime: Type.TLiteral<"sarvam-v2">;
|
|
613
|
+
dimensions: Type.TLiteral<768>;
|
|
614
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
615
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
616
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
617
|
+
}>, Type.TObject<{
|
|
618
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
619
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
620
|
+
revision: Type.TNull;
|
|
621
|
+
quantization: Type.TNull;
|
|
622
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
623
|
+
dimensions: Type.TLiteral<768>;
|
|
624
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
625
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
626
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
627
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
628
|
+
}>]>, Type.TNull]>;
|
|
629
|
+
generations: Type.TArray<Type.TObject<{
|
|
630
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
631
|
+
model: Type.TString;
|
|
632
|
+
space: Type.TUnion<[Type.TObject<{
|
|
633
|
+
provider: Type.TLiteral<"local">;
|
|
634
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
635
|
+
revision: Type.TString;
|
|
636
|
+
quantization: Type.TLiteral<"Q8_0">;
|
|
637
|
+
runtime: Type.TString;
|
|
638
|
+
dimensions: Type.TLiteral<768>;
|
|
639
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
640
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
641
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
642
|
+
}>, Type.TObject<{
|
|
643
|
+
provider: Type.TLiteral<"openai">;
|
|
644
|
+
model: Type.TLiteral<"text-embedding-3-small">;
|
|
645
|
+
revision: Type.TNull;
|
|
646
|
+
quantization: Type.TNull;
|
|
647
|
+
runtime: Type.TNull;
|
|
648
|
+
dimensions: Type.TLiteral<1536>;
|
|
649
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
650
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
651
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
652
|
+
}>, Type.TObject<{
|
|
653
|
+
provider: Type.TLiteral<"sarvam">;
|
|
654
|
+
model: Type.TLiteral<"embeddinggemma-2">;
|
|
655
|
+
revision: Type.TNull;
|
|
656
|
+
quantization: Type.TNull;
|
|
657
|
+
runtime: Type.TLiteral<"sarvam-v2">;
|
|
658
|
+
dimensions: Type.TLiteral<768>;
|
|
659
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
660
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
661
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
662
|
+
}>, Type.TObject<{
|
|
663
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
664
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
665
|
+
revision: Type.TNull;
|
|
666
|
+
quantization: Type.TNull;
|
|
667
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
668
|
+
dimensions: Type.TLiteral<768>;
|
|
669
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
670
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
671
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
672
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
673
|
+
}>]>;
|
|
674
|
+
}>>;
|
|
299
675
|
outcomes: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
300
676
|
status: Type.TLiteral<"success">;
|
|
301
677
|
index: Type.TInteger;
|
|
302
678
|
vector: Type.TArray<Type.TNumber>;
|
|
303
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
679
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
304
680
|
model: Type.TString;
|
|
305
681
|
space: Type.TUnion<[Type.TObject<{
|
|
306
682
|
provider: Type.TLiteral<"local">;
|
|
@@ -332,6 +708,17 @@ export declare const embeddingCompareResultSchema: Type.TObject<{
|
|
|
332
708
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
333
709
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
334
710
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
711
|
+
}>, Type.TObject<{
|
|
712
|
+
provider: Type.TLiteral<"cloudflare">;
|
|
713
|
+
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
714
|
+
revision: Type.TNull;
|
|
715
|
+
quantization: Type.TNull;
|
|
716
|
+
runtime: Type.TLiteral<"cloudflare-workers-ai">;
|
|
717
|
+
dimensions: Type.TLiteral<768>;
|
|
718
|
+
pooling: Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>;
|
|
719
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
720
|
+
prefix: Type.TLiteral<"title: none | text: ">;
|
|
721
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
335
722
|
}>]>;
|
|
336
723
|
attemptId: Type.TString;
|
|
337
724
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
@@ -343,7 +730,7 @@ export declare const embeddingCompareResultSchema: Type.TObject<{
|
|
|
343
730
|
}>]>>;
|
|
344
731
|
attempts: Type.TArray<Type.TObject<{
|
|
345
732
|
id: Type.TString;
|
|
346
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
733
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
347
734
|
model: Type.TString;
|
|
348
735
|
routeIndex: Type.TInteger;
|
|
349
736
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|
|
@@ -357,65 +744,6 @@ export declare const embeddingCompareResultSchema: Type.TObject<{
|
|
|
357
744
|
}>;
|
|
358
745
|
}>>;
|
|
359
746
|
}>;
|
|
360
|
-
export declare const embeddingDiagnosticSchema: Type.TObject<{
|
|
361
|
-
code: Type.TString;
|
|
362
|
-
severity: Type.TUnion<[Type.TLiteral<"error">, Type.TLiteral<"warning">, Type.TLiteral<"info">]>;
|
|
363
|
-
}>;
|
|
364
|
-
export declare const embeddingDescribeSchema: Type.TObject<{
|
|
365
|
-
schemaVersion: Type.TLiteral<1>;
|
|
366
|
-
ready: Type.TBoolean;
|
|
367
|
-
selected: Type.TObject<{
|
|
368
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
369
|
-
model: Type.TString;
|
|
370
|
-
}>;
|
|
371
|
-
space: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
372
|
-
provider: Type.TLiteral<"local">;
|
|
373
|
-
model: Type.TLiteral<"embeddinggemma-2">;
|
|
374
|
-
revision: Type.TString;
|
|
375
|
-
quantization: Type.TLiteral<"Q8_0">;
|
|
376
|
-
runtime: Type.TString;
|
|
377
|
-
dimensions: Type.TLiteral<768>;
|
|
378
|
-
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
379
|
-
prefix: Type.TLiteral<"title: none | text: ">;
|
|
380
|
-
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
381
|
-
}>, Type.TObject<{
|
|
382
|
-
provider: Type.TLiteral<"openai">;
|
|
383
|
-
model: Type.TLiteral<"text-embedding-3-small">;
|
|
384
|
-
revision: Type.TNull;
|
|
385
|
-
quantization: Type.TNull;
|
|
386
|
-
runtime: Type.TNull;
|
|
387
|
-
dimensions: Type.TLiteral<1536>;
|
|
388
|
-
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
389
|
-
prefix: Type.TLiteral<"title: none | text: ">;
|
|
390
|
-
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
391
|
-
}>, Type.TObject<{
|
|
392
|
-
provider: Type.TLiteral<"sarvam">;
|
|
393
|
-
model: Type.TLiteral<"embeddinggemma-2">;
|
|
394
|
-
revision: Type.TNull;
|
|
395
|
-
quantization: Type.TNull;
|
|
396
|
-
runtime: Type.TLiteral<"sarvam-v2">;
|
|
397
|
-
dimensions: Type.TLiteral<768>;
|
|
398
|
-
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
399
|
-
prefix: Type.TLiteral<"title: none | text: ">;
|
|
400
|
-
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
401
|
-
}>]>, Type.TNull]>;
|
|
402
|
-
default: Type.TObject<{
|
|
403
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
404
|
-
model: Type.TString;
|
|
405
|
-
}>;
|
|
406
|
-
fallback: Type.TArray<Type.TObject<{
|
|
407
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
408
|
-
model: Type.TString;
|
|
409
|
-
}>>;
|
|
410
|
-
compare: Type.TArray<Type.TObject<{
|
|
411
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
|
|
412
|
-
model: Type.TString;
|
|
413
|
-
}>>;
|
|
414
|
-
diagnostics: Type.TArray<Type.TObject<{
|
|
415
|
-
code: Type.TString;
|
|
416
|
-
severity: Type.TUnion<[Type.TLiteral<"error">, Type.TLiteral<"warning">, Type.TLiteral<"info">]>;
|
|
417
|
-
}>>;
|
|
418
|
-
}>;
|
|
419
747
|
export type EmbeddingSettings = Static<typeof embeddingSettingsSchema>;
|
|
420
748
|
export type EmbeddingRoute = Static<typeof embeddingRouteSchema>;
|
|
421
749
|
export type EmbeddingSpace = Static<typeof embeddingSpaceSchema>;
|
|
@@ -424,8 +752,7 @@ export type EmbeddingContext = Static<typeof embeddingContextSchema>;
|
|
|
424
752
|
export type EmbeddingUsage = Static<typeof embeddingUsageSchema>;
|
|
425
753
|
export type EmbeddingAttempt = Static<typeof embeddingAttemptSchema>;
|
|
426
754
|
export type EmbeddingOutcome = Static<typeof embeddingOutcomeSchema>;
|
|
755
|
+
export type EmbeddingGeneration = Static<typeof embeddingGenerationSchema>;
|
|
427
756
|
export type EmbeddingResult = Static<typeof embeddingResultSchema>;
|
|
428
757
|
export type EmbeddingCompareEntry = Static<typeof embeddingCompareEntrySchema>;
|
|
429
758
|
export type EmbeddingCompareResult = Static<typeof embeddingCompareResultSchema>;
|
|
430
|
-
export type EmbeddingDiagnostic = Static<typeof embeddingDiagnosticSchema>;
|
|
431
|
-
export type EmbeddingDescribe = Static<typeof embeddingDescribeSchema>;
|