Git Product home page Git Product logo

promptly-dotnet's People

Contributors

cmayomsft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

promptly-dotnet's Issues

Azure table storage for state

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.

Suggestion: provide default Validator implementation

(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();
...

SubTopic can't maintain `HasActiveTopic` flag.

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);
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.