controller.settings.base#

Settings for all environments.

Module Contents#

Functions#

internal_bot(*, package, class_name[, required, args, ...])

Return a tuple with the given arguments.

websocket_external_bot(*, url[, required])

Return a tuple with information to run a WebSocketExternalBot.

Attributes#

BASE_DIR#
DEBUG = False#
ALLOWED_HOSTS: list[str] = []#
SECRET_KEY#
INSTALLED_APPS = ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes',...#
MIDDLEWARE = ['corsheaders.middleware.CorsMiddleware', 'django.middleware.security.SecurityMiddleware',...#
ROOT_URLCONF = 'controller.urls'#
TEMPLATES#
WSGI_APPLICATION = 'controller.wsgi.application'#
AUTH_PASSWORD_VALIDATORS#
LANGUAGES = (('en', 'English'), ('pt-BR', 'Brazilian Portuguese'))#
LANGUAGE_CODE = 'en'#
TIME_ZONE = 'UTC'#
USE_I18N = True#
USE_L10N = True#
USE_TZ = True#
STATIC_URL = '/blabcontrollerstatic/'#
STATIC_ROOT#
ASGI_APPLICATION = 'controller.routing.application'#
MEDIA_URL = '/media/'#
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'#
CHANNEL_LAYERS: dict[str, dict[str, Any]]#
REST_FRAMEWORK#
LOGGING#
CHAT_ENABLE_QUEUE = True#
_celery_port = 6379#
CELERY_BROKER_URL#
CELERY_RESULT_BACKEND#
CELERY_ACCEPT_CONTENT = ['application/json']#
CELERY_TASK_SERIALIZER = 'json'#
CELERY_RESULT_SERIALIZER = 'json'#
internal_bot(*, package, class_name, required=False, args=None, kwargs=None)#

Return a tuple with the given arguments.

This is a convenience method.

Parameters:
  • package (str) – the package that contains the bot class

  • class_name (str) – the bot class that extends Bot (bots.py)

  • required (bool) – whether the bot is essential to the conversation

  • args (list[Any] | None) – positional arguments to be passed to the bot’s constructor after conversation_info

  • kwargs (dict[str, Any] | None) – keyword arguments to be passed to the bot’s constructor

Returns:

(package, class_name, args, kwargs)

Return type:

a tuple

websocket_external_bot(*, url, required=False)#

Return a tuple with information to run a WebSocketExternalBot.

Parameters:
  • url (str) – a full HTTP/HTTPS address (with protocol, hostname, optional port and path, e.g. “https://www.example.com:8080/path”) at which the external bot will be listening to POST requests

  • required (bool) – whether the bot is essential to the conversation

Returns:

a tuple (package, class_name, args, kwargs)

Return type:

tuple[str, str, bool, list[Any], dict[str, Any]]

CHAT_LIMITS#
SPECTACULAR_SETTINGS#