@vectorstores/qdrant 0.1.3 → 0.1.4
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 +18 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.edge-light.d.ts +2 -1
- package/dist/index.edge-light.js +18 -1
- package/dist/index.js +18 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
|
-
var core = require('@vectorstores/core');
|
|
4
3
|
var jsClientRest = require('@qdrant/js-client-rest');
|
|
4
|
+
var core = require('@vectorstores/core');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Qdrant vector store.
|
|
@@ -202,6 +202,23 @@ var jsClientRest = require('@qdrant/js-client-rest');
|
|
|
202
202
|
});
|
|
203
203
|
return this.parseToQueryResult(result);
|
|
204
204
|
}
|
|
205
|
+
async exists(refDocId) {
|
|
206
|
+
const result = await this.db.scroll(this.collectionName, {
|
|
207
|
+
filter: {
|
|
208
|
+
must: [
|
|
209
|
+
{
|
|
210
|
+
key: "doc_id",
|
|
211
|
+
match: {
|
|
212
|
+
value: refDocId
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
limit: 1,
|
|
218
|
+
with_payload: false
|
|
219
|
+
});
|
|
220
|
+
return result.points.length > 0;
|
|
221
|
+
}
|
|
205
222
|
}
|
|
206
223
|
/**
|
|
207
224
|
* Qdrant filter builder
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseVectorStore, VectorStoreBaseParams, BaseNode, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
|
|
2
1
|
import { QdrantClient, Schemas } from '@qdrant/js-client-rest';
|
|
2
|
+
import { BaseVectorStore, VectorStoreBaseParams, BaseNode, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
|
|
3
3
|
|
|
4
4
|
type QdrantSearchParams = Schemas["SearchParams"];
|
|
5
5
|
type PointStruct = {
|
|
@@ -88,6 +88,7 @@ declare class QdrantVectorStore extends BaseVectorStore {
|
|
|
88
88
|
* @returns Zero or more Document instances with data from the vector store.
|
|
89
89
|
*/
|
|
90
90
|
query(query: VectorStoreQuery<QdrantSearchParams | undefined>, options?: object): Promise<VectorStoreQueryResult>;
|
|
91
|
+
exists(refDocId: string): Promise<boolean>;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
export { QdrantVectorStore };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseVectorStore, VectorStoreBaseParams, BaseNode, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
|
|
2
1
|
import { QdrantClient, Schemas } from '@qdrant/js-client-rest';
|
|
2
|
+
import { BaseVectorStore, VectorStoreBaseParams, BaseNode, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
|
|
3
3
|
|
|
4
4
|
type QdrantSearchParams = Schemas["SearchParams"];
|
|
5
5
|
type PointStruct = {
|
|
@@ -88,6 +88,7 @@ declare class QdrantVectorStore extends BaseVectorStore {
|
|
|
88
88
|
* @returns Zero or more Document instances with data from the vector store.
|
|
89
89
|
*/
|
|
90
90
|
query(query: VectorStoreQuery<QdrantSearchParams | undefined>, options?: object): Promise<VectorStoreQueryResult>;
|
|
91
|
+
exists(refDocId: string): Promise<boolean>;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
export { QdrantVectorStore };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseVectorStore, VectorStoreBaseParams, BaseNode, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
|
|
2
1
|
import { QdrantClient, Schemas } from '@qdrant/js-client-rest';
|
|
2
|
+
import { BaseVectorStore, VectorStoreBaseParams, BaseNode, VectorStoreQuery, VectorStoreQueryResult } from '@vectorstores/core';
|
|
3
3
|
|
|
4
4
|
type QdrantSearchParams = Schemas["SearchParams"];
|
|
5
5
|
type PointStruct = {
|
|
@@ -88,6 +88,7 @@ declare class QdrantVectorStore extends BaseVectorStore {
|
|
|
88
88
|
* @returns Zero or more Document instances with data from the vector store.
|
|
89
89
|
*/
|
|
90
90
|
query(query: VectorStoreQuery<QdrantSearchParams | undefined>, options?: object): Promise<VectorStoreQueryResult>;
|
|
91
|
+
exists(refDocId: string): Promise<boolean>;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
export { QdrantVectorStore };
|
package/dist/index.edge-light.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseVectorStore, nodeToMetadata, metadataDictToNode, FilterOperator, FilterCondition } from '@vectorstores/core';
|
|
2
1
|
import { QdrantClient } from '@qdrant/js-client-rest';
|
|
2
|
+
import { BaseVectorStore, nodeToMetadata, metadataDictToNode, FilterOperator, FilterCondition } from '@vectorstores/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Qdrant vector store.
|
|
@@ -200,6 +200,23 @@ import { QdrantClient } from '@qdrant/js-client-rest';
|
|
|
200
200
|
});
|
|
201
201
|
return this.parseToQueryResult(result);
|
|
202
202
|
}
|
|
203
|
+
async exists(refDocId) {
|
|
204
|
+
const result = await this.db.scroll(this.collectionName, {
|
|
205
|
+
filter: {
|
|
206
|
+
must: [
|
|
207
|
+
{
|
|
208
|
+
key: "doc_id",
|
|
209
|
+
match: {
|
|
210
|
+
value: refDocId
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
limit: 1,
|
|
216
|
+
with_payload: false
|
|
217
|
+
});
|
|
218
|
+
return result.points.length > 0;
|
|
219
|
+
}
|
|
203
220
|
}
|
|
204
221
|
/**
|
|
205
222
|
* Qdrant filter builder
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseVectorStore, nodeToMetadata, metadataDictToNode, FilterOperator, FilterCondition } from '@vectorstores/core';
|
|
2
1
|
import { QdrantClient } from '@qdrant/js-client-rest';
|
|
2
|
+
import { BaseVectorStore, nodeToMetadata, metadataDictToNode, FilterOperator, FilterCondition } from '@vectorstores/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Qdrant vector store.
|
|
@@ -200,6 +200,23 @@ import { QdrantClient } from '@qdrant/js-client-rest';
|
|
|
200
200
|
});
|
|
201
201
|
return this.parseToQueryResult(result);
|
|
202
202
|
}
|
|
203
|
+
async exists(refDocId) {
|
|
204
|
+
const result = await this.db.scroll(this.collectionName, {
|
|
205
|
+
filter: {
|
|
206
|
+
must: [
|
|
207
|
+
{
|
|
208
|
+
key: "doc_id",
|
|
209
|
+
match: {
|
|
210
|
+
value: refDocId
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
limit: 1,
|
|
216
|
+
with_payload: false
|
|
217
|
+
});
|
|
218
|
+
return result.points.length > 0;
|
|
219
|
+
}
|
|
203
220
|
}
|
|
204
221
|
/**
|
|
205
222
|
* Qdrant filter builder
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vectorstores/qdrant",
|
|
3
3
|
"description": "Qdrant Storage for vectorstores",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.4",
|
|
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": "^2.1.9",
|
|
38
|
-
"@vectorstores/core": "0.1.
|
|
38
|
+
"@vectorstores/core": "0.1.4",
|
|
39
39
|
"@vectorstores/env": "0.1.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@vectorstores/core": "0.1.
|
|
42
|
+
"@vectorstores/core": "0.1.4",
|
|
43
43
|
"@vectorstores/env": "0.1.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|