Skip to contents

Every logged call

Usage

calls(fn = NULL, folder = NULL, since = NULL)

Arguments

fn

An AI function or a function's name; NULL for every call.

folder

The log folder (default: where calls are logged here).

since

Only calls from this time on (a date or date-time).

Value

A tibble, one row per call, oldest first: id, started, name, module, version, model, seconds, inputs and outputs (list columns of JSON values), error, input_tokens, output_tokens, reasoning_tokens, total_tokens, parent, caller, language, content (whether every value was kept), omitted (when it was not: the names of the fields whose values were not kept, as inputs and outputs; NULL otherwise), saw (the earlier calls it was shown, NULL when its record does not say). Providers count differently: OpenAI's and Anthropic's output_tokens include the model's hidden reasoning, Gemini's leave it out (it is in reasoning_tokens). Every one bills total_tokens - input_tokens as output.