add query

This commit is contained in:
2026-04-21 17:20:45 +02:00
parent 226c3ab4c8
commit ad73a6a985
2 changed files with 31 additions and 2 deletions
+12
View File
@@ -9,6 +9,7 @@ from chroma_functions import (
create_collection,
delete_collection,
list_collections,
query_data,
)
from chunk_functions import chunk_file
from cli_parser import build_parser
@@ -80,6 +81,17 @@ def main() -> int:
return 0
if args.command in {"query", "q"}:
try:
result = query_data(args.collection, [args.texts])
except NotFoundError:
print(f"Collection '{args.collection}' does not exist.")
return 1
print(result)
return 0
print("Nothing to do. Use -h to see available commands.")
return 0