ボット間でのデータを共有する方法をご紹介します。
実装方法
<predstore>
を使用することで、ボット間でデータを共有することができます。
xAIML(Bot-A)
1 2 3 4 5 6 7 8 9 |
<category> <pattern>セット</pattern> <template> <think> <predstore>test=データ共有</predstore> </think> OK </template> </category> |
xAIML(Bot-B)
1 2 3 4 5 6 |
<category> <pattern>ゲット</pattern> <template> <predstore>test</predstore> </template> </category> |
実行結果(Bot-A)
1 2 |
user > セット bot > OK |
実行結果(Bot-B)
1 2 |
user > ゲット bot > データ共有 |