@functional-systems/lambdadb 0.8.1 → 0.9.0-dev.40319878689001
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/CHANGELOG.md +37 -0
- package/README.md +60 -8
- package/RUNTIMES.md +2 -2
- package/dist/commonjs/client.d.ts +1 -1
- package/dist/commonjs/client.d.ts.map +1 -1
- package/dist/commonjs/client.js +11 -7
- package/dist/commonjs/client.js.map +1 -1
- package/dist/commonjs/compat/qdrant/conversions.d.ts.map +1 -1
- package/dist/commonjs/compat/qdrant/conversions.js +0 -4
- package/dist/commonjs/compat/qdrant/conversions.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/models/indexconfigsunion.d.ts +5 -7
- package/dist/commonjs/models/indexconfigsunion.d.ts.map +1 -1
- package/dist/commonjs/models/indexconfigsunion.js +6 -6
- package/dist/commonjs/models/indexconfigsunion.js.map +1 -1
- package/dist/commonjs/models/operations/fetchdocs.d.ts +1 -1
- package/dist/commonjs/models/operations/listdocs.d.ts +8 -8
- package/dist/commonjs/models/operations/listdocs.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listdocs.js +3 -3
- package/dist/commonjs/models/operations/listdocs.js.map +1 -1
- package/dist/commonjs/models/operations/querycollection.d.ts +3 -3
- package/dist/commonjs/models/operations/querycollection.d.ts.map +1 -1
- package/dist/commonjs/models/operations/querycollection.js +2 -2
- package/dist/commonjs/models/operations/querycollection.js.map +1 -1
- package/dist/commonjs/models/operations/updatedocs.d.ts +1 -1
- package/dist/commonjs/models/operations/upsertdocs.d.ts +1 -1
- package/dist/commonjs/models/rerank.d.ts +1 -1
- package/dist/commonjs/models/rerank.d.ts.map +1 -1
- package/dist/commonjs/models/rerank.js +1 -1
- package/dist/commonjs/models/rerank.js.map +1 -1
- package/dist/commonjs/types/public.d.ts +3 -3
- package/dist/commonjs/types/public.d.ts.map +1 -1
- package/dist/esm/client.d.ts +1 -1
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +11 -7
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/compat/qdrant/conversions.d.ts.map +1 -1
- package/dist/esm/compat/qdrant/conversions.js +0 -4
- package/dist/esm/compat/qdrant/conversions.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/models/indexconfigsunion.d.ts +5 -7
- package/dist/esm/models/indexconfigsunion.d.ts.map +1 -1
- package/dist/esm/models/indexconfigsunion.js +6 -6
- package/dist/esm/models/indexconfigsunion.js.map +1 -1
- package/dist/esm/models/operations/fetchdocs.d.ts +1 -1
- package/dist/esm/models/operations/listdocs.d.ts +8 -8
- package/dist/esm/models/operations/listdocs.d.ts.map +1 -1
- package/dist/esm/models/operations/listdocs.js +3 -3
- package/dist/esm/models/operations/listdocs.js.map +1 -1
- package/dist/esm/models/operations/querycollection.d.ts +3 -3
- package/dist/esm/models/operations/querycollection.d.ts.map +1 -1
- package/dist/esm/models/operations/querycollection.js +2 -2
- package/dist/esm/models/operations/querycollection.js.map +1 -1
- package/dist/esm/models/operations/updatedocs.d.ts +1 -1
- package/dist/esm/models/operations/upsertdocs.d.ts +1 -1
- package/dist/esm/models/rerank.d.ts +1 -1
- package/dist/esm/models/rerank.d.ts.map +1 -1
- package/dist/esm/models/rerank.js +1 -1
- package/dist/esm/models/rerank.js.map +1 -1
- package/dist/esm/types/public.d.ts +3 -3
- package/dist/esm/types/public.d.ts.map +1 -1
- package/jsr.json +4 -6
- package/package.json +3 -2
- package/src/client.ts +12 -8
- package/src/compat/qdrant/conversions.ts +0 -2
- package/src/lib/config.ts +2 -2
- package/src/models/indexconfigsunion.ts +12 -11
- package/src/models/operations/fetchdocs.ts +1 -1
- package/src/models/operations/listdocs.ts +11 -11
- package/src/models/operations/querycollection.ts +5 -5
- package/src/models/operations/updatedocs.ts +1 -1
- package/src/models/operations/upsertdocs.ts +1 -1
- package/src/models/rerank.ts +2 -2
- package/src/types/public.ts +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/types/public.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,YAAY,EAAE,uBAAuB,IAAI,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjH,YAAY,EAAE,2BAA2B,IAAI,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACrH,YAAY,EAAE,qBAAqB,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACnG,YAAY,EAAE,qBAAqB,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACnG,YAAY,EAAE,qBAAqB,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACnG,YAAY,EAAE,yBAAyB,IAAI,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAE3G,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/types/public.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,YAAY,EAAE,uBAAuB,IAAI,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjH,YAAY,EAAE,2BAA2B,IAAI,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACrH,YAAY,EAAE,qBAAqB,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACnG,YAAY,EAAE,qBAAqB,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACnG,YAAY,EAAE,qBAAqB,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACnG,YAAY,EAAE,yBAAyB,IAAI,eAAe,EAAE,MAAM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U,EAAE,uBAAuB,CAAC;CACrC,GAAG,8BAA8B,CAEjC;AAED,+DAA+D;AAC/D,MAAM,MAAM,iCAAiC,GAAG,8BAA8B,CAAC;AAE/E,wBAAgB,iCAAiC,CAAC,GAAG,EAAE;IACrD,UAAU,EAAE,uBAAuB,CAAC;CACrC,GAAG,iCAAiC,CAEpC;AAED,6EAA6E;AAC7E,MAAM,MAAM,iCAAiC,GAAG;IAC9C,UAAU,EAAE,IAAI,CAAC,6BAA6B,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,GAAG;QAC3E,SAAS,EAAE,IAAI,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,6BAA6B,GACtC,iCAAiC,CAOnC;AAED,gBAAgB;AAChB,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,oBAAoB,GAAG,eAAe,CAEtF;AAED,gBAAgB;AAChB,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,kBAAkB,GAAG,aAAa,CAOjF;AAED,gBAAgB;AAChB,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,GAAG,UAAU,CAMxE;AAED,gBAAgB;AAChB,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,YAAY,CAE7E;AAED,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAEtG,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
package/jsr.json
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
1
|
{
|
|
4
2
|
"name": "@functional-systems/lambdadb",
|
|
5
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0-dev.40319878689001",
|
|
6
4
|
"exports": {
|
|
7
|
-
".": "./src/index.ts",
|
|
8
|
-
"./models/errors": "./src/models/errors/index.ts",
|
|
9
|
-
"./models": "./src/models/index.ts",
|
|
5
|
+
".": "./src/index.ts",
|
|
6
|
+
"./models/errors": "./src/models/errors/index.ts",
|
|
7
|
+
"./models": "./src/models/index.ts",
|
|
10
8
|
"./models/operations": "./src/models/operations/index.ts",
|
|
11
9
|
"./versioning": "./src/versioning.ts",
|
|
12
10
|
"./compat/qdrant": "./src/compat/qdrant.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@functional-systems/lambdadb",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0-dev.40319878689001",
|
|
4
4
|
"author": "Functional Systems, Inc.",
|
|
5
5
|
"homepage": "https://github.com/lambdadb/lambdadb-typescript-client#readme",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -168,5 +168,6 @@
|
|
|
168
168
|
},
|
|
169
169
|
"main": "./dist/commonjs/index.js",
|
|
170
170
|
"types": "./dist/commonjs/index.d.ts",
|
|
171
|
-
"module": "./dist/esm/index.js"
|
|
171
|
+
"module": "./dist/esm/index.js",
|
|
172
|
+
"lambdadbSourceCommit": "8478115f9ca3cf47d614d7ab138bb159b3044bd9"
|
|
172
173
|
}
|
package/src/client.ts
CHANGED
|
@@ -572,7 +572,9 @@ export class CollectionDocs {
|
|
|
572
572
|
params?: ListDocsInput,
|
|
573
573
|
options?: RequestOptions,
|
|
574
574
|
) {
|
|
575
|
-
const useExtendedList = params?.
|
|
575
|
+
const useExtendedList = params?.size === null
|
|
576
|
+
|| params?.pageToken === null
|
|
577
|
+
|| params?.filter !== undefined
|
|
576
578
|
|| params?.partitionFilter != null
|
|
577
579
|
|| params?.fields != null;
|
|
578
580
|
const result = await unwrapAsync(
|
|
@@ -597,8 +599,8 @@ export class CollectionDocs {
|
|
|
597
599
|
this.client,
|
|
598
600
|
{
|
|
599
601
|
collectionName: this.collectionName,
|
|
600
|
-
size: params?.size,
|
|
601
|
-
pageToken: params?.pageToken,
|
|
602
|
+
size: params?.size ?? undefined,
|
|
603
|
+
pageToken: params?.pageToken ?? undefined,
|
|
602
604
|
includeVectors: params?.includeVectors,
|
|
603
605
|
refKind: params?.ref?.kind,
|
|
604
606
|
refName: params?.ref?.name,
|
|
@@ -625,7 +627,9 @@ export class CollectionDocs {
|
|
|
625
627
|
params?: ListDocsInput,
|
|
626
628
|
options?: RequestOptions,
|
|
627
629
|
): Promise<Result<ListDocsResponse, ListDocsError>> {
|
|
628
|
-
const useExtendedList = params?.
|
|
630
|
+
const useExtendedList = params?.size === null
|
|
631
|
+
|| params?.pageToken === null
|
|
632
|
+
|| params?.filter !== undefined
|
|
629
633
|
|| params?.partitionFilter != null
|
|
630
634
|
|| params?.fields != null;
|
|
631
635
|
const result = useExtendedList
|
|
@@ -649,8 +653,8 @@ export class CollectionDocs {
|
|
|
649
653
|
this.client,
|
|
650
654
|
{
|
|
651
655
|
collectionName: this.collectionName,
|
|
652
|
-
size: params?.size,
|
|
653
|
-
pageToken: params?.pageToken,
|
|
656
|
+
size: params?.size ?? undefined,
|
|
657
|
+
pageToken: params?.pageToken ?? undefined,
|
|
654
658
|
includeVectors: params?.includeVectors,
|
|
655
659
|
refKind: params?.ref?.kind,
|
|
656
660
|
refName: params?.ref?.name,
|
|
@@ -690,7 +694,7 @@ export class CollectionDocs {
|
|
|
690
694
|
params?: ListDocsInput,
|
|
691
695
|
options?: RequestOptions,
|
|
692
696
|
): AsyncGenerator<ListDocsResponse> {
|
|
693
|
-
let pageToken: string | undefined = params?.pageToken;
|
|
697
|
+
let pageToken: string | null | undefined = params?.pageToken;
|
|
694
698
|
const baseParams: ListDocsInput = {
|
|
695
699
|
size: params?.size,
|
|
696
700
|
pageToken,
|
|
@@ -827,7 +831,7 @@ export class CollectionDocs {
|
|
|
827
831
|
}
|
|
828
832
|
|
|
829
833
|
/**
|
|
830
|
-
* Fetch documents by IDs (max
|
|
834
|
+
* Fetch documents by IDs (max 1000 on the supporting server contract).
|
|
831
835
|
* When the API returns docs via docsUrl (isDocsInline false), documents are
|
|
832
836
|
* fetched from the presigned URL automatically so the response always has docs.
|
|
833
837
|
*/
|
|
@@ -293,7 +293,6 @@ export function validatePayloadFieldName(key: string): void {
|
|
|
293
293
|
export function distanceToSimilarity(distance: models.Distance | string): string {
|
|
294
294
|
if (distance === Distance.COSINE || distance === "cosine") return "cosine";
|
|
295
295
|
if (distance === Distance.EUCLID || distance === "euclidean") return "euclidean";
|
|
296
|
-
if (distance === Distance.DOT || distance === "dot_product") return "dot_product";
|
|
297
296
|
throw new UnsupportedQdrantFeatureError(
|
|
298
297
|
`Qdrant distance ${String(distance)} is not supported`,
|
|
299
298
|
);
|
|
@@ -317,7 +316,6 @@ function similarityToDistance(similarity: unknown): models.Distance {
|
|
|
317
316
|
const value = similarity ?? "cosine";
|
|
318
317
|
if (value === "cosine") return Distance.COSINE;
|
|
319
318
|
if (value === "euclidean") return Distance.EUCLID;
|
|
320
|
-
if (value === "dot_product") return Distance.DOT;
|
|
321
319
|
throw new UnsupportedQdrantFeatureError(
|
|
322
320
|
`LambdaDB similarity ${String(value)} cannot be represented as a Qdrant distance`,
|
|
323
321
|
);
|
package/src/lib/config.ts
CHANGED
|
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "1.1.1",
|
|
76
|
-
sdkVersion: "0.
|
|
76
|
+
sdkVersion: "0.9.0-dev.40319878689001",
|
|
77
77
|
genVersion: "2.798.0",
|
|
78
78
|
userAgent:
|
|
79
|
-
"speakeasy-sdk/typescript 0.
|
|
79
|
+
"speakeasy-sdk/typescript 0.9.0-dev.40319878689001 2.798.0 1.1.1 @functional-systems/lambdadb",
|
|
80
80
|
} as const;
|
|
@@ -37,8 +37,6 @@ export type IndexConfigs = {
|
|
|
37
37
|
export const Similarity = {
|
|
38
38
|
Cosine: "cosine",
|
|
39
39
|
Euclidean: "euclidean",
|
|
40
|
-
DotProduct: "dot_product",
|
|
41
|
-
MaxInnerProduct: "max_inner_product",
|
|
42
40
|
} as const;
|
|
43
41
|
/**
|
|
44
42
|
* Vector similarity metric.
|
|
@@ -53,7 +51,7 @@ export type IndexConfigsVector = {
|
|
|
53
51
|
*/
|
|
54
52
|
managedEmbedding?: false | undefined;
|
|
55
53
|
/**
|
|
56
|
-
* Vector dimensions for
|
|
54
|
+
* Vector dimensions for caller-provided fields: an integer from 64 to 4096.
|
|
57
55
|
*/
|
|
58
56
|
dimensions: number;
|
|
59
57
|
/**
|
|
@@ -76,15 +74,15 @@ export type EmbeddingConfig = {
|
|
|
76
74
|
*/
|
|
77
75
|
provider: EmbeddingProvider;
|
|
78
76
|
/**
|
|
79
|
-
* Embedding model name. See /guides/collections/
|
|
77
|
+
* Embedding model name. See /guides/collections/native-embeddings for the current supported providers and models.
|
|
80
78
|
*/
|
|
81
79
|
model: string;
|
|
82
80
|
/**
|
|
83
|
-
*
|
|
81
|
+
* Dot-separated stored string path used to generate embeddings; source indexes are optional.
|
|
84
82
|
*/
|
|
85
83
|
sourceField: string;
|
|
86
84
|
/**
|
|
87
|
-
* Embedding dimensions. Optional in requests and resolved in stored
|
|
85
|
+
* Embedding dimensions: an integer from 64 to 4096, within the model maximum. Optional in requests and resolved in stored metadata.
|
|
88
86
|
*/
|
|
89
87
|
dimensions?: number | undefined;
|
|
90
88
|
/**
|
|
@@ -104,7 +102,7 @@ export type IndexConfigsManagedEmbeddingVector = {
|
|
|
104
102
|
embedding: EmbeddingConfig;
|
|
105
103
|
};
|
|
106
104
|
|
|
107
|
-
/** Native embedding input at backend
|
|
105
|
+
/** Native embedding input and stored source paths at backend ff13daf3f4ed40487b2b13522a141265c2f459ab. */
|
|
108
106
|
export type IndexConfigsNativeEmbeddingVector = {
|
|
109
107
|
type: "vector";
|
|
110
108
|
dimensions?: never;
|
|
@@ -275,6 +273,9 @@ export function indexConfigsFromJSON(
|
|
|
275
273
|
);
|
|
276
274
|
}
|
|
277
275
|
|
|
276
|
+
// OpenAPI: lambdadb/docs@94a7b71613a3bf217a370d5117b3ff6ddfbae851.
|
|
277
|
+
const vectorDimensionsSchema = z.number().int().min(64).max(4096);
|
|
278
|
+
|
|
278
279
|
/** @internal */
|
|
279
280
|
export const Similarity$inboundSchema: z.ZodNativeEnum<typeof Similarity> = z
|
|
280
281
|
.nativeEnum(Similarity);
|
|
@@ -290,7 +291,7 @@ export const IndexConfigsVector$inboundSchema: z.ZodType<
|
|
|
290
291
|
> = z.object({
|
|
291
292
|
type: z.literal("vector"),
|
|
292
293
|
managedEmbedding: nullToUndefined(z.literal(false).optional()),
|
|
293
|
-
dimensions:
|
|
294
|
+
dimensions: vectorDimensionsSchema,
|
|
294
295
|
similarity: nullToUndefined(Similarity$inboundSchema.default("cosine")),
|
|
295
296
|
});
|
|
296
297
|
/** @internal */
|
|
@@ -309,7 +310,7 @@ export const IndexConfigsVector$outboundSchema: z.ZodType<
|
|
|
309
310
|
> = z.object({
|
|
310
311
|
type: z.literal("vector"),
|
|
311
312
|
managedEmbedding: z.literal(false).optional(),
|
|
312
|
-
dimensions:
|
|
313
|
+
dimensions: vectorDimensionsSchema,
|
|
313
314
|
similarity: Similarity$outboundSchema.default("cosine"),
|
|
314
315
|
}).strict();
|
|
315
316
|
|
|
@@ -348,7 +349,7 @@ export const EmbeddingConfig$inboundSchema: z.ZodType<
|
|
|
348
349
|
provider: EmbeddingProvider$inboundSchema,
|
|
349
350
|
model: z.string(),
|
|
350
351
|
sourceField: z.string(),
|
|
351
|
-
dimensions: nullToUndefined(
|
|
352
|
+
dimensions: nullToUndefined(vectorDimensionsSchema.optional()),
|
|
352
353
|
similarity: nullToUndefined(Similarity$inboundSchema.optional()),
|
|
353
354
|
});
|
|
354
355
|
/** @internal */
|
|
@@ -369,7 +370,7 @@ export const EmbeddingConfig$outboundSchema: z.ZodType<
|
|
|
369
370
|
provider: EmbeddingProvider$outboundSchema,
|
|
370
371
|
model: z.string(),
|
|
371
372
|
sourceField: z.string(),
|
|
372
|
-
dimensions:
|
|
373
|
+
dimensions: vectorDimensionsSchema.optional(),
|
|
373
374
|
similarity: Similarity$outboundSchema.optional(),
|
|
374
375
|
}).strict();
|
|
375
376
|
|
|
@@ -11,7 +11,7 @@ import * as models from "../index.js";
|
|
|
11
11
|
|
|
12
12
|
export type FetchDocsRequestBody = {
|
|
13
13
|
/**
|
|
14
|
-
* A list of document IDs to fetch.
|
|
14
|
+
* A list of 1 to 1000 nonblank document IDs to fetch. Projected document bodies retain a 64 MiB per-node JSON limit; exceeding it returns HTTP 400 without partial results.
|
|
15
15
|
*/
|
|
16
16
|
ids: Array<string>;
|
|
17
17
|
/**
|
|
@@ -15,7 +15,7 @@ export type ListDocsRequest = {
|
|
|
15
15
|
*/
|
|
16
16
|
collectionName: string;
|
|
17
17
|
/**
|
|
18
|
-
* Max number of documents to return at once.
|
|
18
|
+
* Max number of documents to return at once, from 1 to 1000. The server default is 100.
|
|
19
19
|
*/
|
|
20
20
|
size?: number | undefined;
|
|
21
21
|
/**
|
|
@@ -97,17 +97,17 @@ export function listDocsRequestToJSON(
|
|
|
97
97
|
|
|
98
98
|
export type ListDocsExtendedRequestBody = {
|
|
99
99
|
/**
|
|
100
|
-
* Max number of documents to return at once.
|
|
100
|
+
* Max number of documents to return at once, from 1 to 1000. The server default is 100.
|
|
101
101
|
*/
|
|
102
|
-
size?: number | undefined;
|
|
102
|
+
size?: number | null | undefined;
|
|
103
103
|
/**
|
|
104
104
|
* Opaque search position, not a Snapshot pin. Use one immutable Tag throughout a stable export.
|
|
105
105
|
*/
|
|
106
|
-
pageToken?: string | undefined;
|
|
106
|
+
pageToken?: string | null | undefined;
|
|
107
107
|
/**
|
|
108
108
|
* Filter applied before pagination.
|
|
109
109
|
*/
|
|
110
|
-
filter?: { [k: string]: any } | undefined;
|
|
110
|
+
filter?: { [k: string]: any } | null | undefined;
|
|
111
111
|
partitionFilter?: models.PartitionFilter | undefined;
|
|
112
112
|
/**
|
|
113
113
|
* An object to specify a list of field names to include and/or exclude in the result.
|
|
@@ -131,9 +131,9 @@ export type ListDocsExtendedRequest = {
|
|
|
131
131
|
|
|
132
132
|
/** @internal */
|
|
133
133
|
export type ListDocsExtendedRequestBody$Outbound = {
|
|
134
|
-
size?: number | undefined;
|
|
135
|
-
pageToken?: string | undefined;
|
|
136
|
-
filter?: { [k: string]: any } | undefined;
|
|
134
|
+
size?: number | null | undefined;
|
|
135
|
+
pageToken?: string | null | undefined;
|
|
136
|
+
filter?: { [k: string]: any } | null | undefined;
|
|
137
137
|
partitionFilter?: models.PartitionFilter$Outbound | undefined;
|
|
138
138
|
fields?: models.FieldsSelectorUnion$Outbound | undefined;
|
|
139
139
|
includeVectors: boolean;
|
|
@@ -146,9 +146,9 @@ export const ListDocsExtendedRequestBody$outboundSchema: z.ZodType<
|
|
|
146
146
|
z.ZodTypeDef,
|
|
147
147
|
ListDocsExtendedRequestBody
|
|
148
148
|
> = z.object({
|
|
149
|
-
size: z.number().int().optional(),
|
|
150
|
-
pageToken: z.string().optional(),
|
|
151
|
-
filter: z.record(z.any()).optional(),
|
|
149
|
+
size: z.number().int().nullable().optional(),
|
|
150
|
+
pageToken: z.string().nullable().optional(),
|
|
151
|
+
filter: z.record(z.any()).nullable().optional(),
|
|
152
152
|
partitionFilter: models.PartitionFilter$outboundSchema.optional(),
|
|
153
153
|
fields: models.FieldsSelectorUnion$outboundSchema.optional(),
|
|
154
154
|
includeVectors: z.boolean().default(false),
|
|
@@ -19,14 +19,14 @@ export type FacetResult = { buckets: Array<FacetBucket> };
|
|
|
19
19
|
|
|
20
20
|
export type QueryCollectionRequestBody = {
|
|
21
21
|
/**
|
|
22
|
-
* Number of documents to return.
|
|
22
|
+
* Number of documents to return. The server supports up to 1000 documents.
|
|
23
23
|
*/
|
|
24
24
|
size?: number | undefined;
|
|
25
|
-
/** Explicit Bayesian candidate budget without rerank. Use rerank.candidateSize with rerank instead. */
|
|
25
|
+
/** Explicit Bayesian candidate budget without rerank: size <= candidateSize <= 1000. Use rerank.candidateSize with rerank instead. */
|
|
26
26
|
candidateSize?: number | undefined;
|
|
27
27
|
/**
|
|
28
28
|
* Query object. BayesianQuery provides an optional typed top-level hybrid query.
|
|
29
|
-
* For native embedding vector fields, use knn.queryText. For
|
|
29
|
+
* For native embedding vector fields, use knn.queryText; knn.queryVector is not supported. For caller-provided vector fields, use knn.queryVector. Each KNN query requires exactly one non-null query input.
|
|
30
30
|
*/
|
|
31
31
|
query?: { [k: string]: any } | undefined;
|
|
32
32
|
facets?: Record<string, FacetRequest> | undefined;
|
|
@@ -149,10 +149,10 @@ export const QueryCollectionRequestBody$outboundSchema: z.ZodType<
|
|
|
149
149
|
if (value.rerank != null) {
|
|
150
150
|
const size = value.size ?? 10;
|
|
151
151
|
const candidateSize = value.rerank.candidateSize ?? Math.max(50, size);
|
|
152
|
-
if (size < 1 || size >
|
|
152
|
+
if (size < 1 || size > 1000 || candidateSize < size) {
|
|
153
153
|
context.addIssue({
|
|
154
154
|
code: z.ZodIssueCode.custom,
|
|
155
|
-
message: "rerank requires 1 <= size <= candidateSize <=
|
|
155
|
+
message: "rerank requires 1 <= size <= candidateSize <= 1000",
|
|
156
156
|
path: ["rerank", "candidateSize"],
|
|
157
157
|
});
|
|
158
158
|
}
|
|
@@ -7,7 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
|
|
8
8
|
export type UpdateDocsRequestBody = {
|
|
9
9
|
/**
|
|
10
|
-
* A list of documents to update. Each document must contain 'id' field to be updated. For native embedding vector fields, omit the
|
|
10
|
+
* A list of documents to update. Each document must contain 'id' field to be updated. For native embedding vector fields, omit the generated vector. Patches merge with stored JSON on the server; omitted or unchanged source text preserves its vector, while changed source text regenerates it.
|
|
11
11
|
*/
|
|
12
12
|
docs: Array<{ [k: string]: any }>;
|
|
13
13
|
/** Write target Branch. Omitting it writes to main. */
|
|
@@ -7,7 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
|
|
8
8
|
export type UpsertDocsRequestBody = {
|
|
9
9
|
/**
|
|
10
|
-
* A list of documents to upsert. For native embedding vector fields, omit the
|
|
10
|
+
* A list of documents to upsert. For native embedding vector fields, omit the generated vector and provide the configured source string at its stored JSON path. Source indexes are optional; full upserts replace the document.
|
|
11
11
|
*/
|
|
12
12
|
docs: Array<{ [k: string]: any }>;
|
|
13
13
|
/** Write target Branch. Omitting it writes to main. */
|
package/src/models/rerank.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type RerankConfig = {
|
|
|
10
10
|
queryText: string;
|
|
11
11
|
/** 1–8 unique stored scalar text paths, in model input order. */
|
|
12
12
|
fields: string[];
|
|
13
|
-
/** Defaults on the server to max(50, size); does not change knn.k. */
|
|
13
|
+
/** Integer up to 1000, at least size. Defaults on the server to max(50, size); does not change knn.k. */
|
|
14
14
|
candidateSize?: number | null | undefined;
|
|
15
15
|
/** Server default: error. Only eligible provider failures can returnOriginal. */
|
|
16
16
|
onFailure?: "error" | "returnOriginal" | null | undefined;
|
|
@@ -46,7 +46,7 @@ export const RerankConfig$outboundSchema: z.ZodType<RerankConfig> = z.object({
|
|
|
46
46
|
fields: z.array(nonblank.refine(
|
|
47
47
|
(path) => path.split(".").every((part) => !blank.test(part)), "Invalid field path",
|
|
48
48
|
)).min(1).max(8).refine((paths) => new Set(paths).size === paths.length, "Fields must be unique"),
|
|
49
|
-
candidateSize: z.number().int().min(1).max(
|
|
49
|
+
candidateSize: z.number().int().min(1).max(1000).nullable().optional(),
|
|
50
50
|
onFailure: z.enum(["error", "returnOriginal"]).nullable().optional(),
|
|
51
51
|
criteria: z.array(nonblank.refine(
|
|
52
52
|
(text) => bytes(text) <= 2048, "Criterion exceeds 2 KiB UTF-8",
|
package/src/types/public.ts
CHANGED
|
@@ -12,7 +12,7 @@ export type { UpdateDocsRequestBody as UpdateDocsInput } from "../models/operati
|
|
|
12
12
|
export type { DeleteDocsRequestBody as DeleteDocsInput } from "../models/operations/deletedocs.js";
|
|
13
13
|
export type { BulkUpsertDocsRequestBody as BulkUpsertInput } from "../models/operations/bulkupsertdocs.js";
|
|
14
14
|
|
|
15
|
-
import type {
|
|
15
|
+
import type { ListDocsExtendedRequestBody } from "../models/operations/listdocs.js";
|
|
16
16
|
import type { ListCollectionsRequest } from "../models/operations/listcollections.js";
|
|
17
17
|
import type { QueryCollectionRequestBody } from "../models/operations/querycollection.js";
|
|
18
18
|
import type { FetchDocsRequestBody } from "../models/operations/fetchdocs.js";
|
|
@@ -45,10 +45,10 @@ export type FetchDocsInput = Omit<
|
|
|
45
45
|
|
|
46
46
|
/** Parameters for listing documents, including extended list options. */
|
|
47
47
|
export type ListDocsInput = Pick<
|
|
48
|
-
|
|
48
|
+
ListDocsExtendedRequestBody,
|
|
49
49
|
"size" | "pageToken" | "includeVectors"
|
|
50
50
|
> & {
|
|
51
|
-
filter?: Record<string, unknown> | undefined;
|
|
51
|
+
filter?: Record<string, unknown> | null | undefined;
|
|
52
52
|
partitionFilter?: import("../models/index.js").PartitionFilter | undefined;
|
|
53
53
|
fields?: import("../models/index.js").FieldsSelectorUnion | undefined;
|
|
54
54
|
/** Read target. Omitting it reads from main. */
|