Nothing
test_that("Translate works", {
test_text <- "this is a test"
llm_use("simulate_llm", "echo", .silent = TRUE, .force = TRUE, .cache = .mall_test$cache)
expect_equal(
llm_vec_translate(test_text, language = "other"),
test_text
)
expect_equal(
llm_translate(data.frame(x = test_text), x, language = "other"),
data.frame(x = test_text, .translation = test_text)
)
expect_equal(
llm_translate(
data.frame(x = test_text),
x,
pred_name = "new",
language = "other"
),
data.frame(x = test_text, new = test_text)
)
})
test_that("Translate on Ollama works", {
skip_if_no_ollama()
expect_snapshot(llm_translate(reviews_table(), review, "spanish"))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.