dragon_dataset: Create a dataset for fine-tuning

View source: R/dataset.R

dragon_datasetR Documentation

Create a dataset for fine-tuning

Description

Reads a file or wraps a data frame. Use dragon_map() afterwards to say which columns hold the prompt and the response.

Usage

dragon_dataset(x, ...)

## S3 method for class 'character'
dragon_dataset(x, format = NULL, name = NULL, ...)

## S3 method for class 'data.frame'
dragon_dataset(x, name = NULL, ...)

Arguments

x

A file path (CSV, TSV, JSONL, JSON array, or Parquet) or a data frame.

...

Passed to methods.

format

One of "csv", "tsv", "jsonl", "json", or "parquet". Inferred from the file extension when NULL.

name

Display name. Defaults to the file name.

Value

A dragon_dataset object.

Examples

ds <- dragon_dataset(dragon_example_data())
ds

dragonfarm documentation built on Oct. 12, 2026, 5:07 p.m.