tests/testthat/_snaps/lang-use.md

Empty lang_use() returns 'unset'

Code
  lang_use(.lang = "english")
Message
  Model not set
  Lang: english

lang_use() works with 'ollama'

Code
  lang_use("ollama", "model")
Message
  Model: model via Ollama
  Lang: english

lang_use() works

Code
  lang_use("simulate_llm", "echo", .cache = "path/to/cache", .lang = "test")
Message
  Model: echo via simulate_llm
  Lang: test
  Cache: path/to/cache

lang_use() works with ellmer

Code
  lang_use(x, .cache = "path/to/cache", .lang = "test")
Message
  Model: test_model via test_name
  Lang: test
  Cache: path/to/cache

lang_use() works with additional arguments

Code
  lang_use("simulate_llm", "echo", temp = 0.8, .cache = "path/to/cache", .lang = "test")
Message
  Model: echo via simulate_llm
  Lang: test
  Cache: path/to/cache

lang_use() works with disabled cache

Code
  lang_use("simulate_llm", "echo", .cache = "", .lang = "test")
Message
  Model: echo via simulate_llm
  Lang: test
  Cache: [Disabled]

Warning is displayed if .lang_chat is set

Code
  lang_use(.silent = TRUE)
Condition
  Warning:
  Option `.lang_chat` is no longer supported
  Use `lang::lang_use([backend])` in your .RProfile file instead


Try the lang package in your browser

Any scripts or data that you put into this service are public.

lang documentation built on June 5, 2026, 5:08 p.m.