Skip to content

Commit

Permalink
even more matching
Browse files Browse the repository at this point in the history
  • Loading branch information
choccccy committed Jun 14, 2024
1 parent 2d47b3c commit 01a76b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pylib/embedding/pgvector.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def match_exact(key, val):
'''
Filter specifier to only return rows where the given top-level key exists in metadata, and matches the given value
'''
assert key.isalnum()
assert key.strip('-_').isalnum()
if isinstance(val, str):
cast = ''
elif isinstance(val, bool):
Expand All @@ -220,7 +220,7 @@ def match_oneof(key, options: tuple[str]):
'''
options = tuple(options)
assert options
assert key.isalnum()
assert key.strip('-_').isalnum()
option1 = options[0]
if isinstance(option1, str):
cast = ''
Expand Down

0 comments on commit 01a76b3

Please sign in to comment.