Skip to content

Commit 0bdf62e

Browse files
committed
Added actions
1 parent 2138df9 commit 0bdf62e

File tree

11 files changed

+124
-14
lines changed

11 files changed

+124
-14
lines changed

components/zep/actions/add-memory/add-memory.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "zep-add-memory",
66
name: "Add Memory to Session",
77
description: "Adds memory to an existing session in Zep. [See the documentation](https://help.getzep.com/api-reference/memory/add)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
zep,

components/zep/actions/add-user/add-user.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "zep-add-user",
66
name: "Add User",
77
description: "Adds a user in Zep. [See the documentation](https://help.getzep.com/api-reference/user/add)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
zep,

components/zep/actions/create-session/create-session.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "zep-create-session",
66
name: "Create Session",
77
description: "Creates a new session in Zep. [See the documentation](https://help.getzep.com/api-reference/memory/add-session)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
zep,
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import zep from "../../zep.app.mjs";
2+
3+
export default {
4+
key: "zep-get-session-memory",
5+
name: "Get Session Memory",
6+
description: "Returns a memory for the session with the specified ID. [See the documentation](https://help.getzep.com/sdk-reference/memory/get)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
zep,
11+
sessionId: {
12+
propDefinition: [
13+
zep,
14+
"sessionId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.zep.listSessionMemory({
20+
$,
21+
sessionId: this.sessionId,
22+
});
23+
$.export("$summary", `Successfully retrieved memory for the session with ID: ${this.sessionId}`);
24+
return response;
25+
},
26+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import zep from "../../zep.app.mjs";
2+
3+
export default {
4+
key: "zep-get-session-messages",
5+
name: "Get Session Messages",
6+
description: "Returns messages for the session with the specified ID. [See the documentation](https://help.getzep.com/sdk-reference/memory/get-session-messages)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
zep,
11+
sessionId: {
12+
propDefinition: [
13+
zep,
14+
"sessionId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.zep.listMessages({
20+
$,
21+
sessionId: this.sessionId,
22+
});
23+
$.export("$summary", `Successfully retrieved messages for the session with ID: ${this.sessionId}`);
24+
return response;
25+
},
26+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import zep from "../../zep.app.mjs";
2+
3+
export default {
4+
key: "zep-get-session",
5+
name: "Get Session",
6+
description: "Returns the session with the specified ID. [See the documentation](https://help.getzep.com/sdk-reference/memory/get-session)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
zep,
11+
sessionId: {
12+
propDefinition: [
13+
zep,
14+
"sessionId",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.zep.getSession({
20+
$,
21+
sessionId: this.sessionId,
22+
});
23+
$.export("$summary", `Successfully retrieved the session with ID: ${this.sessionId}`);
24+
return response;
25+
},
26+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import zep from "../../zep.app.mjs";
2+
3+
export default {
4+
key: "zep-get-sessions",
5+
name: "Get Sessions",
6+
description: "Returns all sessions. [See the documentation](https://help.getzep.com/sdk-reference/memory/list-sessions)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
zep,
11+
},
12+
async run({ $ }) {
13+
const response = await this.zep.listSessions({
14+
$,
15+
});
16+
$.export("$summary", `Successfully retrieved ${response.sessions.length} sessions`);
17+
return response;
18+
},
19+
};

components/zep/actions/update-session/update-session.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "zep-update-session",
66
name: "Update Session",
77
description: "Updates an existing session in Zep. [See the documentation](https://help.getzep.com/api-reference/memory/update-session)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
zep,

components/zep/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/zep",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Pipedream Zep Components",
55
"main": "zep.app.mjs",
66
"keywords": [
@@ -13,6 +13,6 @@
1313
"access": "public"
1414
},
1515
"dependencies": {
16-
"@pipedream/platform": "^3.0.3"
16+
"@pipedream/platform": "^3.1.0"
1717
}
1818
}

components/zep/zep.app.mjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,21 @@ export default {
120120
...opts,
121121
});
122122
},
123+
getSession({
124+
sessionId, ...opts
125+
}) {
126+
return this._makeRequest({
127+
path: `/sessions/${sessionId}`,
128+
...opts,
129+
});
130+
},
131+
listSessionMemory({
132+
sessionId, ...opts
133+
}) {
134+
return this._makeRequest({
135+
path: `/sessions/${sessionId}/memory`,
136+
...opts,
137+
});
138+
},
123139
},
124140
};

0 commit comments

Comments
 (0)