Skip to content

Commit c2bf299

Browse files
US:18810- Standardize Bicep Parameters for KM-Generic
1 parent a6b05ea commit c2bf299

File tree

3 files changed

+27
-38
lines changed

3 files changed

+27
-38
lines changed

documents/CustomizingAzdParameters.md

Lines changed: 24 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,38 @@
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 characters 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-
Change the Content Understanding Location (allowed values: Sweden Central, Australia East)
8+
## Parameters
99

10-
```shell
11-
azd env set AZURE_CONTENT_UNDERSTANDING_LOCATION 'swedencentral'
12-
```
13-
14-
Change the Secondary Location (example: eastus2, westus2, etc.)
15-
16-
```shell
17-
azd env set AZURE_SECONDARY_LOCATION eastus2
18-
```
19-
20-
Change the Model Deployment Type (allowed values: Standard, GlobalStandard)
21-
22-
```shell
23-
azd env set AZURE_OPEN_AI_MODEL_DEPLOYMENT_TYPE GlobalStandard
24-
```
25-
26-
Set the Model Name (allowed values: gpt-4o-mini, gpt-4o, gpt-4)
10+
| Name | Type | Default Value | Purpose |
11+
| ----------------------------------------- | ------- | ------------------------ | -------------------------------------------------------------------------- |
12+
| `AZURE_LOCATION` | string | ` ` *(empty)* | Sets the Azure region for resource deployment. |
13+
| `AZURE_ENV_NAME` | string | `env_name` | Sets the environment name prefix for all Azure resources. |
14+
| `AZURE_CONTENT_UNDERSTANDING_LOCATION` | string | `swedencentral` | Specifies the region for content understanding resources. |
15+
| `AZURE_SECONDARY_LOCATION` | string | `eastus2` | Specifies a secondary Azure region. |
16+
| `AZURE_OPEN_AI_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Defines the model deployment type (allowed: `Standard`, `GlobalStandard`). |
17+
| `AZURE_OPEN_AI_DEPLOYMENT_MODEL` | string | `gpt-4o-mini` | Specifies the GPT model name (e.g., `gpt-4`, `gpt-4o-mini`). |
18+
| `AZURE_ENV_MODEL_VERSION` | string | `2024-07-18` | Sets the Azure model version (allowed: `2024-08-06`, etc.). |
19+
| `AZURE_ENV_OPENAI_API_VERSION` | string | `2024-02-15-preview` | Specifies the API version for Azure OpenAI. |
20+
| `AZURE_OPEN_AI_DEPLOYMENT_MODEL_CAPACITY` | integer | `30` | Sets the GPT model capacity. |
21+
| `AZURE_OPENAI_EMBEDDING_MODEL` | string | `text-embedding-ada-002` | Sets the name of the embedding model to use. |
22+
| `AZURE_ENV_IMAGETAG` | string | `latest_migrated` | Sets the image tag (`latest`, `dev`, `hotfix`, `latest_migrated`, etc.). |
23+
| `AZURE_OPENAI_EMBEDDING_MODEL_CAPACITY` | integer | `80` | Sets the capacity for the embedding model deployment. |
24+
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | ` ` *(empty)* | Reuses an existing Log Analytics Workspace instead of creating a new one. |
2725

28-
```shell
29-
azd env set AZURE_OPEN_AI_DEPLOYMENT_MODEL gpt-4o-mini
30-
```
3126

32-
Change the Model Capacity (choose a number based on available GPT model capacity in your subscription)
3327

34-
```shell
35-
azd env set AZURE_OPEN_AI_DEPLOYMENT_MODEL_CAPACITY 30
36-
```
28+
## How to Set a Parameter
3729

38-
Change the Embedding Model
30+
To customize any of the above values, run the following command **before** `azd up`:
3931

40-
```shell
41-
azd env set AZURE_OPENAI_EMBEDDING_MODEL text-embedding-ada-002
32+
```bash
33+
azd env set <PARAMETER_NAME> <VALUE>
4234
```
4335

44-
Change the Embedding Deployment Capacity (choose a number based on available embedding model capacity in your subscription)
45-
46-
```shell
47-
azd env set AZURE_OPENAI_EMBEDDING_MODEL_CAPACITY 80
48-
```
36+
**Example:**
4937

50-
Set the Log Analytics Workspace Id if you need to reuse the existing workspace which is already existing
51-
```shell
52-
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>'
38+
```bash
39+
azd env set AZURE_LOCATION westus2
5340
```

infra/main.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ param gptModelName string = 'gpt-4o-mini'
3737
@description('Version of the GPT model to deploy:')
3838
param gptModelVersion string = '2024-07-18'
3939

40-
var azureOpenAIApiVersion = '2024-02-15-preview'
40+
param azureOpenAIApiVersion string = '2024-02-15-preview'
4141

4242
@minValue(10)
4343
@description('Capacity of the GPT deployment:')

infra/main.bicepparam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ param secondaryLocation = readEnvironmentVariable('AZURE_SECONDARY_LOCATION', 'e
77
param deploymentType = readEnvironmentVariable('AZURE_OPEN_AI_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
88
param gptModelName = readEnvironmentVariable('AZURE_OPEN_AI_DEPLOYMENT_MODEL', 'gpt-4o-mini')
99
param gptModelVersion = readEnvironmentVariable('AZURE_ENV_MODEL_VERSION', '2024-07-18')
10+
param azureOpenAIApiVersion = readEnvironmentVariable('AZURE_ENV_OPENAI_API_VERSION', '2024-02-15-preview')
1011
param gptDeploymentCapacity = int(readEnvironmentVariable('AZURE_OPEN_AI_DEPLOYMENT_MODEL_CAPACITY', '30'))
1112
param embeddingModel = readEnvironmentVariable('AZURE_OPENAI_EMBEDDING_MODEL', 'text-embedding-ada-002')
13+
param imageTag = readEnvironmentVariable('AZURE_ENV_IMAGETAG', 'latest_migrated')
1214
param embeddingDeploymentCapacity = int(readEnvironmentVariable('AZURE_OPENAI_EMBEDDING_MODEL_CAPACITY', '80'))
1315
param existingLogAnalyticsWorkspaceId = readEnvironmentVariable('AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID', '')

0 commit comments

Comments
 (0)