Chooses which AI model mv_ask() uses to understand plain-language
requests and stores the API key so you only do this once. Three providers
are supported through the ellmer package:
Arguments
- provider
"claude","openai","ollama"or"none".- model
model name; defaults to
"claude-opus-5-5"for Claude, the ellmer default for OpenAI and the first installed model for Ollama.- key
the API key. If
NULLand none is set, you are asked for it with a masked prompt.- save
where to keep the key and settings for future sessions:
"ask"(choose interactively),"renviron"(your.Renvironfile),"keyring"(the system keychain, needs the keyring package) or"none"(this session only).- test
logical; send one tiny test request to check the setup.
Details
"claude": Anthropic's Claude, with your own key from https://console.anthropic.com (stored asANTHROPIC_API_KEY)."openai": OpenAI's GPT models, with your own key from https://platform.openai.com (stored asOPENAI_API_KEY)."ollama": a free model running on your own computer with Ollama (https://ollama.com). Install Ollama, runollama pull qwen2.5(or another model) once, and nothing ever leaves your machine.
Use provider = "none" to always use the built-in keyword parser, which
needs no AI model and no internet connection.
Only a summary of your columns (see profile_data()) and your request are
sent; never individual responses. Keys are never written into scripts,
reports or mv_script objects.