Learn R Programming

gooseR (version 0.1.2)

goose_configure: Configure Goose CLI Settings

Description

Set up Goose CLI configuration. Note: If Goose CLI is already configured (e.g., for Block employees), this function is not needed. The package will use the existing CLI configuration automatically.

Usage

goose_configure(
  provider = NULL,
  model = NULL,
  api_key = NULL,
  save_to_renviron = FALSE,
  check_cli_first = TRUE
)

Value

Invisible TRUE if successful

Arguments

provider

Character string specifying the AI provider (e.g., "openai", "anthropic")

model

Character string specifying the model (e.g., "gpt-4", "claude-3")

api_key

Character string with the API key (stored securely)

save_to_renviron

Logical, whether to save to .Renviron file

check_cli_first

Logical, check if CLI already works before configuring (default TRUE)

Examples

Run this code
if (FALSE) {
# For Block employees with configured CLI, just check:
goose_test_cli()

# For external users who need API keys:
goose_configure(provider = "openai", model = "gpt-4", api_key = "your-key")
}

Run the code above in your browser using DataLab