if (FALSE) {
# Check if CLI works
if (goose_test_cli()) {
# Ready to use goose_ask() etc.
response <- goose_ask("Hello!")
} else {
# May need configuration
goose_configure(provider = "openai", model = "gpt-4", api_key = "key")
}
# Allow more time for authentication
goose_test_cli(timeout = 120)
}
Run the code above in your browser using DataLab