|
49 | 49 | <label for="node-input-workspaceid"><i class="fa fa-tag"></i> Workspace ID</label> |
50 | 50 | <input type="text" id="node-input-workspaceid" placeholder="WorkspaceID"> |
51 | 51 | </div> |
| 52 | + <div class="form-row"> |
| 53 | + <label for="node-input-timeout"><i class="fa fa-tag"></i> Timeout Period</label> |
| 54 | + <input type="text" id="node-input-timeout" placeholder="Leave empty to disable"> |
| 55 | + </div> |
52 | 56 | <div class="form-row"> |
53 | 57 | <label> </label> |
54 | 58 | <input type="checkbox" id="node-input-context" style="display: inline-block; width: auto; vertical-align: top;"> |
|
62 | 66 | <div class="form-row"> |
63 | 67 | <label> </label> |
64 | 68 | <input type="checkbox" id="node-input-empty-payload" style="display: inline-block; width: auto; vertical-align: top;"> |
65 | | - <label for="node-input-empty-payload" style="width: 70%;"> Permit empty payload</label> |
| 69 | + <label for="node-input-empty-payload" style="width: 70%;"> Permit Empty Payload</label> |
| 70 | + </div> |
| 71 | + <div class="form-row"> |
| 72 | + <label> </label> |
| 73 | + <input type="checkbox" id="node-input-optout-learning" style="display: inline-block; width: auto; vertical-align: top;"> |
| 74 | + <label for="node-input-optout-learning" style="width: 70%;"> Opt Out Request Logging</label> |
66 | 75 | </div> |
67 | 76 |
|
68 | 77 | <div class="form-tips" id="conversation-form-tips"> |
|
81 | 90 | <li><code>msg.payload</code> : the message of the conversation to analyse. Format: String </li> |
82 | 91 | <li><code>msg.user</code> (optional): unique identifier of the user. This will be used to maintain the context of the conversation for each user when using with multiple users. Format: String </li> |
83 | 92 | <li><code>msg.params.workspace_id</code> : unique identifier of the workspace to be used. Could be also configured in the node. Format: String </li> |
| 93 | + <li><code>msg.params.timeout</code> (optional): The timeout period (in millisecond) for Watson request. Leave empty or set to 0 to disable. </li> |
84 | 94 | <li><code>msg.params.context</code> (optional): A context object that includes state information for the conversation. When you send multiple requests for the same conversation, include the context object from the response. (<a href="http://www.ibm.com/watson/developercloud/conversation/api/v1/#send_input" target="_blank">documentation</a>). This will overwrite any context saved in the node. Format: JSON </li> |
85 | 95 | <li><code>msg.params.alternate_intents</code> (optional) : whether to return more than one intent. Default is false. Set to true to return all matching intents. For example, return all intents when the confidence is not high to allow users to choose their intent.</li> |
86 | 96 | <li><code>msg.params.output</code> (optional) : see API documentation </li> |
|
91 | 101 | <li><code>msg.params.username</code> : If provided will be used as the username credential for the Conversation service.</li> |
92 | 102 | <li><code>msg.params.password</code> : If provided will be used as the password credential for the Conversation service.</li> |
93 | 103 | <li><code>msg.params.endpoint</code> : If provided will be used as the url for the Conversation service.</li> |
| 104 | + <li><code>msg.params.optout_learning</code> : Set to true to opt out of request logging. Check the <a href="https://console.bluemix.net/docs/services/watson/getting-started-logging.html#controlling-request-logging-for-watson-services" target="_blank">documentation</a> for details.</li> |
94 | 105 | </ul> |
95 | 106 | <p>See <a href="http://www.ibm.com/watson/developercloud/conversation/api/v1/#send_input" target="_blank">Conversation API documentation</a> for details.</p> |
96 | 107 | <p>All Results will made available at <code>msg.payload</code> in JSON format. Check the <a href="http://www.ibm.com/watson/developercloud/conversation/api/v1/#send_input" target="_blank">documentation</a> for details.</p> |
|
108 | 119 | <script type="text/javascript"> |
109 | 120 | var oneditprepare = function() { |
110 | 121 | $('input#node-input-context').change(function () { |
111 | | - var checked = $('input#node-input-context').prop('checked') |
| 122 | + var checked = $('input#node-input-context').prop('checked'); |
112 | 123 | if (checked) { |
113 | 124 | $('input#node-input-multiuser').parent().show(); |
114 | 125 | $('#conversation-form-tips').show(); |
|
118 | 129 | } |
119 | 130 | }); |
120 | 131 | $('input#node-input-default-endpoint').change(function () { |
121 | | - var checked = $('input#node-input-default-endpoint').prop('checked') |
| 132 | + var checked = $('input#node-input-default-endpoint').prop('checked'); |
122 | 133 | if (checked) { |
123 | 134 | $('#node-input-service-endpoint').parent().hide(); |
124 | 135 | } else { |
|
147 | 158 | multiuser: {value: false}, |
148 | 159 | context: {value: true}, |
149 | 160 | 'empty-payload': {value: false}, |
150 | | - 'default-endpoint' :{value: true}, |
151 | | - 'service-endpoint' :{value: 'https://gateway.watsonplatform.net/conversation/api'} |
| 161 | + 'default-endpoint' : {value: true}, |
| 162 | + 'service-endpoint' : {value: 'https://gateway.watsonplatform.net/conversation/api'}, |
| 163 | + timeout: {value: '', validate: RED.validators.number(true)}, |
| 164 | + 'optout-learning': {value: false} |
152 | 165 | }, |
153 | 166 | credentials: { |
154 | 167 | username: {type:'text'}, |
|
0 commit comments