amikos-tech / chromadb-data-pipes

ChromaDB Data Pipes 🖇️ - The easiest way to get data into and out of ChromaDB
https://datapipes.chromadb.dev/
MIT License
8 stars 1 forks source link

Allow use as library in addition to command line #129

Open rhubarb opened 3 months ago

rhubarb commented 3 months ago

Excellent tool - I'm currently using it as a library in my own CLI, but there are some issues:

  1. I have to set where and where_document to None deliberately when calling chroma_export, because their default values are options, not None - leading to JSON parsing errors.

  2. I can only export to a file or stdout, it would be nice to get the list of docs returned

  3. The collection metadata is not preserved - perhaps an optional line at the top of the jsonl output.

tazarov commented 3 months ago

@rhubarb, thank you for the feedback. I'll get right on it.

tazarov commented 3 months ago

@rhubarb, I think the latest main addresses your issue. I'll cut a release tomorrow.

you can now use chroma_import as a regular function in your code, and there is chroma_import_cli, which is the CLI-specific function for typer.