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

feat: Add metadata filter argument to doc search #747

Closed
wants to merge 1 commit into from

Conversation

whiterabbit1983
Copy link
Contributor

@whiterabbit1983 whiterabbit1983 commented Oct 25, 2024

Important

Add metadata_filter to document search requests and functions for filtering by metadata.

  • Behavior:
    • Add metadata_filter argument to BaseDocSearchRequest in Docs.py for filtering document searches by metadata.
    • Update search_docs_by_embedding() and search_docs_by_text() in search_docs_by_embedding.py and search_docs_by_text.py to handle metadata_filter.
    • Modify get_search_fn_and_params() in search_docs.py to pass metadata_filter to search functions.
  • Models:
    • Update BaseDocSearchRequest in models.tsp to include metadata_filter.
  • API Documentation:
    • Add metadata_filter to OpenAPI specifications in openapi-0.4.0.yaml and openapi-1.0.0.yaml.

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

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 385ddbf in 38 seconds

More details
  • Looked at 238 lines of code in 7 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml:2425
  • Draft comment:
    The metadata_filter parameter is marked as required in the OpenAPI specification. Consider making it optional to allow more flexible API requests.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is suggesting a design change to make the API more flexible by making 'metadata_filter' optional. This is a valid suggestion as it could improve the API's usability. The comment is directly related to the change made in the diff.
    The comment is speculative in nature, suggesting a design change without concrete evidence that it is necessary. It assumes that making 'metadata_filter' optional is beneficial without context on the API's intended use.
    While the comment is speculative, it does provide a valid point about API flexibility. If the API's design allows for optional parameters, this could be a beneficial change.
    The comment should be kept as it provides a valid suggestion for improving API flexibility by making 'metadata_filter' optional.

Workflow ID: wflow_fI0jBnxYIB0cKUlb


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

@creatorrr
Copy link
Contributor

Closing in favor of #749

@creatorrr creatorrr closed this Oct 26, 2024
@creatorrr creatorrr deleted the f/metedata-filter branch November 29, 2024 14:53
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.

2 participants