format code

This commit is contained in:
Matteo Rosati
2026-04-22 22:22:49 +02:00
parent 0441bcd911
commit f09e9da9a5
3 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -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],
+2 -1
View File
@@ -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:
+4 -2
View File
@@ -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 <condition>=<value>.")
raise ValueError(
"Invalid --where value. Expected <condition>=<value>.")
condition = condition.strip()
value = value.strip()
if not condition or not value:
raise ValueError("Invalid --where value. Expected <condition>=<value>.")
raise ValueError(
"Invalid --where value. Expected <condition>=<value>.")
return {condition: value}