Files
fil/e2e/r/tests/test_embed_async_pending.R
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

24 lines
1.2 KiB
R
Generated

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
# Issues & docs: https://github.com/kreuzberg-dev/alef
# E2e tests for category: embed_async_pending
test_that("embed_texts_async_empty_input: embed_texts_async: empty text list", {
result <- embed_texts_async(texts = character(0), config = EmbeddingConfig$default())
expect_true(TRUE)
expect_equal(length((if (is.character(result) && length(result) == 1) jsonlite::fromJSON(result, simplifyVector = FALSE) else result)), 0)
})
test_that("embed_texts_async_happy: embed_texts_async: basic async embedding", {
result <- embed_texts_async(texts = c("First", "Second"), config = EmbeddingConfig$default())
expect_true(TRUE)
expect_gte(length((if (is.character(result) && length(result) == 1) jsonlite::fromJSON(result, simplifyVector = FALSE) else result)), 2)
})
test_that("embed_texts_async_preset_switch: embed_texts_async: preset override", {
result <- embed_texts_async(texts = c("Text"), config = EmbeddingConfig$from_json(jsonlite::toJSON(list("model" = list("name" = "balanced", "type" = "preset")), auto_unbox = TRUE)))
expect_true(TRUE)
})