Create and optionally run an OpenAI-based demo project via Quarto
Source:R/demo_run.R
run_demo_openai.RdUses the same demo structure as run_demo_openalex(), but configures
an OpenAI backend and requires an explicit API key argument. The key is set
in OVC_API_TOKEN for the duration of the call.
Arguments
- api_key
OpenAI API key. Must be a non-empty string.
- demo_dir
Demo workspace directory. Defaults to
file.path(getwd(), "demos", "openai").- render
Logical; if
TRUE(default), runquarto renderon the copied template.- model
OpenAI embedding model id. Defaults to
"text-embedding-3-small".- max_corpus
Maximum number of corpus fixture rows to copy.
- max_reference
Maximum number of reference fixture rows to copy.
- overwrite
Logical; if
FALSE(default), stop when demo-managed files already exist. IfTRUE, refresh demo-managed files.- quarto_file
Name of the analysis file created in
demo_dir.- verbose
Logical; print progress messages.