File tree Expand file tree Collapse file tree
services/natural_language_classifier Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Node-RED Watson Nodes for IBM Cloud
1414- TSS Node fix to add visibility check on tts.voices and not stt.models
1515- Assistant V1 Workspace Manager Node updated to reflect that in update mode, updated fields
1616need a new_ prefix in their keys as part of the input json.
17+ - NLC Node - migrate off deprecated methods
18+ - NLC Node - Allow create of a classier to be based on a csv template node.
1719
1820### New in version 0.7.5
1921- Bump SDK Dependency to 3.15.0
Original file line number Diff line number Diff line change 5454 < option value = "classify" > Classify</ option >
5555 < option value = "create" > Train</ option >
5656 < option value = "remove" > Remove</ option >
57- < option value = "list " > List</ option >
57+ < option value = "listClassifiers " > List</ option >
5858 </ select >
5959 </ div >
6060 < div class = "form-row mode classify" >
Original file line number Diff line number Diff line change @@ -140,7 +140,10 @@ module.exports = function(RED) {
140140 node . checkForCreate = function ( msg , config ) {
141141 if ( 'create' !== config . mode ) {
142142 return Promise . resolve ( null ) ;
143- } else {
143+ } else if ( 'string' === typeof msg . payload ) {
144+ return Promise . resolve ( null ) ;
145+ }
146+ else {
144147 var p = node . openTemp ( )
145148 . then ( function ( info ) {
146149 return node . streamFile ( msg , config , info ) ;
@@ -167,11 +170,16 @@ module.exports = function(RED) {
167170 }
168171 break ;
169172 case 'create' :
170- params . training_data = fs . createReadStream ( info . path ) ;
173+ if ( 'string' === typeof msg . payload ) {
174+ params . training_data = msg . payload ;
175+ } else {
176+ params . training_data = fs . createReadStream ( info . path ) ;
177+ }
178+
171179 params . language = config . language ;
172180 break ;
173181 case 'remove' :
174- case 'list ' :
182+ case 'listClassifiers ' :
175183 params . classifier_id = msg . payload ;
176184 if ( msg . nlcparams && msg . nlcparams . classifier_id ) {
177185 params . classifier_id = msg . nlcparams . classifier_id ;
You can’t perform that action at this time.
0 commit comments