{"id":474501,"date":"2025-09-10T15:01:23","date_gmt":"2025-09-10T15:01:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=474501"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=474501","title":{"rendered":"<span>\u0411\u043e\u0442-\u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 \u0441 LLM \u0434\u043b\u044f \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043d\u043b\u0430\u0439\u043d-\u0447\u0430\u0442\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 Telegram, \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u0442\u043e\u043a\u0441\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u0441\u043f\u0430\u043c\u0430 \u0438 \u043e\u0441\u043a\u043e\u0440\u0431\u043b\u0435\u043d\u0438\u0439. \u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0434\u0430\u0432\u043d\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0438: \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043b\u0435\u0433\u043a\u043e \u043e\u0431\u0445\u043e\u0434\u044f\u0442 \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0437\u0430\u043c\u0435\u043d\u044b \u0431\u0443\u043a\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043c\u0430\u0439\u043b\u0438\u043a\u043e\u0432 \u0438\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0443\u0447\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0439 \u0438 \u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u0436\u0435\u0441\u0442\u043a\u043e\u0439.<\/p>\n<p>\u041c\u044b \u0443\u0436\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u044b \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0431\u043e\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/829294\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0431\u043e\u0442-\u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430 Aiogram 3.x<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/874776\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u0442\u0438\u0441\u043f\u0430\u043c \u0431\u043e\u0442-\u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c. \u0417\u0430\u0449\u0438\u0449\u0430\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0437\u0430 \u0442\u0440\u0438 \u043c\u0438\u043d\u0443\u0442\u044b<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u043e \u043f\u0440\u043e\u0448\u043b\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 ML-\u043c\u043e\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u043e \u0438\u0445 \u043c\u0435\u043d\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u043c\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043a\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 (LLM) \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u0441\u043c\u044b\u0441\u043b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430. \u0418 \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e ML \u0438\u0445 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0430\u0442\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u043c\u043f\u0442. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0445 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438. \u0412\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u0431\u043e\u0442 \u0441 LLM \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c LLM \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u2014 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u0430\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434:<\/p>\n<ul>\n<li>\n<p>LLM \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b.<\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u0442 \u0441\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0447\u0430\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0443\u0434\u0430\u043b\u0438\u0442\u044c, \u0437\u0430\u0431\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u043e\u0442\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h4>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Python \u0441 <a href=\"https:\/\/www.python.org\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430<\/a>. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e 3.8 \u0438\u043b\u0438 \u0432\u044b\u0448\u0435. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b (\u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443) \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code>pip install aiogram pip install requests<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044e \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0434\u043b\u044f LLM \u0438 \u0431\u043e\u0442\u0430.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u043e\u0442\u0430 \u0432 Telegram. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/t.me\/BotFather\" rel=\"noopener noreferrer nofollow\">@BotFather<\/a> \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>\/newbot<\/code>. \u0421\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c: \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0438\u043c\u044f \u0431\u043e\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#171;AI Moderator&#187;) \u0438 username (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#171;aimoder_amvera_bot&#187;).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a LLM. \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u0432 <a href=\"https:\/\/amvera.ru\" rel=\"noopener noreferrer nofollow\">Amvera Cloud<\/a> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441 111 \u0440\u0443\u0431\u043b\u0435\u0439, \u0447\u0435\u0433\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430. \u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b LLM. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u043a\u043e\u043f\u0438\u0440\u0435\u043c \u0442\u043e\u043a\u0435\u043d.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b21\/e5c\/2e8\/b21e5c2e8d8e885d995cf6ad6ceaebd1.png\" alt=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c GPT 5 \u0432 Amvera Cloud\" title=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c GPT 5 \u0432 Amvera Cloud\" width=\"3304\" height=\"1048\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b21\/e5c\/2e8\/b21e5c2e8d8e885d995cf6ad6ceaebd1.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b21\/e5c\/2e8\/b21e5c2e8d8e885d995cf6ad6ceaebd1.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c GPT 5 \u0432 Amvera Cloud<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443. \u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/cloud.amvera.ru\/projects\/llm\" rel=\"noopener noreferrer nofollow\">LLM (Preview)<\/a> \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u043e\u0432\u00bb \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430\u043c \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 <strong>\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u043d\u0430 20 000 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<\/strong><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0438\u043c\u0435\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<h4>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0431\u043e\u0442\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h4>\n<p>\u041a\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438? \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0447\u0430\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432 LLM.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445 \u0431\u0435\u0441\u0435\u0434\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0438, \u0431\u043e\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: <\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0442\u043e \u0431\u043e\u0442 \u0432\u044b\u0434\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043d\u0430\u043a\u0430\u0437\u0430\u043d\u0438\u0435, \u043b\u0438\u0431\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0432 Amvera Cloud \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0442\u044b\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<ul>\n<li>\n<p>LLaMA 3 8B \u2014 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430 \u043f\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u0446\u0435\u043d\u044b \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>LLaMA 3 70B \u2014 \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0449\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0447\u0430\u0442\u043e\u0432 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>GPT 5 \u0438 4.1  \u2014 \u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c LLaMA 3 8B \u043a\u0430\u043a \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u0435.<\/p>\n<h4>\u041f\u0438\u0448\u0435\u043c \u0431\u043e\u0442\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432 \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <a href=\"http:\/\/main.py\" rel=\"noopener noreferrer nofollow\"><code>main.py<\/code><\/a> \u0441 \u043a\u043e\u0434\u043e\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0438 \u043f\u0430\u043f\u043a\u0443 <code>data<\/code> \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>\/start<\/code> \u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430:<\/p>\n<pre><code class=\"python\">import sqlite3 import asyncio import requests import logging import re  from contextlib import suppress from datetime import datetime, timedelta from aiogram import Bot, Dispatcher, F from aiogram.filters import Command, CommandObject from aiogram.types import Message, ChatPermissions from aiogram.client.default import DefaultBotProperties from aiogram.exceptions import TelegramBadRequest  logging.basicConfig(level=logging.INFO, format=\"%(asctime)s [%(levelname)s] %(name)s: %(message)s\")  URL = \"https:\/\/kong-proxy.yc.amvera.ru\/api\/v1\/models\/llama\" BOT_TOKEN = \"\" # \u0422\u041e\u041a\u0415\u041d \u0412\u0410\u0428\u0415\u0413\u041e \u0411\u041e\u0422\u0410 AUTH_TOKEN = \"\" # \u0422\u041e\u041a\u0415\u041d LLM \u0412 \u0424\u041e\u0420\u041c\u0410\u0422\u0415 Bearer XXXXXXXX  logger = logging.getLogger(__name__) connection = sqlite3.connect(\"\/data\/database.db\", check_same_thread=False) cursor = connection.cursor() bot = Bot(token=BOT_TOKEN, default=DefaultBotProperties(parse_mode=\"Markdown\")) dp = Dispatcher()  cursor.execute(\"CREATE TABLE IF NOT EXISTS rules (id INTEGER PRIMARY KEY AUTOINCREMENT, rules TEXT, group_id BIGINT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP)\") cursor.execute(\"CREATE TABLE IF NOT EXISTS warnings (id INTEGER PRIMARY KEY AUTOINCREMENT, user_id INTEGER NOT NULL, group_id INTEGER NOT NULL, reason TEXT NOT NULL, moderator_id INTEGER, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP)\") connection.commit()  @dp.message(Command(\"start\")) async def start(message: Message):     await message.answer(\"\u041f\u0440\u0438\u0432\u0435\u0442! \u042f \u0431\u043e\u0442-\u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 LLM LLaMA 8b\")  if __name__ == \"__main__\":     asyncio.run(dp.start_polling(bot)) <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 API Amvera, \u0433\u0434\u0435 \u0431\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0431 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438:<\/p>\n<pre><code class=\"python\">@dp.message(F.text) async def on_message(message: Message):     headers = {\"X-Auth-Token\": str(AUTH_TOKEN), \"Content-Type\": \"application\/json\"}     data = {\"model\": \"llama8b\", \"messages\": [{\"role\": \"user\", \"text\": \"\u0422\u044b \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0447\u0430\u0442\u0430. \u041e\u0442\u0432\u0435\u0447\u0430\u0439 \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e \u0444\u043e\u0440\u043c\u0435: \u041e\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0423\u0434\u0430\u043b\u0438\u0442\u044c\"}, {\"role\": \"system\", \"text\": message.text}]}      response = requests.post(URL, headers=headers, json=data, timeout=10)     result = response.json()     decision = result['result']['alternatives'][0]['message']['text'].lower()     if decision == \"\u0443\u0434\u0430\u043b\u0438\u0442\u044c\":         await message.delete()         logger.info(f\"\u0423\u0414\u0410\u041b\u0415\u041d\u041e | @{message.from_user.username} (ID: {message.from_user.id}) | \u0422\u0435\u043a\u0441\u0442: \\\"{message.text}\\\"\")     elif decision == \"\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c\":         logger.info(f\"\u041e\u0421\u0422\u0410\u0412\u041b\u0415\u041d\u041e | @{message.from_user.username} (ID: {message.from_user.id}) | \u0422\u0435\u043a\u0441\u0442: \\\"{message.text}\\\"\")     else:         logger.warning(f\"\u041e\u0428\u0418\u0411\u041a\u0410 | \u0422\u0435\u043a\u0441\u0442: \\\"{message.text}\\\" | \u041e\u0442\u0432\u0435\u0442: {result}\") <\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u0430, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0440\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0433\u0440\u0443\u043f\u043f\u044b. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>\/addrules<\/code> &#8212; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/p>\n<pre><code class=\"python\">@dp.message(Command(\"addrules\")) async def add_rules(message: Message):     if message.chat.type not in [\"group\", \"supergroup\"]:         await message.answer(\"\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0445 \u0447\u0430\u0442\u0430\u0445!\")         return      rules = message.text.split(' ', 1)     if len(rules) &amp;lt; 2:         await message.answer(\"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041f\u0440\u0438\u043c\u0435\u0440:\\n\/addrules \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442 \u0432 \u0447\u0430\u0442\u0435\")         return      rules = rules[1].strip()     cursor.execute(\"SELECT id FROM rules WHERE group_id = ?\", (message.chat.id,))     if cursor.fetchone():         cursor.execute(\"UPDATE rules SET rules = ?, created_at = ? WHERE group_id = ?\", (rules, datetime.now(), message.chat.id))         await message.answer(\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b!\")     else:         cursor.execute(\"INSERT INTO rules (rules, group_id) VALUES (?, ?)\", (rules, message.chat.id))         await message.answer(\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b!\")     connection.commit() <\/code><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>\/rules<\/code> &#8212; \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0433\u0440\u0443\u043f\u043f\u044b:<\/p>\n<pre><code class=\"python\">@dp.message(Command(\"rules\")) async def show_rules(message: Message):     if message.chat.type not in [\"group\", \"supergroup\"]:         await message.answer(\"\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0445 \u0447\u0430\u0442\u0430\u0445!\")         return      cursor.execute(\"SELECT rules FROM rules WHERE group_id = ?\", (message.chat.id,))     if cursor.fetchone():         await message.answer(f\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b:\\n\\n{cursor.fetchone()[0]}\")     else:         await message.answer(\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \/addrules \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430.\") <\/code><\/pre>\n<p>\u0418 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>\/clearrules<\/code> &#8212; \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0433\u0440\u0443\u043f\u043f\u044b:<\/p>\n<pre><code class=\"python\">@dp.message(Command(\"clearrules\")) async def clear_rules(message: Message):     if message.chat.type not in [\"group\", \"supergroup\"]:         await message.answer(\"\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0445 \u0447\u0430\u0442\u0430\u0445!\")         return      cursor.execute(\"DELETE FROM rules WHERE group_id = ?\", (message.chat.id,))     connection.commit()     if cursor.rowcount &amp;gt; 0:         await message.answer(\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u044b!\")     else:         await message.answer(\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.\") <\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/310\/e48\/493\/310e48493bf2487052d4a36b7a1ad3d7.png\" alt=\"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438\" title=\"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438\" width=\"478\" height=\"431\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/310\/e48\/493\/310e48493bf2487052d4a36b7a1ad3d7.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/310\/e48\/493\/310e48493bf2487052d4a36b7a1ad3d7.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0440\u043e\u0433\u0438\u0439 \u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442, \u0433\u0434\u0435 \u0447\u0451\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b:<\/p>\n<pre><code class=\"python\">@dp.message(F.text) async def on_message(message: Message):     member = await bot.get_chat_member(message.chat.id, message.from_user.id)     if member.status in ['administrator', 'creator']:         return      cursor.execute(\"SELECT rules FROM rules WHERE group_id = ?\", (message.chat.id,))     rules_result = cursor.fetchone()     rules = rules_result[0] if rules_result else \"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0447\u0430\u0442\u0430\u0445\"     headers = {\"X-Auth-Token\": str(AUTH_TOKEN), \"Content-Type\": \"application\/json\"}     data = { \"model\": \"llama8b\", \"messages\": [ {\"role\": \"system\", \"text\": f\"\"\"\u0422\u044b \u2014 \u0441\u0442\u0440\u043e\u0433\u0438\u0439 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 \u0447\u0430\u0442\u0430. \u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b.  \u041f\u0420\u0410\u0412\u0418\u041b\u0410 \u0414\u0410\u041d\u041d\u041e\u0419 \u0413\u0420\u0423\u041f\u041f\u042b: {rules}  \u041f\u0420\u041e\u0426\u0415\u0414\u0423\u0420\u0410 \u0410\u041d\u0410\u041b\u0418\u0417\u0410: 1. \u041e\u0427\u0415\u041d\u042c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u0432\u044b\u0448\u0435 2. \u0421\u0440\u0430\u0432\u043d\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u044d\u0442\u0438\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 3. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 - \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438 \u043a\u0430\u043a\u043e\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u043e 4. \u041d\u0430\u0437\u043d\u0430\u0447\u044c \u043d\u0430\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u043c\u0443 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445 5. \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043d\u0430\u043a\u0430\u0437\u0430\u043d\u0438\u0435 - \u043f\u0440\u0438\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0434\u043b\u044f \u0442\u0438\u043f\u0430 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f  \u0424\u041e\u0420\u041c\u0410\u0422 \u041e\u0422\u0412\u0415\u0422\u0410 \u0422\u041e\u041b\u042c\u041a\u041e \u041e\u0414\u041d\u0410 \u0421\u0422\u0420\u041e\u041a\u0410 \u0411\u0415\u0417 \u041a\u0410\u0412\u042b\u0427\u0415\u041a: \u0423\u0434\u0430\u043b\u0438\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: [\u0431\u0430\u043d\/\u043c\u0443\u0442\/\u043a\u0438\u043a\/\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435], \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c: [\u0441\u0435\u043a\u0443\u043d\u0434\u044b], \u043f\u0440\u0438\u0447\u0438\u043d\u0430: [\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435]  - \u0415\u0421\u041b\u0418 \u041d\u0410\u0420\u0423\u0428\u0415\u041d\u0418\u0415 \u041e\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u043f\u0440\u0438\u0447\u0438\u043d\u0430: -  - \u0415\u0421\u041b\u0418 \u041d\u0415\u0422 \u041d\u0410\u0420\u0423\u0428\u0415\u041d\u0418\u042f  \u041f\u0420\u0418\u041c\u0415\u0420\u042b \u041e\u0422\u0412\u0415\u0422\u041e\u0412 \u0414\u041b\u042f \u0420\u0410\u0417\u041d\u042b\u0425 \u041f\u0420\u0410\u0412\u0418\u041b: \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445: \"\u0417\u0430 \u043e\u0441\u043a\u043e\u0440\u0431\u043b\u0435\u043d\u0438\u044f - \u0431\u0430\u043d\" \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435: \"\u0438\u0434\u0438 \u043d\u0430 \u0445\u0443\u0439\" \u2192 \"\u0423\u0434\u0430\u043b\u0438\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: \u0431\u0430\u043d, \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c: 0, \u043f\u0440\u0438\u0447\u0438\u043d\u0430: \u043e\u0441\u043a\u043e\u0440\u0431\u043b\u0435\u043d\u0438\u0435 (\u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u043e \u043e\u0441\u043a\u043e\u0440\u0431\u043b\u0435\u043d\u0438\u044f)\" \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445: \"\u0421\u043f\u0430\u043c - \u043c\u0443\u0442 \u043d\u0430 1 \u0447\u0430\u0441\" \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435: \"\u043a\u0443\u043f\u0438\u0442\u0435 \u0442\u043e\u0432\u0430\u0440\" \u2192 \"\u0423\u0434\u0430\u043b\u0438\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: \u043c\u0443\u0442, \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c: 3600, \u043f\u0440\u0438\u0447\u0438\u043d\u0430: \u0441\u043f\u0430\u043c (\u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u043e \u0440\u0435\u043a\u043b\u0430\u043c\u0443)\" \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445: \"\u0424\u043b\u0443\u0434 - \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435\" \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435: \"\u0441\u043f\u0430\u043c \u0441\u043f\u0430\u043c \u0441\u043f\u0430\u043c\" \u2192 \"\u0423\u0434\u0430\u043b\u0438\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c: 0, \u043f\u0440\u0438\u0447\u0438\u043d\u0430: \u0444\u043b\u0443\u0434 (\u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u043e \u0444\u043b\u0443\u0434)\" \u0415\u0441\u043b\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445 \u044f\u0432\u043d\u043e, \u043d\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0438\u0442 \u0434\u0443\u0445\u0443 \u043f\u0440\u0430\u0432\u0438\u043b: \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435: \"\u0443\u0433\u0440\u043e\u0437\u044b\" \u2192 \"\u0423\u0434\u0430\u043b\u0438\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435: \u0431\u0430\u043d, \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c: 0, \u043f\u0440\u0438\u0447\u0438\u043d\u0430: \u0443\u0433\u0440\u043e\u0437\u044b (\u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f)\" \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439: \"\u043f\u0440\u0438\u0432\u0435\u0442\" \u2192 \"\u041e\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u043f\u0440\u0438\u0447\u0438\u043d\u0430: -\" \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430:\"\"\"             },             {                 \"role\": \"user\", \"text\": message.text             }         ], \"temperature\": 0.1, \"max_tokens\": 70     }      response = requests.post(URL, headers=headers, json=data, timeout=10)     result = response.json()     decision = result['result']['alternatives'][0]['message']['text'].lower().strip()      delete_match = re.match(r\"\u0443\u0434\u0430\u043b\u0438\u0442\u044c,\\s*\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435:\\s*(\\w+),\\s*\u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c:\\s*(\\d+),\\s*\u043f\u0440\u0438\u0447\u0438\u043d\u0430:\\s*(.+)\",decision)     leave_match = re.match(r\"\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c,\\s*\u043f\u0440\u0438\u0447\u0438\u043d\u0430:\\s*-\", decision)      if delete_match:         action = delete_match.group(1)         duration = int(delete_match.group(2))         reason = delete_match.group(3).strip()         await apply_punish(message, action, duration, reason)         await message.delete()         logger.info(f\"\u0423\u0414\u0410\u041b\u0415\u041d\u041e | \u041f\u0440\u0430\u0432\u0438\u043b\u0430: {rules[:50]}... | \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435: {action} | \u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c: {duration}\u0441 | \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c: @{message.from_user.username} | \u041f\u0440\u0438\u0447\u0438\u043d\u0430: {reason} | \u0422\u0435\u043a\u0441\u0442: {message.text}\")     elif leave_match:         logger.info(f\"\u041e\u0421\u0422\u0410\u0412\u041b\u0415\u041d\u041e | @{message.from_user.username} | \u041f\u0440\u0430\u0432\u0438\u043b\u0430: {rules[:30]}... | \u0422\u0435\u043a\u0441\u0442: {message.text}\")     else:         logger.warning(f\"\u041d\u0415\u041f\u041e\u041d\u042f\u0422\u041d\u042b\u0419 \u041e\u0422\u0412\u0415\u0422: '{decision}' | \u041f\u0440\u0430\u0432\u0438\u043b\u0430: {rules[:30]}... | \u0422\u0435\u043a\u0441\u0442: {message.text}\") <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>apply_punish<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u043a\u0430\u0437\u0430\u043d\u0438\u0439:<\/p>\n<pre><code class=\"python\">async def apply_punish(message: Message, action: str, duration: int, reason: str) -&amp;gt; str:     user_id = message.from_user.id     chat_id = message.chat.id      if action == \"\u0431\u0430\u043d\":         await message.bot.ban_chat_member(chat_id, user_id)         text = \"\u0411\u0430\u043d (\u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430)\"      elif action == \"\u043c\u0443\u0442\":         until_date = datetime.now() + timedelta(seconds=duration)         await message.bot.restrict_chat_member(chat_id, user_id, until_date = until_date, permissions = ChatPermissions(can_send_messages=False, can_send_media_messages=False, can_send_other_messages=False, can_add_web_page_previews=False))         if duration == 0:             time_str = \"\u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430\"         elif duration &amp;lt; 60:             time_str = f\"{duration} \u0441\"         elif duration &amp;lt; 3600:             time_str = f\"{duration\/\/60} \u043c\"         elif duration &amp;lt; 86400:             time_str = f\"{duration \/\/ 3600} \u0447\"         else:             days = duration \/\/ 86400             time_str = f\"{days} \u0434\u043d\"         text = f\"\u041c\u0443\u0442 ({time_str})\"      elif action == \"\u043a\u0438\u043a\":         await message.bot.ban_chat_member(chat_id, user_id, until_date=datetime.now() + timedelta(seconds=30))         text = \"\u041a\u0438\u043a\"      elif action == \"\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435\":         cursor.execute(\"INSERT INTO warnings (user_id, group_id, reason, moderator_id) VALUES (?, ?, ?, ?)\", (user_id, chat_id, reason, message.bot.id))         connection.commit()         text = \"\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435\"     return text <\/code><\/pre>\n<p>\u041c\u043e\u0436\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0431\u043e\u0442\u0430. \u0412\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>python main.py<\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u044b\u0432\u043e\u0434:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/657\/a80\/203\/657a8020309ead91f408f6f15c94e1b2.png\" alt=\"\u0412\u044b\u0432\u043e\u0434 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438\" title=\"\u0412\u044b\u0432\u043e\u0434 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438\" width=\"1096\" height=\"66\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/657\/a80\/203\/657a8020309ead91f408f6f15c94e1b2.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/657\/a80\/203\/657a8020309ead91f408f6f15c94e1b2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0412\u044b\u0432\u043e\u0434 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u043e\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u0438 \u0433\u043e\u0442\u043e\u0432 \u043a \u0440\u0430\u0431\u043e\u0442\u0435. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0431\u043e\u0442\u0430 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u043f\u0440\u0438\u0433\u043b\u0430\u0441\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u044b\u0432\u043e\u0434 \u0432 \u043b\u043e\u0433\u0430\u0445, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/604\/945\/1c4\/6049451c4b7cf79101c4dc86130bac1c.png\" alt=\"\u0412\u044b\u0432\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438\" title=\"\u0412\u044b\u0432\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438\" width=\"1272\" height=\"62\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/604\/945\/1c4\/6049451c4b7cf79101c4dc86130bac1c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/604\/945\/1c4\/6049451c4b7cf79101c4dc86130bac1c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0412\u044b\u0432\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0410 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u044b\u0432\u043e\u0434 \u043f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/16a\/589\/043\/16a589043a2d61b500bb7b5560f7537f.png\" width=\"1845\" height=\"83\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/16a\/589\/043\/16a589043a2d61b500bb7b5560f7537f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/16a\/589\/043\/16a589043a2d61b500bb7b5560f7537f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c, \u0431\u043e\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0443\u0434\u0430\u043b\u0438\u043b \u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dae\/21a\/c47\/dae21ac47889588ee711c04f4341e965.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u043e\u0442\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u043e\u0442\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430\" width=\"455\" height=\"147\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/dae\/21a\/c47\/dae21ac47889588ee711c04f4341e965.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dae\/21a\/c47\/dae21ac47889588ee711c04f4341e965.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u043e\u0442\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0430 \u043a\u0430\u0434\u0440\u043e\u043c \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0438\u0434\u044b \u043d\u0430\u043a\u0430\u0437\u0430\u043d\u0438\u0439, \u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0432\u044b\u0434\u0430\u0447\u0435\u0439 \u043d\u0430\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u043d\u0435\u043b\u044c\u0437\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f: <code>\/ban<\/code>,<code>\/unban<\/code>, <code>\/mute<\/code> \u0438 <code>\/unmute<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/p>\n<pre><code class=\"python\">def pars_time(time: str | None) -&amp;gt; datetime | None:     if not time:         return None      match = re.match(r\"(\\d+)([a-z])\", time.lower())     if match:         value = int(match.group(1))         unit = match.group(2)         match unit:             case \"h\": delta = timedelta(hours=value)             case \"d\": delta = timedelta(days=value)             case _: return None     else:         return None      new = datetime.now() + delta     return new <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438:<\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>\/ban<\/code> &#8212; \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"python\">@dp.message(Command(\"ban\")) async def mute(message: Message, command: CommandObject | None = None) -&amp;gt; None:     if message.chat.type not in [\"group\", \"supergroup\"]:         await message.answer(\"\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0445 \u0447\u0430\u0442\u0430\u0445!\")         return      reply = message.reply_to_message     if not reply:         return None      date = pars_time(command.args)     with suppress(TelegramBadRequest):         await bot.ban_chat_member(chat_id=message.chat.\u0437id, user_id=reply.from_user.id, until_date=date)         await message.answer(f\"\u041c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 {message.from_user.mention_markdown(message.from_user.username)} \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f {reply.from_user.mention_markdown(reply.from_user.username)}\") <\/code><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>\/unban<\/code> &#8212; \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"python\">@dp.message(Command(\"unban\")) async def mute(message: Message):     if message.chat.type not in [\"group\", \"supergroup\"]:         await message.answer(\"\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0445 \u0447\u0430\u0442\u0430\u0445!\")         return      reply = message.reply_to_message     if not reply:         return None      with suppress(TelegramBadRequest):         await bot.unban_chat_member(chat_id=message.chat.id, user_id=reply.from_user.id)         await message.answer(f\"\u041c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 {message.from_user.mention_markdown(message.from_user.username)} \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f {reply.from_user.mention_markdown(reply.from_user.username)}\") <\/code><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>\/mute<\/code> &#8212; \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"python\">@dp.message(Command(\"mute\")) async def mute(message: Message, command: CommandObject | None = None) -&amp;gt; None:     if message.chat.type not in [\"group\", \"supergroup\"]:         await message.answer(\"\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0445 \u0447\u0430\u0442\u0430\u0445!\")         return      reply = message.reply_to_message     if not reply:         return None      date = pars_time(command.args)     with suppress(TelegramBadRequest):         await bot.restrict_chat_member(chat_id=message.chat.id, user_id=reply.from_user.id, until_date=date, permissions=ChatPermissions(can_send_messages=False))         await message.answer(f\"\u041c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 {message.from_user.mention_markdown(message.from_user.username)} \u0432\u044b\u0434\u0430\u043b \u043c\u0443\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e {reply.from_user.mention_markdown(reply.from_user.username)}\") <\/code><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>\/unmute<\/code> &#8212; \u0441\u043d\u044f\u0442\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"python\">@dp.message(Command(\"unmute\")) async def mute(message: Message, command: CommandObject | None = None) -&amp;gt; None:     if message.chat.type not in [\"group\", \"supergroup\"]:         await message.answer(\"\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0445 \u0447\u0430\u0442\u0430\u0445!\")         return      reply = message.reply_to_message     if not reply:         return None      with suppress(TelegramBadRequest):         await bot.restrict_chat_member(chat_id=message.chat.id, user_id=reply.from_user.id, permissions=ChatPermissions(can_send_messages=True))         await message.answer(f\"\u041c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 {message.from_user.mention_markdown(message.from_user.username)} \u0441\u043d\u044f\u043b \u043c\u0443\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e {reply.from_user.mention_markdown(reply.from_user.username)}\") <\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043d\u0430\u0448 \u0444\u0430\u0439\u043b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u0431\u043e\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>python main.py<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432\u044b\u0434\u0430\u0447\u0443 \u0438 \u0441\u043d\u044f\u0442\u0438\u0435 \u043c\u0443\u0442\u0430:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a1a\/cd5\/e6a\/a1acd5e6a15172a67a2c1900eb2a5081.png\" alt=\"\u0421\u043d\u044f\u0442\u0438\u0435 \u043c\u0443\u0442\u0430\" title=\"\u0421\u043d\u044f\u0442\u0438\u0435 \u043c\u0443\u0442\u0430\" width=\"513\" height=\"353\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/a1a\/cd5\/e6a\/a1acd5e6a15172a67a2c1900eb2a5081.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a1a\/cd5\/e6a\/a1acd5e6a15172a67a2c1900eb2a5081.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043d\u044f\u0442\u0438\u0435 \u043c\u0443\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432\u044b\u0434\u0430\u0447\u0443 \u0438 \u0441\u043d\u044f\u0442\u0438\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0e6\/9b8\/eda\/0e69b8eda8f39062d69fbb8d3d395c78.png\" alt=\"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430\" title=\"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430\" width=\"507\" height=\"416\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/0e6\/9b8\/eda\/0e69b8eda8f39062d69fbb8d3d395c78.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0e6\/9b8\/eda\/0e69b8eda8f39062d69fbb8d3d395c78.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041d\u0430\u0448 \u0431\u043e\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0433\u043e\u0442\u043e\u0432 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 Amvera Cloud.<\/p>\n<h4>\u0414\u0435\u043f\u043b\u043e\u0439 \u0431\u043e\u0442\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h4>\n<p>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0451\u043c \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 <a href=\"https:\/\/amvera.ru\" rel=\"noopener noreferrer nofollow\">Amvera<\/a>, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c CI\/CD. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 VPS, Amvera \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0432\u0438\u0436\u0435\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c 2 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0434\u0435\u043f\u043b\u043e\u044f:<\/p>\n<ul>\n<li>\n<p>\u0427\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Amvera<\/p>\n<\/li>\n<li>\n<p>\u0427\u0435\u0440\u0435\u0437 Git push<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 <code>requirements.txt<\/code>:<\/p>\n<pre><code>aiogram==3.21.0 requests==2.32.4<\/code><\/pre>\n<p>\u042d\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0444\u0430\u0439\u043b\u0430 \u2014 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code>pip freeze<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>amvera.yml<\/code>:<\/p>\n<pre><code class=\"yaml\">version: null meta:   environment: python   toolchain:     name: pip     version: \"3.12\" build:   requirementsPath: requirements.txt run:   scriptName: main.py   command: null   persistenceMount: \/data   containerPort: 80 <\/code><\/pre>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f, \u0432\u044b\u0431\u0440\u0430\u0432 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <a href=\"http:\/\/main.py\" rel=\"noopener noreferrer nofollow\"><code>main.py<\/code><\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">connection = sqlite3.connect(\"\/data\/database.db\", check_same_thread=False)<\/code><\/pre>\n<p>\u042d\u0442\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0443\u0442\u0438 \u0431\u043e\u0442 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0434\u0435\u043f\u043b\u043e\u044e. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0434\u0435\u043f\u043b\u043e\u044f \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<p>\u0418\u0434\u0435\u043c \u043d\u0430 \u0441\u0430\u0439\u0442 <a href=\"https:\/\/amvera.ru\/\" rel=\"noopener noreferrer nofollow\">Amvera Cloud<\/a> \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0441\u0432\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u0430\u0431\u0438\u0435\u043d\u0442 \u0438 \u0438\u0434\u0435\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b <a href=\"https:\/\/cloud.amvera.ru\/projects\/applications\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a>. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043e\u043f\u0446\u0438\u044e &#171;\u0427\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441&#187; \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b (\u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u0430\u043f\u043a\u0443 <code>data<\/code>).<\/p>\n<p>\u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u0431\u043e\u0442\u0430 \u0438 \u0442\u043e\u043a\u0435\u043d\u0430 LLM. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 <a href=\"http:\/\/main.py\" rel=\"noopener noreferrer nofollow\">main.py<\/a> \u043f\u0440\u044f\u043c\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432:<\/p>\n<pre><code class=\"python\">BOT_TOKEN = \"\" # \u0422\u041e\u041a\u0415\u041d \u0412\u0410\u0428\u0415\u0413\u041e \u0411\u041e\u0422\u0410 AUTH_TOKEN = \"\" # \u0422\u041e\u041a\u0415\u041d LLM \u0412 \u0424\u041e\u0420\u041c\u0410\u0422\u0415 Bearer XXXXXXXX<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u0435\u043f\u043b\u043e\u044f \u0447\u0435\u0440\u0435\u0437 Git.<\/p>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>git init<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 &#171;\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c&#187;.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 &#171;\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439&#187; \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 &#171;\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e&#187;. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0435\u0435 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442:<\/p>\n<pre><code>git remote add amvera https:\/\/git.amvera.ru\/\u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\/\u0438\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430;<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043a \u0432\u0430\u0448\u0435\u043c\u0443 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435:<\/p>\n<pre><code>git add amvera.yml main.py requirements.txt<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u043c\u0438\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439:<\/p>\n<pre><code>git commit -m \"\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 1.0\"<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 Amvera (\u0441\u0431\u043e\u0440\u043a\u0430 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438):<\/p>\n<pre><code>git push amvera master<\/code><\/pre>\n<p>\u041f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u0432\u043e\u0434 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b30\/785\/01c\/b3078501ced12e4a24c4c5bab6b44c72.png\" width=\"415\" height=\"307\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b30\/785\/01c\/b3078501ced12e4a24c4c5bab6b44c72.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b30\/785\/01c\/b3078501ced12e4a24c4c5bab6b44c72.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Amvera Cloud.<\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0411\u043e\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u0432 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c61\/3d2\/2f1\/c613d22f10e66e4a80d29d1837b75d58.png\" alt=\"\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 git\" title=\"\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 git\" width=\"1270\" height=\"84\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c61\/3d2\/2f1\/c613d22f10e66e4a80d29d1837b75d58.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c61\/3d2\/2f1\/c613d22f10e66e4a80d29d1837b75d58.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 git<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/810\/b1a\/889\/810b1a8893accfc7e08535cf76f53c76.png\" alt=\"\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\" title=\"\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\" width=\"1269\" height=\"80\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/810\/b1a\/889\/810b1a8893accfc7e08535cf76f53c76.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/810\/b1a\/889\/810b1a8893accfc7e08535cf76f53c76.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0448 \u0434\u0435\u043f\u043b\u043e\u0439 \u0437\u0430\u043a\u043e\u043d\u0435\u0447\u0435\u043d!<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041c\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e Telegram-\u0431\u043e\u0442\u0430-\u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 LLM Amvera Cloud \u0434\u043b\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c, \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u0430\u0442\u0430 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u044b\u0435 \u0441\u0430\u043d\u043a\u0446\u0438\u0438 \u043a \u043d\u0430\u0440\u0443\u0448\u0438\u0442\u0435\u043b\u044f\u043c.<\/p>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0421\u043d\u0438\u0437\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0413\u0438\u0431\u043a\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0431\u043e\u0442\u0430 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439 \u0434\u043e \u044d\u0441\u043a\u0430\u043b\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0447\u0430\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043f\u043e\u0440\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u2014 \u0431\u043e\u0442 \u0431\u0435\u0440\u0435\u0442 \u044d\u0442\u0443 \u0440\u0443\u0442\u0438\u043d\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u0441\u0435\u0431\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0447\u0430\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c \u0438 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c, \u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u2014 \u0431\u043e\u043b\u0435\u0435 \u0434\u0438\u0441\u0446\u0438\u043f\u043b\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438, \u0437\u043d\u0430\u044f, \u0447\u0442\u043e \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u043d\u0435\u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0418 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c ML, \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0430\u0442\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u043c\u0442.<\/p>\n<p>\u041a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e <a href=\"https:\/\/github.com\/Dimentiy-cmd\/Bot-moderator-on-LLM\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0430 GitHub<\/a>.<\/p>\n<hr\/>\n<p>\u0420\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b: <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/829294\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0431\u043e\u0442-\u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430 Aiogram 3.x<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/874776\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u0442\u0438\u0441\u043f\u0430\u043c \u0431\u043e\u0442-\u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c. \u0417\u0430\u0449\u0438\u0449\u0430\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0437\u0430 \u0442\u0440\u0438 \u043c\u0438\u043d\u0443\u0442\u044b<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/945724\/\"> https:\/\/habr.com\/ru\/articles\/945724\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043d\u043b\u0430\u0439\u043d-\u0447\u0430\u0442\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 Telegram, \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438 \u0442\u043e\u043a\u0441\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u0441\u043f\u0430\u043c\u0430 \u0438 \u043e\u0441\u043a\u043e\u0440\u0431\u043b\u0435\u043d\u0438\u0439. \u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0434\u0430\u0432\u043d\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0438: \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043b\u0435\u0433\u043a\u043e \u043e\u0431\u0445\u043e\u0434\u044f\u0442 \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0437\u0430\u043c\u0435\u043d\u044b \u0431\u0443\u043a\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043c\u0430\u0439\u043b\u0438\u043a\u043e\u0432 \u0438\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0443\u0447\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0439 \u0438 \u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u0436\u0435\u0441\u0442\u043a\u043e\u0439.<\/p>\n<p>\u041c\u044b \u0443\u0436\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u044b \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0431\u043e\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/829294\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0431\u043e\u0442-\u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430 Aiogram 3.x<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/874776\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u0442\u0438\u0441\u043f\u0430\u043c \u0431\u043e\u0442-\u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c. \u0417\u0430\u0449\u0438\u0449\u0430\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0437\u0430 \u0442\u0440\u0438 \u043c\u0438\u043d\u0443\u0442\u044b<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u043e \u043f\u0440\u043e\u0448\u043b\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 ML-\u043c\u043e\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u043e \u0438\u0445 \u043c\u0435\u043d\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u043c\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0439\u0440\u043e\u043d\u043a\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 (LLM) \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u0441\u043c\u044b\u0441\u043b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430. \u0418 \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e ML \u0438\u0445 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0430\u0442\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u043c\u043f\u0442. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0445 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438. \u0412\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u0431\u043e\u0442 \u0441 LLM \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c LLM \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u2014 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u0430\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0433\u0438\u0431\u0440\u0438\u0434\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434:<\/p>\n<ul>\n<li>\n<p>LLM \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b.<\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u0442 \u0441\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0447\u0430\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0443\u0434\u0430\u043b\u0438\u0442\u044c, \u0437\u0430\u0431\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u043e\u0442\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h4>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Python \u0441 <a href=\"https:\/\/www.python.org\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430<\/a>. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e 3.8 \u0438\u043b\u0438 \u0432\u044b\u0448\u0435. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b (\u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443) \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code>pip install aiogram pip install requests<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044e \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0434\u043b\u044f LLM \u0438 \u0431\u043e\u0442\u0430.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u043e\u0442\u0430 \u0432 Telegram. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/t.me\/BotFather\" rel=\"noopener noreferrer nofollow\">@BotFather<\/a> \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>\/newbot<\/code>. \u0421\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c: \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0438\u043c\u044f \u0431\u043e\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#171;AI Moderator&#187;) \u0438 username (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#171;aimoder_amvera_bot&#187;).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a LLM. \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u0432 <a href=\"https:\/\/amvera.ru\" rel=\"noopener noreferrer nofollow\">Amvera Cloud<\/a> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441 111 \u0440\u0443\u0431\u043b\u0435\u0439, \u0447\u0435\u0433\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430. \u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b LLM. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u043a\u043e\u043f\u0438\u0440\u0435\u043c \u0442\u043e\u043a\u0435\u043d.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c GPT 5 \u0432 Amvera Cloud<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443. \u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/cloud.amvera.ru\/projects\/llm\" rel=\"noopener noreferrer nofollow\">LLM (Preview)<\/a> \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u043e\u0432\u00bb \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430\u043c \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 <strong>\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u043d\u0430 20 000 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<\/strong><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0438\u043c\u0435\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<h4>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0431\u043e\u0442\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h4>\n<p>\u041a\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438? \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0447\u0430\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432 LLM.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445 \u0431\u0435\u0441\u0435\u0434\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0438, \u0431\u043e\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: <\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0442\u043e \u0431\u043e\u0442 \u0432\u044b\u0434\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043d\u0430\u043a\u0430\u0437\u0430\u043d\u0438\u0435, \u043b\u0438\u0431\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0432 Amvera Cloud \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0442\u044b\u0440\u0435 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<ul>\n<li>\n<p>LLaMA 3 8B \u2014 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430 \u043f\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u0446\u0435\u043d\u044b \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>LLaMA 3 70B \u2014 \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0449\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0447\u0430\u0442\u043e\u0432 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>GPT 5 \u0438 4.1  \u2014 \u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c LLaMA 3 8B \u043a\u0430\u043a \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0446\u0435\u043d\u0435.<\/p>\n<h4>\u041f\u0438\u0448\u0435\u043c \u0431\u043e\u0442\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432 \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <a href=\"http:\/\/main.py\" rel=\"noopener noreferrer nofollow\"><code>main.py<\/code><\/a> \u0441 \u043a\u043e\u0434\u043e\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0438 \u043f\u0430\u043f\u043a\u0443 <code>data<\/code> \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>\/start<\/code> \u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430:<\/p>\n<pre><code class=\"python\">import sqlite3 import asyncio import requests import logging import re  from contextlib import suppress from datetime import datetime, timedelta from aiogram import Bot, Dispatcher, F from aiogram.filters import Command, CommandObject from aiogram.types import Message, ChatPermissions from aiogram.client.default import DefaultBotProperties from aiogram.exceptions import TelegramBadRequest  logging.basicConfig(level=logging.INFO, format=\"%(asctime)s [%(levelname)s] %(name)s: %(message)s\")  URL = \"https:\/\/kong-proxy.yc.amvera.ru\/api\/v1\/models\/llama\" BOT_TOKEN = \"\" # \u0422\u041e\u041a\u0415\u041d \u0412\u0410\u0428\u0415\u0413\u041e \u0411\u041e\u0422\u0410 AUTH_TOKEN = \"\" # \u0422\u041e\u041a\u0415\u041d LLM \u0412 \u0424\u041e\u0420\u041c\u0410\u0422\u0415 Bearer XXXXXXXX  logger = logging.getLogger(__name__) connection = sqlite3.connect(\"\/data\/database.db\", check_same_thread=False) cursor = connection.cursor() bot = Bot(token=BOT_TOKEN, default=DefaultBotProperties(parse_mode=\"Markdown\")) dp = Dispatcher()  cursor.execute(\"CREATE TABLE IF NOT EXISTS rules (id INTEGER PRIMARY KEY AUTOINCREMENT, rules TEXT, group_id BIGINT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP)\") cursor.execute(\"CREATE TABLE IF NOT EXISTS warnings (id INTEGER PRIMARY KEY AUTOINCREMENT, user_id INTEGER NOT NULL, group_id INTEGER NOT NULL, reason TEXT NOT NULL, moderator_id INTEGER, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP)\") connection.commit()  @dp.message(Command(\"start\")) async def start(message: Message):     await message.answer(\"\u041f\u0440\u0438\u0432\u0435\u0442! \u042f \u0431\u043e\u0442-\u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 LLM LLaMA 8b\")  if __name__ == \"__main__\":     asyncio.run(dp.start_polling(bot)) <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 API Amvera, \u0433\u0434\u0435 \u0431\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0431 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438:<\/p>\n<pre><code class=\"python\">@dp.message(F.text) async def on_message(message: Message):     headers = {\"X-Auth-Token\": str(AUTH_TOKEN), \"Content-Type\": \"application\/json\"}     data = {\"model\": \"llama8b\", \"messages\": [{\"role\": \"user\", \"text\": \"\u0422\u044b \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0447\u0430\u0442\u0430. \u041e\u0442\u0432\u0435\u0447\u0430\u0439 \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e \u0444\u043e\u0440\u043c\u0435: \u041e\u0441\u0442\u0430\u0432\u0438\u0442\u044c\/\u0423\u0434\u0430\u043b\u0438\u0442\u044c\"}, {\"role\": \"system\", \"text\": message.text}]}      response = requests.post(URL, headers=headers, json=data, timeout=10)     result = response.json()     decision = result['result']['alternatives'][0]['message']['text'].lower()     if decision == \"\u0443\u0434\u0430\u043b\u0438\u0442\u044c\":         await message.delete()         logger.info(f\"\u0423\u0414\u0410\u041b\u0415\u041d\u041e | @{message.from_user.username} (ID: {message.from_user.id}) | \u0422\u0435\u043a\u0441\u0442: \\\"{message.text}\\\"\")     elif decision == \"\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c\":         logger.info(f\"\u041e\u0421\u0422\u0410\u0412\u041b\u0415\u041d\u041e | @{message.from_user.username} (ID: {message.from_user.id}) | \u0422\u0435\u043a\u0441\u0442: \\\"{message.text}\\\"\")     else:         logger.warning(f\"\u041e\u0428\u0418\u0411\u041a\u0410 | \u0422\u0435\u043a\u0441\u0442: \\\"{message.text}\\\" | \u041e\u0442\u0432\u0435\u0442: {result}\") <\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u0430, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0440\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0433\u0440\u0443\u043f\u043f\u044b. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>\/addrules<\/code> &#8212; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/p>\n<pre><code class=\"python\">@dp.message(Command(\"addrules\")) async def add_rules(message: Message):     if message.chat.type not in [\"group\", \"supergroup\"]:         await message.answer(\"\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0445 \u0447\u0430\u0442\u0430\u0445!\")         return      rules = message.text.split(' ', 1)     if len(rules) &amp;lt; 2:         await message.answer(\"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041f\u0440\u0438\u043c\u0435\u0440:\\n\/addrules \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442 \u0432 \u0447\u0430\u0442\u0435\")         return      rules = rules[1].strip()     cursor.execute(\"SELECT id FROM rules WHERE group_id = ?\", (message.chat.id,))     if cursor.fetchone():         cursor.execute(\"UPDATE rules SET rules = ?, created_at = ? WHERE group_id = ?\", (rules, datetime.now(), message.chat.id))         await message.answer(\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b!\")     else:         cursor.execute(\"INSERT INTO rules (rules, group_id) VALUES (?, ?)\", (rules, message.chat.id))         await message.answer(\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b!\")     connection.commit() <\/code><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>\/rules<\/code> &#8212; \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0433\u0440\u0443\u043f\u043f\u044b:<\/p>\n<pre><code class=\"python\">@dp.message(Command(\"rules\")) async def show_rules(message: Message):     if message.chat.type not in [\"group\", \"supergroup\"]:         await message.answer(\"\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0445 \u0447\u0430\u0442\u0430\u0445!\")         return      cursor.execute(\"SELECT rules FROM rules WHERE group_id = ?\", (message.chat.id,))     if cursor.fetchone():         await message.answer(f\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b:\\n\\n{cursor.fetchone()[0]}\")     else:         await message.answer(\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \/addrules \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430.\") <\/code><\/pre>\n<p>\u0418 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>\/clearrules<\/code> &#8212; \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0433\u0440\u0443\u043f\u043f\u044b:<\/p>\n<pre><code class=\"python\">@dp.message(Command(\"clearrules\")) async def clear_rules(message: Message):     if message.chat.type not in [\"group\", \"supergroup\"]:         await message.answer(\"\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0445 \u0447\u0430\u0442\u0430\u0445!\")         return      cursor.execute(\"DELETE FROM rules WHERE group_id = ?\", (message.chat.id,))     connection.commit()     if cursor.rowcount &amp;gt; 0:         await message.answer(\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u044b!\")     else:         await message.answer(\"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.\") <\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438:<\/p>\n<figure class=\"\">\n<div><figcaption>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0440\u043e\u0433\u0438\u0439 \u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442, \u0433\u0434\u0435 \u0447\u0451\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b:<\/p>\n<pre><code class=\"python\">@dp.message(F.text) async def on_message(message: Message):     member = await bot.get_chat_member(message.chat.id, message.from_user.id)     if member.status in ['administrator', 'creator']:         return      cursor.execute(\"SELECT rules FROM rules WHERE group_id = ?\", (message.chat.id,))     rules_result = cursor.fetchone()     rules = rules_result[0] if rules_result else \"\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0447\u0430\u0442\u0430\u0445\"     headers = {\"X-Auth-Token\": str(AUTH_TOKEN), \"Content-Type\": \"application\/json\"}     data = { \"model\": \"llama8b\", \"messages\": [ {\"role\": \"system\", \"text\": f\"\"\"\u0422\u044b \u2014 \u0441\u0442\u0440\u043e\u0433\u0438\u0439 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440 \u0447\u0430\u0442\u0430. \u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b.  \u041f\u0420\u0410\u0412\u0418\u041b\u0410 \u0414\u0410\u041d\u041d\u041e\u0419 \u0413\u0420\u0423\u041f\u041f\u042b:<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-474501","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/474501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=474501"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/474501\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=474501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=474501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=474501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}