{"id":465804,"date":"2025-07-03T09:22:02","date_gmt":"2025-07-03T09:22:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=465804"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=465804","title":{"rendered":"<span>Telegram-\u0431\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c: \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0430 grammY<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/nc\/jv\/dl\/ncjvdldgxtqxzka7jevgtom53im.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/nc\/jv\/dl\/ncjvdldgxtqxzka7jevgtom53im.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/nc\/jv\/dl\/ncjvdldgxtqxzka7jevgtom53im.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/div>\n<p> \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435: \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043d\u0438\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442, \u0430 \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u0432\u043b\u0435\u0447\u044c\u0441\u044f \u0438 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430? \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c? \u041c\u0430\u043a\u0441\u0438\u043c, \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043a\u0430\u043d\u0430\u043b\u0430 RED Group, \u043f\u043e\u0434\u043e\u0448\u0435\u043b \u043a \u0432\u043e\u043f\u0440\u043e\u0441\u0443 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u043d\u0430 \u0431\u0430\u0437\u0435 grammY \u0438 SpeechService \u0432 NestJS \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0442\u0430\u0439\u043c\u043a\u043e\u0434\u0430\u043c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p> \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Telegram Bot API \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JavaScript. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u043a\u043e\u043d\u0446\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u043a\u0430\u043a \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0431\u043e\u0442\u0430 <a href=\"https:\/\/selectel.ru\/services\/cloud\/servers\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=cloud_article_telegramvoicebot_030725_content\">\u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440<\/a>, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c!<a name=\"habracut\"><\/a><\/p>\n<p> <font color=\"#EB4247\"><\/p>\n<h2>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p><\/font><br \/> \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438 \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">nest new test_voice_bot <\/code><\/pre>\n<p> \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0442\u043e\u0442, \u0447\u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/lw\/ty\/1x\/lwty1xwx3_dcbmhihoelllipgfm.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/lw\/ty\/1x\/lwty1xwx3_dcbmhihoelllipgfm.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/lw\/ty\/1x\/lwty1xwx3_dcbmhihoelllipgfm.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/div>\n<p> \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0435\u0433\u043e \u0432 \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043a\u043e\u0434\u0435 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 VSCode.<\/p>\n<p> <a href=\"https:\/\/selectel.ru\/services\/cloud\/servers\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=cloud_article_telegramvoicebot_030725_banner_001_ord\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/di\/ei\/ks\/dieiksvcuar3umm3kjj24s37br8.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/di\/ei\/ks\/dieiksvcuar3umm3kjj24s37br8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/di\/ei\/ks\/dieiksvcuar3umm3kjj24s37br8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/div>\n<p><\/a><br \/> <font color=\"#EB4247\"><\/p>\n<h2>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0431\u043e\u0442\u0430<\/h2>\n<p><\/font> <\/p>\n<h3>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f API<\/h3>\n<p> 1. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Telegram \u0438 \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u0432\u0431\u0438\u0432\u0430\u0435\u043c <a href=\"https:\/\/t.me\/BotFather\">@BotFather<\/a>. \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \/newbot.<\/p>\n<p> 2. \u0412\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 username \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043b\u044e\u0447 \u2014 \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u0442\u043e\u043c. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044c: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u043c\u044f, \u0430\u0432\u0430\u0442\u0430\u0440\u043a\u0443 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435. \u041a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u0441\u044c \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0432 \u0447\u0430\u0442\u0435 \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<p> 3. \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c OpenAI. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c <a href=\"https:\/\/openai.com\/index\/openai-api\/\">\u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443<\/a> \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d <a href=\"https:\/\/help.openai.com\/en\/articles\/4936850-where-do-i-find-my-openai-api-key\">\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p> 4. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0444\u0430\u0439\u043b .env \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043a\u0443\u0434\u0430 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0442\u043e\u043a\u0435\u043d \u043e\u0442 Telegram-\u0431\u043e\u0442\u0430 \u0438 \u043a\u043b\u044e\u0447 \u043e\u0442 API-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 OpenAI:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fk\/jp\/kg\/fkjpkgt0m-rr9id5nqpb3ty1hbk.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/fk\/jp\/kg\/fkjpkgt0m-rr9id5nqpb3ty1hbk.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/fk\/jp\/kg\/fkjpkgt0m-rr9id5nqpb3ty1hbk.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/div>\n<p> 5. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"plaintext\">bun add @grammyjs\/nestjs grammy axios @nestjs\/config <\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"bash\">bun add -D @types\/express <\/code><\/pre>\n<p> \u041f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Telegram-\u0431\u043e\u0442\u0430\u043c\u0438 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>@grammyjs\/nestjs \u2014 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Grammy (\u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Telegram-\u0431\u043e\u0442\u043e\u0432) \u0441 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c NestJS;<\/li>\n<li>grammy \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Telegram Bot API;<\/li>\n<li>axios \u2014 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432;<\/li>\n<li>@nestjs\/config \u2014 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043d\u0430 NestJS.<\/li>\n<\/ul>\n<p> \u0412\u0442\u043e\u0440\u0430\u044f \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0438\u043f\u044b \u0434\u043b\u044f Express.js \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 TypeScript \u0438 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 Express.<\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432<\/h3>\n<p> <\/p>\n<h4>src\/constants.ts<\/h4>\n<p> \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u043f\u0443\u0442\u0438 \u0434\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API.<\/p>\n<pre><code class=\"javascript\">export const TELEGRAM_API = 'https:\/\/api.telegram.org' export const OPENAI_API = 'https:\/\/api.openai.com\/v1' <\/code><\/pre>\n<p> <\/p>\n<h4>src\/prompts\/timestamp.prompts.ts<\/h4>\n<p> \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u043c\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Telegram-\u0431\u043e\u0442 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0445 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u044b OpenAI.<\/p>\n<pre><code class=\"javascript\">\/** * System-\u043f\u0440\u043e\u043c\u043f\u0442: \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 *\/ export const TIMESTAMP_SYSTEM_PROMPT = ` \u0422\u044b \u2014 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0430\u0439\u043c-\u043a\u043e\u0434\u044b \u043a \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c. \u0423 \u0442\u0435\u0431\u044f \u0435\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u0430, \u0440\u0430\u0437\u0431\u0438\u0442\u0430\u044f \u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438. \u0422\u0432\u043e\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u041e\u0414\u041d\u0423 \u043a\u043b\u044e\u0447\u0435\u0432\u0443\u044e \u0438\u0434\u0435\u044e (\u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0435\u0441\u0442\u044c) \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0451 \u0441 \u0442\u043e\u0447\u043d\u044b\u043c \u0442\u0430\u0439\u043c-\u043a\u043e\u0434\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u043b\u043e\u043a\u0430.  \u041f\u0440\u0430\u0432\u0438\u043b\u0430: - \u041d\u0435 \u0432\u044b\u0434\u0443\u043c\u044b\u0432\u0430\u0439 \u0442\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0431\u044b\u043b\u043e \u0432 \u0442\u0435\u043a\u0441\u0442\u0435. - \u041d\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0439 \u0438\u0434\u0435\u0438 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432. - \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 10 \u043f\u0443\u043d\u043a\u0442\u043e\u0432. - \u041d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439 \"\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\", \"\u0424\u0438\u043d\u0430\u043b\", \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0432 \u0440\u0435\u0447\u0438. - \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0430\u0439\u043c\u0438\u043d\u0433 \u2014 \u043d\u0435 \u043f\u043e\u0437\u0436\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0431\u043b\u043e\u043a\u0430. - \u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0439 \u0431\u043b\u043e\u043a, \u0435\u0441\u043b\u0438 \u0432 \u043d\u0451\u043c \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0432\u0430\u0436\u043d\u043e\u0433\u043e.  \u0424\u043e\u0440\u043c\u0430\u0442: 00:00 - \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 00:35 - \u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u043d\u044c 01:10 - \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0440\u043e\u043a\u0440\u0430\u0441\u0442\u0438\u043d\u0430\u0446\u0438\u0438 `  \/** * \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u043c\u043f\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 *\/ export const buildTimestampUserPrompt = (preparedText: string): string =&gt; ` \u0412\u043e\u0442 \u0442\u0435\u043a\u0441\u0442, \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u0437 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u041a\u0430\u0436\u0434\u044b\u0439 \u0431\u043b\u043e\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 30-40 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u043c \u0440\u0435\u0447\u0438. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0432\u044b\u0434\u0435\u043b\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u0443\u044e \u0438\u0434\u0435\u044e (\u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0435\u0441\u0442\u044c), \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u043b\u043e\u043a\u0430.  \u0422\u0435\u043a\u0441\u0442: ${preparedText} ` <\/code><\/pre>\n<p> \u0412 \u0444\u0430\u0439\u043b\u0430\u0445 \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0435\u0449\u0435 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0430\u043c\u044b\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u043e\u043d\u0438 \u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043d\u0430\u0439\u0434\u0443\u0442.<\/p>\n<h4>src\/telegram\/telegram.module.ts<\/h4>\n<p> \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Telegram \u0438 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a .env.<\/p>\n<pre><code class=\"javascript\">import { NestjsGrammyModule } from '@grammyjs\/nestjs' import { Module } from '@nestjs\/common' import { ConfigModule, ConfigService } from '@nestjs\/config' import { AIService } from 'src\/services\/ai.service' import { SpeechService } from 'src\/services\/speech.service' import { TelegramUpdate } from '.\/telegram.update'  @Module({ imports: [ ConfigModule, NestjsGrammyModule.forRootAsync({ imports: [ConfigModule], inject: [ConfigService], useFactory: async (configService: ConfigService) =&gt; ({ token: configService.get&lt;string&gt;('TELEGRAM_BOT_TOKEN') }) }) ], providers: [TelegramUpdate, SpeechService, AIService] }) export class TelegramModule {} <\/code><\/pre>\n<p> <\/p>\n<h4>src\/app.module.ts<\/h4>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0444\u0430\u0439\u043b. \u0412 \u043d\u0435\u043c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u0438 \u0442\u0435, \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043b\u0438.<\/p>\n<pre><code class=\"javascript\">import { Module } from '@nestjs\/common' import { ConfigModule } from '@nestjs\/config' import { TelegramModule } from '.\/telegram\/telegram.module'  @Module({ imports: [ConfigModule.forRoot(), TelegramModule] }) export class AppModule {} <\/code><\/pre>\n<p> <\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0430\u0443\u0434\u0438\u043e \u0438 \u0440\u0435\u0447\u0438<\/h3>\n<p> \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b src\/services\/speech.service.ts \u2014 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c SpeechService \u0432 NestJS. \u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u044e \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0437\u0430 \u043d\u0430\u0441 \u0438 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0437 Telegram \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e OpenAI Whisper. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441:<\/p>\n<ol>\n<li>\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0439 \u0444\u0430\u0439\u043b \u0441 Telegram \u043f\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438;<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u0435\u0442 FormData \u0441 \u044d\u0442\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0434\u043b\u044f API OpenAI;<\/li>\n<li>\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 whisper-1 \u043c\u043e\u0434\u0435\u043b\u044c OpenAI \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043a\u0440\u0438\u0431\u0430\u0446\u0438\u0438;<\/li>\n<li>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442.<\/li>\n<\/ol>\n<p> \u0412\u0441\u0435 \u043a\u043b\u044e\u0447\u0438 (TELEGRAM_BOT_TOKEN, OPENAI_API_KEY) \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 ConfigService (\u0444\u0430\u0439\u043b\u0430 .env).<\/p>\n<pre><code class=\"javascript\">import { Injectable } from '@nestjs\/common' import { ConfigService } from '@nestjs\/config' import axios from 'axios' import * as FormData from 'form-data' import { OPENAI_API, TELEGRAM_API } from '..\/constants'  @Injectable() export class SpeechService { private readonly botToken: string private readonly openaiApiKey: string  constructor(private readonly configService: ConfigService) { this.botToken = this.configService.get&lt;string&gt;('TELEGRAM_BOT_TOKEN') this.openaiApiKey = this.configService.get&lt;string&gt;('OPENAI_API_KEY') }  async transcribeVoice(filePath: string): Promise&lt;string&gt; { const fileUrl = `${TELEGRAM_API}\/file\/bot${this.botToken}\/${filePath}` const fileResponse = await axios.get(fileUrl, { responseType: 'stream' })  const formData = new FormData() formData.append('file', fileResponse.data, { filename: 'audio.ogg' }) formData.append('model', 'whisper-1')  const response = await axios.post&lt;{ text: string }&gt;( `${OPENAI_API}\/audio\/transcriptions`, formData, { headers: { Authorization: `Bearer ${this.openaiApiKey}`, ...formData.getHeaders() } } )  return response.data.text } } <\/code><\/pre>\n<p> <\/p>\n<h3>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0442\u0430\u0439\u043c\u043a\u043e\u0434\u043e\u0432<\/h3>\n<p> \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b src\/services\/ai.service.ts \u2014 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 AIService \u0438\u0437 NestJS, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e OpenAI GPT-4o \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0439\u043c\u043a\u043e\u0434\u044b \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0430\u0443\u0434\u0438\u043e. \u0418 \u0441\u043d\u043e\u0432\u0430: \u0432\u0441\u0435 \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0437\u0430 \u043d\u0430\u0441!<\/p>\n<p> \u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0441\u0435\u0440\u0432\u0438\u0441:<\/p>\n<ol>\n<li>\u0434\u0435\u043b\u0438\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0434\u0435\u0441\u044f\u0442\u044c \u0440\u0430\u0432\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043f\u043e \u0441\u043b\u043e\u0432\u0430\u043c \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438;<\/li>\n<li>\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0432\u0438\u0434 [MM:SS] \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430;<\/li>\n<li>\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0442\u0438 \u0431\u043b\u043e\u043a\u0438 \u0432 GPT \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u043f\u0440\u043e\u043c\u0442\u043e\u043c;<\/li>\n<li>\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0439\u043c\u043a\u043e\u0434\u044b \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438;<\/li>\n<li>\u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (\u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0430\u043c);<\/li>\n<li>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c.<\/li>\n<\/ol>\n<p> <\/p>\n<pre><code class=\"javascript\">import { Injectable } from '@nestjs\/common' import { ConfigService } from '@nestjs\/config' import axios from 'axios' import { OPENAI_API } from '..\/constants' import { TIMESTAMP_SYSTEM_PROMPT, buildTimestampUserPrompt } from '..\/prompts\/timestamp.prompts'  interface IOpenAIResponse { choices: { message: { content: string } }[] usage: { prompt_tokens: number completion_tokens: number } }  @Injectable() export class AIService { private readonly openaiApiKey: string  constructor(private readonly configService: ConfigService) { this.openaiApiKey = this.configService.get&lt;string&gt;('OPENAI_API_KEY') }  async generateTimestamps( text: string, audioDurationSec: number ): Promise&lt;{ timestamps: string; cost: string }&gt; { const maxSegments = 10 \/\/ \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438  \/\/ \u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0432\u0435\u0441\u044c \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 const words = text.split(\/\\s+\/)  \/\/ \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0432 \u0438 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \/\/ \u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u0432\u0435\u0440\u0445 \u2014 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0441\u043b\u043e\u0432\u0430: 9.6 \u2192 10 const wordsPerSegment = Math.ceil(words.length \/ maxSegments) \/\/ \u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0438\u0437 \u2014 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u00ab\u0432\u044b\u0432\u0430\u043b\u0438\u0442\u044c\u0441\u044f\u00bb \u0437\u0430 \u0434\u043b\u0438\u043d\u0443 \u0430\u0443\u0434\u0438\u043e: 96.5 \u2192 96 const secondsPerSegment = Math.floor(audioDurationSec \/ maxSegments)  \/\/ \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0442\u0435\u043a\u0441\u0442\u0430 const segments: { time: string; content: string }[] = []  for (let i = 0; i &lt; maxSegments; i++) { \/\/ \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043c\u0435\u0442\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u043b\u043e\u043a\u0430 const fromSec = i * secondsPerSegment \/\/ padStart - \u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 \u0447\u0438\u0441\u043b\u0430 \u0432\u0438\u0434\u0430 5 \u2192 05 \/\/ \u0427\u0442\u043e\u0431\u044b \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u0444\u043e\u0440\u043c\u0430\u0442 MM:SS, \u0430 \u043d\u0435 M:S. const fromMin = String(Math.floor(fromSec \/ 60)).padStart(2, '0') const fromSecRest = String(fromSec % 60).padStart(2, '0') const time = `${fromMin}:${fromSecRest}`  \/\/ \u0412\u044b\u0440\u0435\u0437\u0430\u0435\u043c \u0447\u0430\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u0430, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0443\u044e\u0441\u044f \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0431\u043b\u043e\u043a\u0443 const start = i * wordsPerSegment const end = start + wordsPerSegment const content = words.slice(start, end).join(' ')  \/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043f\u0443\u0441\u0442\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 if (content.trim()) { segments.push({ time, content }) } }  \/\/ \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0431\u043b\u043e\u043a\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u0438\u0434\u0430: [00:00] \u0442\u0435\u043a\u0441\u0442 const preparedText = segments .map(s =&gt; `[${s.time}] ${s.content}`) .join('\\n\\n')  \/\/ \u0413\u043e\u0442\u043e\u0432\u0438\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f GPT: \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u0432\u0432\u043e\u0434 const systemMessage = TIMESTAMP_SYSTEM_PROMPT const userMessage = buildTimestampUserPrompt(preparedText)  \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 OpenAI Chat API const response = await axios.post&lt;IOpenAIResponse&gt;( `${OPENAI_API}\/chat\/completions`, { model: 'gpt-4o-mini', messages: [ { role: 'system', content: systemMessage }, \/\/ \u0437\u0430\u0434\u0430\u0451\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 { role: 'user', content: userMessage } \/\/ \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0442\u0435\u043a\u0441\u0442 \u0441 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 ], temperature: 0.3, \/\/ \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \"\u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\" \u0434\u0443\u043c\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c (0 \u2014 \u0441\u0442\u0440\u043e\u0433\u043e, 1 \u2014 \u043a\u0440\u0435\u0430\u0442\u0438\u0432\u043d\u043e) max_tokens: 300 \/\/ \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a }, { headers: { Authorization: `Bearer ${this.openaiApiKey}` } } )  \/\/ \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0442 GPT const result = response.data.choices[0].message.content  \/\/ \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (\u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438) const usage = response.data.usage  \/\/ \u041f\u043e\u0434\u0441\u0447\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 const inputCost = (usage.prompt_tokens \/ 1_000_000) * 0.15 const outputCost = (usage.completion_tokens \/ 1_000_000) * 0.6 const total = inputCost + outputCost  const costText = `\ud83d\udcb8 \u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438: ~\\$${total.toFixed(4)}`  return { timestamps: result, \/\/ \u0421\u0430\u043c\u0438 \u0442\u0430\u0439\u043c-\u043a\u043e\u0434\u044b cost: costText \/\/ \u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 } } } <\/code><\/pre>\n<p> <\/p>\n<h3>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h3>\n<p> \u0417\u0430\u0432\u0435\u0434\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b src\/telegram\/telegram.update.ts \u2014 \u0432 \u043d\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d Telegram-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a TelegramUpdate \u043d\u0430 \u0431\u0430\u0437\u0435 @grammyjs\/nestjs. \u041e\u043d \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u2014 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u043e\u0439 \u0438 \u0442\u0430\u0439\u043c\u043a\u043e\u0434\u0430\u043c\u0438. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ol>\n<li>\u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \/start \u0438 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 Telegram.<\/li>\n<li>\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 2\u20133 \u0441\u0435\u043a\u0443\u043d\u0434\u044b).<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0430\u0443\u0434\u0438\u043e \u0438\u0437 Telegram \u0438 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 SpeechService.<\/li>\n<li>\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u0432 AIService \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0430\u0439\u043c-\u043a\u043e\u0434\u043e\u0432.<\/li>\n<li>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/li>\n<\/ol>\n<p> <\/p>\n<pre><code class=\"javascript\">import { Ctx, InjectBot, On, Start, Update } from '@grammyjs\/nestjs' import { Injectable } from '@nestjs\/common' import { ConfigService } from '@nestjs\/config' import { Api, Bot, Context } from 'grammy' import { AIService } from '..\/services\/ai.service' import { SpeechService } from '..\/services\/speech.service'  @Update() \/\/ \u042d\u0442\u043e\u0442 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442 Telegram @Injectable() export class TelegramUpdate { private readonly botToken: string  constructor( @InjectBot() private readonly bot: Bot&lt;Context&gt;, \/\/ \u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 Telegram-\u0431\u043e\u0442\u0430 private readonly speechService: SpeechService, \/\/ \u0421\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0438 \u0440\u0435\u0447\u0438 private readonly aiService: AIService, \/\/ \u0421\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0430\u0439\u043c-\u043a\u043e\u0434\u043e\u0432 private readonly configService: ConfigService ) { this.botToken = this.configService.get&lt;string&gt;('TELEGRAM_BOT_TOKEN') }  @Start() \/\/ \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \/start async onStart(@Ctx() ctx: Context): Promise&lt;void&gt; { await ctx.reply( '\ud83d\udc4b \u041f\u0440\u0438\u0432\u0435\u0442! \u041e\u0442\u043f\u0440\u0430\u0432\u044c \u043c\u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0438 \u044f \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044e \u0442\u0430\u0439\u043c-\u043a\u043e\u0434\u044b.' ) }  @On('message:voice') \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 async onVoiceMessage(@Ctx() ctx: Context): Promise&lt;void&gt; { let progressMessageId: number | undefined let interval: NodeJS.Timeout | undefined let percent = 10 \/\/ \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430  try { const voice = ctx.msg.voice const duration = voice.duration  \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f const file = await ctx.getFile()  \/\/ \u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0433\u043e await ctx.reply(`\ud83c\udfa4 \u0414\u043b\u0438\u043d\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f: ${duration} \u0441\u0435\u043a.`)  \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u043e\u043c const progressMsg = await ctx.reply(this.renderProgress(percent)) progressMessageId = progressMsg.message_id  \/\/ \u23f1 \u042d\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c \"\u043e\u0436\u0438\u0432\u0448\u0438\u0439\" \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441 \u2014 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b interval = setInterval( async () =&gt; { if (percent &lt; 90) { percent += 5 await this.updateProgress( ctx.api, ctx.chat.id, progressMessageId, percent ) } }, duration &gt; 300 ? 3000 : 2000 )  \/\/ \u0420\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0447\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Whisper const transcription = await this.speechService.transcribeVoice( file.file_path )  \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u0432 OpenAI \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u0439\u043c-\u043a\u043e\u0434\u044b + \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c const { timestamps, cost } = await this.aiService.generateTimestamps( transcription, duration )  \/\/ \u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430 clearInterval(interval) await this.updateProgress(ctx.api, ctx.chat.id, progressMessageId, 100)  \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 await ctx.reply( `\u23f3 \u0422\u0430\u0439\u043c-\u043a\u043e\u0434\u044b:\\n\\n${timestamps}\\n\\n&lt;i&gt;\ud83e\udd16 \u0422\u0430\u0439\u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c, \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448 \u0431\u043e\u0442&lt;\/i&gt;`, { parse_mode: 'HTML' } ) await ctx.reply(cost) } catch (error) { clearInterval(interval) \/\/ \u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441 \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 console.error('\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0433\u043e:', error.message) await ctx.reply('\u26a0\ufe0f \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.') } }  \/\/ \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430 (\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435) private async updateProgress( api: Api, chatId: number, messageId: number, percent: number ) { await api.editMessageText(chatId, messageId, this.renderProgress(percent)) }  \/\/ \u041e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441-\u0431\u0430\u0440\u0430 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u043c private renderProgress(percent: number): string { const totalBlocks = 10 \/\/ \u0412\u0441\u0435\u0433\u043e 10 \u044f\u0447\u0435\u0435\u043a \u0432 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441-\u0431\u0430\u0440\u0435 const blockChar = '\u2592' \/\/ \u0421\u0438\u043c\u0432\u043e\u043b, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439 \"\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0443\u044e\" \u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430  \/\/ \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043d\u0430 \u0448\u043a\u0430\u043b\u0435 const filledBlocks = Math.max(1, Math.round((percent \/ 100) * totalBlocks))  \/**  * \ud83d\udc49 Math.round(...) \u2014 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0435\u0442 \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u0446\u0435\u043b\u043e\u0433\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 3.6 \u2192 4)  * \ud83d\udc49 (percent \/ 100) * totalBlocks \u2014 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u043b\u043e\u043a\u043e\u0432  * \ud83d\udc49 Math.max(1, ...) \u2014 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u043c, \u0447\u0442\u043e \u0445\u043e\u0442\u044f \u0431\u044b 1 \u0431\u043b\u043e\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d (\u0434\u0430\u0436\u0435 \u043f\u0440\u0438 0%)  *\/  const emptyBlocks = totalBlocks - filledBlocks \/\/ \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u0430\u043a \"\u043f\u0443\u0441\u0442\u044b\u0435\"  \/**  * \ud83d\udc49 String.prototype.repeat(n) \u2014 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b n \u0440\u0430\u0437  * \u041f\u0440\u0438\u043c\u0435\u0440: '\u2592'.repeat(4) = '\u2592\u2592\u2592\u2592'  * \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0443\u044e \u0438 \u043f\u0443\u0441\u0442\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430  *\/  \/\/ \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0438\u0434\u0430: \ud83d\udd04 \u041f\u0440\u043e\u0433\u0440\u0435\u0441\u0441: [\u2592\u2592\u2592\u2592\u2591\u2591\u2591\u2591\u2591\u2591] 40% return `\ud83d\udd04 \u041f\u0440\u043e\u0433\u0440\u0435\u0441\u0441: [${blockChar.repeat(filledBlocks)}${'\u2591'.repeat(emptyBlocks)}] ${percent}%` } } <\/code><\/pre>\n<p> \u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u0411\u043e\u0442\u0430 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u0435\u0433\u043e \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434: <\/p>\n<pre><code class=\"bash\">bun start:dev <\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"bash\">npm run start:dev <\/code><\/pre>\n<p> \u0427\u0442\u043e\u0431\u044b \u0431\u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043a\u0440\u0443\u0433\u043b\u043e\u0441\u0443\u0442\u043e\u0447\u043d\u043e \u0438 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0431\u043e\u0435\u0432, \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041e\u0434\u0438\u043d \u0438\u0437 \u0443\u0434\u043e\u0431\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u2014 <a href=\"https:\/\/selectel.ru\/services\/cloud\/servers\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=cloud_article_telegramvoicebot_030725_content\">\u043e\u0431\u043b\u0430\u0447\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Selectel<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b \u0432 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p> <font color=\"#EB4247\"><\/p>\n<h2>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u043e\u0434\u0430 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/h2>\n<p><\/font><br \/> \u041a\u043e\u0434 \u0433\u043e\u0442\u043e\u0432, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043d\u0430 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b scp, \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443, \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0432\u0435\u0437\u0434\u0435 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435. \u041d\u043e \u043c\u044b \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u2014 GitHub. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u2014 <a href=\"https:\/\/selectel.ru\/blog\/git-github-review\/\">\u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<p> 1. \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 GitHub.<\/p>\n<p> 2. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 New, \u0447\u0442\u043e\u0431\u044b <a href=\"https:\/\/github.com\/new\">\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>.<\/p>\n<p> 3. \u041d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 <b>Add on README file<\/b>, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0435 \u0431\u044b\u043b \u043f\u0443\u0441\u0442\u044b\u043c \u0438 \u0432\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0435\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 <b>Create repository<\/b>.<\/p>\n<p> 4. \u041c\u044b\u0448\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u2014 \u0438 \u0432\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u043a\u043e GitHub. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e .env \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u2014 \u0432 \u043d\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API \u0432\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430.<\/p>\n<p> <font color=\"#EB4247\"><\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h2>\n<p><\/font> <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p> 1. \u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"https:\/\/my.selectel.ru\/l\">\u0432 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Selectel<\/a>.<\/p>\n<p> 2. \u0414\u0430\u043b\u0435\u0435 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043c\u0435\u043d\u044e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <b>\u041f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u2192 \u041e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b<\/b>. \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 <b>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440<\/b>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fo\/yf\/4y\/foyf4yictptg2qmx77-qmydqlkq.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/fo\/yf\/4y\/foyf4yictptg2qmx77-qmydqlkq.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/fo\/yf\/4y\/foyf4yictptg2qmx77-qmydqlkq.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/div>\n<p> 3. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. \u0420\u0435\u0433\u0438\u043e\u043d, \u043f\u0443\u043b \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0439\u0442\u0435, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0439. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<ul>\n<li><b>1 vCPU \u0438 2 GB RAM<\/b> \u2014 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b NestJS-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0444\u043e\u043d\u0435. \u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u0442 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0435\u043c\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e.<\/li>\n<li><b>10 GB SSD<\/b> \u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u041e\u0421, \u043b\u043e\u0433\u043e\u0432, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0430\u0443\u0434\u0438\u043e\u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043a\u044d\u0448\u0430.<\/li>\n<li><b>Ubuntu 24<\/b> \u2014 \u044d\u0442\u043e\u0442 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/li>\n<li><b>\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 IP<\/b> \u2014 \u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e\u0431\u044b Telegram \u043c\u043e\u0433 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440. \u0411\u0435\u0437 \u043d\u0435\u0433\u043e \u0431\u043e\u0442 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p> 4. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u041e\u0421 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 Ubuntu 24, \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SSH-\u043a\u043b\u044e\u0447. \u041e \u0442\u043e\u043c, \u043a\u0430\u043a \u0435\u0433\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c <a href=\"https:\/\/selectel.ru\/blog\/tutorials\/how-to-generate-ssh\/\">\u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>.<\/p>\n<p> 5. \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 <b>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440<\/b> \u0438 \u0436\u0434\u0435\u043c \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442, \u043f\u043e\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441 \u043d\u0435 \u0441\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043d\u0430 ACTIVE.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ux\/0a\/4c\/ux0a4cf2sflmusnoiwsjufxwzik.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/ux\/0a\/4c\/ux0a4cf2sflmusnoiwsjufxwzik.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/ux\/0a\/4c\/ux0a4cf2sflmusnoiwsjufxwzik.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/div>\n<p> 6. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e SSH. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">ssh root@&lt;ip-\u0430\u0434\u0440\u0435\u0441&gt; <\/code><\/pre>\n<p> <\/p>\n<h3>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Ubuntu<\/h3>\n<p> 1. \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0437\u043d\u0430\u0442\u044c \u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u0445.<\/p>\n<pre><code class=\"bash\">apt update &amp;&amp; apt upgrade -y <\/code><\/pre>\n<p> 2. \u0414\u0430\u043b\u0435\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0438 Node.js:<\/p>\n<pre><code class=\"bash\">apt install -y curl git unzip htop nano nginx <\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"bash\">curl -L &lt;a href=\"https:\/\/raw.githubusercontent.com\/tj\/n\/master\/bin\/n\"&gt;https:\/\/raw.githubusercontent.com\/tj\/n\/master\/bin\/n&lt;\/a&gt; -o \/usr\/local\/bin\/n <\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"bash\">chmod +x \/usr\/local\/bin\/n <\/code><\/pre>\n<p> 3. \u0421\u0442\u0430\u0432\u0438\u043c Node.js latest version. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 Docker, \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u0432\u0435\u0440\u0441\u0438\u044e, \u043a\u0430\u043a \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u0418\u043d\u0430\u0447\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b.<\/p>\n<pre><code class=\"bash\">n lts <\/code><\/pre>\n<p> <\/p>\n<pre><code class=\"bash\">node -v npm -v <\/code><\/pre>\n<p> 4. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Bun. \u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f JavaScript- \u0438 TypeScript-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<pre><code class=\"bash\">curl -fsSL https:\/\/bun.sh\/install | bash export BUN_INSTALL=\"$HOME\/.bun\u201d export PATH=\"$BUN_INSTALL\/bin:$PATH\u201d <\/code><\/pre>\n<p> 5. \u0422\u0430\u043a\u0436\u0435 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c PM2 \u2014 \u044d\u0442\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0434\u043b\u044f Node.js-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041e\u043d \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0438\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<pre><code class=\"bash\">npm install -g pm2 <\/code><\/pre>\n<p> \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f.<\/p>\n<p> <font color=\"#EB4247\"><\/p>\n<h2>\u0414\u0435\u043f\u043b\u043e\u0439 \u0431\u043e\u0442\u0430 \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440<\/h2>\n<p><\/font><br \/> 1. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e GitHub-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0441\u0430\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043e\u0434\u043d\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">git clone &lt;\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439&gt; <\/code><\/pre>\n<p> \u0415\u0441\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u0432\u0435\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043d\u0430 GitHub \u0440\u0430\u043d\u0435\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 SSH-\u043a\u043b\u044e\u0447. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d <a href=\"https:\/\/docs.github.com\/ru\/repositories\/creating-and-managing-repositories\/cloning-a-repository\">\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fg\/qd\/ps\/fgqdpsntb48hj6etzoshy5oix-c.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/fg\/qd\/ps\/fgqdpsntb48hj6etzoshy5oix-c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/fg\/qd\/ps\/fgqdpsntb48hj6etzoshy5oix-c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/div>\n<p> 2. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Bun:<\/p>\n<pre><code class=\"bash\">bun install --production <\/code><\/pre>\n<p> 3. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0444\u0430\u0439\u043b .env \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043d\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0430\u043d\u0435\u0435 TELEGRAM_BOT_TOKEN \u0438 OPENAI_API_KEY.<\/p>\n<pre><code class=\"bash\">nano .env <\/code><\/pre>\n<p> 4. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Bun:<\/p>\n<pre><code class=\"bash\">bun run build <\/code><\/pre>\n<p> 5. \u041f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u0432\u0430\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u043e\u0442\u0430 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<pre><code class=\"bash\">pm2 start dist\/main.js --name=\"telegram-bot\u201d <\/code><\/pre>\n<p> <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ld\/f0\/qc\/ldf0qcq7an4jn9a42qawqccg4ec.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/ld\/f0\/qc\/ldf0qcq7an4jn9a42qawqccg4ec.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/ld\/f0\/qc\/ldf0qcq7an4jn9a42qawqccg4ec.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/div>\n<p> 6. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0431\u043e\u0442\u0430. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<pre><code class=\"bash\">pm2 save <\/code><\/pre>\n<p> \u0413\u043e\u0442\u043e\u0432\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u0431\u043e\u0442 \u043a\u0440\u0443\u0433\u043b\u043e\u0441\u0443\u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0412 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0443 \u0441 \u0442\u0430\u0439\u043c\u043a\u043e\u0434\u0430\u043c\u0438.<\/p>\n<p> <font color=\"#EB4247\"><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p><\/font><br \/> \u0412 \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e Telegram-\u0431\u043e\u0442\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c API OpenAI \u0438 NestJS \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0435\u043a\u0430. \u0410 \u0435\u0449\u0435 \u2014 \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p> \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043e\u0431\u044a\u0435\u043c\u043d\u044b\u0439. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u0440\u043e\u0449\u0435 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0442\u0435\u043c\u0443 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0432\u0438\u0434\u0435\u043e, \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"https:\/\/www.youtube.com\/watch?v=pwxaL1rqQ7Y\">\u0432\u044b\u043f\u0443\u0441\u043a \u043d\u0430 \u043a\u0430\u043d\u0430\u043b\u0435 REG Group<\/a>.<\/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\/914138\/\"> https:\/\/habr.com\/ru\/articles\/914138\/<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/nc\/jv\/dl\/ncjvdldgxtqxzka7jevgtom53im.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/nc\/jv\/dl\/ncjvdldgxtqxzka7jevgtom53im.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/nc\/jv\/dl\/ncjvdldgxtqxzka7jevgtom53im.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/div>\n<p> \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435: \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043d\u0438\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442, \u0430 \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u0432\u043b\u0435\u0447\u044c\u0441\u044f \u0438 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430? \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c? \u041c\u0430\u043a\u0441\u0438\u043c, \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043a\u0430\u043d\u0430\u043b\u0430 RED Group, \u043f\u043e\u0434\u043e\u0448\u0435\u043b \u043a \u0432\u043e\u043f\u0440\u043e\u0441\u0443 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u043d\u0430 \u0431\u0430\u0437\u0435 grammY \u0438 SpeechService \u0432 NestJS \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0442\u0430\u0439\u043c\u043a\u043e\u0434\u0430\u043c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p> \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Telegram Bot API \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JavaScript. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u043a\u043e\u043d\u0446\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u043a\u0430\u043a \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0431\u043e\u0442\u0430 <a href=\"https:\/\/selectel.ru\/services\/cloud\/servers\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=cloud_article_telegramvoicebot_030725_content\">\u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440<\/a>, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c!<\/p>\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-465804","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/465804","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=465804"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/465804\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=465804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=465804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=465804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}