Comments (3)
Learn tag usage Example:
{% block %}
{% client %}Remember (?P<object>.*) (?P<description>(is|are) .*){% endclient %}
{% response %}I will remember that %object %description {% endresponse %}
{% learn %}
{% group %}
{% block %}
{% client %}(Do you know|tell me) about %object{% endclient %}
{% response %}%object %description{% endresponse %}
{% endblock %}
{% endgroup %}
{% endlearn %}
{% endblock %}
when above is present in your templates you could have sample conversation as follows
from chatbot.
Topic based groups are used when you are building chatbot that has multiple topics and sub topics to handle for example lets say you are building bot that needs to answer about movies, travel and with in movie you have sub topic such as Bollywood, Hollywood, ... etc. Then your template would look as follows.
{% block %}
{% client %}can we discuss about movie{% endclient %}
{% response %}Sure why not. {% topic Movie %}{% endresponse %}
{% endblock %}
{% block %}
{% client %}can we discuss about travel{% endclient %}
{% response %}Sure why not. {% topic Travel %}{% endresponse %}
{% endblock %}
{% block %}
{% client %}can we discuss about (?P<movie_industry>(b|h)ollywood){% endclient %}
{% response %}Sure why not. {% topic Movie.{% cap %movie_industry %} %}{% endresponse %}
{% endblock %}
{% group Travel %}
{% block %}
{% client %}Regex{% endclient %}
{% response %} Response{% endresponse %}
{% endblock %}
{% block %}
{% client %}Regex{% endclient %}
{% response %} Response{% endresponse %}
{% endblock %}
...
{% endgroup %}
{% group Movie %}
{% block %}
{% client %}Regex{% endclient %}
{% response %} Response{% endresponse %}
{% endblock %}
{% group Hollywoood %}
{% block %}
{% client %}Regex{% endclient %}
{% response %} Response{% endresponse %}
{% endblock %}
...
{% endgroup %}
{% group Bollywoood %}
{% block %}
{% client %}Regex{% endclient %}
{% response %} Response{% endresponse %}
{% endblock %}
...
{% endgroup %}
...
{% endgroup %}
Let's say topic is Movie.Bollywoood
then first it will try solving as per block definitions under Movie.Bollywoood
if none satisfies then it would try with group Movie
when even that is not able to handle default group is taken.
from chatbot.
Thank you very much
sorry for the delay
from chatbot.
Related Issues (20)
- Middleware for handling chatbot response? HOT 5
- Where is Chat, register_call functions? HOT 2
- Execution HOT 9
- Functions registered via register_call can not access variables HOT 4
- Add examples for features in template files HOT 2
- Can not call function without parameters HOT 1
- Can not avoid "default" answers from default.template HOT 3
- Get confidence score for selected answer HOT 4
- Load all templates from a folder HOT 5
- Access variables from python code HOT 1
- Is the installation from PIP up to date?
- How i can get the text of the response of the bot? HOT 3
- Any more details document? HOT 2
- Learning by chatting HOT 7
- Chat not found HOT 1
- HI HOT 1
- Plugin System HOT 1
- conditional Chatbot response
- Traceback (most recent call last): HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatbot.