Skip to main content

Zoozl services for chatbots

Project description

zoozl

Server for chatbot services

Usage

For basic example a chatbot plugin is provided in zoozl.plugins package. It is a simple chatbot that allows to play bulls & cows game. It is also a plugin that is loaded in case no configuration file is provided.

Run websocket server

python -m zoozl 1601 --conf chatbot.toml

where 1601 is the port number and chatbot.toml is optional configuration file.

Architecture

zoozl package contains modules that handle various input interfaces like websocket or http POST and a chatbot interface that must be extended by plugins. Without plugin zoozl is not able to respond to any input. Plugin can be considered as a single chat assistant to handle a specific task. Plugin can be huge and complex or simple and small. It is up to the developer to decide how to structure plugins. zoozl_package

Plugin

Mimimal setup

  1. Create new toml configuration file (e.g. myconfig.toml)
extensions = ['my_plugin_module']
  1. Make sure my_plugin_module is importable from within python that will run zoozl server
  2. Create file my_plugin_module.py
from zoozl.chatbot import Interface

class MyPlugin(Interface):

    aliases = ("call myplugin",)

    def consume(self, context: , package: Package):
        package.callback("Hello this is my plugin response")
  1. Start zoozl server with your configuration file and asking to bot call myplugin it will respond Hello this is my plugin response
python -m zoozl 1601 --conf myconfig.toml

Configuration file

Configuration file must conform to TOML format. Example of configuration:

title = "Global configuration for Chatbot"
extensions = ["chatbot_fifa_extension", "zoozl.plugins.greeter"]
websocket_port = 80

[chatbot_fifa_extension]
database_path = "tests/tmp"
administrator = "admin"

Root objects like title, extensions are configuration options for chatbot system wide setup, you can pass unlimited objects in configuration, however suggested is to add a component for each plugin and separate those within components.

  • TODO: Describe plugin interface and creation
  • TODO: Add authentication and authorization interaction between chatbot and plugin

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zoozl-0.1.1.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

zoozl-0.1.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file zoozl-0.1.1.tar.gz.

File metadata

  • Download URL: zoozl-0.1.1.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for zoozl-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a8ea8da1b7e3040714584f68749bdf43204439f6eb32a17048b670728bf44406
MD5 5b4ef3c57868018ab71d3e038c729dbf
BLAKE2b-256 904681d4fa55db1b343b9a9ae1b80646e2709309212f0765b550f0c880576485

See more details on using hashes here.

File details

Details for the file zoozl-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zoozl-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for zoozl-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 71ca9b1a8066a587759c8633b3116cf5380717e0d352faf59dc8f2682ad8430c
MD5 f221b2845b2a13d080428a5940b7d5c6
BLAKE2b-256 add40724c13945754af55754ecec47a40af64cc902ce4705aa665617deb02242

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page