Learn R Programming

quallmer (version 0.4.0)

annotate: Apply an annotation task to input data (deprecated)

Description

[Deprecated]

Usage

annotate(.data, task, model_name, ...)

Value

A data frame with one row per input element, containing:

id

Identifier for each input (from names or sequential integers).

...

Additional columns as defined by the task's schema.

Arguments

task

A task object created with task() or qlm_codebook().

...

Additional arguments passed to ellmer::chat(), ellmer::parallel_chat_structured(), or ellmer::batch_chat_structured(). Arguments recognized by ellmer::parallel_chat_structured() or ellmer::batch_chat_structured() are routed there; all other arguments (including provider-specific arguments like base_url, credentials, or api_args for OpenAI-compatible endpoints) are passed to ellmer::chat().

Details

annotate() has been deprecated in favor of qlm_code(). The new function returns a richer object that includes metadata and settings for reproducibility.

See Also

qlm_code() for the replacement function.

Examples

Run this code
if (FALSE) {
# Deprecated usage
texts <- c("I love this product!", "This is terrible.")
annotate(texts, task_sentiment(), model_name = "openai")

# New recommended usage
coded <- qlm_code(texts, task_sentiment(), model = "openai")
coded  # Print as tibble
}

Run the code above in your browser using DataLab