Public | Automated Build

Last pushed: 2 years ago
Short Description
Django project that makes it possible to create a simple chat bot web app using ChatterBot.
Full Description

=================

Django ChatterBot

This is a Django project that makes it possible to create a simple chat bot web
app using
Django,
Django REST framework and
ChatterBot.

Quick start

  1. Add "django_chatterbot" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = (

     ...
     'django_chatterbot',
    

    )

  2. Include the django_chatterbot URLconf in your project urls.py like this::

    url(r'^chatterbot/', include('django_chatterbot.urls')),

  3. Run python manage.py migrate to create the chatterbot models.

  4. Start the development server and visit http://127.0.0.1:8000/admin/
    to create a poll (you'll need the Admin app enabled).

  5. POST to http://127.0.0.1:8000/chatterbot/ to start a conversation.

Docker Quick start

  1. If you have docker-compose installed::

    docker-compose up

  2. Otherwise, build the docker image::

    docker build -t django_chatterbot .

  3. Then run the container::

    docker run -it -p 8000:8000 django_chatterbot

  4. Open the web app in a browser (assuming you have docker-machine)::

    open http://$(docker-machine ip default):8000

Docker Pull Command
Owner
robertoandrade

Comments (1)
tadeogutierrez
a year ago

Hello.
I am getting errors starting with both dockerfile and docker-compose.
here it is:
Performing system checks...

/usr/local/lib/python2.7/site-packages/chatterbot/adapters/storage/jsonfile.py:19: UnsuitableForProductionWarning: The JsonFileStorageAdapter is not recommended for production application environments.
self.UnsuitableForProductionWarning
Unhandled exception in thread started by <function wrapper at 0x7fd73103d1b8>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(args, kwargs)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 121, in inner_run
self.check(display_num_errors=True)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 374, in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 361, in _run_checks
return checks.run_checks(
kwargs)
File "/usr/local/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "/usr/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 24, in check_resolver
for pattern in resolver.url_patterns:
File "/usr/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 313, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 306, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/local/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/code/example/example_app/urls.py", line 25, in <module>
url(r'^api/chatterbot/', include('django_chatterbot.urls', namespace='chatterbot')),
File "/usr/local/lib/python2.7/site-packages/django/conf/urls/init.py", line 50, in include
urlconf_module = import_module(urlconf_module)
File "/usr/local/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/code/example/django_chatterbot/urls.py", line 4, in <module>
from django_chatterbot.api import ChatterBotView
File "/code/example/django_chatterbot/api.py", line 14, in <module>
io_adapter="chatterbot.adapters.io.JsonAdapter"
File "/usr/local/lib/python2.7/site-packages/chatterbot/chatterbot.py", line 61, in init
self.add_adapter(adapter, *
kwargs)
File "/usr/local/lib/python2.7/site-packages/chatterbot/chatterbot.py", line 78, in add_adapter
self.validate_adapter_class(adapter, LogicAdapter)
File "/usr/local/lib/python2.7/site-packages/chatterbot/chatterbot.py", line 99, in validate_adapter_class
if not issubclass(import_module(validate_class), Adapter):
File "/usr/local/lib/python2.7/site-packages/chatterbot/utils/module_loading.py", line 14, in import_module
return getattr(module, module_parts[-1])
AttributeError: 'module' object has no attribute 'EvaluateMathematically'