AzureCosmosDBNoSqlVectorStore
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:131
Extends
Section titled “Extends”BaseVectorStore
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AzureCosmosDBNoSqlVectorStore(
dbConfig
):AzureCosmosDBNoSqlVectorStore
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:174
Parameters
Section titled “Parameters”dbConfig
Section titled “dbConfig”AzureCosmosDBNoSQLConfig
& VectorStoreBaseParams
Returns
Section titled “Returns”AzureCosmosDBNoSqlVectorStore
Overrides
Section titled “Overrides”BaseVectorStore.constructor
Properties
Section titled “Properties”storesText
Section titled “storesText”storesText:
boolean
=true
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:132
Overrides
Section titled “Overrides”BaseVectorStore.storesText
cosmosClient
Section titled “cosmosClient”cosmosClient:
CosmosClient
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:141
The CosmosDB client. This is either passed in or created.
textKey
Section titled “textKey”textKey:
string
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:146
The key to use for the text field in the CosmosDB container. Default: “text”
flatMetadata
Section titled “flatMetadata”flatMetadata:
boolean
=true
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:148
idKey:
string
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:154
The key to use for the id field in the CosmosDB container. Default: “id”
metadataKey
Section titled “metadataKey”metadataKey:
string
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:160
The key to use for the metadata field in the CosmosDB container. Default: “metadata”
embeddingKey
Section titled “embeddingKey”embeddingKey:
string
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:166
The key to use for the vector embedding field in the CosmosDB container. Default: “embedding”
Methods
Section titled “Methods”client()
Section titled “client()”client():
unknown
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:170
Returns
Section titled “Returns”unknown
Overrides
Section titled “Overrides”BaseVectorStore.client
fromConnectionString()
Section titled “fromConnectionString()”
static
fromConnectionString(config
):AzureCosmosDBNoSqlVectorStore
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:232
Static method for creating an instance using a connection string.
If no connection string is provided, it will attempt to use the env variable AZURE_COSMOSDB_NOSQL_CONNECTION_STRING
as connection string.
Parameters
Section titled “Parameters”config
Section titled “config”object
& AzureCosmosDBNoSQLConfig
& VectorStoreBaseParams
= {}
Returns
Section titled “Returns”AzureCosmosDBNoSqlVectorStore
Instance of AzureCosmosDBNoSqlVectorStore
fromAccountAndKey()
Section titled “fromAccountAndKey()”
static
fromAccountAndKey(config
):AzureCosmosDBNoSqlVectorStore
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:256
Static method for creating an instance using a account endpoint and key.
If no endpoint and key is provided, it will attempt to use the env variable AZURE_COSMOSDB_NOSQL_ACCOUNT_ENDPOINT
as enpoint and AZURE_COSMOSDB_NOSQL_ACCOUNT_KEY
as key.
Parameters
Section titled “Parameters”config
Section titled “config”object
& AzureCosmosDBNoSQLConfig
& VectorStoreBaseParams
= {}
Returns
Section titled “Returns”AzureCosmosDBNoSqlVectorStore
Instance of AzureCosmosDBNoSqlVectorStore
fromUriAndManagedIdentity()
Section titled “fromUriAndManagedIdentity()”
static
fromUriAndManagedIdentity(config
):AzureCosmosDBNoSqlVectorStore
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:284
Static method for creating an instance using account endpoint and managed identity.
If no endpoint and credentials are provided, it will attempt to use the env variable AZURE_COSMOSDB_NOSQL_ACCOUNT_ENDPOINT
as endpoint and use DefaultAzureCredential() as credentials.
Parameters
Section titled “Parameters”config
Section titled “config”object
& AzureCosmosDBNoSQLConfig
& VectorStoreBaseParams
= {}
Returns
Section titled “Returns”AzureCosmosDBNoSqlVectorStore
Instance of AzureCosmosDBNoSqlVectorStore
add(
nodes
):Promise
<string
[]>
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:310
Adds document to the CosmosDB container.
Parameters
Section titled “Parameters”BaseNode
<Metadata
>[]
Returns
Section titled “Returns”Promise
<string
[]>
an array of document ids which were added
Overrides
Section titled “Overrides”BaseVectorStore.add
delete()
Section titled “delete()”delete(
refDocId
,deleteOptions?
):Promise
<void
>
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:353
Delete a document from the CosmosDB container.
Parameters
Section titled “Parameters”refDocId
Section titled “refDocId”string
The id of the document to delete
deleteOptions?
Section titled “deleteOptions?”object
Any options to pass to the container.item.delete function
Returns
Section titled “Returns”Promise
<void
>
Promise that resolves if the delete query did not throw an error.
Overrides
Section titled “Overrides”BaseVectorStore.delete
query()
Section titled “query()”query(
query
,options
):Promise
<VectorStoreQueryResult
>
Defined in: .build/typescript/packages/providers/storage/azure/src/vectorStore/AzureCosmosDBNoSqlVectorStore.ts:364
Performs a vector similarity search query in the CosmosDB container.
Parameters
Section titled “Parameters”VectorStoreQuery
VectorStoreQuery
options
Section titled “options”Returns
Section titled “Returns”Promise
<VectorStoreQueryResult
>
List of nodes along with similarityScore
Overrides
Section titled “Overrides”BaseVectorStore.query