No Support Dialog Options?
miltatibm opened this issue · comments
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
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 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 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?
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?
Let me try it. Not outside the realm of possibility that we have a bug here. :-)
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.
Is there a different way I need to setup my assistant?
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.
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
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.
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!