node-red-contrib-chatbot
Version:
REDBot a Chat bot for a full featured chat bot for Telegram, Facebook Messenger and Slack. Almost no coding skills required
23 lines (20 loc) • 993 B
HTML
<script type="text/javascript">
$.RedBot.registerType('chatbot-language',{
category: $.RedBot.config.name + ' Flow',
color: '#FFCC66',
defaults: {},
inputs: 1,
outputs: 1,
paletteLabel: 'Language',
icon: 'chatbot-language.png',
label: function() {
return 'Language';
}
});
</script>
<script type="text/x-red" data-template-name="chatbot-language">
</script>
<script type="text/x-red" data-help-name="chatbot-language"><p>Detect the language of the incoming message and store it the chat context (<code>language</code>) as two-letters ISO codes (<em>en</em>, <em>it</em>, etc.).</p>
<p>Some chat platforms already provide the user’s language, this node is used to override that settings and guess the language from what the user is actually typing (for example a user who is writing in Italian but using the English version of the <strong>Telegram</strong> client).</p>
<p>Language guessing can be inaccurate for short sentences.</p>
</script>