Search in sources :

Example 11 with InputData

use of com.ibm.watson.developer_cloud.assistant.v1.model.InputData in project java-sdk by watson-developer-cloud.

the class ConversationServiceIT method testReadme.

/**
 * Test README.
 */
@Test
public void testReadme() {
    // Conversation service = new Conversation(Conversation.VERSION_DATE_2017_05_26);
    // service.setUsernameAndPassword("<username>", "<password>");
    InputData input = new InputData.Builder("Hi").build();
    MessageOptions options = new MessageOptions.Builder(workspaceId).input(input).build();
    MessageResponse response = service.message(options).execute();
    System.out.println(response);
}
Also used : MessageOptions(com.ibm.watson.developer_cloud.conversation.v1.model.MessageOptions) MessageResponse(com.ibm.watson.developer_cloud.conversation.v1.model.MessageResponse) InputData(com.ibm.watson.developer_cloud.conversation.v1.model.InputData) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)10 WatsonServiceUnitTest (com.ibm.watson.developer_cloud.WatsonServiceUnitTest)6 MessageOptions (com.ibm.watson.developer_cloud.assistant.v1.model.MessageOptions)6 InputData (com.ibm.watson.developer_cloud.assistant.v1.model.InputData)5 MessageResponse (com.ibm.watson.developer_cloud.assistant.v1.model.MessageResponse)5 InputData (com.ibm.watson.developer_cloud.conversation.v1.model.InputData)5 MessageOptions (com.ibm.watson.developer_cloud.conversation.v1.model.MessageOptions)5 MessageResponse (com.ibm.watson.developer_cloud.conversation.v1.model.MessageResponse)4 RecordedRequest (okhttp3.mockwebserver.RecordedRequest)4 CompletableFuture (jersey.repackaged.jsr166e.CompletableFuture)3 JsonObject (com.google.gson.JsonObject)2 JsonParser (com.google.gson.JsonParser)2 OutputData (com.ibm.watson.developer_cloud.assistant.v1.model.OutputData)2 NotFoundException (com.ibm.watson.developer_cloud.service.exception.NotFoundException)2 UnauthorizedException (com.ibm.watson.developer_cloud.service.exception.UnauthorizedException)2 Assistant (com.ibm.watson.developer_cloud.assistant.v1.Assistant)1 Context (com.ibm.watson.developer_cloud.assistant.v1.model.Context)1 RuntimeEntity (com.ibm.watson.developer_cloud.assistant.v1.model.RuntimeEntity)1 RuntimeIntent (com.ibm.watson.developer_cloud.assistant.v1.model.RuntimeIntent)1 Context (com.ibm.watson.developer_cloud.conversation.v1.model.Context)1