@vectorstores/weaviate 0.1.3 → 0.1.5
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/index.cjs +9 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.edge-light.d.ts +1 -0
- package/dist/index.edge-light.js +9 -0
- package/dist/index.js +9 -0
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -285,6 +285,15 @@ class WeaviateVectorStore extends core.BaseVectorStore {
|
|
|
285
285
|
// convert distance https://forum.weaviate.io/t/distance-vs-certainty-scores/258
|
|
286
286
|
return 1 - distance;
|
|
287
287
|
}
|
|
288
|
+
async exists(refDocId) {
|
|
289
|
+
const collection = await this.ensureCollection();
|
|
290
|
+
const result = await collection.query.fetchObjects({
|
|
291
|
+
filters: collection.filter.byProperty("ref_doc_id").equal(refDocId),
|
|
292
|
+
limit: 1,
|
|
293
|
+
returnProperties: []
|
|
294
|
+
});
|
|
295
|
+
return result.objects.length > 0;
|
|
296
|
+
}
|
|
288
297
|
}
|
|
289
298
|
|
|
290
299
|
exports.WeaviateVectorStore = WeaviateVectorStore;
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.edge-light.js
CHANGED
|
@@ -279,6 +279,15 @@ class WeaviateVectorStore extends BaseVectorStore {
|
|
|
279
279
|
// convert distance https://forum.weaviate.io/t/distance-vs-certainty-scores/258
|
|
280
280
|
return 1 - distance;
|
|
281
281
|
}
|
|
282
|
+
async exists(refDocId) {
|
|
283
|
+
const collection = await this.ensureCollection();
|
|
284
|
+
const result = await collection.query.fetchObjects({
|
|
285
|
+
filters: collection.filter.byProperty("ref_doc_id").equal(refDocId),
|
|
286
|
+
limit: 1,
|
|
287
|
+
returnProperties: []
|
|
288
|
+
});
|
|
289
|
+
return result.objects.length > 0;
|
|
290
|
+
}
|
|
282
291
|
}
|
|
283
292
|
|
|
284
293
|
export { WeaviateVectorStore, sanitizeMetadata };
|
package/dist/index.js
CHANGED
|
@@ -279,6 +279,15 @@ class WeaviateVectorStore extends BaseVectorStore {
|
|
|
279
279
|
// convert distance https://forum.weaviate.io/t/distance-vs-certainty-scores/258
|
|
280
280
|
return 1 - distance;
|
|
281
281
|
}
|
|
282
|
+
async exists(refDocId) {
|
|
283
|
+
const collection = await this.ensureCollection();
|
|
284
|
+
const result = await collection.query.fetchObjects({
|
|
285
|
+
filters: collection.filter.byProperty("ref_doc_id").equal(refDocId),
|
|
286
|
+
limit: 1,
|
|
287
|
+
returnProperties: []
|
|
288
|
+
});
|
|
289
|
+
return result.objects.length > 0;
|
|
290
|
+
}
|
|
282
291
|
}
|
|
283
292
|
|
|
284
293
|
export { WeaviateVectorStore, sanitizeMetadata };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vectorstores/weaviate",
|
|
3
3
|
"description": "Weaviate Storage for vectorstores",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"vitest": "^3.2.0",
|
|
38
|
-
"@vectorstores/core": "0.1.
|
|
38
|
+
"@vectorstores/core": "0.1.5",
|
|
39
39
|
"@vectorstores/env": "0.1.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@vectorstores/core": "0.1.
|
|
42
|
+
"@vectorstores/core": "0.1.5",
|
|
43
43
|
"@vectorstores/env": "0.1.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|