foundry_set_endpoint: Set Azure AI Foundry Endpoint

View source: R/config.R

foundry_set_endpointR Documentation

Set Azure AI Foundry Endpoint

Description

Set the base endpoint URL for your Azure AI Foundry resource.

Usage

foundry_set_endpoint(endpoint, store = FALSE)

Arguments

endpoint

Character string containing the endpoint URL. Example: the endpoint URL from your Foundry resource.

store

Logical. If TRUE, stores the endpoint in foundryR's package-specific user configuration file. Default: FALSE.

Value

Invisibly returns TRUE if endpoint was set successfully.

Examples


withr::with_envvar(c(AZURE_FOUNDRY_ENDPOINT = NA_character_), {
  foundry_set_endpoint("https://example.openai.azure.com")
  foundry_get_endpoint()
})

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)
    })
  })
})


foundryR documentation built on Sept. 25, 2026, 1:10 a.m.