Skip to content

Commit

Permalink
Collections.exists now uses any
Browse files Browse the repository at this point in the history
  • Loading branch information
PyWoody committed Jan 31, 2025
1 parent f8dcc67 commit 57d8392
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llm/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ def exists(cls, db: Database, name: str) -> bool:
Args:
name (str): Name of the collection
"""
rows = list(db["collections"].rows_where("name = ?", [name]))
return bool(rows)
return any(db["collections"].rows_where("name = ?", [name]))

def delete(self):
"""
Expand Down

0 comments on commit 57d8392

Please sign in to comment.