.init_helper {chores} | R Documentation |
Initialize a Helper object
Description
Users typically should not need to call this function.
Create new helpers that will automatically be registered with this function with
prompt_new()
.The chores addin will initialize needed helpers on-the-fly.
Usage
.init_helper(chore = NULL, .chores_chat = getOption(".chores_chat"))
Arguments
chore |
The identifier for a helper prompt. By default one
of "cli", "testthat" or "roxygen",
though custom helpers can be added with |
.chores_chat |
An ellmer Chat, e.g.
|
Value
A Helper object, which is a subclass of an ellmer chat.
Examples
# requires an API key and sets options
## Not run:
# to create a chat with claude:
.init_helper(.chores_chat = ellmer::chat_claude())
# or with OpenAI's 4o-mini:
.init_helper(.chores_chat = ellmer::chat_openai(model = "gpt-4o-mini"))
# to set OpenAI's 4o-mini as the default model powering chores, for example,
# set the following option (possibly in your .Rprofile, if you'd like
# them to persist across sessions):
options(
.chores_chat = ellmer::chat_openai(model = "gpt-4o-mini")
)
## End(Not run)
[Package chores version 0.2.0 Index]