你知道机器人自由还提供了 3D头像 和一个免费的网络 语音 API?
Self, AIML, and scripting

sample of using the new response cretion

通过 passionguru 发布 Nov 24 2016, 4:46

Hi,

I want to see the sample of the "previous", "condition", "keywords" etc

A quick help is highly appreciated.

Regards,
Sam


by admin posted Nov 24 2016, 9:27
There is a good example script of previous and keywords here,

https://www.botlibre.com/script?id=836109

This is a "response list" file that you can import from your bot's "Training & Chat Logs" page.
You can also create the same responses directly from the "Training & Chat Logs" page by clicking "Add new response", and clicking the "show" checkboxes for keywords and previous.

Conditions are a little more complicated as they involve code. Normally you would use a "condition" with a "think". A condition is a block of Self code that will evaluate to true or false, and the response is only used if it evaluates to true.

For example, consider this "response list",

greeting: Are you a new or existing client?

new
Welcome to our service.
require previous: Are you a new or existing client?
think: speaker.status = "new";

existing
Welcome back.
require previous: Are you a new or existing client?
think: speaker.status = "existing";

help
How can I help?
condition: speaker.status == "existing"

help
Sorry, you need to register first.
condition: speaker.status == "new"

Updated: Nov 24 2016, 10:23
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2473, today: 3, week: 10, month: 29

Id: 14747086
发布: Nov 24 2016, 4:46
更新: Nov 24 2016, 9:18
答复: 1
的风景: 2146, 今天: 3, 周: 8, 一个月: 19
0 0 0.0/5