{"id":21991914,"url":"https://github.com/elct9620/doll","last_synced_at":"2025-04-30T14:15:58.258Z","repository":{"id":62557408,"uuid":"77428858","full_name":"elct9620/doll","owner":"elct9620","description":"The Chatbot Framework written in Ruby","archived":false,"fork":false,"pushed_at":"2017-09-12T08:49:56.000Z","size":39,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T21:37:27.396Z","etag":null,"topics":["chatbot","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elct9620.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-27T05:38:47.000Z","updated_at":"2017-11-02T16:51:18.000Z","dependencies_parsed_at":"2022-11-03T06:30:26.105Z","dependency_job_id":null,"html_url":"https://github.com/elct9620/doll","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fdoll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fdoll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fdoll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elct9620%2Fdoll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elct9620","download_url":"https://codeload.github.com/elct9620/doll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251719657,"owners_count":21632723,"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":["chatbot","ruby"],"created_at":"2024-11-29T20:12:09.379Z","updated_at":"2025-04-30T14:15:58.207Z","avatar_url":"https://github.com/elct9620.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Doll [![Gem Version](https://badge.fury.io/rb/doll.svg)](https://badge.fury.io/rb/doll) [![Build Status](https://travis-ci.org/elct9620/doll.svg?branch=master)](https://travis-ci.org/elct9620/doll) [![Coverage Status](https://coveralls.io/repos/github/elct9620/doll/badge.svg?branch=master)](https://coveralls.io/github/elct9620/doll?branch=master) [![Code Climate](https://codeclimate.com/github/elct9620/doll/badges/gpa.svg)](https://codeclimate.com/github/elct9620/doll)\n===\n\nThe Chatbot Framework written in Ruby\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'doll'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install doll\n\n# Requirement\n\n* Ruby 2.3+\n\n## Usage\n\nPrepare your Rack (`config.ru`)\n```ruby\nrequire 'doll'\n\nrequire './config'\nrequire './converse'\n\nrun Doll.server\n```\n\nConfigure your chatbot (`config.rb`)\n```ruby\nDoll.configure do\n  # Support Adapters\n  adapter Doll::Adapter::Plain.new\n  adapter Doll::Adapter::Facebook.new(\n    'ACCESS_TOKEN',\n    'SECRET_TOKEN',\n    'VERIFY_TOKEN'\n  )\n\n  # NLP Support\n  use Doll::NLP::Wit.new('API_TOKEN')\nend\n```\n\nConfigure your chatbot converse rules (`converse.rb`)\n```ruby\nDoll.converse do\n  match /[Hh]ello/, to: :hello\n  # Current only support `intent` as predict entity for Wit.ai\n  intent :buy\n\n  not_found { 'I cannot figure out what you say....' }\nend\n```\n\nCreate your dialog classes\n```ruby\n# TODO: Namespace and Class name can be improved\n\nmodule Hello\n  # Initialize Dialog\n  class StartDialog\n    def process\n      # TODO: View-like helper comming soon\n      Doll::Message::Text.new('Hi, Human!')\n    end\n  end\nend\n```\n\n```ruby\n# TODO: Namespace and Class name can be improved\n\nmodule Buy\n  # Initialize Dialog\n  class StartDialog\n    def process\n      # TODO: View-like helper comming soon\n      Doll::Message::Text.new('Ok, I know you want buy something')\n    end\n  end\nend\n```\n\nStart your server\n```bash\n$ puma -C config.ru\n```\n\nNow, you can access your chatbot via `https://example.com/facebook`\n\n### Rails Integrate\n\nMount doll routes\n```ruby\nmount Doll.server =\u003e '/doll'\n```\n\nAdd configuration and converse to `config/initializes/doll.rb`\n```ruby\nDoll.configurate do\n  adapter # ...\nend\n\nDoll.converse do\n  match # ...\n  intent # ...\nend\n```\n\nAdd dialog classes into `app/bot`\n\n```ruby\n# app/bot/hello/start_dialog.rb\n\nmodule Hello\n  class StartDialog \u003c Doll::Dialog\n    def process\n      # ...\n    end\n  end\nend\n```\n\n## Roadmap\n\n* [x] Workable Chatbot\n* [ ] Converse\n  * [x] Regexp Matcher\n  * [x] NLP intent\n  * [ ] Routing options\n  * [ ] Improved routing\n* [ ] Session\n  * [ ] Store\n    * [ ] Memory-based\n    * [ ] Redis\n  * [ ] Converse Management\n* [ ] Dialog\n  * [ ] Response Builder\n  * [ ] Parameter\n* [ ] Adaptetr\n  * [ ] Facebook\n    * [x] Text Message\n    * [ ] Image Message\n  * [ ] LINE\n    * [ ] Text Message\n    * [ ] Image Message\n* [ ] Middleware\n  * [ ] NLP\n    * [x] Wit.ai\n    * [ ] LUIS.ai\n\n## Development\n\nTODO: Write development guide\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/elct9620/doll.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felct9620%2Fdoll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felct9620%2Fdoll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felct9620%2Fdoll/lists"}