# \donttest{
library(lang)
# Using an `ellmer` chat object
lang_use(ellmer::chat_openai(model = "gpt-4o"))
# Using Ollama directly
lang_use("ollama", "llama3.2", seed = 100)
# Turn off cache by setting `.cache` to ""
lang_use("ollama", "llama3.2", seed = 100, .cache = "")
# Use `.lang` to set the target language to translate to,
# it will be set for the current R session
lang_use("ollama", "llama3.2", .lang = "spanish")
# Use `.silent` to avoid console output
lang_use("ollama", "llama3.2", .lang = "spanish", .silent = TRUE)
# To see current settings, simply call the function
lang_use()
# }
Run the code above in your browser using DataLab