Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Azure OpenAI Deployment Types (Global Standard, Standard, Provisioned) #2014

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .azdo/pipelines/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ steps:
AZURE_OPENAI_CHATGPT_DEPLOYMENT: $(AZURE_OPENAI_CHATGPT_DEPLOYMENT)
AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY: $(AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY)
AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION: $(AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION)
AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKUNAME: $(AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKUNAME)
AZURE_OPENAI_EMB_MODEL_NAME: $(AZURE_OPENAI_EMB_MODEL_NAME)
AZURE_OPENAI_EMB_DEPLOYMENT: $(AZURE_OPENAI_EMB_DEPLOYMENT)
AZURE_OPENAI_EMB_DEPLOYMENT_CAPACITY: $(AZURE_OPENAI_EMB_DEPLOYMENT_CAPACITY)
Expand Down
1 change: 1 addition & 0 deletions azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pipeline:
- AZURE_OPENAI_CHATGPT_DEPLOYMENT
- AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY
- AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION
- AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKUNAME
- AZURE_OPENAI_EMB_MODEL_NAME
- AZURE_OPENAI_EMB_DEPLOYMENT
- AZURE_OPENAI_EMB_DEPLOYMENT_CAPACITY
Expand Down
7 changes: 7 additions & 0 deletions docs/deploy_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ Execute the following commands inside your terminal:
azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-4o-mini
```

1. To set the Azure OpenAI deployment Sku name, run this command with the desired Sku name.

```bash
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKUNAME GlobalStandard
```

1. To set the Azure OpenAI deployment capacity, run this command with the desired capacity.

```bash
Expand Down Expand Up @@ -96,6 +102,7 @@ Execute the following commands inside your terminal:
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT chat` to set the name of your old GPT 3.5 deployment.
> * `azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-35-turbo` to set the name of your old GPT 3.5 model.
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY 30` to set the capacity of your old GPT 3.5 deployment.
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKUNAME Standard` to set the Sku name back to Standard.
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION 0613` to set the version number of your old GPT 3.5.
> * `azd up` to update the provisioned resources.
>
Expand Down
5 changes: 4 additions & 1 deletion infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,16 @@ param computerVisionSkuName string // Set in main.parameters.json
param chatGptModelName string = ''
param chatGptDeploymentName string = ''
param chatGptDeploymentVersion string = ''
param chatGptDeploymentSkuName string = ''
param chatGptDeploymentCapacity int = 0

var chatGpt = {
modelName: !empty(chatGptModelName)
? chatGptModelName
: startsWith(openAiHost, 'azure') ? 'gpt-35-turbo' : 'gpt-3.5-turbo'
deploymentName: !empty(chatGptDeploymentName) ? chatGptDeploymentName : 'chat'
deploymentVersion: !empty(chatGptDeploymentVersion) ? chatGptDeploymentVersion : '0613'
deploymentSkuName: !empty(chatGptDeploymentSkuName) ? chatGptDeploymentSkuName : 'Standard'
deploymentCapacity: chatGptDeploymentCapacity != 0 ? chatGptDeploymentCapacity : 30
}

Expand Down Expand Up @@ -450,7 +453,7 @@ var defaultOpenAiDeployments = [
version: chatGpt.deploymentVersion
}
sku: {
name: 'Standard'
name: chatGpt.deploymentSkuName
capacity: chatGpt.deploymentCapacity
}
}
Expand Down
3 changes: 3 additions & 0 deletions infra/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
"chatGptDeploymentVersion":{
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION}"
},
"chatGptDeploymentSkuName":{
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKUNAME}"
},
"chatGptDeploymentCapacity":{
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY}"
},
Expand Down
Loading