UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

45 lines (44 loc) • 1.41 kB
/** * Conversation Selector for Loop Mode * Handles discovery and selection of stored conversations from Redis */ import type { ConversationSummary, RedisStorageConfig } from "../../types/index.js"; export declare class ConversationSelector { private redisClient; private redisConfig; private conversationCache; private cacheTimestamp; constructor(redisConfig?: RedisStorageConfig); /** * Initialize Redis connection */ private initializeRedis; /** * Get available conversations for a user */ getAvailableConversations(userId?: string): Promise<ConversationSummary[]>; /** * Display conversation menu and get user selection */ displayConversationMenu(userId?: string): Promise<string | "NEW_CONVERSATION">; /** * Check if there are any stored conversations */ hasStoredConversations(userId?: string): Promise<boolean>; /** * Close Redis connection */ close(): Promise<void>; private scanConversationKeys; private processConversationKeys; private processSingleConversationKey; private sortConversationsByDate; private updateCache; private filterConversationsByUser; private createMenuChoices; private showSelectionPrompt; private handleRetrievalError; private handleMenuError; private createConversationSummary; private formatConversationChoice; }