Skip to content

Documentation v1.0.0


Documentation / @openassistant/utils / ConversationCache

Class: ConversationCache ​

Defined in: packages/utils/src/conversation-cache.ts:46

ConversationCache manages ToolOutputManager instances per conversation, providing persistent caching across requests within the same conversation while maintaining isolation between different conversations.

Constructors ​

Constructor ​

new ConversationCache(config): ConversationCache

Defined in: packages/utils/src/conversation-cache.ts:51

Parameters ​

config ​

ConversationCacheConfig = {}

Returns ​

ConversationCache

Methods ​

clearAll() ​

clearAll(): void

Defined in: packages/utils/src/conversation-cache.ts:187

Manually clear all conversations from the cache.

Returns ​

void


getConfig() ​

getConfig(): Required<ConversationCacheConfig>

Defined in: packages/utils/src/conversation-cache.ts:198

Get the current configuration.

Returns ​

Required<ConversationCacheConfig>


getStatus() ​

getStatus(): Promise<ConversationCacheStatus>

Defined in: packages/utils/src/conversation-cache.ts:155

Get status information about the conversation cache.

Returns ​

Promise<ConversationCacheStatus>


getToolOutputManager() ​

getToolOutputManager(conversationId): Promise<ToolOutputManager>

Defined in: packages/utils/src/conversation-cache.ts:76

Get or create a ToolOutputManager for the given conversation ID.

Parameters ​

conversationId ​

string

Returns ​

Promise<ToolOutputManager>

Released under the MIT License.