Skip to content

Commit 4027401

Browse files
US:18810-Standardize Bicep Parameters for DocGen
1 parent c2699e6 commit 4027401

File tree

3 files changed

+31
-33
lines changed

3 files changed

+31
-33
lines changed

docs/CustomizingAzdParameters.md

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,36 @@
33
By default this template will use the environment name as the prefix to prevent naming collisions within Azure. The parameters below show the default values. You only need to run the statements below if you need to change the values.
44

55

6-
> To override any of the parameters, run `azd env set <key> <value>` before running `azd up`. On the first azd command, it will prompt you for the environment name. Be sure to choose 3-20 charaters alphanumeric unique name.
6+
> To override any of the parameters, run `azd env set <PARAMETER_NAME> <VALUE>` before running `azd up`. On the first azd command, it will prompt you for the environment name. Be sure to choose 3-20 charaters alphanumeric unique name.
77
8+
## Parameters
89

9-
Change the Secondary Location (example: eastus2, westus2, etc.)
10+
| Name | Type | Example Value | Purpose |
11+
| -------------------------------------- | ------- | ---------------------------- | ----------------------------------------------------------------------------- |
12+
| `AZURE_LOCATION` | string | `japaneast` | Sets the Azure region for resource deployment. |
13+
| `AZURE_ENV_NAME` | string | `docgen` | Sets the environment name prefix for all Azure resources. |
14+
| `AZURE_ENV_SECONDARY_LOCATION` | string | `eastus2` | Specifies a secondary Azure region. |
15+
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `Standard` | Defines the model deployment type (allowed: `Standard`, `GlobalStandard`). |
16+
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4o` | Specifies the GPT model name (allowed: `gpt-4`, `gpt-4o`). |
17+
| `AZURE_ENV_MODEL_VERSION` | string | `2024-05-13` | Set the Azure model version (allowed values: `2024-08-06`). |
18+
| `AZURE_ENV_OPENAI_API_VERSION` | string | `2024-05-01-preview` | Specifies the API version for Azure OpenAI. |
19+
| `AZURE_ENV_MODEL_CAPACITY` | integer | `30` | Sets the GPT model capacity (based on what's available in your subscription). |
20+
| `AZURE_ENV_EMBEDDING_MODEL_NAME` | string | `text-embedding-ada-002` | Sets the name of the embedding model to use. |
21+
| `AZURE_ENV_IMAGETAG` | string | `latest` | Set the Image tag Like (allowed values: latest, dev, hotfix) |
22+
| `AZURE_ENV_EMBEDDING_MODEL_CAPACITY` | integer | `80` | Sets the capacity for the embedding model deployment. |
23+
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | `<Existing Workspace Id>` | Reuses an existing Log Analytics Workspace instead of creating a new one. |
1024

11-
```shell
12-
azd env set AZURE_ENV_SECONDARY_LOCATION eastus2
13-
```
14-
15-
Change the Model Deployment Type (allowed values: Standard, GlobalStandard)
16-
17-
```shell
18-
azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE Standard
19-
```
20-
21-
Set the Model Name (allowed values: gpt-4, gpt-4o)
2225

23-
```shell
24-
azd env set AZURE_ENV_MODEL_NAME gpt-4o
25-
```
26+
## How to Set a Parameter
2627

27-
Change the Model Capacity (choose a number based on available GPT model capacity in your subscription)
28+
To customize any of the above values, run the following command **before** `azd up`:
2829

29-
```shell
30-
azd env set AZURE_ENV_MODEL_CAPACITY 30
30+
```bash
31+
azd env set <PARAMETER_NAME> <VALUE>
3132
```
3233

33-
Change the Embedding Model
34-
35-
```shell
36-
azd env set AZURE_ENV_EMBEDDING_MODEL_NAME text-embedding-ada-002
37-
```
38-
39-
Change the Embedding Deployment Capacity (choose a number based on available embedding model capacity in your subscription)
40-
41-
```shell
42-
azd env set AZURE_ENV_EMBEDDING_MODEL_CAPACITY 80
43-
```
34+
**Example:**
4435

45-
Set the Log Analytics Workspace Id if you need to reuse the existing workspace
46-
```shell
47-
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID '<Existing Log Analytics Workspace Id>'
36+
```bash
37+
azd env set AZURE_LOCATION westus2
4838
```

docs/DeploymentGuide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
2222

2323
This will allow the scripts to run for the current session without permanently changing your system's policy.
2424

25+
### **Configurable Deployment Settings**
26+
27+
When you start the deployment, most parameters will have **default values**, but you can update the following settings by following the steps [here](../docs/CustomizingAzdParameters.md):
28+
29+
2530
## Deployment Options & Steps
2631

2732
Pick from the options below to see step-by-step instructions for GitHub Codespaces, VS Code Dev Containers, and Local Environments.

infra/main.bicepparam

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ param secondaryLocation = readEnvironmentVariable('AZURE_ENV_SECONDARY_LOCATION'
66
param deploymentType = readEnvironmentVariable('AZURE_ENV_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
77
param gptModelName = readEnvironmentVariable('AZURE_ENV_MODEL_NAME', 'gpt-4o')
88
param gptModelVersion = readEnvironmentVariable('AZURE_ENV_MODEL_VERSION', '2024-05-13')
9+
param azureOpenaiAPIVersion = readEnvironmentVariable('AZURE_ENV_OPENAI_API_VERSION', '2024-05-01-preview')
910
param gptDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_MODEL_CAPACITY', '30'))
11+
param embeddingModel = readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_NAME', 'text-embedding-ada-002')
12+
param imageTag = readEnvironmentVariable('AZURE_ENV_IMAGETAG', 'latest')
1013

1114
param embeddingDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_CAPACITY', '80'))
1215
param existingLogAnalyticsWorkspaceId = readEnvironmentVariable('AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID', '')

0 commit comments

Comments
 (0)