Skip to content

A simple chat bot written in PHP and JavaScript with customizable requests and responses

License

Notifications You must be signed in to change notification settings

femi-dd/simpleChatBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simpleChatBot

A very simple chat bot written in PHP and JavaScript

To train the bot: type train: yourQuestion # yourAnswer # yourPassword

To find an existing question: type find: yourQuestion

To Setup

  1. Edit the db.php to suit your database environment
  2. Edit the ajax url to send to the brain.php file
  3. You can add custom functions to the functions.php file to give your bot more super-powers! NOTE: The custom functions should return definite values to enable the brain.php process them well. (use the return keyword to return values)

<<< Since you know what a return keyword does, why am i even explaining? 🤔

  1. To train the bot to return function values, try this training syntax 👇

train: # yourQuestion # yourAnswer(the name of the function) # yourPassword

e.g train: # what's the time? # the time is (getTime) # password

  1. Also, Edit the .......

Just kidding around, You're all done!

About

A simple chat bot written in PHP and JavaScript with customizable requests and responses

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published