Class: SimpleVectorStore
Implements
Constructors
constructor
• new SimpleVectorStore(data?
, fs?
): SimpleVectorStore
Parameters
Name | Type |
---|---|
data? | SimpleVectorStoreData |
fs? | GenericFileSystem |
Returns
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:37
Properties
data
• Private
data: SimpleVectorStoreData
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:33
fs
• Private
fs: GenericFileSystem
= defaultFS
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:34
persistPath
• Private
persistPath: undefined
| string
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:35
storesText
• storesText: boolean
= false
Implementation of
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:32
Accessors
client
• get
client(): any
Returns
any
Implementation of
VectorStore.client
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:50
Methods
add
▸ add(embeddingResults
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
embeddingResults | BaseNode <Metadata >[] |
Returns
Promise
<string
[]>
Implementation of
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:58
delete
▸ delete(refDocId
): Promise
<void
>
Parameters
Name | Type |
---|---|
refDocId | string |
Returns
Promise
<void
>
Implementation of
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:76
get
▸ get(textId
): Promise
<number
[]>
Parameters
Name | Type |
---|---|
textId | string |
Returns
Promise
<number
[]>
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:54
persist
▸ persist(persistPath?
, fs?
): Promise
<void
>
Parameters
Name | Type |
---|---|
persistPath | string |
fs? | GenericFileSystem |
Returns
Promise
<void
>
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:145
query
▸ query(query
): Promise
<VectorStoreQueryResult
>
Parameters
Name | Type |
---|---|
query | VectorStoreQuery |
Returns
Promise
<VectorStoreQueryResult
>
Implementation of
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:87
toDict
▸ toDict(): SimpleVectorStoreData
Returns
SimpleVectorStoreData
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:195
fromDict
▸ fromDict(saveDict
): SimpleVectorStore
Parameters
Name | Type |
---|---|
saveDict | SimpleVectorStoreData |
Returns
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:188
fromPersistDir
▸ fromPersistDir(persistDir?
, fs?
): Promise
<SimpleVectorStore
>
Parameters
Name | Type | Default value |
---|---|---|
persistDir | string | DEFAULT_PERSIST_DIR |
fs | GenericFileSystem | defaultFS |
Returns
Promise
<SimpleVectorStore
>
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:42
fromPersistPath
▸ fromPersistPath(persistPath
, fs?
): Promise
<SimpleVectorStore
>
Parameters
Name | Type |
---|---|
persistPath | string |
fs? | GenericFileSystem |
Returns
Promise
<SimpleVectorStore
>
Defined in
packages/core/src/storage/vectorStore/SimpleVectorStore.ts:158