The Chatbot AP module provides a common layer to expose your website content and logic to Chatbots and Personal Assistants (NLPs).
Requirements and Recommended modules
Chatbot API by itself doesn't do anything. You should install it only if another module asks for it or you want to build your own integration driver.
Currently the following platforms are supported out of the box:
- Alexa, by using the internal chatbot_api_alexa submodule together with the Alexa module.
- Dialogflow, by using the internal chatbot_api_ai submodule together with the Dialogflow Webhook module
More integrations are coming, besides the module provide examples on how to write your own driver for (yet) unsupported platforms.
Roadmap
The module is already stable and its RC phase. No new features are planned in the next 6-12 months, other than bugfixes and new / better integrations with platforms.
The README file is in our TODO, however the module already have a pretty good documentation.
Tests are currently green, there are 6 Coding Standard issues left because fixing them could break the current API, and the module it's in its Release Candidate phase.
Credits
gambry and larowlan are the maintainers.
Project link
https://www.drupal.org/project/chatbot_api
Git instructions
git clone --branch 8.x-2.x https://git.drupal.org/project/chatbot_api.git
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | chatbot_api_alexa.txt | 26.01 KB | nandu.kumar |
Comments
Comment #2
nandu.kumar commentedHey @gambry,
i am able to see the some error Pareviw of your project.
The chatbot_api_alexa.module does not implement hook_help()
DrupalPractice has found some issues with your code, but could be false positives.
Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
https://pareview.sh/pareview/https-git.drupal.org-project-chatbot_api.git
Comment #3
nandu.kumar commentedComment #4
gambryThat's what I love about community! :D
They do implement hook_help(), just with old modules namings which I haven't updated accordingly.
RE Coding Standard issues, most of them are due Drupal Console code templates.
Thanks for your review! We'll check those soon.
Comment #5
gambryI've released a new version with most of the issues flagged by #2 solved.
The only Coding Standards issues left can't be fixed because they won't be Back Compatible and as the module is in Release Candidate I don't want to break its API.
The README file is in our TODO, however the module already have a pretty good documentation.
Tests are still green, and 31 coding standard issues have been fixed.
Comment #6
gambryAdditional Coding Standard issues have been fixed: https://pareview.sh/pareview/https-git.drupal.org-project-chatbot_api.git
The only outstanding one is the README, which #5 has an answer and a plan for.
Comment #7
avpadernoComment #8
sleitner commentedAutomated Review
Pareview details: https://pareview.sh/pareview/https-git.drupal.org-project-chatbot_api.gi...
Review of the 8.x-1.x branch (commit 973ed2d):
This automated report was generated with PAReview.sh, your friendly project application review script.
Manual Review
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #9
gambryREADME.txt is in the main branch. The remaining CS issues can't be fixed because they will require to break the API.
Comment #10
avpaderno#8 doesn't report any coding style issue. Which coding style issue would break the API?
Comment #11
sleitner commentedI agree with kiamlaluno. I can't find where the API would break, if you change the code to match with Drupal coding standards.
Review of the 8.x-1.x branch (commit ba50156):
This automated report was generated with PAReview.sh, your friendly project application review script.
Comment #12
gambryHi guys, thanks for your time. Really appreciated.
modules/chatbot_api_entities/src/Form/EntityCollectionForm.phpthese issues are related to the__wakeup()PHP magic method. I discussed with the other maintainer and the method can probably go, as DependencySerializationTrait already takes care of it.modules/chatbot_api_entities/src/Plugin/QueryHandlerInterface.phpThis will break the API if I fix it. It's the plugin interface, if I change the arguments any plugin implementing it will break.src/Plugin/ChatbotApiEntities/QueryHandler/DefaultEntity.phpSame as above. This is a base class implementing QueryHandlerInterface interface.tests/src/Functional/ChatbotApiEntitiesFunctionalTest.phpthis is a public method. If any site is extending it for their own tests I would break their classes. Probably the worrying is more than the actual risk, but still.usestatements, which refer to the plugins Annotation, and I thought they were required. I can try to remove and test, if all looks code I'll fix those.I hope that makes sense, but let me know your thoughts.
Comment #13
gambryusestatements importing annotation classes can be avoided in Drupal plugins (so i fixedDefaultEntity), but are required for Drupal console Commands (so I forced ignoring CodingStyle checks for that line)I hope there aren't any more issues. Thanks.
Comment #14
avpadernoThere are still methods where the arguments with default values aren't the last in the argument list. That is not allowed from PHP.
If the module is already used, create a new branch, don't create new tags, and fix the code there.
Comment #15
avpaderno(That was the wrong status.)
Comment #16
gambryHi @kiamlaluno,
that is allowed in PHP. PHP doc just says "defaults should be on the right side [...] otherwise, things will not work as expected", and it doesn't refer to something wrong with the implementation, but with the usage.
That is how the
interface QueryHandlerInterfaceis defined, and I can't change it in 1.x due the module being in RC version already, and we can't break the API.But as you suggested I created a branch 2.x and fixed it in there.
As that is a new major version and we can break things, I fixed the CS issue with the test method "Public method name "ChatbotApiEntitiesFunctionalTest::testAdminUI" is not in lowerCamel format" too.
Thanks for your time!
Comment #17
avpadernoComment #18
sleitner commentedI see no issues in branch 2.x
Comment #19
avpadernoI am going to take the final step in 4 hours (less or more).
Comment #20
avpadernoThank you for your contribution!
I am going to update your account so you can opt into security advisory coverage now.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.