Skip to main content

Class: AzureCosmosVCoreChatStore<AdditionalMessageOptions>

Extends

Type Parameters

AdditionalMessageOptions extends object = object

Constructors

new AzureCosmosVCoreChatStore()

new AzureCosmosVCoreChatStore<AdditionalMessageOptions>(__namedParameters): AzureCosmosVCoreChatStore<AdditionalMessageOptions>

Create a new AzureCosmosVCoreChatStore instance.

Parameters

__namedParameters: AzureCosmosVCoreChatStoreConfig

Returns

AzureCosmosVCoreChatStore<AdditionalMessageOptions>

Overrides

BaseChatStore.constructor

Defined in

packages/llamaindex/src/storage/chatStore/AzureCosmosMongovCoreChatStore.ts:32

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

BaseChatStore.addMessage

Defined in

packages/llamaindex/src/storage/chatStore/AzureCosmosMongovCoreChatStore.ts:129


client()

client(): MongoClient

Returns

MongoClient

Defined in

packages/llamaindex/src/storage/chatStore/AzureCosmosMongovCoreChatStore.ts:60


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

BaseChatStore.deleteMessage

Defined in

packages/llamaindex/src/storage/chatStore/AzureCosmosMongovCoreChatStore.ts:163


deleteMessages()

deleteMessages(key): Promise<void>

Deletes all messages for a given key.

Parameters

key: string

Returns

Promise<void>

Overrides

BaseChatStore.deleteMessages

Defined in

packages/llamaindex/src/storage/chatStore/AzureCosmosMongovCoreChatStore.ts:152


getKeys()

getKeys(): Promise<IterableIterator<string, any, any>>

Get all keys.

Returns

Promise<IterableIterator<string, any, any>>

Overrides

BaseChatStore.getKeys

Defined in

packages/llamaindex/src/storage/chatStore/AzureCosmosMongovCoreChatStore.ts:175


getMessages()

getMessages(key): Promise<ChatMessage<AdditionalMessageOptions>[]>

Get messages for a given key.

Parameters

key: string

Returns

Promise<ChatMessage<AdditionalMessageOptions>[]>

Overrides

BaseChatStore.getMessages

Defined in

packages/llamaindex/src/storage/chatStore/AzureCosmosMongovCoreChatStore.ts:114


setMessages()

setMessages(key, messages): Promise<void>

Set messages for a given key.

Parameters

key: string

messages: ChatMessage<AdditionalMessageOptions>[]

Returns

Promise<void>

Overrides

BaseChatStore.setMessages

Defined in

packages/llamaindex/src/storage/chatStore/AzureCosmosMongovCoreChatStore.ts:98


fromMongoClient()

static fromMongoClient(mongoClient, dbName, collectionName): AzureCosmosVCoreChatStore<object>

Parameters

mongoClient: MongoClient

dbName: string = DEFAULT_CHAT_DATABASE

collectionName: string = DEFAULT_CHAT_Collection

Returns

AzureCosmosVCoreChatStore<object>

Defined in

packages/llamaindex/src/storage/chatStore/AzureCosmosMongovCoreChatStore.ts:48