forked from matijagrcic/azurechatgpt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.bicep
39 lines (32 loc) · 1.01 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
@minLength(1)
@maxLength(64)
@description('Name of the the environment which is used to generate a short unique hash used in all resources.')
param name string
@minLength(1)
@maxLength(64)
@description('Azure OpenAI API Key')
param openaiApiKey string
@minLength(1)
@maxLength(64)
@description('Azure OpenAI Instance Name e.g. my-openai-instance')
param openaiInstanceName string
@minLength(1)
@maxLength(64)
@description('Azure OpenAI Deployment Name e.g. gpt3-turbo')
param openaiDeploymentName string
@minLength(1)
@maxLength(64)
@description('Azure OpenAI API Version e.g. 2021-08-04-preview')
param openaiApiVersion string
var resourceToken = toLower(uniqueString(subscription().id, name, resourceGroup().location))
module resources 'resources.bicep' = {
name: 'resources-${resourceToken}'
params: {
name: name
resourceToken: resourceToken
openai_api_key: openaiApiKey
openai_instance_name: openaiInstanceName
openai_deployment_name: openaiDeploymentName
openai_api_version: openaiApiVersion
}
}