Class: AstraDBVectorStore
Implements
Constructors
constructor
• new AstraDBVectorStore(init?
): AstraDBVectorStore
Parameters
Name | Type |
---|---|
init? | Partial <AstraDBVectorStore > & { params? : { endpoint : string ; namespace : string ; token : string } } |
Returns
Defined in
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:21
Properties
astraDBClient
• astraDBClient: AstraDB
Defined in
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:14
collection
• Private
collection: undefined
| Collection
Defined in
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:19
contentKey
• contentKey: string
Defined in
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:16
flatMetadata
• flatMetadata: boolean
= true
Defined in
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:12
idKey
• idKey: string
Defined in
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:15
metadataKey
• metadataKey: string
Defined in
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:17
storesText
• storesText: boolean
= true
Implementation of
Defined in
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:11
Methods
add
▸ add(nodes
): Promise
<string
[]>
Add your document(s) to your Astra DB collection.
Parameters
Name | Type |
---|---|
nodes | BaseNode <Metadata >[] |
Returns
Promise
<string
[]>
and array of node ids which were added
Implementation of
Defined in
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:102
client
▸ client(): AstraDB
Get an instance of your Astra DB client.
Returns
AstraDB
the AstraDB client
Implementation of
Defined in
packages/core/src/storage/vectorStore/AstraDBVectorStore.ts:93
connect
▸ connect(collection
): Promise
<void
>
Connect to an existing collection in your Astra DB vector database. You must call this before adding, deleting, or querying.