cherry wit与wit.ai交互的cherry插件
樱桃机智配置witd_url: \"http://192.168.1.68:8080\", wit_token: \"MY_TOKEN\",接口产生“来自:机智”的消息。例如cherry . handle ( { wit : function ( message ) { var plugins = cherry . plugins ( ) ; var intent = message . outcomes [ 0 ] . intent ; if ( intent === 'lights_on' ) { plugins . hue ( { on : true } ) ; } else if ( intent === 'lights_off' ) { plugins . hue ( { on : false } ) ; } } } )
下载地址
用户评论