Skip to content

Commit 9da7a1b

Browse files
feat: Finalize zep-cloud integration, update naming
1 parent 29c86f7 commit 9da7a1b

File tree

6 files changed

+27
-17
lines changed

6 files changed

+27
-17
lines changed

packages/components/nodes/memory/ZepMemory/ZepMemory.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class ZepMemory_Memory implements INode {
1717
inputs: INodeParams[]
1818

1919
constructor() {
20-
this.label = 'Zep Memory'
21-
this.name = 'ZepMemory'
20+
this.label = 'Zep Memory - Open Source'
21+
this.name = 'Zep Memory (Open Source)'
2222
this.version = 2.0
2323
this.type = 'ZepMemory'
2424
this.icon = 'zep.svg'
@@ -97,11 +97,11 @@ class ZepMemory_Memory implements INode {
9797
}
9898

9999
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
100-
return await initalizeZep(nodeData, options)
100+
return await initializeZep(nodeData, options)
101101
}
102102
}
103103

104-
const initalizeZep = async (nodeData: INodeData, options: ICommonObject): Promise<ZepMemory> => {
104+
const initializeZep = async (nodeData: INodeData, options: ICommonObject): Promise<ZepMemory> => {
105105
const baseURL = nodeData.inputs?.baseURL as string
106106
const aiPrefix = nodeData.inputs?.aiPrefix as string
107107
const humanPrefix = nodeData.inputs?.humanPrefix as string

packages/components/nodes/memory/ZepMemoryCloud/ZepMemoryCloud.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ZepMemoryCloud_Memory implements INode {
2020

2121
constructor() {
2222
this.label = 'Zep Memory - Cloud'
23-
this.name = 'ZepMemory (Cloud)'
23+
this.name = 'Zep Memory (Cloud)'
2424
this.version = 2.0
2525
this.type = 'ZepMemory'
2626
this.icon = 'zep.svg'
@@ -75,6 +75,13 @@ class ZepMemoryCloud_Memory implements INode {
7575
default: 'chat_history',
7676
additionalParams: true
7777
},
78+
{
79+
label: 'Input Key',
80+
name: 'inputKey',
81+
type: 'string',
82+
default: 'input',
83+
additionalParams: true
84+
},
7885
{
7986
label: 'Output Key',
8087
name: 'outputKey',
@@ -86,28 +93,31 @@ class ZepMemoryCloud_Memory implements INode {
8693
}
8794

8895
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
89-
return await initalizeZep(nodeData, options)
96+
return await initializeZep(nodeData, options)
9097
}
9198
}
9299

93-
const initalizeZep = async (nodeData: INodeData, options: ICommonObject): Promise<ZepMemory> => {
100+
const initializeZep = async (nodeData: INodeData, options: ICommonObject): Promise<ZepMemory> => {
94101
const aiPrefix = nodeData.inputs?.aiPrefix as string
95102
const humanPrefix = nodeData.inputs?.humanPrefix as string
96103
const memoryKey = nodeData.inputs?.memoryKey as string
104+
const inputKey = nodeData.inputs?.inputKey as string
105+
97106
const memoryType = nodeData.inputs?.memoryType as 'perpetual' | 'message_window'
98107
const sessionId = nodeData.inputs?.sessionId as string
99108

100109
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
101110
const apiKey = getCredentialParam('apiKey', credentialData, nodeData)
102-
103111
const obj: ZepMemoryInput & ZepMemoryExtendedInput = {
104112
apiKey,
105113
baseURL: 'https://api.development.getzep.com',
106114
aiPrefix,
107115
humanPrefix,
108116
memoryKey,
109117
sessionId,
110-
memoryType: memoryType
118+
inputKey,
119+
memoryType: memoryType,
120+
returnMessages: true
111121
}
112122

113123
return new ZepMemoryExtended(obj)
@@ -157,7 +167,7 @@ class ZepMemoryExtended extends ZepMemory implements MemoryMethods {
157167
const id = overrideSessionId ? overrideSessionId : this.sessionId
158168
const input = msgArray.find((msg) => msg.type === 'userMessage')
159169
const output = msgArray.find((msg) => msg.type === 'apiMessage')
160-
const inputValues = { ['input']: input?.text }
170+
const inputValues = { [this.inputKey ?? 'input']: input?.text }
161171
const outputValues = { output: output?.text }
162172

163173
await this.saveContext(inputValues, outputValues, id)

packages/components/nodes/vectorstores/Zep/Zep.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class Zep_VectorStores implements INode {
2222
outputs: INodeOutputsValue[]
2323

2424
constructor() {
25-
this.label = 'Zep'
26-
this.name = 'zep'
25+
this.label = 'Zep Collection - Open Source'
26+
this.name = 'Zep Collection (Open Source)'
2727
this.version = 2.0
2828
this.type = 'Zep'
2929
this.icon = 'zep.svg'

packages/components/nodes/vectorstores/Zep/Zep_Existing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class Zep_Existing_VectorStores implements INode {
2020
outputs: INodeOutputsValue[]
2121

2222
constructor() {
23-
this.label = 'Zep Load Existing Index'
24-
this.name = 'zepExistingIndex'
23+
this.label = 'Zep Load Existing Index (Open Source)'
24+
this.name = 'Zep Existing Index (Open Source)'
2525
this.version = 1.0
2626
this.type = 'Zep'
2727
this.icon = 'zep.svg'

packages/components/nodes/vectorstores/Zep/Zep_Upsert.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class Zep_Upsert_VectorStores implements INode {
2020
outputs: INodeOutputsValue[]
2121

2222
constructor() {
23-
this.label = 'Zep Upsert Document'
24-
this.name = 'zepUpsert'
23+
this.label = 'Zep Upsert Document (Open Source)'
24+
this.name = 'Zep Upsert (Open Source)'
2525
this.version = 1.0
2626
this.type = 'Zep'
2727
this.icon = 'zep.svg'

packages/components/nodes/vectorstores/ZepCloud/ZepCloud.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Zep_CloudVectorStores implements INode {
2323

2424
constructor() {
2525
this.label = 'Zep Collection - Cloud'
26-
this.name = 'zepCloud'
26+
this.name = 'Zep Collection Cloud'
2727
this.version = 2.0
2828
this.type = 'Zep'
2929
this.icon = 'zep.svg'

0 commit comments

Comments
 (0)