Skip to content

Commit 0adb821

Browse files
authored
Merge pull request #338 from chughts/langcode
CRUD for Conversation Entities
2 parents d75431a + bd4760f commit 0adb821

File tree

6 files changed

+258
-28
lines changed

6 files changed

+258
-28
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Node-RED Watson Nodes for IBM Bluemix
77

88
<a href="https://cla-assistant.io/watson-developer-cloud/node-red-node-watson"><img src="https://cla-assistant.io/readme/badge/watson-developer-cloud/node-red-node-watson" alt="CLA assistant" /></a>
99

10+
### New in version 0.5.16
11+
- Implement methods to manage Entities in Conversation workspace Manager node.
12+
- Create Collection Language fix in Discovery Node.
13+
- Similarity Search Nodes moved into deprecated category.
14+
1015
### New in version 0.5.15
1116
- Allow language code to be specified on create collection in Discovery Node.
1217
- Implement delete collection, delete environment in Discovery Node.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-node-watson",
3-
"version": "0.5.15",
3+
"version": "0.5.16",
44
"description": "A collection of Node-RED nodes for IBM Watson services",
55
"dependencies": {
66
"alchemy-api": "^1.3.0",

services/conversation/v1-workspace-manager.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@
7070
<option value="listCounterExamples">List Counter Examples</option>
7171
<option value="createCounterExample">Create Counter Example</option>
7272
<option value="deleteCounterExample">Delete Counter Example</option>
73+
<option disabled>______________</option>
74+
<option value="listEntities">List Entities</option>
75+
<option value="getEntity">Get Entity Details</option>
76+
<option value="createEntity">Create Entity</option>
77+
<option value="updateEntity">Update Entity</option>
78+
<option value="deleteEntity">Delete Entity</option>
7379
</select>
7480
</div>
7581

@@ -88,6 +94,11 @@
8894
<input type="text" id="node-input-cwm-example" placeholder="">
8995
</div>
9096

97+
<div class="form-row">
98+
<label for="node-input-cwm-entity"><i class="fa fa-book"></i> Entity</label>
99+
<input type="text" id="node-input-cwm-entity" placeholder="">
100+
</div>
101+
91102
<div class="form-row">
92103
<label for="node-input-cwm-export-content"><i class="fa fa-book"></i> Export All Content</label>
93104
<input type="checkbox" id="node-input-cwm-export-content" placeholder="">
@@ -206,6 +217,42 @@
206217
specified conversation workspace.
207218
</p>
208219
</li>
220+
<li>list Entities
221+
<p>In this mode a list of all entities for the specified conversation
222+
workspace are returned on
223+
<code>msg.entities</code>
224+
</p>
225+
</li>
226+
<li>Get Entity
227+
<p>In this mode all information about the specified entity
228+
is retrieved. The information is returned on
229+
<code>msg.entity</code>
230+
</p>
231+
</li>
232+
<li>Create Entity
233+
<p>In this mode, a new entity is created in the specified workspace.
234+
The input json structure
235+
defining the content of the new entity
236+
should be passed in
237+
as <code>msg.payload</code>
238+
</p>
239+
</li>
240+
<li>Update Entity
241+
<p>In this mode, the specified entity is updated. The input json structure
242+
defining the content of the updates
243+
should be passed in
244+
as <code>msg.payload</code>. Only the elements need to be included
245+
in the json. Any included element will override the existing setting
246+
for the element. ie. Any existing elements will
247+
be overridden. ie. If any element is not mentioned in the json, then it
248+
will be deleted.
249+
You can use this mode to rename an entity.
250+
</p>
251+
</li>
252+
<li>Delete Entity
253+
<p>In this mode the selected entity is removed from the worskpace.
254+
</p>
255+
</li>
209256

210257
</ul>
211258

@@ -246,6 +293,7 @@
246293
fields.push('#node-input-cwm-workspace-id'
247294
+ ', #node-input-cwm-intent'
248295
+ ', #node-input-cwm-example'
296+
+ ', #node-input-cwm-entity'
249297
+ ', #node-input-cwm-export-content'
250298
+ ', #node-input-cwm-service-endpoint');
251299

@@ -260,6 +308,7 @@
260308
switch (method) {
261309
case 'getWorkspace':
262310
case 'listIntents':
311+
case 'listEntities':
263312
fields.push('#node-input-cwm-workspace-id'
264313
+ ', #node-input-cwm-export-content');
265314
break;
@@ -285,9 +334,20 @@
285334
fields.push('#node-input-cwm-workspace-id'
286335
+ ', #node-input-cwm-example');
287336
break;
337+
case 'getEntity':
338+
fields.push('#node-input-cwm-workspace-id'
339+
+ ', #node-input-cwm-entity'
340+
+ ', #node-input-cwm-export-content');
341+
break;
342+
case 'updateEntity':
343+
case 'deleteEntity':
344+
fields.push('#node-input-cwm-workspace-id'
345+
+ ', #node-input-cwm-entity');
346+
break;
288347
case 'deleteWorkspace':
289348
case 'updateWorkspace':
290349
case 'createIntent':
350+
case 'createEntity':
291351
case 'listCounterExamples':
292352
fields.push('#node-input-cwm-workspace-id');
293353
break;
@@ -345,6 +405,7 @@
345405
'cwm-workspace-id': {value:""},
346406
'cwm-intent': {value:""},
347407
'cwm-example': {value:""},
408+
'cwm-entity': {value:""},
348409
'cwm-export-content': {value:false},
349410
'cwm-default-endpoint' :{value: true},
350411
'cwm-service-endpoint' :{value: 'https://gateway.watsonplatform.net/conversation/api'}

0 commit comments

Comments
 (0)