Skip to content

Commit

Permalink
Merge pull request #1317 from solliancenet/mg-t18398
Browse files Browse the repository at this point in the history
Side-by-Side OpenAI Deployment Support for QuickStart
  • Loading branch information
ciprianjichici authored Aug 1, 2024
2 parents 0e672d9 + b677299 commit f9c507b
Show file tree
Hide file tree
Showing 3 changed files with 182 additions and 179 deletions.
177 changes: 177 additions & 0 deletions deploy/common/config/openAiDeploymentConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
[
{
"name": "completions",
"locations": [
"eastus",
"eastus2",
"japaneast",
"northcentralus",
"switzerlandnorth"
],
"raiPolicyName": "",
"model": {
"format": "OpenAI",
"name": "gpt-35-turbo",
"version": "0613"
},
"sku": {
"capacity": 60,
"name": "Standard"
}
},
{
"name": "completions",
"locations": [
"austrailiaeast",
"canadaeast",
"francecentral",
"southindia",
"swedencentral",
"uksouth",
"westus"
],
"raiPolicyName": "",
"model": {
"format": "OpenAI",
"name": "gpt-35-turbo",
"version": "1106"
},
"sku": {
"capacity": 60,
"name": "Standard"
}
},
{
"name": "completions",
"locations": [
"austrailiaeast",
"canadaeast",
"francecentral",
"southindia",
"swedencentral",
"uksouth",
"westus"
],
"raiPolicyName": "",
"model": {
"format": "OpenAI",
"name": "gpt-35-turbo",
"version": "1106"
},
"sku": {
"capacity": 60,
"name": "Standard"
}
},
{
"name": "completions4",
"locations": [
"austrailiaeast",
"canadaeast",
"eastus2",
"francecentral",
"norwayeast",
"southindia",
"swedencentral",
"uksouth",
"westus"
],
"raiPolicyName": "",
"model": {
"format": "OpenAI",
"name": "gpt-4",
"version": "1106-Preview"
},
"sku": {
"capacity": 40,
"name": "Standard"
}
},
{
"name": "completions4o",
"locations": [
"eastus",
"eastus2",
"northcentralus",
"southcentralus",
"southindia",
"westus",
"westus3"
],
"raiPolicyName": "",
"model": {
"format": "OpenAI",
"name": "gpt-4o",
"version": "2024-05-13"
},
"sku": {
"capacity": 40,
"name": "Standard"
}
},
{
"name": "embeddings",
"locations": [
"austrailiaeast",
"canadaeast",
"eastus",
"eastus2",
"francecentral",
"japaneast",
"northcentralus",
"norwayeast",
"southcentralus",
"swedencentral",
"switzerlandnorth",
"uksouth",
"westeurope",
"westus"
],
"raiPolicyName": "Microsoft.Default",
"model": {
"format": "OpenAI",
"name": "text-embedding-ada-002",
"version": "2"
},
"sku": {
"capacity": 60,
"name": "Standard"
}
},
{
"name": "embeddings-3-large",
"locations": [
"canadaeast",
"eastus",
"eastus2"
],
"raiPolicyName": "Microsoft.Default",
"model": {
"format": "OpenAI",
"name": "text-embedding-3-large",
"version": ""
},
"sku": {
"capacity": 60,
"name": "Standard"
}
},
{
"name": "embeddings-3-small",
"locations": [
"canadaeast",
"eastus",
"eastus2"
],
"raiPolicyName": "Microsoft.Default",
"model": {
"format": "OpenAI",
"name": "text-embedding-3-small",
"version": ""
},
"sku": {
"capacity": 60,
"name": "Standard"
}
}
]
28 changes: 4 additions & 24 deletions deploy/quick-start/infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ var openAiInstance = {
subscriptionId: subscription().subscriptionId
}

var deploymentConfigurations = loadJsonContent('../../common/config/openAiDeploymentConfig.json')
var deployments = filter(deploymentConfigurations, (d) => contains(d.locations, location))

// Tags that should be applied to all resources.
//
// Note that 'azd-service-name' tags should be applied separately to service host resources.
Expand Down Expand Up @@ -362,30 +365,7 @@ module openAi './shared/openai.bicep' =
sku: 'S0'
tags: tags

deployments: [
{
name: 'completions'
sku: {
name: 'Standard'
capacity: 10
}
model: {
name: 'gpt-35-turbo'
version: '0613'
}
}
{
name: 'embeddings'
sku: {
name: 'Standard'
capacity: 10
}
model: {
name: 'text-embedding-ada-002'
version: '2'
}
}
]
deployments: deployments
}
}

Expand Down
156 changes: 1 addition & 155 deletions deploy/standard/infra/openai-rg.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -31,161 +31,7 @@ var openAiInstance = {
subscriptionId: azureOpenAiSubId
}

var deploymentConfigurations = [
{
name: 'completions'
locations: [
'eastus'
'eastus2'
'japaneast'
'northcentralus'
'switzerlandnorth'
]
raiPolicyName: ''
model: {
format: 'OpenAI'
name: 'gpt-35-turbo'
version: '0613'
}
sku: {
capacity: 60
name: 'Standard'
}
}
{
name: 'completions'
locations: [
'austrailiaeast'
'canadaeast'
'francecentral'
'southindia'
'swedencentral'
'uksouth'
'westus'
]
raiPolicyName: ''
model: {
format: 'OpenAI'
name: 'gpt-35-turbo'
version: '1106'
}
sku: {
capacity: 60
name: 'Standard'
}
}
{
name: 'completions4'
locations: [
'austrailiaeast'
'canadaeast'
'eastus2'
'francecentral'
'norwayeast'
'southindia'
'swedencentral'
'uksouth'
'westus'
]
raiPolicyName: ''
model: {
format: 'OpenAI'
name: 'gpt-4'
version: '1106-Preview'
}
sku: {
capacity: 40
name: 'Standard'
}
}
{
name: 'completions4o'
locations: [
'eastus'
'eastus2'
'northcentralus'
'southcentralus'
'southindia'
'westus'
'westus3'
]
raiPolicyName: ''
model: {
format: 'OpenAI'
name: 'gpt-4o'
version: '2024-05-13'
}
sku: {
capacity: 40
name: 'Standard'
}
}
{
name: 'embeddings'
locations: [
'austrailiaeast'
'canadaeast'
'eastus'
'eastus2'
'francecentral'
'japaneast'
'northcentralus'
'norwayeast'
'southcentralus'
'swedencentral'
'switzerlandnorth'
'uksouth'
'westeurope'
'westus'
]
raiPolicyName: 'Microsoft.Default'
model: {
format: 'OpenAI'
name: 'text-embedding-ada-002'
version: '2'
}
sku: {
capacity: 60
name: 'Standard'
}
}
{
name: 'embeddings-3-large'
locations: [
'canadaeast'
'eastus'
'eastus2'
]
raiPolicyName: 'Microsoft.Default'
model: {
format: 'OpenAI'
name: 'text-embedding-3-large'
version: ''
}
sku: {
capacity: 60
name: 'Standard'
}
}
{
name: 'embeddings-3-small'
locations: [
'canadaeast'
'eastus'
'eastus2'
]
raiPolicyName: 'Microsoft.Default'
model: {
format: 'OpenAI'
name: 'text-embedding-3-small'
version: ''
}
sku: {
capacity: 60
name: 'Standard'
}
}
]
var deploymentConfigurations = loadJsonContent('../../common/config/openAiDeploymentConfig.json')

var tags = {
Environment: environmentName
Expand Down

0 comments on commit f9c507b

Please sign in to comment.