{"id":13658960,"url":"https://github.com/techx/faqbot","last_synced_at":"2025-04-24T11:33:03.316Z","repository":{"id":39646093,"uuid":"97699621","full_name":"techx/faqbot","owner":"techx","description":":question: An email bot to answer FAQ","archived":false,"fork":false,"pushed_at":"2023-07-06T21:26:06.000Z","size":2016,"stargazers_count":22,"open_issues_count":5,"forks_count":8,"subscribers_count":47,"default_branch":"master","last_synced_at":"2025-04-19T16:05:39.698Z","etag":null,"topics":["ai","email"],"latest_commit_sha":null,"homepage":"https://medium.com/hackmit-stories/faqbot-an-open-source-email-answering-tool-from-hackmit-fb395e93589d","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-07-19T09:39:58.000Z","updated_at":"2024-09-26T02:44:25.000Z","dependencies_parsed_at":"2022-07-25T21:18:12.975Z","dependency_job_id":null,"html_url":"https://github.com/techx/faqbot","commit_stats":{"total_commits":76,"total_committers":11,"mean_commits":6.909090909090909,"dds":0.4736842105263158,"last_synced_commit":"7dd25ba5d0c2937cc6bc5dc4c5dc124ec9626794"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techx%2Ffaqbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techx%2Ffaqbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techx%2Ffaqbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techx%2Ffaqbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techx","download_url":"https://codeload.github.com/techx/faqbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250515393,"owners_count":21443391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","email"],"created_at":"2024-08-02T05:01:04.108Z","updated_at":"2025-04-24T11:33:03.285Z","avatar_url":"https://github.com/techx.png","language":"Python","funding_links":[],"categories":["Python (144)"],"sub_categories":[],"readme":"# faqbot\n\nA bot to manage emails that ask frequenty asked questions.\n\n![Control Panel](./screenshot.png)\n\n## Features\n\n### Canned Replies\n\nSuper simple interface to reply to an email with a canned response. Simply reply to faqbot with `@faqbot \u003ctemplate_name\u003e` and faqbot will respond to the original email with the response.\n\n### Hackable Email Modules\n\nEasy API to add new email bot features. Simply hook into a `email_callback` and use the API to do tasks and reply to emails that suit your needs.\n\n### Smart Reply\n\nWith a lot of faqbot usage from your organization, you can train a model such that faqbot can figure out how to reply on its own.\n\n### Quill Integration\n\nIf you run a hackathon and use HackMIT's quill registration system, faqbot comes pre-baked with quill integration. Whitelist email addresses right from your inbox.\n\n#### And many more!\n\n## Setup\n\nUse Python 2.7,\n\nResolve dependencies,\n\n```bash\npip install -r requirements.txt\n```\n\nYou need to place the `config.py` file inside the `faqbot` directory. We have provided an example config in the `faqbot` directory, [config.example.py](faqbot/config.example.py).\n\n### Running\n\nTo run for local debugging,\n\n```bash\npython app.py\n```\n\nTo run on production,\n\n```bash\npython run.py\n```\n\n## Usage\n\n### Control Panel\n\nHead over to the url where you've deployed faqbot to view the control panel. There you can enable / disable features, tweak settings and add new templates.\n\n### Basic Usage\n\nReply all to the email thread without the person who sent the email. Or reply-one to `admin@hackmit.org` (or your configured mail-box) with the body text:\n\n```\n@faqbot latereg\n```\n\nThis will reply to the person a generic response to \"I didn't register for you hackathon before the deadline.\"\n\nYou can also use the `@fb` trigger for shorthand.\n\n### Quill\n\nfaqbot has a quill integration module (HackMIT's registration system). This is used to whitelist emails in our system.\n\n```\n@faqbot whitelist \u003cemail\u003e\n```\n\nThis will whitelist the given email in quill and reply to the person.\n\n### Smart Reply\n\nfaqbot can learn emails to template mapping and will attempt to automatically reply to an email if it's confident enough.\n\nTo use Smart Reply on your own emails, collect training data,\n\n```\npython tasks.py --collect\n```\n\nand then train the model on the collected dataset,\n\n```\npython tasks.py --train\n```\n\n\n## Development\n\n### Writing Code\n\nfaqbot's codebase is designed to be hackable. The main directory to add a new feature is the `faqbot/features/` directory. Here you can register for email callbacks and use the faqbot API to send reply-all or reply-one messages based on the email you just received.\n\nAdding new features is extensively documented in the [`features` module](faqbot/features/__init__.py). You can also take a look at the [quill feature](faqbot/features/quill.py) as an example feature to go off of.\n\n### Testing\n\nThe tests right now are hidden, because they are based on emails we've received in the past and hence reveal private information. However, we do plan on anonymize them and checking them in. The tests are run as follows:\n\n```\npython -m unittest tests.test_parsing\n```\n\n### Contributing\n\nTry to use [black](https://github.com/ambv/black) and follow that style for everything outside of `legacy/`. Contribute by opening pull requests and report bugs by creating issues. Email parsing in general is nasty, so opening bugs for parsing errors will be really helpful.\n\n## License\nCopyright (c) 2018-2019 Shreyas Kapur. Released under AGPLv3. See [LICENSE.md](LICENSE.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechx%2Ffaqbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechx%2Ffaqbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechx%2Ffaqbot/lists"}