Files
fil/docs/snippets/r/utils/standalone_embed.md
Henrik Jess Nielsen b4c07d3693
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s
Nomad changes
2026-06-01 23:40:55 +02:00

396 B

library(kreuzberg)

config <- list(
  model = list(type = "preset", name = "balanced"),
  normalize = TRUE
)

texts <- c("Hello, world!", "Kreuzberg is fast")
embeddings <- embed_texts(texts, config)

stopifnot(length(embeddings) == 2L)
cat(sprintf("Embedding 1: %d dimensions\n", length(embeddings[[1]])))
cat(sprintf("Embedding 2: %d dimensions\n", length(embeddings[[2]])))