ios-virtual-assistant-app icon indicating copy to clipboard operation
ios-virtual-assistant-app copied to clipboard

No Support Dialog Options?

Open miltatibm opened this issue 6 years ago • 13 comments

I modified the Customer Care Sample Skill to use dialog options in dialog node. When chatting with app no answer or options are visible. Here's the try it out. dialognodewithoptions

And with the emulator Emulator

miltatibm avatar May 22 '19 16:05 miltatibm

Did you update BMSCredentials.plist with the workspace ID? see the step here: https://github.com/IBM/virtual-assistant-ios#optional-31-specify-your-own-conversation

stevemar avatar May 22 '19 17:05 stevemar

@stevemar yes I did but the emulator didn't even use it. Another bug. image

miltatibm avatar May 22 '19 17:05 miltatibm

The options part of the chat models is fairly new and this code has not been updated to handle these node changes.

@rossmooney This upgrade should be fairly simple to implement while maintaining the text-based interface, just render the question followed by the options in text. Would you be willing to contribute these changes?

christiancompton avatar May 22 '19 21:05 christiancompton

@christiancompton Yes, I can make the UI changes as long as the assistant SDK supports the option response coming through. I didn't think that was already in there though, do you have a timeline on when you expect to have option responses in the assistant sdk where I could finish the UI?

rossmooney avatar May 23 '19 03:05 rossmooney

@rossmooney I believe this is supported in the SDK. https://watson-developer-cloud.github.io/swift-sdk/services/AssistantV1/Structs/DialogNodeCollection.html

@mkistler Can you confirm?

christiancompton avatar May 23 '19 14:05 christiancompton

I have a working example that gives me an option response on Welcome dialog when using "Try It" in the watson assistant web interface. When I connect to it with (other working) iOS code, I get the following, which does not include my options:

Printing description of watsonMessages:
▿ MessageResponse
  ▿ input : Optional<MessageInput>
    ▿ some : MessageInput
      - text : nil
  - intents : 0 elements
  - entities : 0 elements
  - alternateIntents : nil
  ▿ context : Context
    ▿ conversationID : Optional<String>
      - some : "da82c20b-a019-4ee8-8e61-93a917bc31d7"
    ▿ system : Optional<SystemResponse>
      ▿ some : SystemResponse
        ▿ additionalProperties : 4 elements
          ▿ 0 : 2 elements
            - key : "dialog_turn_counter"
            ▿ value : JSON
              - int : 1
          ▿ 1 : 2 elements
            - key : "dialog_request_counter"
            ▿ value : JSON
              - int : 1
          ▿ 2 : 2 elements
            - key : "initialized"
            ▿ value : JSON
              - boolean : true
          ▿ 3 : 2 elements
            - key : "dialog_stack"
            ▿ value : JSON
              ▿ array : 1 element
                ▿ 0 : JSON
                  ▿ object : 1 element
                    ▿ 0 : 2 elements
                      - key : "dialog_node"
                      ▿ value : JSON
                        - string : "Welcome"
    - metadata : nil
    - additionalProperties : 0 elements
  ▿ output : OutputData
    - logMessages : 0 elements
    - text : 0 elements
    - generic : nil
    ▿ nodesVisited : Optional<Array<String>>
      ▿ some : 1 element
        - 0 : "Welcome"
    - nodesVisitedDetails : nil
    - additionalProperties : 0 elements
  - actions : nil

If this is supported, how do I get it?

rossmooney avatar May 23 '19 15:05 rossmooney

Let me try it. Not outside the realm of possibility that we have a bug here. :-)

mkistler avatar May 24 '19 12:05 mkistler

It's working for me:

image

mkistler avatar May 24 '19 14:05 mkistler

@mkistler

The generic property inside output is always nil for me. I'm grabbing the first message (which is an option response) using the virtual assistant app.

Screen Shot 2019-05-29 at 10 35 31 AM

Is there a different way I need to setup my assistant?

rossmooney avatar May 29 '19 14:05 rossmooney

Thanks to @mkistler

I was able to get it working by changing the API date from "2018-02-01" to "2018-10-15". Now I get all my options inside the output.generic field.

rossmooney avatar May 29 '19 19:05 rossmooney

Hi, sorry, I'm not much of a developer and was trying to test having dialog options for a chatbot... I tried to follow the suggested changes above, but I still did not see any dialog options appear. Is there code that I need to add to the current example .swift files? Thanks

spacegoodies avatar Oct 31 '19 13:10 spacegoodies

There is no UI for the dialog options, I had to build that myself. If you're talking about still not getting any options output in the watsonMessages object (like my screenshot from a previous comment) then that is the issue I ran into which was fixed by changing the API date.

rossmooney avatar Oct 31 '19 14:10 rossmooney

Yes, I was talking about UI. I was digging around for a while until I found this issue, thinking I was missing something on the Watson-side... Another update to pull from the node would be the pause feature, which would be a nice have. Thanks for the quick response!

spacegoodies avatar Oct 31 '19 14:10 spacegoodies