botframework-solutions | Bot Framework Solutions repository | Bot library
kandi X-RAY | botframework-solutions Summary
kandi X-RAY | botframework-solutions Summary
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.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of botframework-solutions
botframework-solutions Key Features
botframework-solutions Examples and Code Snippets
Community Discussions
Trending Discussions on botframework-solutions
QUESTION
I have been following the tutorial (Bot Framework Integrate Composer Into Skill Project) to integrate composer dialogs with a skill project. This includes composer created dialogs which call a skill. I am running into the exception "Value cannot be null. (Parameter 'uriString')" when calling the skill.
I ran into various other issues when setting this up, as outlined here Previous Issues, which have been resolved though I had to do a work around to get the settings to work. I now need to determine why the configuration settings are not resolving.
To recreate the issue use the "skill-setting-issue" branch of the repo Git Repo
Prerequisites
Install Bot Emulator:Bot Emulator Install Instructions
Open the solution file in visual studio Integrate-Composer-Dialog-Using-Skill.sln
Put a breakpoint on line 79 of DefaultAdapter.cs - this is where the error can be seen
Start debugging the project
Open Bot Emulator
Connect to the bot: http://localhost:3978/api/messages
Type "Greeting"
Bot should respond with "Hello, I have recognized that you said greeting" - This means that the composer dialog integration is working as expected.
Type "Skill"
The breakpoint on line 79 of DefaultAdapter.cs should trigger giving details of the error.
The error seems to be occurring because the settings values within Composer-With-Skill.dialog between line 52 & 57 cannot be resolved.
...ANSWER
Answered 2020-Dec-18 at 22:36Determined that the IConfiguration instance which was configured & created in the constructor of Startup.cs was not being used when dependency injection was happening on IConfiguration. This was causing the new configuration files added not to be available.
Added
QUESTION
I am working on creating a workflow which allows composer created dialogs to be integrated into a bot skill project.
To accomplish this I am trying to follow the instructions in this post: https://microsoft.github.io/botframework-solutions/skills/handbook/experimental-add-composer/
My composer created dialogs including calling a skill. When I initiate that intent through the Bot Emulator I get this error: System.NullReferenceException: 'Unable to locate SkillConversationIdFactoryBase in HostContext'
The setup to get to this error is time consuming so I have created a git repo which can be started fairly easily to demonstrate the issue.
The project can be found here: https://github.com/silverbulletgt/Integrate-Composer-Dialog-Using-Skill
To recreate the issue:
Prerequisites
Install Bot Emulator: https://github.com/Microsoft/BotFramework-Emulator/blob/master/README.md
Open the solution file in visual studio Integrate-Composer-Dialog-Using-Skill.sln
Put a breakpoint on line 72 of DefaultAdapter.cs - this is where the error can be seen
Start debugging the project
Open Bot Emulator
Connect to the bot: http://localhost:3978/api/messages
Type "Greeting"
Bot should respond with "Hello, I have recognized that you said greeting" - This means that the composer dialog integration is working as expected.
Type "Skill"
The breakpoint on line 72 of DefaultAdapter.cs should trigger giving details of the error.
Error & stack trace can be found here: https://github.com/silverbulletgt/Integrate-Composer-Dialog-Using-Skill/blob/master/Readme/error%20stack%20trace.txt
Edit: I was able to compile the Bot Builder code Bot Builder GitHub & connect it to my project so that I could debug. I found the error to be happening on line 157 of Microsoft.Bot.Builder.Dialogs.Adaptive.BeginSkill.cs code BeginSkill.cs.
This line is trying to get the SkillConversationFactoryBase out of the dialogContext.Context.TurnState. I'm investigating how I might add this so that it is populated when this code executes.
...ANSWER
Answered 2020-Dec-18 at 17:44- Fix: System.NullReferenceException: 'Unable to locate SkillConversationIdFactoryBase in HostContext' in Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.BeginSkill
This error was being caused by missing dependency injection requirements. Added the below lines to Startup.cs
QUESTION
I'm trying to add authentication (and SSO) to my Virtual Assistant (+Skills) bot for Teams.
In this document they are using "Azure Active Directory" while creating the OAuth Connection.
So AAD v1 instead of v2, as used in other tutorials here and here.
Is there a reason for that?
Is it related to Teams?
Is v2 not supported by Teams?
ANSWER
Answered 2020-Sep-21 at 07:27Just saw that on Friday (09/18/2020) Microsoft updated the documentation here. It now contains both AAD v1 and AAD v2 versions.
QUESTION
I use Virtual Assistant. I am going to use Entity Framework Core for saving state. I met a problem. IStorage interface injects like a singleton because other objects which use this interface injects as a singleton.
...ANSWER
Answered 2019-Sep-15 at 19:13First of all do not abstract MyDbContext
with interface, otherwise you won't be able to access EF fetures or will try hard to hide EntityFramework
namespace. Use AddDbContext extension. This way DbContext
will be registered as Scoped
what is the best lifetime for it.
Inject IServiceProvider
into your singleton UserState
and ConversationState
, then create scope and resolve MyDbContext
instance within this scope on demand only.
QUESTION
I installed the newly launched virtual assistant template (C#) of the bot framework, downloaded it from here https://github.com/microsoft/botframework-solutions/tree/master/templates/Virtual-Assistant-Template/csharp and deployed it using deployment scripts and the default setup works well.
According to the documentation at https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-virtual-assistant-template?view=azure-bot-service-4.0#content-moderator, content moderator is optional but enabled. It says "A middleware component is provided that screen texts and surfaces through a TextModeratorResult on the TurnState object." I see cognitive service for Content-moderator has been created and the secret key appears in the appsettings but startup does not instantate the object neither does the botservice.
But, I do not see any evidence of it in the code. Searching keys such as "TextModeratorResult", "TurnState", "contentModerator" does not return anything.
Is this something we need to instantiate? Are there any guidelines?
...ANSWER
Answered 2019-Sep-04 at 15:12You should only have to add a single line to get this working. However, it looks like this hasn't been tested in awhile because there's a few steps to get this working. I'll submit a PR to fix thisPR, but for now:
- Ensure you have
"contentModerator": "key"
set inappsettings.json
. This should have happened automatically during deployment. - Remove the
Microsoft.Azure.CognitiveServices.ContentModerator
NuGet package from your project. It's been added toMicrosoft.Bot.Builder.Solutions
and having it in both caused a "Could Not Load Type..." error for me. - In
/Adapters/DefaultAdapter.cs
(orDefaultWebsocketAdapter.cs
if you're using Websockets), add (near the rest of the middleware pipeline):
QUESTION
I created a chatbot in C# .net Core SDK v4 with my virtual assistant template and the web chat works fine with the iframe
...ANSWER
Answered 2019-Aug-07 at 21:27Just to confirm the WebChat YOUR_SECRET_HERE
and DirectLine YOUR_DIRECT_LINE_SECRET
should be two different values.
Before you will be able to retrieve the value for YOUR_DIRECT_LINE_SECRET
you will need to connect your bot to the Direct Line channel via Azure Portal > MyBot Resource > Channels, detailed instructions on how to do this are available here.
As an aside
In the future it would be extremely helpful if you could post a detailed error message (from the console logs of Developer tools in this instance) which demonstrates the error that you are encountering, rather than just saying "it doesn't work".
There are question guidelines available here.
QUESTION
I'm trying to create a simple way for product owners to stand up and tear down the Azure resources required for the Virtual Assistant. However, the deployment script deploy.ps1
requires PowerShell 6+, which doesn't seem to be available with Azure DevOps.
What's the best way to proceed?
Describe the solution you'd likeThe goal is to use a release pipeline to automatically stand up the Azure resources required for the bot to function.
Thoughts- Is there a way to use PowerShell 6+ using Azure PowerShell?
- Should we not use
deploy.ps1
to deploy the resources in a DevOps release pipeline?
Here's the contents of deploy.ps1
and a link to the latest.
ANSWER
Answered 2019-May-23 at 05:52First of all, your script is using Read-Host
, which is not usable in the pipeline. Build agents do have pwsh (so Powershell 6.0 +), but your script isn't using Azure Powershell at all, its using Azure CLI (which is also available on the build agent).
In general you'd need to refactor your script for the pipeline and it would work just fine.
QUESTION
I've been doing a POC for Microsoft Virtual Assistant using their template as a base in c# (found here: https://github.com/microsoft/botframework-solutions). I've deployed my code to azure and added and deployed some skills and have been using the application in Bot Framework Emulator to test all successfully.
Now, I want to add a scenario where the user can use the the Virtual Assistant hands-free, using voice. I've been reading that the Direct Line Speech is the way to go for this but have been having some double getting started.
I've created a direct line speech channel in my azure webapp. Then I followed these guides: https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-connect-directlinespeech?view=azure-bot-service-4.0 https://docs.microsoft.com/en-us/azure/bot-service/directline-speech-bot?view=azure-bot-service-4.0
I feel like some information is missing since the direct line speech secret isn't mentioned at all in the 'Use Direct Line Speech in your bot' guide.
Anyone with any experience in this would be a major help, thank you very much.
...ANSWER
Answered 2019-Jul-24 at 15:12For anyone else who might search this later, I found my primary issue is was that I was using a webchat implementation that isn't currently supported by the direct line speech preview.
For integrating speech in webchat properly I was able to find a bunch of examples of web chat implementations from Microsoft here. Specifically, the two examples that I found most helpful was an implementation of speech using a the built-in browser methods in this sample solution and then using Microsoft Cognitive Services in this solution.
QUESTION
I am trying to run android Virtual Assistant Client of the Microsoft botframework from https://github.com/microsoft/botframework-solutions/blob/master/solutions/android/VirtualAssistantClient.
When I run it, it always keeps on saying "Reconnecting to server" without doing anything else. There is a microphone button which on pressing says I am listening but does nothing.
In the readme they have suggested to add Speech Channel secret to the DefaultConfiguration.java. There is no such variable defined in the DefaultConfiguration.java file.
I believe that we need to provide this directline speech channel secret somewhere for this sample client to run properly but could not find a place to add that.
Note, my Bot is running on the emulator as well as on the Web chat using directline speech. Thanks
...ANSWER
Answered 2019-Jul-02 at 23:00I've done some research into this and it looks like you've discovered a bug in that solution. You can see in the code where a BotConnectorConfig
is created from a secret key but configuration.botId
is used instead.
QUESTION
The document here says update skill manifest but does not specify how to add a new skill in the manifest file.
I have the following in the main dialog:
...ANSWER
Answered 2019-Jun-27 at 20:23Dependency Injection error
That error is to do with the dependency injection pipeline, without setting your Startup.cs
file my best guess is that you haven't wired up PlayVideoDialog
in there.
In your Startup.cs
file you will have a section where you register your Dialogs against the dependency injection service provider like so:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install botframework-solutions
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page