guidone / node-red-contrib-chatbot

Visually build a full featured chat bot for Telegram, Facebook Messenger, Whatsapp and Slack with Node-RED. Almost no coding skills required.
http://red-bot.io
940 stars 191 forks source link

extract variables? #329

Closed davidwallis closed 3 years ago

davidwallis commented 5 years ago

Hi, I'm using the universal receiver and I've created a lexicon step that defines some objects to test with called HouseObjects as follows (Ill make this dynamic later)

image

I've then got a listen node which has the following in

image

however in my text node I cant get it to use the object - and I suspect I'm missing something simple..

image

Also in the listen is it possible to do Turn[Verb] Switch[Verb] and have an or? can I use a Pipe like in regex - as some examples have pipes some have quotes and I'm not entirely sure on the syntax.

Also can I reference the matched word - from the "Turn or Switch" and then use the correct response automatically such as turning switching?

Thanks

David

davidwallis commented 5 years ago

also:

image

image

davidwallis commented 5 years ago

Anyone?

m1kr0b1 commented 5 years ago

I use a switch node, then a function to set a variable in msg.payload.smething = "My Option"

davidwallis commented 4 years ago

This isnt closed - I'm still at a loss with this - I want to dynamically extract the houseObject - I dont want to use a switch node - it doesn't achieve it being dynamic.

guidone commented 4 years ago

Hi @davidwallis3101 , the point is that node is quite old and the implementation is a wrong approach to solve the problem. The idea is to implement this

https://github.com/axa-group/nlp.js?utm_source=gold_browser_extension

a machine learning library with data extraction features

davidwallis commented 4 years ago

Is there anyway of extracting the object that is matched?, just so I can carry on playing until NLP could be implemented?

NLP would be great to add and have previously looked at using it in a different project.

guidone commented 4 years ago

Support for NLP.js

guidone commented 4 years ago

Working on NLP implementation

guidone commented 4 years ago

Development is almost done, I writing some docs and tests

https://github.com/guidone/node-red-contrib-chatbot/wiki/NLP.js

davidwallis commented 4 years ago

can't wait to test it!

On Wed, 29 Jan 2020, 12:27 Guidone, notifications@github.com wrote:

Development is almost done, I writing some docs and tests

https://github.com/guidone/node-red-contrib-chatbot/wiki/NLP.js

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/guidone/node-red-contrib-chatbot/issues/329?email_source=notifications&email_token=ADJWV7WXQDVBDIM4MXEUZXDRAFY4NA5CNFSM4IPJ2V7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKHAQZQ#issuecomment-579733606, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJWV7VMSB2XUQYPILBTDFDRAFY4NANCNFSM4IPJ2V7A .

davidwallis commented 4 years ago

any planned date for merging the pull into main?

guidone commented 4 years ago

Sometime during this week 🖖

guidone commented 4 years ago

NLP.js was merged in 0.18.10

davidwallis commented 4 years ago

how do I install this version as it's not published to npm.

guidone commented 4 years ago

just launch

npm install node-red-contrib-chatbot

in your node red installation (should be $HOME/.node-red on a Mac)

davidwallis commented 4 years ago

it didn't appear to have been pushed to npm when I looked?

On Mon, 3 Feb 2020, 15:27 Guidone, notifications@github.com wrote:

just launch

npm install node-red-contrib-chatbot

in your node red installation (should be $HOME/.node-red on a Mac)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/guidone/node-red-contrib-chatbot/issues/329?email_source=notifications&email_token=ADJWV7TJNLEMZBVHCFWVUCLRBAZV3A5CNFSM4IPJ2V7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKUIAPQ#issuecomment-581468222, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJWV7U7TGVNHI5ZM4JW26DRBAZV3ANCNFSM4IPJ2V7A .

davidwallis commented 4 years ago

ok, npm view says it is the correct version - but node-red still stuck on 0.18.8 - will flatten my end and start again!

davidwallis commented 4 years ago

Ok, getting somewhere with this now, need to have a play with it in more detail and actually get it to do something :)

davidwallis commented 4 years ago

Looks good, any thoughts on whether Slots would be possible?

davidwallis commented 4 years ago

for example https://github.com/axa-group/nlp.js/blob/master/docs/v3/slot-filling.md