一つ前の発話内容を利用する方法をご紹介します。
実装方法
システムPredicate(that
)を使用すると、一つ前のシステム発話を取得できます。
xAIML
1 2 3 4 5 6 7 8 9 10 11 12 |
<category> <pattern>今何時?</pattern> <template> <date format="HH時mm分ss秒" />です。 </template> </category> <category> <pattern>もう1回教えて</pattern> <template> <get name="that"/> </template> </category> |
実行結果
1 2 3 4 |
user > 今何時? bot > 11時57分21秒です。 user > もう1回教えて bot > 11時57分21秒です。 |