chatsky


Namechatsky JSON
Version 0.9.0 PyPI version JSON
download
home_pagehttps://github.com/deeppavlov/chatsky
SummaryChatsky is a free and open-source software stack for creating chatbots, released under the terms of Apache License 2.0.
upload_time2024-09-27 22:16:41
maintainerNone
docs_urlNone
authorDenis Kuznetsov
requires_python!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8
licenseApache-2.0
keywords chatbots
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Chatsky](https://raw.githubusercontent.com/deeppavlov/chatsky/master/docs/source/_static/images/Chatsky-full-dark.svg)

[![Documentation Status](https://github.com/deeppavlov/chatsky/workflows/build_and_publish_docs/badge.svg?branch=dev)](https://deeppavlov.github.io/chatsky)
[![Codestyle](https://github.com/deeppavlov/chatsky/workflows/codestyle/badge.svg?branch=dev)](https://github.com/deeppavlov/chatsky/actions/workflows/codestyle.yml)
[![Tests](https://github.com/deeppavlov/chatsky/workflows/test_coverage/badge.svg?branch=dev)](https://github.com/deeppavlov/chatsky/actions/workflows/test_coverage.yml)
[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/deeppavlov/chatsky/blob/master/LICENSE)
![Python 3.8, 3.9, 3.10, 3.11](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-green.svg)
[![PyPI](https://img.shields.io/pypi/v/chatsky)](https://pypi.org/project/chatsky/)
[![Downloads](https://static.pepy.tech/badge/chatsky)](https://pepy.tech/project/chatsky)

Chatsky allows you to develop conversational services.
Chatsky offers a specialized domain-specific language (DSL) for quickly writing dialogs in pure Python. The service is created by defining a special dialog graph that determines the behavior of the dialog agent. The latter is then leveraged in the Chatsky pipeline.
You can use the framework in various services such as social networks, call centers, websites, personal assistants, etc.

Chatsky, a versatile Python-based conversational service framework, can be deployed across a spectrum of platforms,
ensuring flexibility for both novice and seasoned developers:

- Cloud platforms like AWS, Azure, and GCP offer scalable environments for Chatsky,
  with options such as AWS Lambda and Azure Functions providing serverless execution.
- For containerized deployment, Docker and Kubernetes streamline the orchestration of Chatsky applications.
- Furthermore, the framework's adaptability extends to IoT ecosystems,
  making it suitable for integration with edge devices in scenarios like smart homes or industrial automation.

Whether deployed on cloud platforms, containerized environments, or directly on IoT devices,
Chatsky's accessibility and customization options make it a robust choice for developing conversational services
in the evolving landscape of Python applications and IoT connectivity.

## Why choose Chatsky

* Written in pure Python, the framework is easily accessible for both beginners and experienced developers.
* For the same reason, all the abstractions used in Chatsky can be easily customized and extended using regular language synthax.
* Chatsky offers easy and straightforward tools for state management which is as easy as setting values of a Python dictionary.
* The framework is being actively maintained and thoroughly tested. The team is open to suggestions and quickly reacts to bug reports.

# Quick Start

## System Requirements

- Supported operating systems include Ubuntu 18.04+, Windows 10+ (partial support), and MacOS Big Sur (partial support);
- Python version 3.8 or higher is necessary for proper functionality;
- A minimum of 1 GB of RAM is required for optimal performance;
- If analytics collection or database integration is intended, Docker version 20 or higher may be necessary.


## Installation

Chatsky can be installed via pip:

```bash
pip install chatsky
```

The above command will set the minimum dependencies to start working with Chatsky. 
The installation process allows the user to choose from different packages based on their dependencies, which are:
```bash
pip install chatsky[json]  # dependencies for using JSON
pip install chatsky[pickle] # dependencies for using Pickle
pip install chatsky[redis]  # dependencies for using Redis
pip install chatsky[mongodb]  # dependencies for using MongoDB
pip install chatsky[mysql]  # dependencies for using MySQL
pip install chatsky[postgresql]  # dependencies for using PostgreSQL
pip install chatsky[sqlite]  # dependencies for using SQLite
pip install chatsky[ydb]  # dependencies for using Yandex Database
pip install chatsky[telegram]  # dependencies for using Telegram
pip install chatsky[benchmark]  # dependencies for benchmarking
```

For example, if you are going to use one of the database backends,
you can specify the corresponding requirements yourself. Multiple dependencies can be installed at once, e.g.
```bash
pip install chatsky[postgresql,mysql]
```

## Basic example

The following code snippet builds a simplistic chat bot that replies with messages
``Hi!`` and ``OK`` depending on user input, which only takes a few lines of code.
All the abstractions used in this example are thoroughly explained in the dedicated
[user guide](https://deeppavlov.github.io/chatsky/user_guides/basic_conceptions.html).

```python
from chatsky import (
    GLOBAL,
    TRANSITIONS,
    RESPONSE,
    Pipeline,
    conditions as cnd,
    Transition as Tr,
)

# create a dialog script
script = {
    GLOBAL: {
        TRANSITIONS: [
            Tr(
                dst=("flow", "node_hi"),
                cnd=cnd.ExactMatch("Hi"),
            ),
            Tr(
                dst=("flow", "node_ok")
            )
        ]
    },
    "flow": {
        "node_hi": {RESPONSE: "Hi!"},
        "node_ok": {RESPONSE: "OK"},
    },
}

# initialize Pipeline (needed to run the script)
pipeline = Pipeline(script, start_label=("flow", "node_hi"))


pipeline.run()
```

When you run this code, you get similar output:
```
request: hi
response: text='OK'
request: Hi
response: text='Hi!'
```

More advanced examples are available as a part of documentation:
[tutorials](https://deeppavlov.github.io/chatsky/tutorials.html).

## Further steps

To further explore the API of the framework, you can make use of the [detailed documentation](https://deeppavlov.github.io/chatsky/index.html). 
Broken down into several sections to highlight all the aspects of development with Chatsky,
the documentation for the library is constantly available online.

# Contributing to Chatsky

We are open to accepting pull requests and bug reports.
Please refer to [CONTRIBUTING.md](https://github.com/deeppavlov/chatsky/blob/master/CONTRIBUTING.md).

# License

Chatsky is distributed under the terms of the [Apache License 2.0](https://github.com/deeppavlov/chatsky/blob/master/LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/deeppavlov/chatsky",
    "name": "chatsky",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8",
    "maintainer_email": null,
    "keywords": "chatbots",
    "author": "Denis Kuznetsov",
    "author_email": "kuznetsov.den.p@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/85/ed/b87ef5cb1a42fa1e756d2e52e5e64f64031fd035188c761c5af5ddea8d84/chatsky-0.9.0.tar.gz",
    "platform": null,
    "description": "![Chatsky](https://raw.githubusercontent.com/deeppavlov/chatsky/master/docs/source/_static/images/Chatsky-full-dark.svg)\n\n[![Documentation Status](https://github.com/deeppavlov/chatsky/workflows/build_and_publish_docs/badge.svg?branch=dev)](https://deeppavlov.github.io/chatsky)\n[![Codestyle](https://github.com/deeppavlov/chatsky/workflows/codestyle/badge.svg?branch=dev)](https://github.com/deeppavlov/chatsky/actions/workflows/codestyle.yml)\n[![Tests](https://github.com/deeppavlov/chatsky/workflows/test_coverage/badge.svg?branch=dev)](https://github.com/deeppavlov/chatsky/actions/workflows/test_coverage.yml)\n[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/deeppavlov/chatsky/blob/master/LICENSE)\n![Python 3.8, 3.9, 3.10, 3.11](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-green.svg)\n[![PyPI](https://img.shields.io/pypi/v/chatsky)](https://pypi.org/project/chatsky/)\n[![Downloads](https://static.pepy.tech/badge/chatsky)](https://pepy.tech/project/chatsky)\n\nChatsky allows you to develop conversational services.\nChatsky offers a specialized domain-specific language (DSL) for quickly writing dialogs in pure Python. The service is created by defining a special dialog graph that determines the behavior of the dialog agent. The latter is then leveraged in the Chatsky pipeline.\nYou can use the framework in various services such as social networks, call centers, websites, personal assistants, etc.\n\nChatsky, a versatile Python-based conversational service framework, can be deployed across a spectrum of platforms,\nensuring flexibility for both novice and seasoned developers:\n\n- Cloud platforms like AWS, Azure, and GCP offer scalable environments for Chatsky,\n  with options such as AWS Lambda and Azure Functions providing serverless execution.\n- For containerized deployment, Docker and Kubernetes streamline the orchestration of Chatsky applications.\n- Furthermore, the framework's adaptability extends to IoT ecosystems,\n  making it suitable for integration with edge devices in scenarios like smart homes or industrial automation.\n\nWhether deployed on cloud platforms, containerized environments, or directly on IoT devices,\nChatsky's accessibility and customization options make it a robust choice for developing conversational services\nin the evolving landscape of Python applications and IoT connectivity.\n\n## Why choose Chatsky\n\n* Written in pure Python, the framework is easily accessible for both beginners and experienced developers.\n* For the same reason, all the abstractions used in Chatsky can be easily customized and extended using regular language synthax.\n* Chatsky offers easy and straightforward tools for state management which is as easy as setting values of a Python dictionary.\n* The framework is being actively maintained and thoroughly tested. The team is open to suggestions and quickly reacts to bug reports.\n\n# Quick Start\n\n## System Requirements\n\n- Supported operating systems include Ubuntu 18.04+, Windows 10+ (partial support), and MacOS Big Sur (partial support);\n- Python version 3.8 or higher is necessary for proper functionality;\n- A minimum of 1 GB of RAM is required for optimal performance;\n- If analytics collection or database integration is intended, Docker version 20 or higher may be necessary.\n\n\n## Installation\n\nChatsky can be installed via pip:\n\n```bash\npip install chatsky\n```\n\nThe above command will set the minimum dependencies to start working with Chatsky. \nThe installation process allows the user to choose from different packages based on their dependencies, which are:\n```bash\npip install chatsky[json]  # dependencies for using JSON\npip install chatsky[pickle] # dependencies for using Pickle\npip install chatsky[redis]  # dependencies for using Redis\npip install chatsky[mongodb]  # dependencies for using MongoDB\npip install chatsky[mysql]  # dependencies for using MySQL\npip install chatsky[postgresql]  # dependencies for using PostgreSQL\npip install chatsky[sqlite]  # dependencies for using SQLite\npip install chatsky[ydb]  # dependencies for using Yandex Database\npip install chatsky[telegram]  # dependencies for using Telegram\npip install chatsky[benchmark]  # dependencies for benchmarking\n```\n\nFor example, if you are going to use one of the database backends,\nyou can specify the corresponding requirements yourself. Multiple dependencies can be installed at once, e.g.\n```bash\npip install chatsky[postgresql,mysql]\n```\n\n## Basic example\n\nThe following code snippet builds a simplistic chat bot that replies with messages\n``Hi!`` and ``OK`` depending on user input, which only takes a few lines of code.\nAll the abstractions used in this example are thoroughly explained in the dedicated\n[user guide](https://deeppavlov.github.io/chatsky/user_guides/basic_conceptions.html).\n\n```python\nfrom chatsky import (\n    GLOBAL,\n    TRANSITIONS,\n    RESPONSE,\n    Pipeline,\n    conditions as cnd,\n    Transition as Tr,\n)\n\n# create a dialog script\nscript = {\n    GLOBAL: {\n        TRANSITIONS: [\n            Tr(\n                dst=(\"flow\", \"node_hi\"),\n                cnd=cnd.ExactMatch(\"Hi\"),\n            ),\n            Tr(\n                dst=(\"flow\", \"node_ok\")\n            )\n        ]\n    },\n    \"flow\": {\n        \"node_hi\": {RESPONSE: \"Hi!\"},\n        \"node_ok\": {RESPONSE: \"OK\"},\n    },\n}\n\n# initialize Pipeline (needed to run the script)\npipeline = Pipeline(script, start_label=(\"flow\", \"node_hi\"))\n\n\npipeline.run()\n```\n\nWhen you run this code, you get similar output:\n```\nrequest: hi\nresponse: text='OK'\nrequest: Hi\nresponse: text='Hi!'\n```\n\nMore advanced examples are available as a part of documentation:\n[tutorials](https://deeppavlov.github.io/chatsky/tutorials.html).\n\n## Further steps\n\nTo further explore the API of the framework, you can make use of the [detailed documentation](https://deeppavlov.github.io/chatsky/index.html). \nBroken down into several sections to highlight all the aspects of development with Chatsky,\nthe documentation for the library is constantly available online.\n\n# Contributing to Chatsky\n\nWe are open to accepting pull requests and bug reports.\nPlease refer to [CONTRIBUTING.md](https://github.com/deeppavlov/chatsky/blob/master/CONTRIBUTING.md).\n\n# License\n\nChatsky is distributed under the terms of the [Apache License 2.0](https://github.com/deeppavlov/chatsky/blob/master/LICENSE).\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Chatsky is a free and open-source software stack for creating chatbots, released under the terms of Apache License 2.0.",
    "version": "0.9.0",
    "project_urls": {
        "Documentation": "https://deeppavlov.github.io/chatsky/",
        "Homepage": "https://github.com/deeppavlov/chatsky",
        "Project Template": "https://github.com/deeppavlov/chatsky-template"
    },
    "split_keywords": [
        "chatbots"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c31f1548631904aae958355cebb42c9936079e59e4932e03325b517141c93987",
                "md5": "199560139702ff10e19cc7d5938ba0f5",
                "sha256": "7e368b7ae30fe9d8564e3edd108cb252311a7aa6d7d278fe3b587ef5ace3a79d"
            },
            "downloads": -1,
            "filename": "chatsky-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "199560139702ff10e19cc7d5938ba0f5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8",
            "size": 152914,
            "upload_time": "2024-09-27T22:16:39",
            "upload_time_iso_8601": "2024-09-27T22:16:39.973410Z",
            "url": "https://files.pythonhosted.org/packages/c3/1f/1548631904aae958355cebb42c9936079e59e4932e03325b517141c93987/chatsky-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "85edb87ef5cb1a42fa1e756d2e52e5e64f64031fd035188c761c5af5ddea8d84",
                "md5": "b5232067baaf9c3325018fe9947953d4",
                "sha256": "4aa1a4e43c56212d6f776a12c8a099ffbfd749101d25154d0a67c0df7a175fd9"
            },
            "downloads": -1,
            "filename": "chatsky-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b5232067baaf9c3325018fe9947953d4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8",
            "size": 101892,
            "upload_time": "2024-09-27T22:16:41",
            "upload_time_iso_8601": "2024-09-27T22:16:41.187970Z",
            "url": "https://files.pythonhosted.org/packages/85/ed/b87ef5cb1a42fa1e756d2e52e5e64f64031fd035188c761c5af5ddea8d84/chatsky-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-27 22:16:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "deeppavlov",
    "github_project": "chatsky",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "chatsky"
}
        
Elapsed time: 0.28420s