Skip to content

Instantly share code, notes, and snippets.

@plindberg
Last active June 21, 2016 17:26
Show Gist options
  • Save plindberg/1c20f2f45b74ce043359a3269b19f7b1 to your computer and use it in GitHub Desktop.
Save plindberg/1c20f2f45b74ce043359a3269b19f7b1 to your computer and use it in GitHub Desktop.
Quick and dirty dump of Watson Dialog conversation history (using httpie and jq)
http -b -a ${WATSON_DIALOG_USERNAME}:${WATSON_DIALOG_PASSWORD} \
https://gateway.watsonplatform.net/dialog/api/v1/dialogs/${WATSON_DIALOG_ID}/conversation\
\?date_from='2016-01-27 00:00:00'\&date_to='2016-06-22 00:00:00' \
|jq '
.conversations[] | .messages |
[
.[] |
if .from_client == "true" then
"> \(.text)"
else
"\(.text)"
end
]
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment