Closed dhannya34 closed 4 years ago
Thanks for indicating the bug
You can update the version in your project :
npm install newbot@latest
But it couldn't classify the correct and incorrect answers. Here it incorrectly classified the correct answer as 'It's wrong'. Could you please fix this issue.
I do not have any worries on my side. Can you send me the logs (Debug tab> Download Log)
I have attached the Log. newbot_log_4_2019-10-10T11_20_25.084Z.zip
Ok, you have two solutions (to choose) :
Use index = Array.indexOf(question.choices, :text)
in your conversational code
or
create your own function
In your JS file :
import formats from 'newbot-formats'
import code from './quiz.converse'
export default {
code,
skills: {
formats
},
functions: {
indexOf(array, text) {
return array.indexOf(text)
}
}
}
and use your function :
Use index = indexOf(question.choices, :text)
in your conversational code
I faced an issue running the Quiz bot, it's not showing 2nd question after I have selected 1st answer option. It's not propagating the loop. Could you please help me fix this issue.
I think there's a problem with this line:- index = Array.indexOf(question.choices, :text)