The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
rchroma provides a clean interface to ChromaDB, a modern vector database for storing and querying embeddings.
You can isntall rchroma from CRAN:
install.packages("rchroma")
Or you can install the developer version from GitHub:
# install.packages("remotes")
::install_github("cynkra/rchroma") remotes
You also need a running ChromaDB instance. The easiest way to get started is using the provided Docker helper functions:
chroma_docker_run()
# use chroma_docker_stop() to stop the container
See the ChromaDB documentation for other installation methods.
library(rchroma)
# Connect to ChromaDB
<- chroma_connect()
client
# Create a collection and add documents with embeddings
create_collection(client, "my_collection")
add_documents(
client,"my_collection",
documents = c("apple", "banana"),
ids = c("doc1", "doc2"),
embeddings = list(
c(1.0, 0.0), # apple
c(0.8, 0.2) # banana (similar to apple)
)
)
# Query similar documents using embeddings
query(
client,"my_collection",
query_embeddings = list(c(1.0, 0.0)), # should match apple best
n_results = 2
)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.