To configure gptstudio to work using Azure OpenAI service, you need to provide some configuration details in your .Renviron file. Specifically, gptstudio looks for five environment variables:
Here’s how you can add these details to your .Renviron file:
usethis::edit_r_environ()
.You need to do this for each of the environment variables expected by the function. Your .Renviron file should look something like this:
AZURE_OPENAI_TASK="your_task_code"
AZURE_OPENAI_ENDPOINT="your_endpoint_url"
AZURE_OPENAI_DEPLOYMENT_NAME="your_deployment_name"
AZURE_OPENAI_KEY="your_api_key"
AZURE_OPENAI_API_VERSION="your_api_version"
AZURE_OPENAI_USE_TOKEN=FALSE
Remember to replace your_task_code, your_endpoint_url, your_deployment_name, your_api_key, and your_api_version with your actual Azure OpenAI details. You can retrieve these details from your Azure OpenAI service account. For more information about Azure OpenAI configuration, refer to the Microsoft quickstart guide.