chromadb 3.4.3 → 3.5.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/dist/chromadb.d.ts +33 -6
- package/dist/chromadb.legacy-esm.js +3 -16
- package/dist/chromadb.mjs +3 -16
- package/dist/chromadb.mjs.map +1 -1
- package/dist/cjs/chromadb.cjs +3 -16
- package/dist/cjs/chromadb.cjs.map +1 -1
- package/dist/cjs/chromadb.d.cts +33 -6
- package/dist/cjs/cli.cjs +0 -0
- package/package.json +22 -22
- package/src/api/sdk.gen.ts +22 -1
- package/src/api/types.gen.ts +86 -6
- package/src/collection.ts +2 -0
- package/src/schema.ts +39 -39
- package/src/types.ts +3 -0
package/dist/cjs/chromadb.cjs
CHANGED
|
@@ -146,7 +146,8 @@ if (typeof globalThis.Deno !== "undefined") {
|
|
|
146
146
|
// src/types.ts
|
|
147
147
|
var ReadLevel = {
|
|
148
148
|
INDEX_AND_WAL: "index_and_wal",
|
|
149
|
-
INDEX_ONLY: "index_only"
|
|
149
|
+
INDEX_ONLY: "index_only",
|
|
150
|
+
INDEX_AND_BOUNDED_WAL: "index_and_bounded_wal"
|
|
150
151
|
};
|
|
151
152
|
var baseRecordSetFields = [
|
|
152
153
|
"ids",
|
|
@@ -3437,9 +3438,7 @@ var Schema = class _Schema {
|
|
|
3437
3438
|
);
|
|
3438
3439
|
}
|
|
3439
3440
|
if (keyProvided && key && key === EMBEDDING_KEY) {
|
|
3440
|
-
throw new Error(
|
|
3441
|
-
"Cannot modify #embedding. Currently not supported"
|
|
3442
|
-
);
|
|
3441
|
+
throw new Error("Cannot modify #embedding. Currently not supported");
|
|
3443
3442
|
}
|
|
3444
3443
|
if (keyProvided && key === DOCUMENT_KEY && !(config instanceof FtsIndexConfig)) {
|
|
3445
3444
|
throw new Error(
|
|
@@ -3577,7 +3576,6 @@ var Schema = class _Schema {
|
|
|
3577
3576
|
}
|
|
3578
3577
|
setIndexForKey(key, config, enabled) {
|
|
3579
3578
|
if (config instanceof SparseVectorIndexConfig && enabled) {
|
|
3580
|
-
this.validateSingleSparseVectorIndex(key);
|
|
3581
3579
|
this.validateSparseVectorConfig(config);
|
|
3582
3580
|
}
|
|
3583
3581
|
const current = this.keys[key] = ensureValueTypes(this.keys[key]);
|
|
@@ -3664,17 +3662,6 @@ var Schema = class _Schema {
|
|
|
3664
3662
|
new BoolInvertedIndexType(false, new BoolInvertedIndexConfig())
|
|
3665
3663
|
);
|
|
3666
3664
|
}
|
|
3667
|
-
validateSingleSparseVectorIndex(targetKey) {
|
|
3668
|
-
for (const [existingKey, valueTypes] of Object.entries(this.keys)) {
|
|
3669
|
-
if (existingKey === targetKey) continue;
|
|
3670
|
-
const sparseIndex = valueTypes.sparseVector?.sparseVectorIndex;
|
|
3671
|
-
if (sparseIndex?.enabled) {
|
|
3672
|
-
throw new Error(
|
|
3673
|
-
`Cannot enable sparse vector index on key '${targetKey}'. A sparse vector index is already enabled on key '${existingKey}'. Only one sparse vector index is allowed per collection.`
|
|
3674
|
-
);
|
|
3675
|
-
}
|
|
3676
|
-
}
|
|
3677
|
-
}
|
|
3678
3665
|
validateSparseVectorConfig(config) {
|
|
3679
3666
|
if (config.sourceKey !== null && config.sourceKey !== void 0 && !config.embeddingFunction) {
|
|
3680
3667
|
throw new Error(
|