@vectorstores/pinecone 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 +14 -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 +14 -0
- package/dist/index.js +14 -0
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -243,6 +243,20 @@ var env = require('@vectorstores/env');
|
|
|
243
243
|
metadata: core.nodeToMetadata(node)
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
|
+
async exists(refDocId) {
|
|
247
|
+
const idx = await this.index();
|
|
248
|
+
const results = await idx.query({
|
|
249
|
+
vector: new Array(1536).fill(0),
|
|
250
|
+
topK: 1,
|
|
251
|
+
includeMetadata: false,
|
|
252
|
+
filter: {
|
|
253
|
+
ref_doc_id: {
|
|
254
|
+
$eq: refDocId
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
return results.matches.length > 0;
|
|
259
|
+
}
|
|
246
260
|
}
|
|
247
261
|
|
|
248
262
|
exports.PineconeVectorStore = PineconeVectorStore;
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.edge-light.js
CHANGED
|
@@ -241,6 +241,20 @@ import { getEnv } from '@vectorstores/env';
|
|
|
241
241
|
metadata: nodeToMetadata(node)
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
+
async exists(refDocId) {
|
|
245
|
+
const idx = await this.index();
|
|
246
|
+
const results = await idx.query({
|
|
247
|
+
vector: new Array(1536).fill(0),
|
|
248
|
+
topK: 1,
|
|
249
|
+
includeMetadata: false,
|
|
250
|
+
filter: {
|
|
251
|
+
ref_doc_id: {
|
|
252
|
+
$eq: refDocId
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
return results.matches.length > 0;
|
|
257
|
+
}
|
|
244
258
|
}
|
|
245
259
|
|
|
246
260
|
export { PineconeVectorStore };
|
package/dist/index.js
CHANGED
|
@@ -241,6 +241,20 @@ import { getEnv } from '@vectorstores/env';
|
|
|
241
241
|
metadata: nodeToMetadata(node)
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
+
async exists(refDocId) {
|
|
245
|
+
const idx = await this.index();
|
|
246
|
+
const results = await idx.query({
|
|
247
|
+
vector: new Array(1536).fill(0),
|
|
248
|
+
topK: 1,
|
|
249
|
+
includeMetadata: false,
|
|
250
|
+
filter: {
|
|
251
|
+
ref_doc_id: {
|
|
252
|
+
$eq: refDocId
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
return results.matches.length > 0;
|
|
257
|
+
}
|
|
244
258
|
}
|
|
245
259
|
|
|
246
260
|
export { PineconeVectorStore };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vectorstores/pinecone",
|
|
3
3
|
"description": "Pinecone 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",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"directory": "packages/providers/storage/pinecone"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@vectorstores/core": "0.1.
|
|
37
|
+
"@vectorstores/core": "0.1.5",
|
|
38
38
|
"@vectorstores/env": "0.1.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@vectorstores/
|
|
42
|
-
"@vectorstores/
|
|
41
|
+
"@vectorstores/env": "0.1.0",
|
|
42
|
+
"@vectorstores/core": "0.1.5"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@pinecone-database/pinecone": "^4.0.0"
|