Bot Responses(机器回答)翻译

Bot Responses

If you want your bot to respond to user messages, you need to manage the bots responses. In the training data for your bot, your stories, you specify the actions your bot executes when he encounters the dialogue example. These actions can use utterances to send messages back to the user.

你想要机器人回答你的问题,那么你需要去管理机器人的回答。在你的训练数据故事中,当机器人匹配到了你的对话时,他会按照指定的action去执行,通过该action可以将结果返回给用户。

There are two ways to manage these utterances:

这里有2种方式去控制语言

  1. include your bot utterances in your domain file or
  2. use an external service to generate the responses

   1.在domain文件中配置话语

   2.调用外部接口服务返回话语

Including the utterances in the domain(在domain文件中配置话语)

The default format is, to include the utterances into your domain file. This file then contains references to all your custom actions, available entities, slots and intents.

默认格式是在domain文件中配置话语,这个文件包含了所有自定义action、实体、词槽、意图。

# all hashtags are comments :)
intents:
 - greet
 - default
 - goodbye
 - affirm
 - thank_you
 - change_bank_details
 - simple
 - hello
 - why
 - next_intent

entities:
 - name

slots:
  name:
    type: text

templates:
  utter_greet:
    - "hey there {name}!"    # variable will be filled by slot with the same name or by custom code
  utter_goodbye:
    - "goodbye 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值