To configure gptstudio to work using Azure OpenAI service, you needto 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 bythe 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=FALSERemember to replace your_task_code, your_endpoint_url,your_deployment_name, your_api_key, and your_api_version with youractual Azure OpenAI details. You can retrieve these details from yourAzure OpenAI service account. For more information about Azure OpenAIconfiguration, refer to theMicrosoftquickstart guide.