Tools to • embed text with the OpenAI API • create a DuckDB-backed vector store (optionally with the `vss` extension) • insert documents with embeddings (handles chunking) • build HNSW/FTS indexes and run nearest-neighbour search
create_vectorstore(
db_path = ":memory:",
overwrite = FALSE,
embedding_dim = 1536,
load_vss = identical(Sys.getenv("_R_CHECK_PACKAGE_NAME_"), "")
)A live `duckdb_connection`. Disconnect manually with `DBI::dbDisconnect(con, shutdown = TRUE)`.
Path to the DuckDB file (\"`:memory:`\" for RAM).
If `TRUE`, delete any existing file / table.
Dimension of the embeddings stored.
Try to load the experimental `vss` extension? Defaults to `TRUE` except during CRAN checks where it is forced `FALSE`.
Only `create_vectorstore()` is exported; all other helpers are internal.