Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
dev: Simplify a lot the deployment required config
Clémence Lesné728e1c3c4a6d
diff --git a/README.md b/README.mdindex ef14409..8c662ae 100644--- a/README.md+++ b/README.md@@ -205,11 +205,37 @@ Container is available on GitHub Actions, at:- Latest version from a branch: `ghcr.io/clemlesne/claim-ai-phone-bot:main`- Specific tag: `ghcr.io/clemlesne/claim-ai-phone-bot:0.1.0` (recommended)+Create a local `config.yaml` file (most of the fields are filled automatically by the deployment script):++```yaml+# config.yaml+api: {}++database:+ cosmos_db: {}++resources: {}++workflow:+ agent_phone_number: "+33612345678"+ bot_company: Contoso+ bot_name: Robert++communication_service:+ phone_number: "+33612345678"+ voice_name: fr-FR-DeniseNeural++cognitive_service:+ endpoint: https://xxx.cognitiveservices.azure.com++openai: {}+```+Steps to deploy:-1. Create an Communication Services resource with a phone number-2. Create a local `config.yaml` file (be sure to use the phone number previously created)-3. Connect to (for example `az login`)+1. Create an `Communication Services` resource plus a `Phone Number`+2. Create the local `config.yaml`+3. Connect to your Azure environment (e.g. `az login`)4. Run deployment with `make deploy name=my-instance`5. Wait for the deployment to finish6. Get the logs with `make logs name=my-instance`diff --git a/bicep/app.bicep b/bicep/app.bicepindex 32df80a..0f8620a 100644--- a/bicep/app.bicep+++ b/bicep/app.bicep@@ -11,6 +11,7 @@ var appUrl = 'https://claim-ai.${acaEnv.properties.defaultDomain}'var gptModelFullName = toLower('${gptModel}-${gptVersion}')output appUrl string = appUrl+output blobStoragePublicName string = storageAccount.nameoutput communicationId string = communication.idresource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {@@ -93,6 +94,30 @@ resource containerApp 'Microsoft.App/containerApps@2023-05-01' = {name: 'DATABASE_COSMOS_DB_DATABASE'value: database.name}+ {+ name: 'RESOURCES_PUBLIC_URL'+ value: storageAccount.properties.primaryEndpoints.web+ }+ {+ name: 'COMMUNICATION_SERVICE_ENDPOINT'+ value: communication.properties.hostName+ }+ {+ name: 'COMMUNICATION_SERVICE_ACCESS_KEY'+ value: communication.listKeys().primaryKey+ }+ {+ name: 'OPENAI_ENDPOINT'+ value: cognitiveOpenai.properties.endpoint+ }+ {+ name: 'OPENAI_GPT_DEPLOYMENT'+ value: gpt.name+ }+ {+ name: 'OPENAI_GPT_MODEL'+ value: gptModel+ }]resources: {cpu: 1diff --git a/bicep/main.bicep b/bicep/main.bicepindex 5aa5aaa..48c7e8d 100644--- a/bicep/main.bicep+++ b/bicep/main.bicep@@ -1,5 +1,5 @@param config string-param imageVersion string = 'main'+param imageVersion string = 'develop'param gptModel string = 'gpt-4'param gptVersion string = '1106-Preview'param instance string = deployment().name@@ -9,6 +9,7 @@ param openaiLocation string = 'swedencentral'targetScope = 'subscription'output appUrl string = app.outputs.appUrl+output blobStoragePublicName string = app.outputs.blobStoragePublicNameoutput communicationId string = app.outputs.communicationIdvar tags = {