{"id":19287901,"url":"https://github.com/deeppavlov/chatsky-template","last_synced_at":"2026-05-17T10:34:52.331Z","repository":{"id":221554890,"uuid":"750783625","full_name":"deeppavlov/chatsky-template","owner":"deeppavlov","description":"A template repository for Chatsky projects.","archived":false,"fork":false,"pushed_at":"2024-10-10T12:00:05.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-05T19:22:32.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deeppavlov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-31T10:07:27.000Z","updated_at":"2024-10-10T12:00:09.000Z","dependencies_parsed_at":"2024-11-09T22:17:31.700Z","dependency_job_id":null,"html_url":"https://github.com/deeppavlov/chatsky-template","commit_stats":null,"previous_names":["deeppavlov/dff-template","deeppavlov/chatsky-template"],"tags_count":3,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fchatsky-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fchatsky-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fchatsky-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeppavlov%2Fchatsky-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deeppavlov","download_url":"https://codeload.github.com/deeppavlov/chatsky-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240392635,"owners_count":19794130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T22:07:33.390Z","updated_at":"2026-05-17T10:34:47.281Z","avatar_url":"https://github.com/deeppavlov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chatsky Project Template\n\nThis repository is a template for Chatsky projects.\n\nThe bot presented here is fully-functional with a very simple script that should\nbe overwritten with yours (more on that in the next section).\n\nThis bot uses SQLite to store dialog history. Refer to the [context storage tutorials](https://deeppavlov.github.io/chatsky/tutorials/index_context_storages.html)\nif you'd like to use a different DB engine.\n\nThis bot uses Telegram as an interface. Refer to the [interface tutorials](https://deeppavlov.github.io/chatsky/tutorials/index_interfaces.html)\nif you'd like to use different means of communicating.\n\n## How to use\n\n### [Step 0] System requirements\n\n1. A unix system (e.g. Ubuntu 22.04) is recommended. Although both Chatsky and this template\n    support other systems such as Windows, the instructions below are for unix systems.\n2. [Git](https://git-scm.com/downloads) to clone this repository.\n3. |Option 1| [Docker Engine](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/)\n   if you want to run the bot inside a docker container.\n4. |Option 2| [Python 3.9+](https://www.python.org/downloads/) if you don't want to use docker.\n\n### [Step 1] Clone the repo\n\n```shell\ngit clone https://github.com/deeppavlov/chatsky-template.git\ncd chatsky-template\n```\n\nAlternatively, you can create a new repository using this one as a template via GitHub:\n\nhttps://github.com/new?template_name=chatsky-template\u0026template_owner=deeppavlov\n\n### [Step 2] Edit project files\n\n1. Write your custom functions (e.g. custom responses, custom services) into `services/bot/bot/custom`.\n2. Edit Chatsky script at `services/bot/bot/script.py`.\n3. Save Telegram bot token into `secrets/tg_token.txt`.\n\n### [Step 3] Test the bot\n\n#### With Python\n\nFirst, move to the bot directory:\n\n```shell\ncd services/bot\n```\n\nNext, install project dependencies:\n\n```shell\npip install -r requirements.txt\n```\n\nFinally, run tests:\n\n```shell\npytest test.py\n```\n\n#### With Docker\n\n```shell\ndocker build --target test services/bot\n```\n\n### [Step 4] Run the bot\n\n#### With Python\n\nFirst, you need to be in the root directory of the project.\n\nIf you've done the previous step, run\n```shell\ncd ../..\n```\nto return from the `services/bot` directory.\n\nNext, install project dependencies (if you haven't done so yet):\n\n```shell\n(cd services/bot \u0026\u0026 pip install -r requirements.txt)\n```\n\nDeploy the bot to telegram with:\n\n```shell\n(export DB_URI=\"sqlite+aiosqlite:////$(pwd)/sqlite.db\" TG_BOT_TOKEN_FILE=\"$(pwd)/secrets/tg_token.txt\" \u0026\u0026 cd services/bot \u0026\u0026 python app.py)\n```\n\n#### With Docker Compose\n\n```shell\ndocker compose up\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeppavlov%2Fchatsky-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeeppavlov%2Fchatsky-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeppavlov%2Fchatsky-template/lists"}