Skip to content

agent-plugin-conversation-history / Exports / FileHistoryStorage

Class: FileHistoryStorage

File storage implementation

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new FileHistoryStorage(filePath): FileHistoryStorage

Parameters

NameType
filePathstring

Returns

FileHistoryStorage

Defined in

agent-plugin-conversation-history/src/storages/file-storage.ts:11

Methods

save

save(conversationId, _entry): Promise<void>

Parameters

NameType
conversationIdstring
_entryIConversationHistoryEntry

Returns

Promise<void>

Implementation of

IHistoryStorage.save

Defined in

agent-plugin-conversation-history/src/storages/file-storage.ts:16


load

load(conversationId): Promise<undefined | IConversationHistoryEntry>

Parameters

NameType
conversationIdstring

Returns

Promise<undefined | IConversationHistoryEntry>

Implementation of

IHistoryStorage.load

Defined in

agent-plugin-conversation-history/src/storages/file-storage.ts:33


list

list(): Promise<string[]>

Returns

Promise<string[]>

Implementation of

IHistoryStorage.list

Defined in

agent-plugin-conversation-history/src/storages/file-storage.ts:50


delete

delete(conversationId): Promise<boolean>

Parameters

NameType
conversationIdstring

Returns

Promise<boolean>

Implementation of

IHistoryStorage.delete

Defined in

agent-plugin-conversation-history/src/storages/file-storage.ts:65


clear

clear(): Promise<void>

Returns

Promise<void>

Implementation of

IHistoryStorage.clear

Defined in

agent-plugin-conversation-history/src/storages/file-storage.ts:82

Released under the MIT License.