chatbot.sql
Files are poured into your database, and thenchatbot/Config.php
Modify the relevant database configuration variables in the file.aiml/chatbot.aiml
File or create a new oneaiml
File thenaiml/chatbot.aiml
Documentationinclude
Labels introduce it.aiml
Must be placed inaiml
In the catalogue.chatbot.aiml
It’s the entry file. It’s inside.aiml
Labels can contain multiplecategory
Label, onedefault
Labels and multipleinclude
Label.aiml
File at rootaiml
The label must contain onetopic
Tag, this topic tag can contain more than onecategory
Labels and onedefault
Label (other AIML files here cannot be written)include
Label,include
Labels can only appearchatbot.aiml
It’s in the document.index.php
Chat with the robot for testing.Api. php? RequestType = talk & input = hello
aiml
Labels and standardsaiml
Labels are different. I personalize the tags according to the requirements. We can find more tags supported by chat robots in the AIML. MD file.api.php?requestType=talk&userInput=haha
When you can get the abovejson
Data.api.php
withGET
When you send a request in a way, you take it with you.userId
Parameter, which is used as the unique identifier of the user. If you don’t give this parameter, the program will use the user’s IP as the only indication.multiChatbot
Set tofalse
All users will share onedefault
Ofchatbot
。 When you set it totrue
Every user will have its ownchatbot
Thesechatbot
Yes.userId
As a unique label, each user gives its ownchatbot
Set the relevant name, gender, age and other attributes. When you’re writing a voice assistant or something like that, more than onechatbot
Functions will be particularly useful because users can name their voice assistants.log
A table that stores logs.property
It’s storage.user
andbot
The table of attributes, which is equivalent to the head of our chat robot, helps us remember some attributes. Labels such as set, get, del, user, BOT are used to manipulate the table. Anneliese michel grave site.data
Tables are used to store user input and robot responses.input
, that
, topic
Wait for labels to operateParser::$_data
Array. Every time the program starts running, the program loads data from the table into the array, and then stores it in the table when the program ends. The only indication of the table isuserId
。