-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[ACTION] Zep - Memory APIs #17817 #17897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis update introduces several new action modules for session and memory retrieval in the Zep component, adds supporting methods to the Zep app instance, and increments version numbers for existing actions and the package. The new modules enable fetching sessions, session details, session memory, and session messages, while minor version bumps reflect these enhancements. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ActionModule
participant ZepApp
participant ZepAPI
User->>ActionModule: Trigger action (e.g., Get Session)
ActionModule->>ZepApp: Call method (e.g., getSession({ sessionId }))
ZepApp->>ZepAPI: HTTP request to /sessions/{sessionId}
ZepAPI-->>ZepApp: Return session data
ZepApp-->>ActionModule: Return session data
ActionModule-->>User: Output result and summary
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
components/zep/actions/update-session/update-session.mjs (1)
41-41
: Minor typo in success message.There's a typo in the summary message: "ssession" should be "session".
- $.export("$summary", `Successfully updated ssession with ID ${this.sessionId}`); + $.export("$summary", `Successfully updated session with ID ${this.sessionId}`);components/zep/actions/get-session-memory/get-session-memory.mjs (1)
6-6
: Clarify description to match method behavior.The description states "Returns a memory" (singular) but the method name
listSessionMemory
suggests it returns multiple memory entries. Consider updating the description to be more precise about what is returned.- description: "Returns a memory for the session with the specified ID. [See the documentation](https://help.getzep.com/sdk-reference/memory/get)", + description: "Returns memory entries for the session with the specified ID. [See the documentation](https://help.getzep.com/sdk-reference/memory/get)",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
components/zep/actions/add-memory/add-memory.mjs
(1 hunks)components/zep/actions/add-user/add-user.mjs
(1 hunks)components/zep/actions/create-session/create-session.mjs
(1 hunks)components/zep/actions/get-session-memory/get-session-memory.mjs
(1 hunks)components/zep/actions/get-session-messages/get-session-messages.mjs
(1 hunks)components/zep/actions/get-session/get-session.mjs
(1 hunks)components/zep/actions/get-sessions/get-sessions.mjs
(1 hunks)components/zep/actions/update-session/update-session.mjs
(1 hunks)components/zep/package.json
(2 hunks)components/zep/zep.app.mjs
(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
📚 Learning: in `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "c...
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In `components/gainsight_px/actions/create-account/create-account.mjs`, the action name should be "Create Account" instead of "Create Memory".
Applied to files:
components/zep/actions/add-memory/add-memory.mjs
components/zep/actions/create-session/create-session.mjs
components/zep/actions/add-user/add-user.mjs
components/zep/actions/get-sessions/get-sessions.mjs
components/zep/actions/get-session-memory/get-session-memory.mjs
📚 Learning: when developing pipedream components, do not add built-in node.js modules like `fs` to `package.json...
Learnt from: jcortes
PR: PipedreamHQ/pipedream#14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.
Applied to files:
components/zep/package.json
📚 Learning: when exporting a summary message in the `run` method of an action, ensure the message is correctly f...
Learnt from: GTFalcao
PR: PipedreamHQ/pipedream#12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-07-04T18:11:59.822Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Applied to files:
components/zep/actions/get-sessions/get-sessions.mjs
components/zep/actions/get-session-messages/get-session-messages.mjs
components/zep/actions/get-session/get-session.mjs
components/zep/actions/get-session-memory/get-session-memory.mjs
🧬 Code Graph Analysis (4)
components/zep/actions/get-sessions/get-sessions.mjs (7)
components/zep/actions/get-session-memory/get-session-memory.mjs (1)
response
(19-22)components/zep/actions/create-session/create-session.mjs (1)
response
(38-46)components/zep/actions/add-memory/add-memory.mjs (1)
response
(43-51)components/zep/actions/add-user/add-user.mjs (1)
response
(50-60)components/zep/actions/get-session-messages/get-session-messages.mjs (1)
response
(19-22)components/zep/actions/get-session/get-session.mjs (1)
response
(19-22)components/zep/actions/update-session/update-session.mjs (1)
response
(33-40)
components/zep/actions/get-session-messages/get-session-messages.mjs (3)
components/zep/actions/get-session-memory/get-session-memory.mjs (1)
response
(19-22)components/zep/actions/get-session/get-session.mjs (1)
response
(19-22)components/zep/actions/get-sessions/get-sessions.mjs (1)
response
(13-15)
components/zep/actions/get-session/get-session.mjs (7)
components/zep/actions/get-session-memory/get-session-memory.mjs (1)
response
(19-22)components/zep/actions/create-session/create-session.mjs (1)
response
(38-46)components/zep/actions/add-memory/add-memory.mjs (1)
response
(43-51)components/zep/actions/add-user/add-user.mjs (1)
response
(50-60)components/zep/actions/get-session-messages/get-session-messages.mjs (1)
response
(19-22)components/zep/actions/update-session/update-session.mjs (1)
response
(33-40)components/zep/actions/get-sessions/get-sessions.mjs (1)
response
(13-15)
components/zep/actions/get-session-memory/get-session-memory.mjs (3)
components/zep/actions/get-session-messages/get-session-messages.mjs (1)
response
(19-22)components/zep/actions/get-session/get-session.mjs (1)
response
(19-22)components/zep/actions/get-sessions/get-sessions.mjs (1)
response
(13-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
- GitHub Check: pnpm publish
🔇 Additional comments (11)
components/zep/zep.app.mjs (1)
123-138
: LGTM! New session methods follow established patterns.The
getSession
andlistSessionMemory
methods are well-implemented and consistent with the existing codebase architecture. They properly use parameter destructuring, follow the same request pattern as other methods, and use appropriate RESTful endpoints.components/zep/actions/add-memory/add-memory.mjs (1)
8-8
: Version bump is appropriate for coordinated release.The version increment from "0.0.1" to "0.0.2" aligns with the package version bump and maintains consistency across all action modules in this release.
components/zep/actions/update-session/update-session.mjs (1)
8-8
: Version bump is consistent with coordinated release.The version increment from "0.0.1" to "0.0.2" maintains consistency across all action modules in this release.
components/zep/package.json (2)
3-3
: Appropriate minor version bump for new features.The version increment from 0.1.0 to 0.2.0 correctly follows semantic versioning for the addition of new session and memory retrieval functionality.
16-16
: Platform dependency update aligns with new features.The update to
@pipedream/platform
from ^3.0.3 to ^3.1.0 likely provides support for the new functionality being introduced.components/zep/actions/add-user/add-user.mjs (1)
8-8
: Version bump maintains consistency across action modules.The version increment from "0.0.1" to "0.0.2" is consistent with the coordinated release strategy across all Zep action modules.
components/zep/actions/create-session/create-session.mjs (1)
8-8
: LGTM! Version increment aligns with package updates.The version bump from "0.0.1" to "0.0.2" is consistent with the coordinated updates across the Zep component.
components/zep/actions/get-sessions/get-sessions.mjs (1)
1-19
: VerifiedlistSessions
response includes asessions
array
Confirmed in components/zep/zep.app.mjs that
listSessions(opts = {})
calls_makeRequest
and returns an object with asessions
property (an array)The summary
Successfully retrieved ${response.sessions.length} sessions
is therefore correct.components/zep/actions/get-session/get-session.mjs (1)
1-26
: getSession action implementation approvedThe
getSession
method has been verified incomponents/zep/zep.app.mjs
, and the action follows the established patterns for props, API call, and summary messaging.components/zep/actions/get-session-messages/get-session-messages.mjs (1)
1-26
: Consistent action implementation with clear messaging.The action follows the established patterns for session-related actions and uses appropriate prop definitions. The summary message clearly indicates the operation performed.
components/zep/actions/get-session-memory/get-session-memory.mjs (1)
18-24
: Confirmed listSessionMemory implementationFound in components/zep/zep.app.mjs – it destructures sessionId (and other opts, including $) and calls this._makeRequest({ path:
/sessions/${sessionId}/memory
, …opts }). This matches the established pattern for other session methods, so no changes are needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is failing checks because it needs version updated for new-message
, new-session
, and session-updated
.
key: "zep-get-sessions", | ||
name: "Get Sessions", | ||
description: "Returns all sessions. [See the documentation](https://help.getzep.com/sdk-reference/memory/list-sessions)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
zep, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.zep.listSessions({ | ||
$, | ||
}); | ||
$.export("$summary", `Successfully retrieved ${response.sessions.length} sessions`); | ||
return response; | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get-sessions
should return a paginated list of sessions. The prop, sessionId
shows it accepts order_by
and asc
props. I'd include those as optional for the user, and also a maxResults
prop.
WHY
Summary by CodeRabbit