weixin_39614874
weixin_39614874
2020-12-06 18:20

User can choose whether to maintain tone history for each utterance

Summary

Depending on use-case, there might be a need to maintain tone history for each user utterance or not. The earlier code version, by default always stored tone history. This update adds a flag "maintainToneHistoryInContext". Developer can set this value to false to not maintain tone history in context.

When maintainToneHistoryInContext == true Conversation context will have - tone for current utterance as well as tones for all prior user utterances. When maintainToneHistoryInContext == false Conversation context will only have - tone for current utterance

该提问来源于开源项目:watson-developer-cloud/node-sdk

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39951295 weixin_39951295 5月前

    Hi ,

    This seems to add a fair amount of complexity. I understand that this could be important in a production app, but do you feel that it is necessary in example code?

    点赞 评论 复制链接分享
  • weixin_39614874 weixin_39614874 5月前

    Yes. The idea behind example code is to enable developers to have code they could quickly reuse. The need to not save tone history is something we encountered in just the first tone-app we started creating. So I guess many developers would need it.

    In terms of code, it is not adding complexity. There are just a bunch of if checks in 3 places and an extra variable being passed.

    点赞 评论 复制链接分享
  • weixin_39951295 weixin_39951295 5月前

    Alright, I'll trust you on this one.

    点赞 评论 复制链接分享
  • weixin_39614874 weixin_39614874 5月前

    Merci !

    点赞 评论 复制链接分享