Set the base endpoint URL for your Microsoft Foundry resource.
Examples
withr::with_envvar(c(AZURE_FOUNDRY_ENDPOINT = NA_character_), {
foundry_set_endpoint("https://example.openai.azure.com")
foundry_get_endpoint()
})
#> ✔ Endpoint set to <https://example.openai.azure.com>
#> [1] "https://example.openai.azure.com"
local({
config_file <- tempfile("foundryR-config-", fileext = ".json")
on.exit(unlink(config_file))
withr::with_options(list(foundryR.config_file = config_file), {
withr::with_envvar(c(AZURE_FOUNDRY_ENDPOINT = NA_character_), {
foundry_set_endpoint("https://example.openai.azure.com", store = TRUE)
})
})
})
#> ✔ Endpoint set to <https://example.openai.azure.com>
#> ✔ Endpoint stored in /tmp/Rtmpf97pZU/foundryR-config-19c74e2e7ec0.json