Skip to content
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

Add text episode type #46

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

danielchalef
Copy link
Member

@danielchalef danielchalef commented Aug 26, 2024

Add a new text episode type and update the extract_nodes function to handle it.

  • EpisodeType Enum:

    • Add text to the EpisodeType enum in graphiti_core/nodes.py.
    • Update the from_str method to handle the text episode type.
  • extract_nodes Function:

    • Update the extract_nodes function in graphiti_core/utils/maintenance/node_operations.py to handle the text episode type.
    • Use the message type prompt for both message and text episodes.

For more details, open the Copilot Workspace session.


🚀 This description was created by Ellipsis for commit 2905dde

Summary:

Add text episode type to EpisodeType enum and update extract_nodes to handle it like message episodes.

Key points:

  • Add text to EpisodeType enum in graphiti_core/nodes.py.
  • Update from_str method in EpisodeType to handle text.
  • Modify extract_nodes in graphiti_core/utils/maintenance/node_operations.py to process text episodes like message episodes.

Generated with ❤️ by ellipsis.dev

Add a new `text` episode type and update the `extract_nodes` function to handle it.

* **EpisodeType Enum:**
  - Add `text` to the `EpisodeType` enum in `graphiti_core/nodes.py`.
  - Update the `from_str` method to handle the `text` episode type.

* **extract_nodes Function:**
  - Update the `extract_nodes` function in `graphiti_core/utils/maintenance/node_operations.py` to handle the `text` episode type.
  - Use the `message` type prompt for both `message` and `text` episodes.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/getzep/graphiti?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 2905dde in 16 seconds

More details
  • Looked at 42 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. graphiti_core/nodes.py:58
  • Draft comment:
    Consider using a dictionary for mapping episode_type strings to EpisodeType values for better performance and readability.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The from_str method in EpisodeType should use a dictionary for mapping to improve performance and readability.
2. graphiti_core/utils/maintenance/node_operations.py:78
  • Draft comment:
    Consider adding an else clause to handle unexpected episode.source values gracefully, possibly logging a warning or raising an exception.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The extract_nodes function should handle unexpected episode types gracefully.

Workflow ID: wflow_29IB0nSD6OCWd7UT


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@danielchalef danielchalef merged commit a6d63f0 into main Aug 26, 2024
6 checks passed
@danielchalef danielchalef deleted the danielchalef/add-text-episode-type branch August 26, 2024 22:51
@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants