Creates a parsnip model specification for LLM-based prediction using dsprrr.
Examples
if (FALSE) { # \dontrun{
library(parsnip)
library(tune)
# Create LLM model spec
llm_spec <- llm_predict(
mode = "classification",
signature = "text -> sentiment: enum('positive', 'negative', 'neutral')"
) |>
set_engine("dsprrr")
# With tunable parameters
llm_spec_tuned <- llm_predict(
mode = "classification",
signature = "text -> sentiment",
temperature = tune()
) |>
set_engine("dsprrr")
} # }