انتقل إلى المحتوى الرئيسي

Interface: BaseChatStore<AdditionalMessageOptions>

Type parameters

NameType
AdditionalMessageOptionsextends Record<string, unknown> = Record<string, unknown>

Implemented by

Methods

addMessage

addMessage(key, message): void

Parameters

NameType
keystring
messageChatMessage<AdditionalMessageOptions>

Returns

void

Defined in

packages/core/src/storage/chatStore/types.ts:14


deleteLastMessage

deleteLastMessage(key): null | ChatMessage<AdditionalMessageOptions>

Parameters

NameType
keystring

Returns

null | ChatMessage<AdditionalMessageOptions>

Defined in

packages/core/src/storage/chatStore/types.ts:20


deleteMessage

deleteMessage(key, idx): null | ChatMessage<AdditionalMessageOptions>

Parameters

NameType
keystring
idxnumber

Returns

null | ChatMessage<AdditionalMessageOptions>

Defined in

packages/core/src/storage/chatStore/types.ts:16


deleteMessages

deleteMessages(key): null | ChatMessage<AdditionalMessageOptions>[]

Parameters

NameType
keystring

Returns

null | ChatMessage<AdditionalMessageOptions>[]

Defined in

packages/core/src/storage/chatStore/types.ts:15


getKeys

getKeys(): string[]

Returns

string[]

Defined in

packages/core/src/storage/chatStore/types.ts:21


getMessages

getMessages(key): ChatMessage<AdditionalMessageOptions>[]

Parameters

NameType
keystring

Returns

ChatMessage<AdditionalMessageOptions>[]

Defined in

packages/core/src/storage/chatStore/types.ts:13


setMessages

setMessages(key, messages): void

Parameters

NameType
keystring
messagesChatMessage<AdditionalMessageOptions>[]

Returns

void

Defined in

packages/core/src/storage/chatStore/types.ts:9