@@ -16,7 +16,7 @@ help() {
16
16
echo " Syntax: deploy-to-azure-containerapps.sh [options]"
17
17
echo " options:"
18
18
echo " -a Create Azure OpenAI resources and bind to the narration service"
19
- echo " By default this is not created and the narration service will server a default narration on all requests."
19
+ echo " By default this is not created and the narration service will serve a default narration on all requests."
20
20
echo " -g <resource_group_name> Name of the Azure resource group to use to deploy resources"
21
21
echo " Default: 'super-heroes'"
22
22
echo " -h Prints this help message"
@@ -316,16 +316,16 @@ create_narration_app() {
316
316
az containerapp create \
317
317
--resource-group " $RESOURCE_GROUP " \
318
318
--tags system=" $TAG_SYSTEM " application=" $NARRATION_APP " \
319
- --image " $NARRATION_IMAGE " \
319
+ --image " ${ NARRATION_IMAGE} -azure-openai " \
320
320
--name " $NARRATION_APP " \
321
321
--environment " $CONTAINERAPPS_ENVIRONMENT " \
322
322
--ingress external \
323
323
--target-port 8087 \
324
324
--min-replicas 1 \
325
- --env-vars NARRATION_AZURE_OPEN_AI_ENABLED=true \
326
- NARRATION_AZURE_OPEN_AI_KEY =" $AZURE_OPENAI_KEY " \
327
- NARRATION_AZURE_OPEN_AI_ENDPOINT =" $AZURE_OPENAI_ENDPOINT " \
328
- NARRATION_AZURE_OPEN_AI_DEPLOYMENT_NAME =" $NARRATION_COGNITIVE_SERVICE_DEPLOYMENT_NAME "
325
+ --env-vars QUARKUS_PROFILE=azure-openai \
326
+ QUARKUS_LANGCHAIN4J_AZURE_OPENAI_API_KEY =" $AZURE_OPENAI_KEY " \
327
+ QUARKUS_LANGCHAIN4J_AZURE_OPENAI_RESOURCE_NAME =" $NARRATION_COGNITIVE_SERVICE " \
328
+ QUARKUS_LANGCHAIN4J_AZURE_OPENAI_DEPLOYMENT_ID =" $NARRATION_COGNITIVE_SERVICE_DEPLOYMENT_NAME "
329
329
else
330
330
az containerapp create \
331
331
--resource-group " $RESOURCE_GROUP " \
@@ -435,13 +435,6 @@ create_azure_openai_resources() {
435
435
--resource-group " $RESOURCE_GROUP " \
436
436
| jq -r .key1
437
437
)
438
-
439
- AZURE_OPENAI_ENDPOINT=$(
440
- az cognitiveservices account show \
441
- --name " $NARRATION_COGNITIVE_SERVICE " \
442
- --resource-group " $RESOURCE_GROUP " \
443
- | jq -r .properties.endpoint
444
- )
445
438
}
446
439
447
440
# Define defaults
0 commit comments