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

Use sessions search #197

Merged
merged 3 commits into from
Oct 22, 2024
Merged

Use sessions search #197

merged 3 commits into from
Oct 22, 2024

Conversation

prasmussen15
Copy link
Collaborator

@prasmussen15 prasmussen15 commented Oct 22, 2024

Important

Refactor database query execution to use sessions and rename query parameters for consistency across multiple files.

  • Database Query Execution:
    • Refactor to use session.run() for executing queries in search_utils.py, community_operations.py, and graph_data_operations.py.
    • Replace execute_query() with session.run() in functions like get_mentioned_nodes(), get_communities_by_nodes(), edge_fulltext_search(), and others.
  • Parameter Naming:
    • Rename _database to database_ in edges.py, nodes.py, search_utils.py, community_operations.py, and graph_data_operations.py for consistency.
  • Miscellaneous:
    • Minor adjustments in query handling and logging across the affected files.

This description was created by Ellipsis for 5dd92c8. It will automatically update as commits are pushed.

@prasmussen15 prasmussen15 changed the title Use seassions search Use sessions search Oct 22, 2024
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.

❌ Changes requested. Reviewed everything up to c5541ec in 43 seconds

More details
  • Looked at 577 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. graphiti_core/search/search_utils.py:90
  • Draft comment:
    Missing comma in the Cypher query. Add a comma after n.name_embedding AS name_embedding.
                n.name_embedding AS name_embedding,
  • Reason this comment was not posted:
    Marked as duplicate.
2. graphiti_core/search/search_utils.py:91
  • Draft comment:
    Missing comma in the Cypher query. Add a comma after n.name_embedding AS name_embedding.
                n.name_embedding AS name_embedding,
  • Reason this comment was not posted:
    Marked as duplicate.
3. graphiti_core/search/search_utils.py:116
  • Draft comment:
    Missing comma in the Cypher query. Add a comma after c.name_embedding AS name_embedding.
            c.name_embedding AS name_embedding,
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_gB92GtwMtjAlKsEM


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

graphiti_core/search/search_utils.py Outdated Show resolved Hide resolved
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! Incremental review on 5dd92c8 in 21 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. graphiti_core/search/search_utils.py:87
  • Draft comment:
    Consider renaming database=DEFAULT_DATABASE to database_=DEFAULT_DATABASE for consistency with the PR description. This applies to other instances as well (e.g., lines 107, 161, 214, 244, 279, 321, 356).
  • Reason this comment was not posted:
    Confidence changes required: 80%
    The PR description mentions renaming _database to database_ for consistency, but this change is not reflected in the code. The code still uses database=DEFAULT_DATABASE in multiple places.
2. graphiti_core/search/search_utils.py:87
  • Draft comment:
    Consider refactoring the repeated pattern of executing queries and processing results into a separate function to adhere to the DRY principle. This pattern appears in multiple functions such as get_mentioned_nodes, get_communities_by_nodes, edge_fulltext_search, etc.
  • Reason this comment was not posted:
    Confidence changes required: 80%
    The code contains a repeated pattern for executing queries and processing results. This can be refactored to follow the DRY principle.

Workflow ID: wflow_enASk0B7BaVrvXo2


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

@prasmussen15 prasmussen15 merged commit 50d2308 into main Oct 22, 2024
7 checks passed
@prasmussen15 prasmussen15 deleted the use-seassions-search branch October 22, 2024 14:01
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 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