Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[conversation] dialog_stack empty #213

Closed
Joshua-Carr opened this issue Feb 11, 2017 · 2 comments

Comments

3 participants
@Joshua-Carr
Copy link

commented Feb 11, 2017

Judging by the docs on https://www.ibm.com/watson/developercloud/doc/conversation/dialog-build.html#dialog-tree-evaluation it seems that dialog_stack is important for horizontal traversal of dialog trees.

When I get a response, my dialog_stack is empty (IE [0] is out of range)

This happens when using the example code in the readme.

@mediumTaj mediumTaj self-assigned this Feb 12, 2017

@mediumTaj

This comment has been minimized.

Copy link
Collaborator

commented Feb 12, 2017

Good catch! I added a missing DialogNode to the Conversation DataModel. Add it to the end of the DataModel.cs in the Conversation service (Scripts/Services/Conversation/DataModel.cs). Alternatively you can grab it from the feature branch gh-213-emptyDialogStack (https://github.com/watson-developer-cloud/unity-sdk/tree/gh-213-emptyDialogStack) or wait until it is merged into develop.

    /// <summary>
    /// Dialog information.
    /// </summary>
    [fsObject]
    public class SystemResponse
    {
        /// <summary>
        /// An array of dialog node IDs that are in focus in the conversation.
        /// </summary>
        public DialogNode[] dialog_stack { get; set; }
        /// <summary>
        /// The number of cycles of user input and response in this conversation.
        /// </summary>
        public int dialog_turn_counter { get; set; }
        /// <summary>
        /// The number of inputs in this conversation. This counter might be higher than the dialog_turn_counter counter when multiple inputs are needed before a response can be returned.
        /// </summary>
        public int dialog_request_counter { get; set; }
    }

    /// <summary>
    /// The dialog node ID information.
    /// </summary>
    [fsObject]
    public class DialogNode
    {
        /// <summary>
        /// The dialog node iD in focus.
        /// </summary>
        public string dialog_node { get; set; }
    }

@mediumTaj mediumTaj closed this Feb 12, 2017

mediumTaj added a commit that referenced this issue Feb 22, 2017

mediumTaj added a commit that referenced this issue Feb 24, 2017

mediumTaj added a commit that referenced this issue Feb 24, 2017

mediumTaj added a commit that referenced this issue Feb 24, 2017

mediumTaj added a commit that referenced this issue Mar 7, 2017

@ghettokon

This comment has been minimized.

Copy link

commented Jun 7, 2017

Hi Taj, I downloaded the gh-213-emptyDialogStack and implemented into my Unity project, but I still can't get pass by the parent node. Please advise what I missed. I am using the exampleconversation code inside the example/service folder. Many thanks!

germanattanasio added a commit that referenced this issue Jun 12, 2017

mediumTaj added a commit that referenced this issue Jun 27, 2017

mediumTaj added a commit that referenced this issue Jun 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.