cmayomsft / promptly-dotnet Goto Github PK
View Code? Open in Web Editor NEW.NET conversation modelling library for building bots with Bot Builder SDK V4.
License: MIT License
.NET conversation modelling library for building bots with Bot Builder SDK V4.
License: MIT License
Hi,
I've been porting an old bot to the latest v4 SDK and have been trying out your project. The problem I'm having is with using AzureTableStorage. I've tried adding dictionary properties to my User and Conversation state models like this: https://github.com/Microsoft/botbuilder-dotnet/blob/master/samples-final/5.AspNetCore-MultiplePrompts-Bot/MultiplePromptsState.cs
Or just as a property within the state model, but to no avail.
I understand that AzureTableStorage will try to flatten objects, and as per some of the prompt examples I need to serialize the state models to a Dictionary<TK, TV>.
I've had a little play with the alarm bot example, but regardless of what I do I'm unable to get the state to serialize. There error you get is the same as this: Azure/azure-storage-net#426
I wonder if you have tried to get Azure table store working with Promptly and if you have any examples or pointers.
(already discussed with @cmayomsft, adding an issue for visibility & tracking)
In the Prompt
class, you can use Validator
to specify which validator to use for that prompt.
generalPrompt.Set
.OnPrompt((context, lastTurnReason) =>
{
context.Reply("You want an appointment?");
})
.Validator(new DummyValidator())
.OnSuccess((context, value) =>
{
this.ClearActiveTopic();
...
If no Validator
is specified, the prompt is not working anymore. It would be better to provide a default implemented Validator
that validates everything to be accepted as input, so you can leave out the line that explicitly sets the Validator
. Similar how MaxTurns is implemented.
Desired bot code:
generalPrompt.Set
.OnPrompt((context, lastTurnReason) =>
{
context.Reply("You want an appointment?");
})
.OnSuccess((context, value) =>
{
this.ClearActiveTopic();
...
Hi, when I add async to SubTopic's OnReceiveActivity() and call await method, SubTopic can't maintain HasActiveTopic flag.
public async override Task OnReceiveActivity(IBotContext context)
{
// HasActiveTopic is always false.
if (HasActiveTopic)
{
await ActiveTopic.OnReceiveActivity(context);
}
// in this method, coll some async method.
await this.SetActiveTopic(ADD_ALARM_TOPIC)
.OnReceiveActivity(context);
}
The sample project references the 0.0.6.14 version, but this is not available on nuget.org
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.