This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
/
main.bicep
100 lines (84 loc) · 2.08 KB
/
main.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@description('Specifies the name for Azure Open AI.')
param openaiName string
@description('Specifies the name for Content Safety.')
param contentsafetyName string
param gpt35TurboModelName string = 'gpt-35-turbo'
param textEmbeddingModelName string = 'text-embedding-ada-002'
param chatGptModelVersion string = '0613'
param embeddingDeploymentCapacity int = 10
param chatGptDeploymentCapacity int = 10
@description('Display name of GPT-35-Turbo deployment')
param gpt35TurboDeploymentName string
@description('Display name of Text-Embedding-002 deployment')
param embeddingDeploymentName string
@description('Specifies the location of the Azure Machine Learning workspace and dependent resources.')
@allowed([
'australiaeast'
'canadaeast'
'eastus'
'eastus2'
'francecentral'
'japaneast'
'southcentralus'
'switzerlandnorth'
'uksouth'
'westcentralus'
'westus'
'westeurope'
])
param location string
param oaSKU string = 'S0'
resource account1 'Microsoft.CognitiveServices/accounts@2022-03-01' = {
name: openaiName
location: location
kind: 'OpenAI'
sku: {
name: oaSKU
}
properties: {
}
}
param csSKU string = 'S0'
resource contentsafetyaccount 'Microsoft.CognitiveServices/accounts@2022-03-01' = {
name: contentsafetyName
location: location
kind: 'ContentSafety'
sku: {
name: csSKU
}
properties: {
}
}
resource gptDeployment 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = {
parent: account1
name: gpt35TurboDeploymentName
properties: {
model: {
format: 'OpenAI'
name: gpt35TurboModelName
version: chatGptModelVersion
}
}
sku: {
name: 'Standard'
capacity: chatGptDeploymentCapacity
}
}
resource embedDeployment 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = {
parent: account1
name: embeddingDeploymentName
properties: {
model: {
format: 'OpenAI'
name: textEmbeddingModelName
version: '2'
}
}
sku: {
name: 'Standard'
capacity: embeddingDeploymentCapacity
}
dependsOn: [
gptDeployment
]
}