QdrantVectorStore
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:41
Qdrant 向量存储。
BaseVectorStore
new QdrantVectorStore(
__namedParameters):QdrantVectorStore
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:59
创建一个新的 QdrantVectorStore。
__namedParameters
Section titled “__namedParameters”QdrantParams
QdrantVectorStore
BaseVectorStore.constructor
storesText
Section titled “storesText”storesText:
boolean=true
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:42
BaseVectorStore.storesText
batchSize
Section titled “batchSize”批次大小:
number
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:44
collectionName
Section titled “collectionName”集合名称:
string
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:45
client()
Section titled “client()”client():
QdrantClient
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:91
返回 Qdrant 客户端。
QdrantClient
Qdrant 客户端
BaseVectorStore.client
createCollection()
Section titled “createCollection()”createCollection(
collectionName,vectorSize):Promise<void>
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:100
在 Qdrant 中创建一个集合。
collectionName
Section titled “collectionName”string
Qdrant 集合名称
vectorSize
Section titled “vectorSize”number
向量的维度
Promise<void>
collectionExists()
Section titled “collectionExists()”collectionExists(
collectionName):Promise<boolean>
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:114
检查集合是否存在于Qdrant中,如果不存在则创建它。
collectionName
Section titled “collectionName”string
Qdrant 集合名称
Promise<boolean>
initializeCollection()
Section titled “initializeCollection()”initializeCollection(
vectorSize):Promise<void>
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:127
初始化 Qdrant 中的集合。
vectorSize
Section titled “vectorSize”number
向量的维度
Promise<void>
buildPoints()
Section titled “buildPoints()”buildPoints(
nodes):Promise<{points:PointStruct[];ids:string[]; }>
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:140
根据给定的节点构建一个点列表。
BaseNode<Metadata>[]
Promise<{ points: PointStruct[]; ids: string[]; }>
add(
embeddingResults):Promise<string[]>
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:188
将给定节点添加到向量存储中。
embeddingResults
Section titled “embeddingResults”BaseNode<Metadata>[]
节点列表
Promise<string[]>
节点ID列表
BaseVectorStore.add
delete()
Section titled “delete()”delete(
refDocId):Promise<void>
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:215
从向量存储中删除指定节点。
refDocId
Section titled “refDocId”string
节点ID
Promise<void>
BaseVectorStore.delete
query()
Section titled “query()”query(
query,options?):Promise<VectorStoreQueryResult>
定义于:.build/typescript/packages/providers/storage/qdrant/src/QdrantVectorStore.ts:268
查询向量存储中与查询嵌入最匹配的数据。
VectorStoreQuery<undefined | { }>
要使用的 VectorStoreQuery
object
VectorStore接口所需。
Promise<VectorStoreQueryResult>
零个或多个来自向量存储数据的文档实例。
BaseVectorStore.query