Skip to content

Commit

Permalink
Merge branch 'main' of github.com:OoriData/OgbujiPT
Browse files Browse the repository at this point in the history
  • Loading branch information
uogbuji committed Jun 20, 2024
2 parents e5685b0 + c72933c commit 07f3fb6
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 @@ -200,7 +200,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.replace('_', '').replace('-', '').isalnum(), 'key contains nonalphanumeric, "-", or "_" characters'
if isinstance(val, str):
cast = ''
elif isinstance(val, bool):
Expand All @@ -221,7 +221,7 @@ def match_oneof(key, options: tuple[str]):
'''
options = tuple(options)
assert options
assert key.isalnum()
assert key.replace('_', '').replace('-', '').isalnum(), 'key contains nonalphanumeric, "-", or "_" characters'
option1 = options[0]
if isinstance(option1, str):
cast = ''
Expand Down

0 comments on commit 07f3fb6

Please sign in to comment.