| set_llm | R Documentation |
Set up your LLM service with native support for OpenAI, Claude (Anthropic), and Gemini (via OpenAI-compatible endpoint). For custom endpoints like Ollama, proxies, DeepSeek, Kimi, and others, use provider = "openai" along with your custom URL to connect through the compactible API interface. All information is stored strictly locally in your system configuration and is never uploaded or shared.
set_llm(provider = "openai", url = NULL, key = NULL, model = NULL)
provider |
character, LLM provider. One of "openai", "claude", "gemini". Default "openai". |
url |
url to your LLM provider endpoint. If NULL, auto-set based on provider. |
key |
api-key of your service. |
model |
character, model name. If NULL, auto-set from provider default. |
NULL invisibly. Called for side effect of writing the config file.
set_llm(provider = "openai", key = "<your-openai-api-key>", model = "gpt-5.4-mini")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.