microsoft / botframework-solutions

Welcome to the Bot Framework Solutions repository which is the home for a set of templates and solutions to help build advanced conversational experiences using Azure Bot Service and Bot Framework. Microsoft Bot Framework is a comprehensive framework for building enterprise-grade conversational AI experiences.
https://aka.ms/bfsolutionsdocs
MIT License
1.05k stars 529 forks source link

[Docs] Documentation doesn't accurately describe how to add skill to bot #3342

Closed ericchansen closed 4 years ago

ericchansen commented 4 years ago

/skills/tutorials/create-skill/csharp/7-add-your-skill/

I followed the tutorials to create a C# virtual assistant. It works locally and in Azure. I followed the tutorials to create a C# skill. It works locally and in Azure.

Attempts to add the skill to the bot all fail. Here's my directory setup.

virtualassistant
|-- BotProject
    |-- BotProject.sln
    |-- BotProject
        |-- BotProject
            |-- Adapters
            |-- Authentication
            |-- Connected Services
            |-- Controllers
            |-- Deployment
                |-- Resources
                    |-- Dispatch
                    |-- LU
                        |-- de-de
                        |-- en-us
                        |-- ...
                    |-- QnA
                    |-- parameters.template.json
                    |-- template.json
                |-- Scripts
            |-- Dialogs
            |-- ...
        |-- BotProject.Tests
|-- TestSkill
    |-- TestSkill.sln
    |-- TestSkill
        |-- TestSkill
            |-- Adapters
            |-- Connected Services
            |-- Controllers
            |-- Deployment
                |-- Resources
                    |-- LU
                        |-- de-de
                        |-- en-us
                        |-- ...
                    |-- parameters.template.json
                    |-- template.json
                |-- Scripts
           |-- Dialogs
           |-- ...
       |-- TestSkill.Tests

From the directory virtualassistant/BotProject/BotProject/BotProject, here are some example outputs.

PS C:\Users\ericc\source\repos\virtualassistant\BotProject\BotProject\BotProject> botskills connect --remoteManifest "https://erictestskill-xxx.azurewebsites.net/manifest/manifest-1.1.json" --cs --luisFolder ..\..\..\TestSkill\TestSkill\TestSkill\Deployment\Resources\LU
Updating Dispatch
Adding skill to Dispatch
Parsing en-us TestSkillLuModel-en LU file
There was an error while connecting the Skill to the Assistant:
Error: An error ocurred while updating the Dispatch model:
Error: There was an error in the ludown parse command:
Command: ludown parse toluis --in "..\..\..\TestSkill\TestSkill\TestSkill\Deployment\Resources\LU\en-us\TestSkill.lu" --luis_culture en-us --out_folder "..\..\..\TestSkill\TestSkill\TestSkill\Deployment\Resources\LU\en-us" --out testskill.luis
Error: The execution of the ludown command failed with the following error:
(node:21924) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:21924) Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency
PS C:\Users\ericc\source\repos\virtualassistant\BotProject\BotProject\BotProject> botskills connect --remoteManifest "https://erictestskill-xxx.azurewebsites.net/manifest/manifest-1.1.json" --cs                                          Updating Dispatch
Adding skill to Dispatch
There was an error while connecting the Skill to the Assistant:
Error: An error ocurred while updating the Dispatch model:
Error: Path to the LU file (C:\Users\ericc\source\repos\virtualassistant\BotProject\BotProject\BotProject\Deployment\Resources\Skills\en-us\TestSkill.lu) leads to a nonexistent file.
Batta32 commented 4 years ago

Hi @ericchansen, thanks for reporting the issue. We will be reviewing it and we will back to you later 😊.

Batta32 commented 4 years ago

@ericchansen - we improved the Botskills documentation in PR #3346. If you have any feedback, don't hesitate to comment in the PR 😊.

Also, we reviewed the attached issues:

  1. Apparently, it's a warning message in NodeJS@14.0 that generates an error in botskills. Can you try using the LTS one? Please, check nodejs/node#32987 issue

    Warning: Accessing non-existent property 'INVALID_ALT_NUMBER' of module exports inside circular dependency.

  2. The error's message means that C:\Users\ericc\source\repos\virtualassistant\BotProject\BotProject\BotProject\Deployment\Resources\Skills\en-us\TestSkill.lu leads to a file that doesn't exist. The --luisFolder parameter is used to point the Skill CLI at the source LU files of your Skill. By default it uses /Deployment/Resources/Skills/en-us inside where it's executed the tool. You can attach the absolute or relative path to your source LU files as you did in the first attempt.

    Path to the LU file (C:\Users\ericc\source\repos\virtualassistant\BotProject\BotProject\BotProject\Deployment\Resources\Skills\en-us\TestSkill.lu) leads to a nonexistent file.

Checking your directory setup, execute the following command to accomplish the connection of your Virtual Assistant to your Skill, being located in the VA's folder:

botskills connect --remoteManifest "https://erictestskill-xxx.azurewebsites.net/manifest/manifest-1.1.json" --cs --luisFolder ""

Here you have some links for further documentation to connect a Virtual Assistant to a Skill:

Hope this helps to you!