question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to do chat bot?

See original GitHub issue

Why it didn’t work? I tried set sents in [], same problem Can anyone show example how make simple chat bot?

var brain = require('brain.js');
var net = new brain.recurrent.LSTM();
net.train([
	{input: "hello", output: "Hi!"},
    {input: "How are you?", output: "Super!"},
    {input: "Where are you?", output: "Next to you"}
], { log: true });

console.log(net.run("Hello!"));

Sometimes it crash with errors like

Error: unrecognized character “Hello!” at DataFormatter.toIndexes (/home/node/neural/node_modules/brain.js/dist/utilities/data-formatter.js:85:17) at DataFormatter.toIndexesInputOutput (/home/node/neural/node_modules/brain.js/dist/utilities/data-formatter.js:103:23) at LSTM.formatDataIn (/home/node/neural/node_modules/brain.js/dist/recurrent/rnn.js:769:35) at LSTM.run (/home/node/neural/node_modules/brain.js/dist/recurrent/rnn.js:381:24) at Object.<anonymous> (/home/node/neural/index.js:9:17) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3)

Sorry for my bad English

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
robertleeplummerjrcommented, Jul 12, 2018

We really need to handle the case of a generic non-understood value so that the net can essentially just skip that value.

1reaction
robertleeplummerjrcommented, Jul 17, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Make a Chatbot From Scratch
Go to the Integrations section. · Choose Chat Widget from the list. · Choose Lead generation bot in Set up for bot. ·...
Read more >
How to Make a Chatbot [No-Code Creation Guide 2022]
Learn how to create a chatbot from scratch & without coding using an intuitive drag-n-drop Landbot builder. In under 30 minutes.
Read more >
How to Create a Chatbot: Business Owner Guide 2022
1. If you think you could use a friendly conversation about building chatbots powered by AI without being judged, just book a spot...
Read more >
How To Create A Chatbot with Python & Deep Learning In ...
How To Create A Chatbot with Python & Deep Learning In Less Than An Hour · Agenda · Libraries & Data · Initializing...
Read more >
How to Create a Powerful Chatbot in 15 Minutes
Step 1: Get a Chatbot Builder (MobileMonkey) ... First, you will need to use a chatbot building platform like MobileMonkey. When selecting a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found