| foundry_check_setup | R Documentation |
Validates your Azure AI Foundry configuration and provides helpful guidance if anything is missing or misconfigured.
foundry_check_setup(model = NULL, verbose = TRUE)
model |
Character. Optional deployment name to test. If provided, will make a test API call to verify the deployment works. |
verbose |
Logical. If TRUE (default), prints detailed status messages. |
Invisibly returns a list with configuration status:
The configured endpoint URL, or NA if not set.
Logical. TRUE if an API key is configured.
Logical. TRUE if a bearer token is configured.
The deployment name tested, or NA if none.
Logical. TRUE if the API test succeeded, NA if not tested.
Logical. TRUE if all checks passed.
if (requireNamespace("withr", quietly = TRUE)) {
withr::with_options(list(foundryR.config_file = tempfile()), {
withr::with_envvar(c(
AZURE_FOUNDRY_ENDPOINT = "https://example.openai.azure.com",
AZURE_FOUNDRY_KEY = "example-key-not-a-secret",
AZURE_FOUNDRY_TOKEN = "",
AZURE_OPENAI_TOKEN = ""
), {
status <- foundry_check_setup(verbose = FALSE)
status$all_ok
})
})
}
## Not run:
# Requires an Azure deployment, endpoint, and credentials; makes an API call.
foundry_check_setup(model = "my-gpt4")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.