AzureCosmosNoSqlChatStore
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:61
Extends
Section titled “Extends”BaseChatStore<AdditionalMessageOptions>
Type Parameters
Section titled “Type Parameters”AdditionalMessageOptions
Section titled “AdditionalMessageOptions”AdditionalMessageOptions extends object = object
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AzureCosmosNoSqlChatStore<
AdditionalMessageOptions>(__namedParameters):AzureCosmosNoSqlChatStore<AdditionalMessageOptions>
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:77
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”AzureCosmosNoSqlChatStoreConfig
Returns
Section titled “Returns”AzureCosmosNoSqlChatStore<AdditionalMessageOptions>
Overrides
Section titled “Overrides”BaseChatStore<AdditionalMessageOptions>.constructor
Methods
Section titled “Methods”client()
Section titled “client()”client():
CosmosClient
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:112
Returns
Section titled “Returns”CosmosClient
fromConnectionString()
Section titled “fromConnectionString()”
staticfromConnectionString(config):AzureCosmosNoSqlChatStore
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:148
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 & AzureCosmosNoSqlChatStoreConfig = {}
Returns
Section titled “Returns”AzureCosmosNoSqlChatStore
Instance of AzureCosmosNoSqlKVStore
fromAccountAndKey()
Section titled “fromAccountAndKey()”
staticfromAccountAndKey(config):AzureCosmosNoSqlChatStore
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:176
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 & AzureCosmosNoSqlChatStoreConfig = {}
Returns
Section titled “Returns”AzureCosmosNoSqlChatStore
Instance of AzureCosmosNoSqlKVStore
fromAadToken()
Section titled “fromAadToken()”
staticfromAadToken(config):AzureCosmosNoSqlChatStore
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:209
Static method for creating an instance using AAD token.
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 & AzureCosmosNoSqlChatStoreConfig = {}
Returns
Section titled “Returns”AzureCosmosNoSqlChatStore
Instance of AzureCosmosNoSqlKVStore
setMessages()
Section titled “setMessages()”setMessages(
key,messages):Promise<void>
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:259
Set messages for a given key.
Parameters
Section titled “Parameters”string
messages
Section titled “messages”ChatMessage<AdditionalMessageOptions>[]
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”BaseChatStore.setMessages
getMessages()
Section titled “getMessages()”getMessages(
key):Promise<ChatMessage<AdditionalMessageOptions>[]>
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:275
Get messages for a given key.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<ChatMessage<AdditionalMessageOptions>[]>
Overrides
Section titled “Overrides”BaseChatStore.getMessages
addMessage()
Section titled “addMessage()”addMessage(
key,message,idx?):Promise<void>
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:288
Add a message for a given key.
Parameters
Section titled “Parameters”string
message
Section titled “message”ChatMessage<AdditionalMessageOptions>
number
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”BaseChatStore.addMessage
deleteMessages()
Section titled “deleteMessages()”deleteMessages(
key):Promise<void>
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:307
Deletes all messages for a given key.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”BaseChatStore.deleteMessages
deleteMessage()
Section titled “deleteMessage()”deleteMessage(
key,idx):Promise<void>
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:318
Deletes one message at idx index for a given key.
Parameters
Section titled “Parameters”string
number
Returns
Section titled “Returns”Promise<void>
Overrides
Section titled “Overrides”BaseChatStore.deleteMessage
getKeys()
Section titled “getKeys()”getKeys():
Promise<IterableIterator<string,any,any>>
Defined in: .build/typescript/packages/providers/storage/azure/src/chatStore/AzureCosmosNoSqlChatStore.ts:331
Get all keys.
Returns
Section titled “Returns”Promise<IterableIterator<string, any, any>>
Overrides
Section titled “Overrides”BaseChatStore.getKeys