bugfix: Dynamo Memory - messageAttributeName (#2011)
* bugfix: Dynamo Memory - messageAttributeName * bugfix: Dynamo Memory - messageAttributeName
This commit is contained in:
parent
813f622f6d
commit
509b2dd36d
|
|
@ -81,11 +81,11 @@ class DynamoDb_Memory implements INode {
|
||||||
}
|
}
|
||||||
|
|
||||||
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
|
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
|
||||||
return initalizeDynamoDB(nodeData, options)
|
return initializeDynamoDB(nodeData, options)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const initalizeDynamoDB = async (nodeData: INodeData, options: ICommonObject): Promise<BufferMemory> => {
|
const initializeDynamoDB = async (nodeData: INodeData, options: ICommonObject): Promise<BufferMemory> => {
|
||||||
const tableName = nodeData.inputs?.tableName as string
|
const tableName = nodeData.inputs?.tableName as string
|
||||||
const partitionKey = nodeData.inputs?.partitionKey as string
|
const partitionKey = nodeData.inputs?.partitionKey as string
|
||||||
const region = nodeData.inputs?.region as string
|
const region = nodeData.inputs?.region as string
|
||||||
|
|
@ -224,8 +224,8 @@ class BufferMemoryExtended extends FlowiseMemory implements MemoryMethods {
|
||||||
|
|
||||||
const dynamoKey = overrideSessionId ? this.overrideDynamoKey(overrideSessionId) : this.dynamoKey
|
const dynamoKey = overrideSessionId ? this.overrideDynamoKey(overrideSessionId) : this.dynamoKey
|
||||||
const tableName = this.tableName
|
const tableName = this.tableName
|
||||||
const messageAttributeName = this.messageAttributeName
|
|
||||||
|
|
||||||
|
const messageAttributeName = this.messageAttributeName ? this.messageAttributeName : 'messages'
|
||||||
const params: GetItemCommandInput = {
|
const params: GetItemCommandInput = {
|
||||||
TableName: tableName,
|
TableName: tableName,
|
||||||
Key: dynamoKey
|
Key: dynamoKey
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue