Class: AzureCosmosNoSqlChatStore<AdditionalMessageOptions>
Extends
BaseChatStore
<AdditionalMessageOptions
>
Type Parameters
• AdditionalMessageOptions extends object
= object
Constructors
new AzureCosmosNoSqlChatStore()
new AzureCosmosNoSqlChatStore<
AdditionalMessageOptions
>(__namedParameters
):AzureCosmosNoSqlChatStore
<AdditionalMessageOptions
>
Parameters
• __namedParameters: AzureCosmosNoSqlChatStoreConfig
Returns
AzureCosmosNoSqlChatStore
<AdditionalMessageOptions
>
Overrides
Defined in
packages/llamaindex/src/storage/chatStore/AzureCosmosNoSqlChatStore.ts:77
Methods
addMessage()
addMessage(
key
,message
,idx
?):Promise
<void
>
Add a message for a given key.
Parameters
• key: string
• message: ChatMessage
<AdditionalMessageOptions
>
• idx?: number
Returns
Promise
<void
>
Overrides
Defined in
packages/llamaindex/src/storage/chatStore/AzureCosmosNoSqlChatStore.ts:288
client()
client():
CosmosClient
Returns
CosmosClient
Defined in
packages/llamaindex/src/storage/chatStore/AzureCosmosNoSqlChatStore.ts:112
deleteMessage()
deleteMessage(
key
,idx
):Promise
<void
>
Deletes one message at idx index for a given key.
Parameters
• key: string
• idx: number
Returns
Promise
<void
>
Overrides
Defined in
packages/llamaindex/src/storage/chatStore/AzureCosmosNoSqlChatStore.ts:318
deleteMessages()
deleteMessages(
key
):Promise
<void
>
Deletes all messages for a given key.
Parameters
• key: string
Returns
Promise
<void
>
Overrides
Defined in
packages/llamaindex/src/storage/chatStore/AzureCosmosNoSqlChatStore.ts:307
getKeys()
getKeys():
Promise
<IterableIterator
<string
,any
,any
>>
Get all keys.
Returns
Promise
<IterableIterator
<string
, any
, any
>>
Overrides
Defined in
packages/llamaindex/src/storage/chatStore/AzureCosmosNoSqlChatStore.ts:331
getMessages()
getMessages(
key
):Promise
<ChatMessage
<AdditionalMessageOptions
>[]>
Get messages for a given key.
Parameters
• key: string
Returns
Promise
<ChatMessage
<AdditionalMessageOptions
>[]>
Overrides
Defined in
packages/llamaindex/src/storage/chatStore/AzureCosmosNoSqlChatStore.ts:275
setMessages()
setMessages(
key
,messages
):Promise
<void
>
Set messages for a given key.
Parameters
• key: string
• messages: ChatMessage
<AdditionalMessageOptions
>[]
Returns
Promise
<void
>
Overrides
Defined in
packages/llamaindex/src/storage/chatStore/AzureCosmosNoSqlChatStore.ts:259
fromAadToken()
static
fromAadToken(config
):AzureCosmosNoSqlChatStore
<object
>
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
• config: object
& AzureCosmosNoSqlChatStoreConfig
= {}
Returns
AzureCosmosNoSqlChatStore
<object
>
Instance of AzureCosmosNoSqlKVStore
Defined in
packages/llamaindex/src/storage/chatStore/AzureCosmosNoSqlChatStore.ts:209
fromAccountAndKey()
static
fromAccountAndKey(config
):AzureCosmosNoSqlChatStore
<object
>
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
• config: object
& AzureCosmosNoSqlChatStoreConfig
= {}
Returns
AzureCosmosNoSqlChatStore
<object
>
Instance of AzureCosmosNoSqlKVStore
Defined in
packages/llamaindex/src/storage/chatStore/AzureCosmosNoSqlChatStore.ts:176
fromConnectionString()
static
fromConnectionString(config
):AzureCosmosNoSqlChatStore
<object
>
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
• config: object
& AzureCosmosNoSqlChatStoreConfig
= {}
Returns
AzureCosmosNoSqlChatStore
<object
>
Instance of AzureCosmosNoSqlKVStore
Defined in
packages/llamaindex/src/storage/chatStore/AzureCosmosNoSqlChatStore.ts:148