Class: AstraDBVectorStore
Extends
Implements
Constructors
new AstraDBVectorStore()
new AstraDBVectorStore(
init
?):AstraDBVectorStore
Parameters
• init?: Partial
<AstraDBVectorStore
> & object
& Partial
<IEmbedModel
>
Returns
Overrides
Source
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:28
Properties
astraClient
private
astraClient:DataAPIClient
Source
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:24
astraDB
private
astraDB:Db
Source
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:25
collection
private
collection:undefined
|Collection
<SomeDoc
>
Source
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:26
contentKey
contentKey:
string
Source
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:22
embedModel
embedModel:
BaseEmbedding
Inherited from
Source
packages/core/src/storage/vectorStore/types.ts:86
flatMetadata
flatMetadata:
boolean
=true
Source
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:19
idKey
idKey:
string
Source
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:21
storesText
storesText:
boolean
=true
Implementation of
VectorStoreNoEmbedModel
. storesText
Source
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:18
Methods
add()
add(
nodes
):Promise
<string
[]>
Add your document(s) to your Astra DB collection.
Parameters
• nodes: BaseNode
<Metadata
>[]
Returns
Promise
<string
[]>
and array of node ids which were added
Implementation of
Source
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:107
client()
client():
DataAPIClient
Get an instance of your Astra DB client.
Returns
DataAPIClient
the AstraDB client
Implementation of
VectorStoreNoEmbedModel
. client
Source
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:98
connect()
connect(
collection
):Promise
<void
>
Connect to an existing collection in your Astra DB vector database.
You must call this method or createAndConnect
before adding, deleting, or querying.
Parameters
• collection: string
Returns
Promise
<void
>
Promise that resolves if the connection did not throw an error.