-
Notifications
You must be signed in to change notification settings - Fork 3
goodbot: Templates
The templates
directory provides templates for the bot to get messages from, this cuts down on the actual codebase and modularizes responses away from the code.
Currently, we have:
- faq.json: This file contains all the template messages for FAQs which are fuzzy-matched to return the closest match. Each question is attached to a keyword and the keyword is the key for the answers, giving the extended answers to the question.
-
replies.json: This file contains almost all other bot responses the bot uses to reply, each keyword is connected to a snippet or long-form text. The
greetings
keyword contains a list of all greetings the bot shuffles between.
The bot stores the files into a dict()
upon each initialization, while a bit slower than hardcoding the messages, it provides O(1)
time-complexity and can be implemented using the standard library alone.
Copyright (C) 2020 QEDK Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
- Home
- Building dependencies
- goodbot
- ircbot
- parsebot
- Web app
- Running
- Toolforge
- Style guidelines
- GNU Free Documentation License