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

fix(agents-api): Fix search stuff #695

Merged
merged 1 commit into from
Oct 18, 2024
Merged

fix(agents-api): Fix search stuff #695

merged 1 commit into from
Oct 18, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Oct 18, 2024

Signed-off-by: Diwank Singh Tomer diwank.singh@gmail.com


Important

Add clean option to extract_keywords and filter empty queries in nlp.py; update imports and defaults in utils.py.

  • Behavior:
    • Add clean parameter to extract_keywords() in nlp.py to optionally strip non-alphanumeric characters.
    • Filter out empty queries in paragraph_to_custom_queries() in nlp.py.
  • Imports:
    • Add debug to imports in utils.py.
  • Function Defaults:
    • Change default only_on_error to True in cozo_query() in utils.py.

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

Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
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 ca38891 in 15 seconds

More details
  • Looked at 62 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. agents-api/agents_api/common/nlp.py:11
  • Draft comment:
    The extract_keywords function now includes a clean parameter, but the function signature in the docstring was not updated to reflect this change. Please update the docstring to include the clean parameter.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The extract_keywords function now includes a clean parameter, but the function signature in the docstring was not updated to reflect this change.
2. agents-api/agents_api/common/nlp.py:219
  • Draft comment:
    Good use of filtering to remove empty queries, ensuring only meaningful queries are processed further.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The paragraph_to_custom_queries function filters out empty queries, which is a good practice to avoid unnecessary processing of empty strings.
3. agents-api/agents_api/models/utils.py:189
  • Draft comment:
    The only_on_error parameter now defaults to True, changing the behavior of when debug information is printed. Ensure this change is intentional and documented.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The cozo_query decorator now defaults only_on_error to True, which changes the behavior of when debug information is printed. This should be noted in the review.

Workflow ID: wflow_mVUzYkVhbxk0K5XO


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

Copy link
Contributor

@HamadaSalhab HamadaSalhab left a comment

Choose a reason for hiding this comment

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

lgtm

@HamadaSalhab HamadaSalhab merged commit 8720d46 into dev Oct 18, 2024
10 of 14 checks passed
@HamadaSalhab HamadaSalhab deleted the x/fix-search branch October 18, 2024 18:51
@HamadaSalhab HamadaSalhab linked an issue Oct 18, 2024 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Doc Search By Text Is Not Giving Desired Results
2 participants