0

How should the Chatbot conversation raw data excel csv look like?

Now I am building a Chatbot with IBM Watsons. The client would want the chatbot conversation raw data export in excel/csv format. As the conversation is very long, How should we get the most appropriate format for the Chatbot conversation raw data csv?

Thanks!

Ta Te
  • 1
  • 1

1 Answers1

0

Based on your question, I guess you should use Logs/ examples on the API Reference for base what you CSV file gonna have, for example: inputText, outputText, conversation_id, dateConversation, intents, entities, context, workspace_id, etc.

In this example using Python that will return these data (you can also use another language that has HTTP request support):

List logs:

list_logs(self, workspace_id, sort=None, filter=None, page_limit=None, cursor=None)

Request:

import json
import watson_developer_cloud

conversation = watson_developer_cloud.ConversationV1(
    username='{username}',
    password='{password}',
    version='2018-02-16'
)

response = conversation.list_logs(
    workspace_id = '9978a49e-ea89-4493-b33d-82298d3db20d'
)

print(json.dumps(response, indent=2))

Obs.: Take a look at this example saving inside one txt file the conversation Logs, you can also check this answer to use the same logic to save in one csv file.

Obs.: Nowadays Watson conversation changed the name for Watson Assistant.

Sayuri Mizuguchi
  • 5,250
  • 3
  • 26
  • 53