Azure / Vector-Search-AI-Assistant

Microsoft Official Build Modern AI Apps reference solutions and content. Demonstrate how to build Copilot applications that incorporate Hero Azure Services including Azure OpenAI Service, Azure Container Apps (or AKS) and Azure Cosmos DB for NoSQL with Vector Search.
MIT License
150 stars 72 forks source link

Deployment errors with ACA (AKS too) due to path error #65

Open dabedin opened 1 month ago

dabedin commented 1 month ago

Following the instructions for azd deployment with the ACA deployment option I get multiple errors.

ERROR: error executing step command 'provision': initializing provisioning manager: failed to compile bicep template: failed running bicep build: exit code: 1, stdout: , stderr: 
.... lots of warning ....
C:\repos\sandbox\Vector-Search-AI-Assistant\aca\infra\main.bicep(219,34) : Error BCP091: An error occurred reading file. Could not find a part of the path 'C:\repos\sandbox\Vector-Search-AI-Assistant\SystemPrompts\RetailAssistant\Default.txt'.
C:\repos\sandbox\Vector-Search-AI-Assistant\aca\infra\main.bicep(226,34) : Error BCP091: An error occurred reading file. Could not find a part of the path 'C:\repos\sandbox\Vector-Search-AI-Assistant\SystemPrompts\RetailAssistant\Limited.txt'.
C:\repos\sandbox\Vector-Search-AI-Assistant\aca\infra\main.bicep(233,34) : Error BCP091: An error occurred reading file. Could not find a part of the path 'C:\repos\sandbox\Vector-Search-AI-Assistant\SystemPrompts\Summarizer\TwoWords.txt'.
C:\repos\sandbox\Vector-Search-AI-Assistant\aca\infra\main.bicep(240,34) : Error BCP091: An error occurred reading file. Could not find a part of the path 'C:\repos\sandbox\Vector-Search-AI-Assistant\MemorySources\BlobMemorySourceConfig.json'.
C:\repos\sandbox\Vector-Search-AI-Assistant\aca\infra\main.bicep(247,34) : Error BCP091: An error occurred reading file. Could not find a part of the path 'C:\repos\sandbox\Vector-Search-AI-Assistant\MemorySources\return-policies.txt'.
C:\repos\sandbox\Vector-Search-AI-Assistant\aca\infra\main.bicep(254,34) : Error BCP091: An error occurred reading file. Could not find a part of the path 'C:\repos\sandbox\Vector-Search-AI-Assistant\MemorySources\shipping-policies.txt'.

All of these are because the paths to the SK prompts are incorrect: It is

module storage './shared/storage.bicep' = {
  name: 'storage'
  params: {
    containers: [
      {
        name: 'system-prompt'
      }
      {
        name: 'memory-source'
      }
      {
        name: 'product-policy'
      }
    ]
    files: [
      {
        name: 'retailassistant-default-txt'
        file: 'Default.txt'
        path: 'RetailAssistant/Default.txt'
        content: loadTextContent('../../SystemPrompts/RetailAssistant/Default.txt')
        container: 'system-prompt'
      }

But all the files are in the data folder

...
    files: [
      {
        name: 'retailassistant-default-txt'
        file: 'Default.txt'
        path: 'RetailAssistant/Default.txt'
        content: loadTextContent('../../data/SystemPrompts/RetailAssistant/Default.txt')
        container: 'system-prompt'
      }

Same applies to AKS bicep file.

dabedin commented 1 month ago

FWIW while the PR #66 moves past the deployment issue, I miss the purpose of the files parameter in the module, given similar task is performed in https://github.com/Azure/Vector-Search-AI-Assistant/blob/main/aca/azd-hooks/predeploy.ps1