| foundry_set_image_key | R Documentation |
Set the API key for image generation. Use this when your DALL-E model uses a different API key than your chat/embedding models.
foundry_set_image_key(key)
key |
Character. The API key for image generation. |
If not set, foundry_image() will fall back to AZURE_FOUNDRY_KEY.
Invisibly returns TRUE on success.
local({
old <- Sys.getenv("AZURE_FOUNDRY_IMAGE_KEY", unset = NA_character_)
on.exit({
if (is.na(old)) {
Sys.unsetenv("AZURE_FOUNDRY_IMAGE_KEY")
} else {
Sys.setenv(AZURE_FOUNDRY_IMAGE_KEY = old)
}
})
foundry_set_image_key("example-image-key-not-a-secret")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.