add abstract methods

This commit is contained in:
Henry 2023-12-26 16:13:14 +00:00
parent 5a76076ce4
commit b6d08268d4
4 changed files with 18 additions and 2 deletions

View File

@ -306,6 +306,10 @@ class BufferMemoryExtended extends FlowiseMemory implements MemoryMethods {
await this.dynamodbClient.send(new DeleteItemCommand(params))
await this.clear()
}
async resumeMessages(): Promise<void> {
return
}
}
module.exports = { nodeClass: DynamoDb_Memory }

View File

@ -221,6 +221,10 @@ class BufferMemoryExtended extends FlowiseMemory implements MemoryMethods {
await this.collection.deleteOne({ sessionId: id })
await this.clear()
}
async resumeMessages(): Promise<void> {
return
}
}
module.exports = { nodeClass: MongoDB_Memory }

View File

@ -1,4 +1,4 @@
import { INode, INodeData, INodeParams, ICommonObject, IMessage, MessageType } from '../../../src/Interface'
import { INode, INodeData, INodeParams, ICommonObject, IMessage, MessageType, FlowiseMemory, MemoryMethods } from '../../../src/Interface'
import {
convertBaseMessagetoIMessage,
getBaseClasses,
@ -187,7 +187,7 @@ interface BufferMemoryExtendedInput {
sessionId: string
}
class BufferMemoryExtended extends BufferMemory {
class BufferMemoryExtended extends FlowiseMemory implements MemoryMethods {
isSessionIdUsingChatMessageId? = false
sessionId = ''
redisClient: Redis
@ -236,6 +236,10 @@ class BufferMemoryExtended extends BufferMemory {
await this.redisClient.del(id)
await this.clear()
}
async resumeMessages(): Promise<void> {
return
}
}
module.exports = { nodeClass: RedisBackedChatMemory_Memory }

View File

@ -186,6 +186,10 @@ class BufferMemoryExtended extends FlowiseMemory implements MemoryMethods {
await this.redisClient.del(id)
await this.clear()
}
async resumeMessages(): Promise<void> {
return
}
}
module.exports = { nodeClass: UpstashRedisBackedChatMemory_Memory }