IBM / guestbook

Apache License 2.0
65 stars 226 forks source link

enhance exception and tokens handling #54

Closed JoannaCai closed 6 years ago

JoannaCai commented 6 years ago
  1. enhance exception handling
  2. enhance token handling below indicates "joy" returned for input text "happy"
    [2018-11-08 09:30:26,050] [140650331694848] [app : 39] [INFO] tone_analyzer_ep is: https://gateway-syd.watsonplatform.net/tone-analyzer/api/v3/tone?version=2017-09-21&sentences=false
    [2018-11-08 09:30:26,050] [140650331694848] [app : 41] [INFO] access token is there.
    [2018-11-08 09:30:28,670] [140650331694848] [app : 52] [INFO] tone_analyzer_ep response code is: 200
    [2018-11-08 09:30:28,671] [140650331694848] [app : 56] [INFO] return {u'document_tone': {u'tones': [{u'tone_name': u'Joy', u'score': 1.0, u'tone_id': u'joy'}]}}
duglin commented 6 years ago

LGTM