1.0.1 • Published 7 years ago

lazy-examples v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

Lazy,

npm.io

AI chat bot service.

You can try in telegram already: Lets chat with @LazyAIBot, my Turkish friends already teached somethings like as greetings. If you want host on your own, go ahead do this!

Create telegram bot

Telegram Bot Deploy: Deploy

Express HTTP Endpoint Deploy: Deploy


Node Usage

# Or npm install --save lazy.ai
$> yarn add lazy.ai
const Lazy = require('lazy.ai');

async function start() {
  const lazy = new Lazy();

  // Learn ..
  await lazy.learn({phrase: 'hello', category: 'greetings'})
  await lazy.learn({phrase: 'hi', category: 'greetings'})
  await lazy.learn({phrase: 'Hello there!', category: 'greetings'})

  // Maybe add action ..
  await lazy.addAction({category: 'greetings', actions: 'http://localhost:3000/'})
  // Or add usual response ..
  await lazy.addResponse({category: 'greetings', response: 'Hi there!'})

  // Query.
  await lazy.query({phrase: "hello dude!"})

  // Helpers..
  await lazy.getResponses({category: 'greetings'})
  await lazy.getCategories()

}
// Dont forget start your function :)
start();
FileContains
learn.jsBasic learning process.
save.jsSave trained data.
loadTrainedData.jsLoad trained data.
initial.jsShows initial options.
helpers.jsShows helper actions.