lazy
1.0.0
懶惰讓您可以創建很棒的聊天機器人,而無需再了解人工智慧!
就教懶人4你的相案吧!
讓他來回答你吧!
您已經可以在電報中嘗試:讓我們與@LazyAIBot 聊天,我的土耳其朋友已經教過諸如問候之類的內容。如果您想自己主持,請繼續這樣做!
創建電報機器人
Telegram 機器人部署:
快速 HTTP 端點部署:
Nodejs 用法範例
用土耳其語“lazy”在線與“lazy”聊天
# 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 ( ) ;
# Or Gemfile --> gem 'lazy.ai', '~> 0.0.1'
$ > gem install lazy.ai
require 'lazy.ai'
# Change with a valid lazy chatbot server url.
lazy = Lazy . new ( host : "lazy.herokuapp.com" )
puts lazy . learn ( phrase : "hello" , category : "greetings" )
puts lazy . add_response ( response : "Hello there" , category : "greetings" )
puts lazy . query ( phrase : "hello dude!" )
puts lazy . get_responses ( category : "greetings" )
puts lazy . get_categories ( )
puts lazy . save ( )
puts lazy . load ( )
# Or python setup.py install
$ > pip install lazy-ai
import lazyai
# Change with a valid lazy chatbot server url.
lazy = lazyai . Lazy ()
lazy . learn ( "hello" , "greetings" )
lazy . add_response ( "greetings" , "Hello world!" )
lazy . query ( "hello dude!" )
lazy . get_responses ( "greetings" )
lazy . get_categories ()
lazy . save ()
lazy . load ()
/learn hi - greeting
/add greeting - Hello there!
/add greeting - Hello buddy!
/categories
/responses greeting
/quiet
/save
/load
POST /learn
POST /forget
POST /response
POST /action
POST /query
GET /categories
GET /save
GET /load
GET /responses/:category
這個項目的存在要感謝所有做出貢獻的人。 [貢獻]。
感謝我們所有的支持者! [成為支持者]
成為贊助商來支持該計畫。您的徽標將顯示在此處,並帶有指向您網站的連結。 [成為贊助商]
特別感謝 ruby 客戶@Yengas
特別感謝 python 客戶端@ahmetkotan
麻省理工學院 © cagataycali