node-red-contrib-viseo-ms-language
Version:
VISEO Bot Maker - Microsoft Cognitive Services Language
81 lines (71 loc) • 3.13 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('ms-luis',{
category: '💬_language',
color: '#8accff',
defaults: {
name: { value: undefined },
config: { value: undefined, type: "ms-luis-config" },
text: { value: "payload" },
textType: { value: "msg" },
intent: { value: "payload" }
},
inputs: 1,
outputs:1,
icon: "azure.png", align: "left",
paletteLabel: "LUIS",
label: function() { return this.name || "LUIS"; },
oneditprepare: function() {
if (!this.textType) this.textType = 'msg';
if (!this.intentType) this.intentType = 'msg';
$("#node-input-text").typedInput({ default: 'msg', types: ['msg','str','global'], typeField: $("#node-input-textType") });
$("#node-input-intent").typedInput({ default: 'msg', types: ['msg'], type: 'msg' });
}
});
</script>
<script type="text/x-red" data-template-name="ms-luis">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="LUIS">
</div>
<br>
<b>Luis settings </b>
<div class="form-row">
<br>
<label for="node-input-config"><i class="fa fa-lock"></i> App config</label>
<input type="text" id="node-input-config" placeholder="">
</div>
<br>
<b>NLP settings</b>
<div class="form-row">
<br>
<label for="node-input-text"><i class="fa fa-tasks"></i> Text</label>
<input type="text" id="node-input-text" style="width:70%;" placeholder="payload">
<input type="hidden" id="node-input-textType">
</div>
<div class="form-row">
<label for="node-input-intent"><i class="fa fa-tasks"></i> Output</label>
<input type="text" id="node-input-intent" style="width:70%;" placeholder="payload">
</div>
</script>
<script type="text/x-red" data-help-name="ms-luis">
<p>Query Microsoft LUIS API to perform NLU. </p>
<h3>Details</h3>
<p>Properties</p>
<dl class="message-properties">
<dt>App config <span class="property-type">config</span></dt>
<dd>credentials for LUIS</dd>
<dt>Text <span class="property-type">string</span></dt>
<dd>text to analyze</dd>
<dt>Output <span class="property-type">string</span></dt>
<dd>where to store the results</dd>
</dl>
<h3>References</h3>
<ul>
<li><a href="https://docs.microsoft.com/fr-fr/azure/cognitive-services/luis/">LUIS</a> - reference</li>
<li><a href="https://github.com/NGRP/node-red-contrib-viseo/">VISEO BotMaker</a> - the nodes github repository</li>
</ul>
<h3>Tracking</h3>
<p>This node is likely to display an error message if no key is configured in the VISEO Bot Maker project.
If such an error appears, please get a key <a href="https://key.bot.viseo.io/">here</a>.
</p>
</script>