{"repo":"gunthercox/ChatterBot","free":true,"listed":false,"github":"https://github.com/gunthercox/ChatterBot","clone":"git clone https://github.com/gunthercox/ChatterBot.git","description":"ChatterBot is a machine learning, conversational dialog engine for creating chat bots","language":"Python","stars":14509,"topics":["bot","chatbot","chatterbot","conversation","language","machine-learning","python"],"license":"BSD-3-Clause","category":"chatbot_framework","readme_excerpt":"![ChatterBot: Machine learning in Python](https://i.imgur.com/b3SCmGT.png)\n\n# ChatterBot\n\nChatterBot is a machine-learning based conversational dialog engine built in\nPython which makes it possible to generate responses based on collections of\nknown conversations. The language independent design of ChatterBot allows it\nto be trained to speak any language.\n\n[![Package Version](https://img.shields.io/pypi/v/chatterbot.svg)](https://pypi.python.org/pypi/chatterbot/)\n[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-360/)\n[![Coverage Status](https://img.shields.io/coveralls/gunthercox/ChatterBot.svg)](https://coveralls.io/r/gunthercox/ChatterBot)\n[![Follow on Bluesky](https://img.shields.io/badge/🦋%20Bluesky-1185fe)](https://bsky.app/profile/chatterbot.us)\n[![Join the chat at https://gitter.im/chatterbot/Lobby](https://badges.gitter.im/chatterbot/Lobby.svg)](https://gitter.im/chatterbot/Lobby?utm_source=badge&utm_medium=badge&utm_content=badge)\n<!-- [![Code Climate](https://codeclimate.com/github/gunthercox/ChatterBot/badges/gpa.svg)](https://codeclimate.com/github/gunthercox/ChatterBot) -->\n\nAn example of typical input would be something like this:\n\n> **user:** Good morning! How are you doing?  \n> **bot:**  I am doing very well, thank you for asking.  \n> **user:** You're welcome.  \n> **bot:** Do you like hats?  \n\n## How it works\n\nAn untrained instance of ChatterBot starts off with no knowledge of how to communicate. Each time a user enters a statement, the library saves the text that they entered and the text that the statement was in response to. As ChatterBot receives more input the number of responses that it can reply to, and the accuracy of each response in relation to the input statement increases. The program selects the closest matching response by searching for the closest matching known statement that matches the input, it then returns the most likely response to that statement based on how frequently each response is issued by the people the bot communicates with.\n\n# [Documentation](https://docs.chatterbot.us)\n\nView the [documentation](https://docs.chatterbot.us)\nfor ChatterBot.\n\n## Installation\n\nThis package can be installed from [PyPi](https://pypi.python.org/pypi/ChatterBot) by running:\n\n```bash\npip install chatterbot\n```\n\n## Basic Usage\n\n```python\nfrom chatterbot import ChatBot\nfrom chatterbot.trainers import ChatterBotCorpusTrainer\n\nchatbot = ChatBot('Ron Obvious')\n\n# Create a new trainer for the chatbot\ntrainer = ChatterBotCorpusTrainer(chatbot)\n\n# Train the chatbot based on the english corpus\ntrainer.train(\"chatterbot.corpus.english\")\n\n# Get a response to an input statement\nchatbot.get_response(\"Hello, how are you today?\")\n```\n\n# Training data\n\nChatterBot comes with a data utility module that can be used to train chat bots.\nAt the moment there is training data for over a dozen languages in this module.\nContributions of additional training data or training data\nin other languages would be greatly appreciated. Take a look at the data files\nin the [chatterbot-corpus](https://github.com/gunthercox/chatterbot-corpus)\npackage if you are interested in contributing.\n\n```python\nfrom chatterbot.trainers import ChatterBotCorpusTrainer\n\n# Create a new trainer for the chatbot\ntrainer = ChatterBotCorpusTrainer(chatbot)\n\n# Train based on the english corpus\ntrainer.train(\"chatterbot.corpus.english\")\n\n# Train based on english greetings corpus\ntrainer.train(\"chatterbot.corpus.english.greetings\")\n\n# Train based on the english conversations corpus\ntrainer.train(\"chatterbot.corpus.english.conversations\")\n```\n\n**Corpus contributions are welcome! Please make a pull request.**\n\n# Examples\n\nFor examples, see the [examples](https://docs.chatterbot.us/examples/)\nsection of the documentation.\n\n# History\n\nSee release notes for changes https://github.com/gunthercox/ChatterBot/releases\n\n# Contributing\n\nContributions are welcomed, to help ensure a smooth process please start with the contributing guidelines in our documentation:\nhttps://docs.chatterbot.us/contributing/\n\n# Sponsors\n\nChatterBot is sponsored by:\n\n<p>\n   <a href=\"https://www.testmuai.com/?utm_source=chatterbot&utm_medium=sponsor\" target=\"_blank\">\n      <img src=\"docs/_static/testmu-ai-white-logo.png\" style=\"vertical-align: middle;\" width=\"250\" height=\"80\" />\n   </a>\n</p>\n\n# License\n\nChatterBot is licensed under the [BSD 3-clause license](https://opensource.org/licenses/BSD-3-Clause).\n","default_branch":"master","files":260,"tree":[".codeclimate.yml",".github/FUNDING.yml",".github/workflows/publish-documentation.yml",".github/workflows/python-package.yml",".gitignore","CODE_OF_CONDUCT.md","LICENSE","README.md","SECURITY.md","chatterbot/__init__.py","chatterbot/__main__.py","chatterbot/adapters.py","chatterbot/chatterbot.py","chatterbot/comparisons.py","chatterbot/components.py","chatterbot/constants.py","chatterbot/conversation.py","chatterbot/corpus.py","chatterbot/exceptions.py","chatterbot/ext/__init__.py","chatterbot/ext/django_chatterbot/__init__.py","chatterbot/ext/django_chatterbot/abstract_models.py","chatterbot/ext/django_chatterbot/admin.py","chatterbot/ext/django_chatterbot/apps.py","chatterbot/ext/django_chatterbot/migrations/0001_initial.py","chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py","chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py","chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py","chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py","chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py","chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py","chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py","chatterbot/ext/django_chatterbot/migrations/0009_tags.py","chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py","chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py","chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py","chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py","chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py","chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py","chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py","chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py","chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py","chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py","chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py","chatterbot/ext/django_chatterbot/migrations/0021_increase_text_max_length_to_1100.py","chatterbot/ext/django_chatterbot/migrations/__init__.py","chatterbot/ext/django_chatterbot/model_admin.py","chatterbot/ext/django_chatterbot/models.py","chatterbot/ext/django_chatterbot/settings.py","chatterbot/ext/sqlalchemy_app/__init__.py","chatterbot/ext/sqlalchemy_app/models.py","chatterbot/filters.py","chatterbot/languages.py","chatterbot/logic/__init__.py","chatterbot/logic/best_match.py","chatterbot/logic/llm_adapters.py","chatterbot/logic/logic_adapter.py","chatterbot/logic/mathematical_evaluation.py","chatterbot/logic/mcp_tools.py","chatterbot/logic/specific_response.py","chatterbot/logic/time_adapter.py","chatterbot/logic/unit_conversion.py","chatterbot/parsing.py","chatterbot/preprocessors.py","chatterbot/response_selection.py","chatterbot/search.py","chatterbot/storage/__init__.py","chatterbot/storage/django_storage.py","chatterbot/storage/mongodb.py","chatterbot/storage/redis.py","chatterbot/storage/sql_storage.py","chatterbot/storage/storage_adapter.py","chatterbot/tagging.py","chatterbot/trainers.py","chatterbot/utils.py","chatterbot/vectorstores.py","docs/_ext/canonical.py","docs/_ext/github.py","docs/_includes/python_module_structure.txt","docs/_static/MongoDB_Fores-Green.svg","docs/_static/Redis_Logo_Red_RGB.svg","docs/_static/bigrams.svg","docs/_static/chatterbot-logo.png","docs/_static/chatterbot-process-flow.svg","docs/_static/dialog-processing-flow-llm.svg","docs/_static/dialog-processing-flow.svg","docs/_static/favicon.ico","docs/_static/github-mark.png","docs/_static/mobile.js","docs/_static/silktide-consent-manager.css","docs/_static/silktide-consent-manager.js","docs/_static/so-icon.png","docs/_static/statement-relationship.svg","docs/_static/statement-response-relationship.svg","docs/_static/style.css","docs/_static/terminal-example.gif","docs/_static/testmu-ai-white-logo.png","docs/_static/training-graph.svg","docs/_templates/footer.html","docs/_templates/layout.html","docs/_templates/page.html","docs/_templates/sidebar_ad.html","docs/chatterbot.rst","docs/commands.rst","docs/comparisons.rst","docs/conf.py","docs/contributing.rst","docs/conversations.rst","docs/corpus.rst","docs/development.rst","docs/django/custom-models.rst","docs/django/index.rst","docs/django/settings.rst","docs/django/tutorial/django-filter-tutorial/index.rst","docs/django/tutorial/django-rest-framework-tutorial/index.rst","docs/django/tutorial/django-tutorial/django-installed.png","docs/django/tutorial/django-tutorial/index.rst","docs/django/tutorial/django-tutorial/part-2.rst","docs/django/tutorial/index.rst","docs/django/tutorial/writing-tests.rst","docs/django/views.rst","docs/django/wsgi.rst","docs/encoding.rst","docs/examples.rst","docs/faq.rst","docs/filters.rst","docs/glossary.rst","docs/index.rst","docs/large-language-models.rst","docs/logic/create-a-logic-adapter.rst","docs/logic/index.rst","docs/logic/response-selection.rst","docs/packaging.rst","docs/preprocessors.rst","docs/quickstart.rst","docs/releases.rst","docs/robots.txt","docs/security.rst","docs/setup.rst","docs/statements.txt","docs/storage/create-a-storage-adapter.rst","docs/storage/index.rst","docs/storage/mongodb.rst","docs/storage/redis.rst","docs/storage/sql.rst","docs/storage/text-search.rst","docs/testing.rst","docs/training.rst","docs/tutorial.rst","docs/upgrading.rst","docs/utils.rst","examples/__init__.py","examples/basic_example.py","examples/convert_units.py","examples/default_response_example.py","examples/django_example/README.rst","examples/django_example/django_example/__init__.py","examples/django_example/django_example/asgi.py","examples/django_example/django_example/management/__init__.py","examples/django_example/django_example/management/commands/__init__.py","examples/django_example/django_example/management/commands/train.py","examples/django_example/django_example/settings.py","examples/django_example/django_example/static/css/bootstrap.css","examples/django_example/django_example/static/css/bootstrap.css.map","examples/django_example/django_example/static/css/custom.css","examples/django_example/django_example/static/favicon.ico","examples/django_example/django_example/static/img/chatterbot.png","examples/django_example/django_example/static/js/bootstrap.js","examples/django_example/django_example/static/js/bootstrap.js.map","examples/django_example/django_example/static/js/jquery.js","examples/django_example/django_example/static/js/js.cookie.js","examples/django_example/django_example/templates/app.html","examples/django_example/django_example/templates/nav.html","examples/django_example/django_example/tests/__init__.py","examples/django_example/django_example/tests/test_api.py","examples/django_example/django_example/tests/test_example.py","examples/django_example/django_example/urls.py","examples/django_example/django_example/views.py","examples/django_example/django_example/wsgi.py","examples/django_example/manage.py","examples/django_example/requirements.txt","examples/export_example.py","examples/learning_feedback_example.py","examples/math_and_time.py","examples/memory_sql_example.py","examples/ollama_example.py","examples/openai_example.py","examples/specific_response_example.py","examples/tagged_dataset_example.py","examples/terminal_example.py","examples/terminal_mongo_example.py","examples/tkinter_gui.py","examples/training_example_chatterbot_corpus.py","examples/training_example_list_data.py","examples/training_example_ubuntu_corpus.py","graphics/README.md","graphics/ad.png","graphics/ad.xcf","graphics/avatar.png","graphics/banner.png","graphics/chatterbot.xcf","graphics/scan.jpg","pyproject.toml","setup.cfg","tests/__init__.py","tests/base_case.py","tests/django_integration/__init__.py","tests/django_integration/base_case.py","tests/django_integration/test_chatbot.py","tests/django_integration/test_chatterbot_corpus_training.py","tests/django_integration/test_chatterbot_settings.py","tests/django_integration/test_custom_models.py","tests/django_integration/test_django_adapter.py","tests/django_integration/test_logic_adapter_integration.py","tests/django_integration/test_secondary_database.py","tests/django_integration/test_settings.py","tests/django_integration/test_statement_integration.py","tests/logic/__init__.py","tests/logic/test_best_match.py","tests/logic/test_data_cache.py","tests/logic/test_logic_adapter.py","tests/logic/test_mathematical_evaluation.py","tests/logic/test_specific_response.py","tests/logic/test_time.py","tests/logic/test_unit_conversion.py","tests/storage/__init__.py","tests/storage/test_mongo_adapter.py","tests/storage/test_redis_adapter.py","tests/storage/test_sql_adapter.py","tests/storage/test_storage_adapter.py","tests/test_adapter_validation.py","tests/test_benchmarks.py","tests/test_chatbot.py","tests/test_cli.py","tests/test_comparisons.py","tests/test_conversations.py","tests/test_corpus.py","tests/test_examples.py","tests/test_filters.py","tests/test_initialization.py","tests/test_languages.py","tests/test_parsing.py","tests/test_preprocessors.py","tests/test_response_selection.py","tests/test_search.py","tests/test_tagging.py","tests/test_turing.py","tests/test_utils.py","tests/training/__init__.py","tests/training/test_chatterbot_corpus_training.py","tests/training/test_csv_file_training.py","tests/training/test_data/csv_corpus/1.csv","tests/training/test_data/csv_corpus/2.csv","tests/training/test_data/get_search.json","tests/training/test_data/json_corpus/1.json","tests/training/test_data/json_corpus/2.json","tests/training/test_json_file_training.py","tests/training/test_list_training.py","tests/training/test_training.py","tests/training/test_ubuntu_corpus_training.py"],"storefront":"/r/gunthercox","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gunthercox/ChatterBot/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}