Ana içeriğe geç

Class: SimpleVectorStore

Implements

Constructors

constructor

new SimpleVectorStore(data?, fs?): SimpleVectorStore

Parameters

NameType
data?SimpleVectorStoreData
fs?GenericFileSystem

Returns

SimpleVectorStore

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:38

Properties

data

Private data: SimpleVectorStoreData

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:34


fs

Private fs: GenericFileSystem = defaultFS

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:35


persistPath

Private persistPath: undefined | string

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:36


storesText

storesText: boolean = false

Implementation of

VectorStore.storesText

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:33

Accessors

client

get client(): any

Returns

any

Implementation of

VectorStore.client

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:51

Methods

add

add(embeddingResults): Promise<string[]>

Parameters

NameType
embeddingResultsBaseNode<Metadata>[]

Returns

Promise<string[]>

Implementation of

VectorStore.add

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:59


delete

delete(refDocId): Promise<void>

Parameters

NameType
refDocIdstring

Returns

Promise<void>

Implementation of

VectorStore.delete

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:77


get

get(textId): Promise<number[]>

Parameters

NameType
textIdstring

Returns

Promise<number[]>

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:55


persist

persist(persistPath?, fs?): Promise<void>

Parameters

NameType
persistPathstring
fs?GenericFileSystem

Returns

Promise<void>

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:149


query

query(query): Promise<VectorStoreQueryResult>

Parameters

NameType
queryVectorStoreQuery

Returns

Promise<VectorStoreQueryResult>

Implementation of

VectorStore.query

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:91


toDict

toDict(): SimpleVectorStoreData

Returns

SimpleVectorStoreData

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:197


fromDict

fromDict(saveDict): SimpleVectorStore

Parameters

NameType
saveDictSimpleVectorStoreData

Returns

SimpleVectorStore

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:190


fromPersistDir

fromPersistDir(persistDir?, fs?): Promise<SimpleVectorStore>

Parameters

NameTypeDefault value
persistDirstringDEFAULT_PERSIST_DIR
fsGenericFileSystemdefaultFS

Returns

Promise<SimpleVectorStore>

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:43


fromPersistPath

fromPersistPath(persistPath, fs?): Promise<SimpleVectorStore>

Parameters

NameTypeDefault value
persistPathstringundefined
fsGenericFileSystemdefaultFS

Returns

Promise<SimpleVectorStore>

Defined in

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:162