{"version":3,"file":"ioredis.d.cts","names":["Redis","RedisOptions","BaseListChatMessageHistory","BaseMessage","RedisChatMessageHistoryInput","RedisChatMessageHistory","Promise"],"sources":["../../../src/stores/message/ioredis.d.ts"],"sourcesContent":["import { Redis, RedisOptions } from \"ioredis\";\nimport { BaseListChatMessageHistory } from \"@langchain/core/chat_history\";\nimport { BaseMessage } from \"@langchain/core/messages\";\n/**\n * Type for the input parameter of the RedisChatMessageHistory\n * constructor. It includes fields for the session ID, session TTL, Redis\n * URL, Redis configuration, and Redis client.\n */\nexport type RedisChatMessageHistoryInput = {\n    sessionId: string;\n    sessionTTL?: number;\n    url?: string;\n    config?: RedisOptions;\n    client?: Redis;\n};\n/**\n * Class used to store chat message history in Redis. It provides methods\n * to add, retrieve, and clear messages from the chat history.\n * @example\n * ```typescript\n * const chatHistory = new RedisChatMessageHistory({\n *   sessionId: new Date().toISOString(),\n *   sessionTTL: 300,\n *   url: \"redis:\n * });\n *\n * const chain = new ConversationChain({\n *   llm: new ChatOpenAI({ model: \"gpt-4o-mini\", temperature: 0 }),\n *   memory: { chatHistory },\n * });\n *\n * const response = await chain.invoke({\n *   input: \"What did I just say my name was?\",\n * });\n * console.log({ response });\n * ```\n */\nexport declare class RedisChatMessageHistory extends BaseListChatMessageHistory {\n    lc_namespace: string[];\n    get lc_secrets(): {\n        url: string;\n        \"config.username\": string;\n        \"config.password\": string;\n    };\n    client: Redis;\n    private sessionId;\n    private sessionTTL?;\n    constructor(fields: RedisChatMessageHistoryInput);\n    /**\n     * Retrieves all messages from the chat history.\n     * @returns Promise that resolves with an array of BaseMessage instances.\n     */\n    getMessages(): Promise<BaseMessage[]>;\n    /**\n     * Adds a message to the chat history.\n     * @param message The message to add to the chat history.\n     * @returns Promise that resolves when the message has been added.\n     */\n    addMessage(message: BaseMessage): Promise<void>;\n    /**\n     * Clears all messages from the chat history.\n     * @returns Promise that resolves when the chat history has been cleared.\n     */\n    clear(): Promise<void>;\n}\n//# sourceMappingURL=ioredis.d.ts.map"],"mappings":";;;;;;;;AAQA;AA6BA;;AAUwBI,KAvCZA,4BAAAA,GAuCYA;EAKGD,SAAAA,EAAAA,MAAAA;EAARG,UAAAA,CAAAA,EAAAA,MAAAA;EAMKH,GAAAA,CAAAA,EAAAA,MAAAA;EAAcG,MAAAA,CAAAA,EA9CzBL,YA8CyBK;EAKzBA,MAAAA,CAAAA,EAlDAN,KAkDAM;CA1BwCJ;AAA0B;;;;;;;;;;;;;;;;;;;;;;cAA1DG,uBAAAA,SAAgCH,0BAAAA;;;;;;;UAOzCF;;;sBAGYI;;;;;iBAKLE,QAAQH;;;;;;sBAMHA,cAAcG;;;;;WAKzBA"}