如何获取Watson Assistant的日语日志

时间:2018-12-19 05:49:29

标签: python chatbot ibm-watson

我执行以下代码是为了获取Watson Assistant的日志。在获取的日志中,日语日志出现了乱码。 我得到了英语对话记录。你能告诉我回应政策吗?

 #set assistant info
 import json
 from watson_developer_cloud import AssistantV1

 assistant = AssistantV1(
     version='2018-09-20',
     iam_apikey='XXXXXXX',
     url='https://gateway.watsonplatform.net/assistant/api'
 )

 # set workspace id
 workspace_id='XXXXXXXX'

 # get logs
 response = assistant.list_logs(workspace_id).get_result()
 print(json.dumps(response, indent=2))


 ###Example of acquired log (Japanese)###
 {
   "logs": [
     {
       "request": {
         "input": {
           "text": "\u3053\u3093\u306ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
         }
       },


 ###Example of acquired log (English)###
       "response": {
         "intents": [],
         "entities": [],
         "input": {
           "text": "hello"
         },
         "output": {
           "generic": [
           .......

0 个答案:

没有答案