View source: R/model_defaults.R
| set_model | R Documentation |
Sets the package-wide default language model. Pass NULL to restore the
built-in default ("openai:gpt-4o" unless overridden with
options(aisdk.default_model = ...)). If new is omitted and runtime
options are supplied, only the runtime options are updated.
set_model(
new = NULL,
context_window = NULL,
max_output_tokens = NULL,
max_tokens = NULL,
thinking = NULL,
thinking_budget = NULL,
reasoning_effort = NULL,
reset_options = FALSE
)
new |
A model identifier string, a |
context_window |
Optional context-window override used by sessions created from this default model. |
max_output_tokens |
Optional maximum output-token metadata override. |
max_tokens |
Optional default generation token limit. |
thinking |
Optional default thinking-mode value passed to providers that support it. Logical values are normalized by each provider. |
thinking_budget |
Optional default thinking budget. |
reasoning_effort |
Optional default reasoning effort ( |
reset_options |
Logical. If |
Invisibly returns the previous default model.
old <- set_model("deepseek:deepseek-chat")
current <- get_model()
set_model(old)
set_model(NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.