Skip to contents

Calling `document_start()` enables automatic logging for subsequent `localLLM` calls. Information such as timestamps, models, and generation settings are buffered in-memory until [document_end()] is invoked, at which point a human-readable text report is written to disk.

Usage

document_start(path = NULL, metadata = list(), append = FALSE)

Arguments

path

Optional destination path for the log file. Defaults to `localLLM_run_<timestamp>.txt` in the current working directory.

metadata

Optional named list of user-defined metadata to include in the log header (e.g. project name, dataset id).

append

When `TRUE`, entries are appended to an existing file instead of overwriting it.

Value

The path that will be written when [document_end()] is called.