diff --git a/chromy/chroma_functions.py b/chromy/chroma_functions.py index 569447f..d2d6528 100644 --- a/chromy/chroma_functions.py +++ b/chromy/chroma_functions.py @@ -70,7 +70,8 @@ def add_data( _, collection = _get_client_and_collection(collection_name) - embeddings: list[Sequence[float]] = [record["embedding"] for record in data] + embeddings: list[Sequence[float]] = [record["embedding"] + for record in data] collection.add( ids=[str(uuid4()) for _ in data], diff --git a/chromy/cli.py b/chromy/cli.py index 666ec92..308c5f5 100644 --- a/chromy/cli.py +++ b/chromy/cli.py @@ -98,7 +98,8 @@ def add_data( ], file: Annotated[ str, - typer.Argument(help="Path to the file to chunk and add to the collection."), + typer.Argument( + help="Path to the file to chunk and add to the collection."), ], ) -> None: try: diff --git a/chromy/handlers/delete_collection.py b/chromy/handlers/delete_collection.py index f762983..0aa5f1c 100644 --- a/chromy/handlers/delete_collection.py +++ b/chromy/handlers/delete_collection.py @@ -7,13 +7,15 @@ def _parse_where_clause(where_clause: str) -> dict[str, str]: condition, separator, value = where_clause.partition("=") if separator == "": - raise ValueError("Invalid --where value. Expected =.") + raise ValueError( + "Invalid --where value. Expected =.") condition = condition.strip() value = value.strip() if not condition or not value: - raise ValueError("Invalid --where value. Expected =.") + raise ValueError( + "Invalid --where value. Expected =.") return {condition: value}