From dc9cdb4b73ee1403f254182c91bd6379dff4b772 Mon Sep 17 00:00:00 2001 From: Zhaofeng Xu Date: Sat, 14 Sep 2024 14:07:32 +0800 Subject: [PATCH] refactor: update template (#12397) --- .../Create-Assistant.ps1 | 8 +++++--- .../custom-copilot-rag-azure-ai-search/teamsapp.yml.tpl | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/csharp/custom-copilot-assistant-assistants-api/Create-Assistant.ps1 b/templates/csharp/custom-copilot-assistant-assistants-api/Create-Assistant.ps1 index e07ec133b9..f2edff100a 100644 --- a/templates/csharp/custom-copilot-assistant-assistants-api/Create-Assistant.ps1 +++ b/templates/csharp/custom-copilot-assistant-assistants-api/Create-Assistant.ps1 @@ -9,9 +9,11 @@ $AZURE_OPENAI_ENDPOINT = $config.Azure.OpenAIEndpoint $Auzre_OpenAI_DEPLOYMENTNAME = $config.Azure.OpenAIDeploymentName # check if OpenAI is enabled -if ($config.OpenAI -and !$OPENAI_API_KEY) { - Write-Error "OpenAI API Key is not provided in the $configPath file." - exit +if ($config.OpenAI) { + if (!$OPENAI_API_KEY) { + Write-Error "OpenAI API Key is not provided in the $configPath file." + exit + } } else { # check if Azure OpenAI is enabled diff --git a/templates/csharp/custom-copilot-rag-azure-ai-search/teamsapp.yml.tpl b/templates/csharp/custom-copilot-rag-azure-ai-search/teamsapp.yml.tpl index 4cad152d17..74710a4229 100644 --- a/templates/csharp/custom-copilot-rag-azure-ai-search/teamsapp.yml.tpl +++ b/templates/csharp/custom-copilot-rag-azure-ai-search/teamsapp.yml.tpl @@ -53,7 +53,7 @@ provision: # Path to manifest template manifestPath: ./appPackage/manifest.json outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip - outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json + outputFolder: ./appPackage/build # Validate app package using validation rules - uses: teamsApp/validateAppPackage with: