Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

conf: Allow to config OpenAI model from Bicep

Clémence Lesné87e9c807fd4b
diff --git a/bicep/app.bicep b/bicep/app.bicep
index 43902be..32df80a 100644
--- a/bicep/app.bicep
+++ b/bicep/app.bicep
@@ -1,4 +1,6 @@
param config string
+param gptModel string
+param gptVersion string
param imageVersion string
param location string
param openaiLocation string
@@ -6,6 +8,7 @@ param tags object
var prefix = deployment().name
var appUrl = 'https://claim-ai.${acaEnv.properties.defaultDomain}'
+var gptModelFullName = toLower('${gptModel}-${gptVersion}')
output appUrl string = appUrl
output communicationId string = communication.id
@@ -187,7 +190,7 @@ resource cognitiveOpenai 'Microsoft.CognitiveServices/accounts@2023-10-01-previe
resource gpt 'Microsoft.CognitiveServices/accounts/deployments@2023-10-01-preview' = {
parent: cognitiveOpenai
- name: 'gpt'
+ name: gptModelFullName
sku: {
capacity: 50
name: 'Standard'
@@ -196,8 +199,8 @@ resource gpt 'Microsoft.CognitiveServices/accounts/deployments@2023-10-01-previe
raiPolicyName: contentfilter.name
model: {
format: 'OpenAI'
- name: 'gpt-4'
- version: '1106-Preview'
+ name: gptModel
+ version: gptVersion
}
}
}
diff --git a/bicep/main.bicep b/bicep/main.bicep
index 64a10c5..5aa5aaa 100644
--- a/bicep/main.bicep
+++ b/bicep/main.bicep
@@ -1,5 +1,7 @@
param config string
param imageVersion string = 'main'
+param gptModel string = 'gpt-4'
+param gptVersion string = '1106-Preview'
param instance string = deployment().name
param location string = 'westeurope'
param openaiLocation string = 'swedencentral'
@@ -28,6 +30,8 @@ module app 'app.bicep' = {
scope: sub
params: {
config: config
+ gptModel: gptModel
+ gptVersion: gptVersion
imageVersion: imageVersion
location: location
openaiLocation: openaiLocation