-
Notifications
You must be signed in to change notification settings - Fork 135
Tutorial Conversations
Keith Sterling edited this page Dec 20, 2017
·
5 revisions
There are a number of tags which can be used to support contextual conversations, providing access to that which was asked and responded to, so that it can then be used in further stages of the conversation. These tags are
- input - Returns the entire user input
- request - Indexed element which provides access to the historical inputs from the user.
- response - Indexed element which provides access to the historical responses from the bot.
- star - Indexed element which provides access to those words or phrases which matched one or more wildcards
- topicstar - Similar star but returns the wildcard matches for topic
- thatstar - Similar to star but returns the wildcard matches for that
<category>
<pattern>Patriots Rock</pattern>
<template>
You said <input />, but I disagree, for me its the Jaguars all the way!
</template>
</category>
<category>
<pattern>WHAT DID I JUST SAY</pattern>
<template>
You said <request index="1" />
</template>
</category>
<category>
<pattern>WHAT DID I SAY BEFORE THAT</pattern>
<template>
You said <request index="2" />
</template>
</category>
<category>
<pattern>WHAT DID YOU JUST SAY</pattern>
<template>
You said <response index="1" />
</template>
</category>
<category>
<pattern>WHAT DID YOU SAY BEFORE THAT</pattern>
<template>
You said <response index="2" />
</template>
</category>
<category>
<pattern>I LIKE *</pattern>
<template>
I also like <star />
</template>
</category>
<category>
<pattern>I LIKE * AND *</pattern>
<template>
I like <star index="1" /> but I do not like <star index="2" />
</template>
</category>
<topic name="* APPLES">
<category>
<pattern>I LIKE TO EAT THEM</pattern>
<template>
Why do you like eating <topicstar /> apples ?
</template>
</category>
</topic>
<category>
<pattern>I LIKE IT TOO</pattern>
<that>I LIKE *</that>
<template>
What do you like best about <thatstar />
</template>
</category>
Email: keiffster@gmail.com | Twitter: @keiffster | Facebook: keith.sterling | LinkedIn: keithsterling | My Blog
- Home
- Background
- Guiding Principles
- Reporting an Issue
- Installation
- You And Your Bot
- Bots
- Clients
- Configuration
- AIML
- Sentence Splitting
- Natural Langauge Processing
- Normalization
- Spelling
- Sentiment Analysis
- Translation
- Security
- Hot Reload
- Logging
- Out of Band
- Multi Language
- RDF Support
- Rich Media
- Asynchronous Events
- Triggers
- External Services
- Dynamic Sets, Maps & Vars
- Extensions
- Pre & Post Processors
- Custom Nodes
- The Brain Tree
- Utilities
- Building It Yourself
- Creating Your Own Bot
- Contributing
- Performance Testing
- FAQ
- History
- Website