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

Extend Algolia search parameters #75

Closed
wants to merge 2 commits into from
Closed

Conversation

amureki
Copy link
Member

@amureki amureki commented Apr 22, 2024

Can't make it properly work with dates yet.

@amureki amureki self-assigned this Apr 22, 2024
Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 94.73%. Comparing base (c82278d) to head (439e6c0).
Report is 8 commits behind head on main.

Files Patch % Lines
sam/contrib/algolia/tools.py 66.66% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #75      +/-   ##
==========================================
- Coverage   95.62%   94.73%   -0.90%     
==========================================
  Files          17       17              
  Lines         572      589      +17     
==========================================
+ Hits          547      558      +11     
- Misses         25       31       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amureki amureki force-pushed the extend-algolia-search branch from 00f1881 to 9b84398 Compare April 22, 2024 14:55
Copy link
Member

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

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

I don't think we should add filters that are specific to our indexes. Unless we want Sam to search voiio explicitly. That might be cool if a customer sets up a bot like this.

"""
Search the platform for information that matches the given query.

Translate the query into a German language.
Copy link
Member

Choose a reason for hiding this comment

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

This line should be added to the function definition in the pyproject.toml.

def search(query: str, _context=None) -> str:
def search(
query: str,
start_date: str = None,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
start_date: str = None,
start_date: int = None,

@amureki
Copy link
Member Author

amureki commented Apr 22, 2024

I don't think we should add filters that are specific to our indexes. Unless we want Sam to search voiio explicitly. That might be cool if a customer sets up a bot like this.

yeah, there are more hard-locks on voiio that we need to fix. I'd be happy to change this, but we also need to introduce a proper plugin system.

@amureki
Copy link
Member Author

amureki commented Apr 25, 2024

We'll need to unify codebases first and then I will rework this internally.

@amureki amureki closed this Apr 25, 2024
@amureki amureki deleted the extend-algolia-search branch April 25, 2024 07:50
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