Skip to content

Commit

Permalink
Merge pull request #6 from bkimminich/nlp-support
Browse files Browse the repository at this point in the history
Make training silent and disable model autosave
  • Loading branch information
bkimminich committed Jul 4, 2020
2 parents 2d7e58f + 5676ec4 commit c1b5dd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions factory.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable no-unused-vars */
/* global Nlp, training */
var trainingSet = training.data
const model = new Nlp({ languages: ['en'] })

const model = new Nlp({ languages: ['en'], nlu: { log: false }, autoSave: false, autoLoad: false, modelFileName: '' })
var users = {
idmap: {},

Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ class Bot {
this.factory.run(`users.addUser("${token}", "${name}")`)
}

getUser (token) {
return this.factory.run(`users.get("${token}")`)
}

render (statement, token) {
return statement.replace(/<bot-name>/g, this.name).replace(/<customer-name>/g, this.factory.run(`currentUser(${token})`))
}
Expand Down

0 comments on commit c1b5dd6

Please sign in to comment.