0
我正在嘗試使用IBM Watson Conversation API在Java中進行對話。 我也路過IBM Watson Conversation API始終返回父節點,而不是插入到子節點中
方面
在消息request.Still其返回相同。
static Map<String, Object> context = new HashMap<String, Object>();
public static void main(String[] args) {
System.setProperty("https.proxyHost", "10.xx.xx.xx");
System.setProperty("https.proxyPort", "80");
ConversationService service = new ConversationService(ConversationService.VERSION_DATE_2016_07_11);
service.setUsernameAndPassword("xxxxxx", "xxxxxx");
MessageRequest newMessage = new MessageRequest.Builder().inputText("galaxy light").context(context).build();
MessageResponse response = service.message("xxxxx", newMessage).execute();
context = response.getContext();
System.out.println(context);
System.out.println(response);
}
我正在保存上下文並再次傳遞。
"output": {
"log_messages": [],
"text": [
"i did not understand you may say can you add hot chocolate"
],
"nodes_visited": [
"node_2_1487682572904"
]
},
"input": {
"text": "galaxy light"
}
我還能做什麼呢?
System.out.println(context)顯示一些東西? –