Created
February 4, 2016 16:16
-
-
Save germanattanasio/6a586528b93c705fbff4 to your computer and use it in GitHub Desktop.
Dialog code snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Create the conversation | |
String message = "This is the first message"; | |
Conversation conversation = new Conversation().workspaceId("dialog_id"); | |
conversation = service.converse(message, conversation); | |
System.out.println(conversation); | |
// 2. Second message using the previous response | |
message = "This is the second message"; | |
conversation = service.converse(message, conversation); | |
System.out.println(conversation); | |
// 3. Third message that change the conversation status | |
message = "This is the second message"; | |
conversation.profile("foooo", 30).profile("bar","foo"); | |
conversation = service.converse(message, conversation); | |
System.out.println(conversation); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment