@abhishek944/pi-embeddings 0.2.0 → 0.4.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 +44 -4
- package/dist/execute.js +20 -2
- package/dist/extension.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/providers.d.ts +5 -1
- package/dist/providers.js +112 -2
- package/dist/response.d.ts +15 -0
- package/dist/response.js +72 -0
- package/dist/schemas.d.ts +317 -22
- package/dist/schemas.js +91 -0
- package/dist/settings-write.js +2 -2
- package/dist/settings.js +6 -1
- package/dist/tool-contracts.d.ts +141 -9
- package/dist/vertex-provider.d.ts +18 -0
- package/dist/vertex-provider.js +139 -0
- package/package.json +9 -2
- package/src/execute.ts +19 -2
- package/src/extension.ts +2 -2
- package/src/index.ts +10 -0
- package/src/providers.ts +138 -1
- package/src/response.ts +84 -0
- package/src/schemas.ts +112 -0
- package/src/settings-write.ts +2 -2
- package/src/settings.ts +6 -0
- package/src/vertex-provider.ts +152 -0
package/dist/schemas.d.ts
CHANGED
|
@@ -12,15 +12,35 @@ 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", "openrouter", "cloudflare"];
|
|
15
|
+
export declare const EMBEDDING_ROUTE_IDS: readonly ["local", "openai", "sarvam", "gateway", "openrouter", "cloudflare", "gemini", "vertex"];
|
|
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
18
|
export declare const OPENROUTER_EMBEDDING_MODELS: readonly ["openai/text-embedding-3-small"];
|
|
19
19
|
export declare const CLOUDFLARE_EMBEDDING_MODELS: readonly ["@cf/baai/bge-base-en-v1.5"];
|
|
20
|
+
export declare const GEMINI_EMBEDDING_MODELS: readonly ["gemini-embedding-2"];
|
|
21
|
+
export declare const GEMINI_EMBEDDING_MIN_DIMENSIONS = 128;
|
|
22
|
+
export declare const GEMINI_EMBEDDING_MAX_DIMENSIONS = 3072;
|
|
23
|
+
export declare const DEFAULT_GEMINI_DIMENSIONS = 3072;
|
|
24
|
+
export declare const GEMINI_EMBEDDING_TASK_FORMATS: readonly ["retrieval-document", "search-query", "question-answering", "fact-checking", "code-retrieval", "classification", "clustering", "sentence-similarity"];
|
|
25
|
+
export declare const DEFAULT_GEMINI_TASK_FORMAT: GeminiEmbeddingTaskFormat;
|
|
26
|
+
export type GeminiEmbeddingDimension = number;
|
|
27
|
+
export type GeminiEmbeddingTaskFormat = (typeof GEMINI_EMBEDDING_TASK_FORMATS)[number];
|
|
28
|
+
/** Official Gemini Embedding 2 text task prefixes. `task_type` is not used for this model. */
|
|
29
|
+
export declare const GEMINI_TASK_PREFIXES: {
|
|
30
|
+
readonly 'retrieval-document': "title: none | text: ";
|
|
31
|
+
readonly 'search-query': "task: search result | query: ";
|
|
32
|
+
readonly 'question-answering': "task: question answering | query: ";
|
|
33
|
+
readonly 'fact-checking': "task: fact checking | query: ";
|
|
34
|
+
readonly 'code-retrieval': "task: code retrieval | query: ";
|
|
35
|
+
readonly classification: "task: classification | query: ";
|
|
36
|
+
readonly clustering: "task: clustering | query: ";
|
|
37
|
+
readonly 'sentence-similarity': "task: sentence similarity | query: ";
|
|
38
|
+
};
|
|
39
|
+
export declare const VERTEX_EMBEDDING_LOCATIONS: readonly ["us", "eu", "global"];
|
|
20
40
|
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"];
|
|
21
41
|
export type EmbeddingErrorCode = (typeof EMBEDDING_ERROR_CODES)[number];
|
|
22
42
|
export declare const embeddingRouteSchema: Type.TObject<{
|
|
23
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
43
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
24
44
|
model: Type.TString;
|
|
25
45
|
}>;
|
|
26
46
|
/**
|
|
@@ -57,6 +77,28 @@ export declare const embeddingSpaceSchema: Type.TUnion<[Type.TObject<{
|
|
|
57
77
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
58
78
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
59
79
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
80
|
+
}>, Type.TObject<{
|
|
81
|
+
provider: Type.TLiteral<"gemini">;
|
|
82
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
83
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
84
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
85
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
86
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
87
|
+
revision: Type.TNull;
|
|
88
|
+
quantization: Type.TNull;
|
|
89
|
+
dimensions: Type.TInteger;
|
|
90
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
91
|
+
}>, Type.TObject<{
|
|
92
|
+
provider: Type.TLiteral<"vertex">;
|
|
93
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
94
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
95
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
96
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
97
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
98
|
+
revision: Type.TNull;
|
|
99
|
+
quantization: Type.TNull;
|
|
100
|
+
dimensions: Type.TInteger;
|
|
101
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
60
102
|
}>, Type.TObject<{
|
|
61
103
|
provider: Type.TLiteral<"cloudflare">;
|
|
62
104
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -72,15 +114,15 @@ export declare const embeddingSpaceSchema: Type.TUnion<[Type.TObject<{
|
|
|
72
114
|
export declare const embeddingSettingsSchema: Type.TObject<{
|
|
73
115
|
version: Type.TOptional<Type.TLiteral<1>>;
|
|
74
116
|
default: Type.TObject<{
|
|
75
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
117
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
76
118
|
model: Type.TString;
|
|
77
119
|
}>;
|
|
78
120
|
fallback: Type.TOptional<Type.TArray<Type.TObject<{
|
|
79
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
121
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
80
122
|
model: Type.TString;
|
|
81
123
|
}>>>;
|
|
82
124
|
compare: Type.TOptional<Type.TArray<Type.TObject<{
|
|
83
|
-
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
125
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
84
126
|
model: Type.TString;
|
|
85
127
|
}>>>;
|
|
86
128
|
providers: Type.TOptional<Type.TObject<{
|
|
@@ -111,6 +153,17 @@ export declare const embeddingSettingsSchema: Type.TObject<{
|
|
|
111
153
|
model: Type.TOptional<Type.TLiteral<"@cf/baai/bge-base-en-v1.5">>;
|
|
112
154
|
pooling: Type.TOptional<Type.TUnion<[Type.TLiteral<"mean">, Type.TLiteral<"cls">]>>;
|
|
113
155
|
}>>;
|
|
156
|
+
vertex: Type.TOptional<Type.TObject<{
|
|
157
|
+
project: Type.TString;
|
|
158
|
+
location: Type.TUnion<[Type.TLiteral<"us">, Type.TLiteral<"eu">, Type.TLiteral<"global">]>;
|
|
159
|
+
dimensions: Type.TInteger;
|
|
160
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
161
|
+
}>>;
|
|
162
|
+
gemini: Type.TOptional<Type.TObject<{
|
|
163
|
+
apiKey: Type.TOptional<Type.TString>;
|
|
164
|
+
dimensions: Type.TOptional<Type.TInteger>;
|
|
165
|
+
taskFormat: Type.TOptional<Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>>;
|
|
166
|
+
}>>;
|
|
114
167
|
}>>;
|
|
115
168
|
}>;
|
|
116
169
|
export declare const embeddingRequestSchema: Type.TObject<{
|
|
@@ -128,7 +181,7 @@ export declare const embeddingUsageSchema: Type.TObject<{
|
|
|
128
181
|
}>;
|
|
129
182
|
export declare const embeddingAttemptSchema: Type.TObject<{
|
|
130
183
|
id: Type.TString;
|
|
131
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
184
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
132
185
|
model: Type.TString;
|
|
133
186
|
routeIndex: Type.TInteger;
|
|
134
187
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|
|
@@ -143,7 +196,7 @@ export declare const embeddingOutcomeSchema: Type.TUnion<[Type.TObject<{
|
|
|
143
196
|
status: Type.TLiteral<"success">;
|
|
144
197
|
index: Type.TInteger;
|
|
145
198
|
vector: Type.TArray<Type.TNumber>;
|
|
146
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
199
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
147
200
|
model: Type.TString;
|
|
148
201
|
space: Type.TUnion<[Type.TObject<{
|
|
149
202
|
provider: Type.TLiteral<"local">;
|
|
@@ -175,6 +228,28 @@ export declare const embeddingOutcomeSchema: Type.TUnion<[Type.TObject<{
|
|
|
175
228
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
176
229
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
177
230
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
231
|
+
}>, Type.TObject<{
|
|
232
|
+
provider: Type.TLiteral<"gemini">;
|
|
233
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
234
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
235
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
236
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
237
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
238
|
+
revision: Type.TNull;
|
|
239
|
+
quantization: Type.TNull;
|
|
240
|
+
dimensions: Type.TInteger;
|
|
241
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
242
|
+
}>, Type.TObject<{
|
|
243
|
+
provider: Type.TLiteral<"vertex">;
|
|
244
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
245
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
246
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
247
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
248
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
249
|
+
revision: Type.TNull;
|
|
250
|
+
quantization: Type.TNull;
|
|
251
|
+
dimensions: Type.TInteger;
|
|
252
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
178
253
|
}>, Type.TObject<{
|
|
179
254
|
provider: Type.TLiteral<"cloudflare">;
|
|
180
255
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -200,7 +275,7 @@ export declare const embeddingOutcomeSchema: Type.TUnion<[Type.TObject<{
|
|
|
200
275
|
* the singular fields are populated only when every successful vector came from one generation.
|
|
201
276
|
*/
|
|
202
277
|
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">]>;
|
|
278
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
204
279
|
model: Type.TString;
|
|
205
280
|
space: Type.TUnion<[Type.TObject<{
|
|
206
281
|
provider: Type.TLiteral<"local">;
|
|
@@ -232,6 +307,28 @@ export declare const embeddingGenerationSchema: Type.TObject<{
|
|
|
232
307
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
233
308
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
234
309
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
310
|
+
}>, Type.TObject<{
|
|
311
|
+
provider: Type.TLiteral<"gemini">;
|
|
312
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
313
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
314
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
315
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
316
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
317
|
+
revision: Type.TNull;
|
|
318
|
+
quantization: Type.TNull;
|
|
319
|
+
dimensions: Type.TInteger;
|
|
320
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
321
|
+
}>, Type.TObject<{
|
|
322
|
+
provider: Type.TLiteral<"vertex">;
|
|
323
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
324
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
325
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
326
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
327
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
328
|
+
revision: Type.TNull;
|
|
329
|
+
quantization: Type.TNull;
|
|
330
|
+
dimensions: Type.TInteger;
|
|
331
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
235
332
|
}>, Type.TObject<{
|
|
236
333
|
provider: Type.TLiteral<"cloudflare">;
|
|
237
334
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -247,7 +344,7 @@ export declare const embeddingGenerationSchema: Type.TObject<{
|
|
|
247
344
|
}>;
|
|
248
345
|
export declare const embeddingResultSchema: Type.TObject<{
|
|
249
346
|
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]>;
|
|
347
|
+
provider: Type.TUnion<[Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>, Type.TNull]>;
|
|
251
348
|
model: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
252
349
|
space: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
253
350
|
provider: Type.TLiteral<"local">;
|
|
@@ -279,6 +376,28 @@ export declare const embeddingResultSchema: Type.TObject<{
|
|
|
279
376
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
280
377
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
281
378
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
379
|
+
}>, Type.TObject<{
|
|
380
|
+
provider: Type.TLiteral<"gemini">;
|
|
381
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
382
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
383
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
384
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
385
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
386
|
+
revision: Type.TNull;
|
|
387
|
+
quantization: Type.TNull;
|
|
388
|
+
dimensions: Type.TInteger;
|
|
389
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
390
|
+
}>, Type.TObject<{
|
|
391
|
+
provider: Type.TLiteral<"vertex">;
|
|
392
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
393
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
394
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
395
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
396
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
397
|
+
revision: Type.TNull;
|
|
398
|
+
quantization: Type.TNull;
|
|
399
|
+
dimensions: Type.TInteger;
|
|
400
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
282
401
|
}>, Type.TObject<{
|
|
283
402
|
provider: Type.TLiteral<"cloudflare">;
|
|
284
403
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -292,7 +411,7 @@ export declare const embeddingResultSchema: Type.TObject<{
|
|
|
292
411
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
293
412
|
}>]>, Type.TNull]>;
|
|
294
413
|
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">]>;
|
|
414
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
296
415
|
model: Type.TString;
|
|
297
416
|
space: Type.TUnion<[Type.TObject<{
|
|
298
417
|
provider: Type.TLiteral<"local">;
|
|
@@ -324,6 +443,28 @@ export declare const embeddingResultSchema: Type.TObject<{
|
|
|
324
443
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
325
444
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
326
445
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
446
|
+
}>, Type.TObject<{
|
|
447
|
+
provider: Type.TLiteral<"gemini">;
|
|
448
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
449
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
450
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
451
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
452
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
453
|
+
revision: Type.TNull;
|
|
454
|
+
quantization: Type.TNull;
|
|
455
|
+
dimensions: Type.TInteger;
|
|
456
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
457
|
+
}>, Type.TObject<{
|
|
458
|
+
provider: Type.TLiteral<"vertex">;
|
|
459
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
460
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
461
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
462
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
463
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
464
|
+
revision: Type.TNull;
|
|
465
|
+
quantization: Type.TNull;
|
|
466
|
+
dimensions: Type.TInteger;
|
|
467
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
327
468
|
}>, Type.TObject<{
|
|
328
469
|
provider: Type.TLiteral<"cloudflare">;
|
|
329
470
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -341,7 +482,7 @@ export declare const embeddingResultSchema: Type.TObject<{
|
|
|
341
482
|
status: Type.TLiteral<"success">;
|
|
342
483
|
index: Type.TInteger;
|
|
343
484
|
vector: Type.TArray<Type.TNumber>;
|
|
344
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
485
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
345
486
|
model: Type.TString;
|
|
346
487
|
space: Type.TUnion<[Type.TObject<{
|
|
347
488
|
provider: Type.TLiteral<"local">;
|
|
@@ -373,6 +514,28 @@ export declare const embeddingResultSchema: Type.TObject<{
|
|
|
373
514
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
374
515
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
375
516
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
517
|
+
}>, Type.TObject<{
|
|
518
|
+
provider: Type.TLiteral<"gemini">;
|
|
519
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
520
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
521
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
522
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
523
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
524
|
+
revision: Type.TNull;
|
|
525
|
+
quantization: Type.TNull;
|
|
526
|
+
dimensions: Type.TInteger;
|
|
527
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
528
|
+
}>, Type.TObject<{
|
|
529
|
+
provider: Type.TLiteral<"vertex">;
|
|
530
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
531
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
532
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
533
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
534
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
535
|
+
revision: Type.TNull;
|
|
536
|
+
quantization: Type.TNull;
|
|
537
|
+
dimensions: Type.TInteger;
|
|
538
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
376
539
|
}>, Type.TObject<{
|
|
377
540
|
provider: Type.TLiteral<"cloudflare">;
|
|
378
541
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -395,7 +558,7 @@ export declare const embeddingResultSchema: Type.TObject<{
|
|
|
395
558
|
}>]>>;
|
|
396
559
|
attempts: Type.TArray<Type.TObject<{
|
|
397
560
|
id: Type.TString;
|
|
398
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
561
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
399
562
|
model: Type.TString;
|
|
400
563
|
routeIndex: Type.TInteger;
|
|
401
564
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|
|
@@ -408,12 +571,12 @@ export declare const embeddingResultSchema: Type.TObject<{
|
|
|
408
571
|
}>>;
|
|
409
572
|
}>;
|
|
410
573
|
export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
411
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
574
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
412
575
|
model: Type.TString;
|
|
413
576
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|
|
414
577
|
result: Type.TObject<{
|
|
415
578
|
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]>;
|
|
579
|
+
provider: Type.TUnion<[Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>, Type.TNull]>;
|
|
417
580
|
model: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
418
581
|
space: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
419
582
|
provider: Type.TLiteral<"local">;
|
|
@@ -445,6 +608,28 @@ export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
|
445
608
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
446
609
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
447
610
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
611
|
+
}>, Type.TObject<{
|
|
612
|
+
provider: Type.TLiteral<"gemini">;
|
|
613
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
614
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
615
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
616
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
617
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
618
|
+
revision: Type.TNull;
|
|
619
|
+
quantization: Type.TNull;
|
|
620
|
+
dimensions: Type.TInteger;
|
|
621
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
622
|
+
}>, Type.TObject<{
|
|
623
|
+
provider: Type.TLiteral<"vertex">;
|
|
624
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
625
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
626
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
627
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
628
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
629
|
+
revision: Type.TNull;
|
|
630
|
+
quantization: Type.TNull;
|
|
631
|
+
dimensions: Type.TInteger;
|
|
632
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
448
633
|
}>, Type.TObject<{
|
|
449
634
|
provider: Type.TLiteral<"cloudflare">;
|
|
450
635
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -458,7 +643,7 @@ export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
|
458
643
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
459
644
|
}>]>, Type.TNull]>;
|
|
460
645
|
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">]>;
|
|
646
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
462
647
|
model: Type.TString;
|
|
463
648
|
space: Type.TUnion<[Type.TObject<{
|
|
464
649
|
provider: Type.TLiteral<"local">;
|
|
@@ -490,6 +675,28 @@ export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
|
490
675
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
491
676
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
492
677
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
678
|
+
}>, Type.TObject<{
|
|
679
|
+
provider: Type.TLiteral<"gemini">;
|
|
680
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
681
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
682
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
683
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
684
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
685
|
+
revision: Type.TNull;
|
|
686
|
+
quantization: Type.TNull;
|
|
687
|
+
dimensions: Type.TInteger;
|
|
688
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
689
|
+
}>, Type.TObject<{
|
|
690
|
+
provider: Type.TLiteral<"vertex">;
|
|
691
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
692
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
693
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
694
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
695
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
696
|
+
revision: Type.TNull;
|
|
697
|
+
quantization: Type.TNull;
|
|
698
|
+
dimensions: Type.TInteger;
|
|
699
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
493
700
|
}>, Type.TObject<{
|
|
494
701
|
provider: Type.TLiteral<"cloudflare">;
|
|
495
702
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -507,7 +714,7 @@ export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
|
507
714
|
status: Type.TLiteral<"success">;
|
|
508
715
|
index: Type.TInteger;
|
|
509
716
|
vector: Type.TArray<Type.TNumber>;
|
|
510
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
717
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
511
718
|
model: Type.TString;
|
|
512
719
|
space: Type.TUnion<[Type.TObject<{
|
|
513
720
|
provider: Type.TLiteral<"local">;
|
|
@@ -539,6 +746,28 @@ export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
|
539
746
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
540
747
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
541
748
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
749
|
+
}>, Type.TObject<{
|
|
750
|
+
provider: Type.TLiteral<"gemini">;
|
|
751
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
752
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
753
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
754
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
755
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
756
|
+
revision: Type.TNull;
|
|
757
|
+
quantization: Type.TNull;
|
|
758
|
+
dimensions: Type.TInteger;
|
|
759
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
760
|
+
}>, Type.TObject<{
|
|
761
|
+
provider: Type.TLiteral<"vertex">;
|
|
762
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
763
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
764
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
765
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
766
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
767
|
+
revision: Type.TNull;
|
|
768
|
+
quantization: Type.TNull;
|
|
769
|
+
dimensions: Type.TInteger;
|
|
770
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
542
771
|
}>, Type.TObject<{
|
|
543
772
|
provider: Type.TLiteral<"cloudflare">;
|
|
544
773
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -561,7 +790,7 @@ export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
|
561
790
|
}>]>>;
|
|
562
791
|
attempts: Type.TArray<Type.TObject<{
|
|
563
792
|
id: Type.TString;
|
|
564
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
793
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
565
794
|
model: Type.TString;
|
|
566
795
|
routeIndex: Type.TInteger;
|
|
567
796
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|
|
@@ -577,12 +806,12 @@ export declare const embeddingCompareEntrySchema: Type.TObject<{
|
|
|
577
806
|
export declare const embeddingCompareResultSchema: Type.TObject<{
|
|
578
807
|
schemaVersion: Type.TLiteral<2>;
|
|
579
808
|
entries: Type.TArray<Type.TObject<{
|
|
580
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
809
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
581
810
|
model: Type.TString;
|
|
582
811
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|
|
583
812
|
result: Type.TObject<{
|
|
584
813
|
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]>;
|
|
814
|
+
provider: Type.TUnion<[Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>, Type.TNull]>;
|
|
586
815
|
model: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
587
816
|
space: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
588
817
|
provider: Type.TLiteral<"local">;
|
|
@@ -614,6 +843,28 @@ export declare const embeddingCompareResultSchema: Type.TObject<{
|
|
|
614
843
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
615
844
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
616
845
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
846
|
+
}>, Type.TObject<{
|
|
847
|
+
provider: Type.TLiteral<"gemini">;
|
|
848
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
849
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
850
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
851
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
852
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
853
|
+
revision: Type.TNull;
|
|
854
|
+
quantization: Type.TNull;
|
|
855
|
+
dimensions: Type.TInteger;
|
|
856
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
857
|
+
}>, Type.TObject<{
|
|
858
|
+
provider: Type.TLiteral<"vertex">;
|
|
859
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
860
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
861
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
862
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
863
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
864
|
+
revision: Type.TNull;
|
|
865
|
+
quantization: Type.TNull;
|
|
866
|
+
dimensions: Type.TInteger;
|
|
867
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
617
868
|
}>, Type.TObject<{
|
|
618
869
|
provider: Type.TLiteral<"cloudflare">;
|
|
619
870
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -627,7 +878,7 @@ export declare const embeddingCompareResultSchema: Type.TObject<{
|
|
|
627
878
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
628
879
|
}>]>, Type.TNull]>;
|
|
629
880
|
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">]>;
|
|
881
|
+
provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
631
882
|
model: Type.TString;
|
|
632
883
|
space: Type.TUnion<[Type.TObject<{
|
|
633
884
|
provider: Type.TLiteral<"local">;
|
|
@@ -659,6 +910,28 @@ export declare const embeddingCompareResultSchema: Type.TObject<{
|
|
|
659
910
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
660
911
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
661
912
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
913
|
+
}>, Type.TObject<{
|
|
914
|
+
provider: Type.TLiteral<"gemini">;
|
|
915
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
916
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
917
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
918
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
919
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
920
|
+
revision: Type.TNull;
|
|
921
|
+
quantization: Type.TNull;
|
|
922
|
+
dimensions: Type.TInteger;
|
|
923
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
924
|
+
}>, Type.TObject<{
|
|
925
|
+
provider: Type.TLiteral<"vertex">;
|
|
926
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
927
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
928
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
929
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
930
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
931
|
+
revision: Type.TNull;
|
|
932
|
+
quantization: Type.TNull;
|
|
933
|
+
dimensions: Type.TInteger;
|
|
934
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
662
935
|
}>, Type.TObject<{
|
|
663
936
|
provider: Type.TLiteral<"cloudflare">;
|
|
664
937
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -676,7 +949,7 @@ export declare const embeddingCompareResultSchema: Type.TObject<{
|
|
|
676
949
|
status: Type.TLiteral<"success">;
|
|
677
950
|
index: Type.TInteger;
|
|
678
951
|
vector: Type.TArray<Type.TNumber>;
|
|
679
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
952
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
680
953
|
model: Type.TString;
|
|
681
954
|
space: Type.TUnion<[Type.TObject<{
|
|
682
955
|
provider: Type.TLiteral<"local">;
|
|
@@ -708,6 +981,28 @@ export declare const embeddingCompareResultSchema: Type.TObject<{
|
|
|
708
981
|
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
709
982
|
prefix: Type.TLiteral<"title: none | text: ">;
|
|
710
983
|
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
984
|
+
}>, Type.TObject<{
|
|
985
|
+
provider: Type.TLiteral<"gemini">;
|
|
986
|
+
runtime: Type.TLiteral<"gemini-api-v1beta">;
|
|
987
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
988
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
989
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
990
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
991
|
+
revision: Type.TNull;
|
|
992
|
+
quantization: Type.TNull;
|
|
993
|
+
dimensions: Type.TInteger;
|
|
994
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
995
|
+
}>, Type.TObject<{
|
|
996
|
+
provider: Type.TLiteral<"vertex">;
|
|
997
|
+
runtime: Type.TLiteral<"vertex-ai-v1">;
|
|
998
|
+
format: Type.TLiteral<"host-display-attributes-v1">;
|
|
999
|
+
prefix: Type.TUnion<[Type.TLiteral<"title: none | text: ">, Type.TLiteral<"task: search result | query: ">, Type.TLiteral<"task: question answering | query: ">, Type.TLiteral<"task: fact checking | query: ">, Type.TLiteral<"task: code retrieval | query: ">, Type.TLiteral<"task: classification | query: ">, Type.TLiteral<"task: clustering | query: ">, Type.TLiteral<"task: sentence similarity | query: ">]>;
|
|
1000
|
+
normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
|
|
1001
|
+
model: Type.TLiteral<"gemini-embedding-2">;
|
|
1002
|
+
revision: Type.TNull;
|
|
1003
|
+
quantization: Type.TNull;
|
|
1004
|
+
dimensions: Type.TInteger;
|
|
1005
|
+
taskFormat: Type.TUnion<[Type.TLiteral<"retrieval-document">, Type.TLiteral<"search-query">, Type.TLiteral<"question-answering">, Type.TLiteral<"fact-checking">, Type.TLiteral<"code-retrieval">, Type.TLiteral<"classification">, Type.TLiteral<"clustering">, Type.TLiteral<"sentence-similarity">]>;
|
|
711
1006
|
}>, Type.TObject<{
|
|
712
1007
|
provider: Type.TLiteral<"cloudflare">;
|
|
713
1008
|
model: Type.TLiteral<"@cf/baai/bge-base-en-v1.5">;
|
|
@@ -730,7 +1025,7 @@ export declare const embeddingCompareResultSchema: Type.TObject<{
|
|
|
730
1025
|
}>]>>;
|
|
731
1026
|
attempts: Type.TArray<Type.TObject<{
|
|
732
1027
|
id: Type.TString;
|
|
733
|
-
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">]>;
|
|
1028
|
+
route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">, Type.TLiteral<"openrouter">, Type.TLiteral<"cloudflare">, Type.TLiteral<"gemini">, Type.TLiteral<"vertex">]>;
|
|
734
1029
|
model: Type.TString;
|
|
735
1030
|
routeIndex: Type.TInteger;
|
|
736
1031
|
status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
|