{"id":353601,"date":"2024-05-20T22:31:22","date_gmt":"2024-05-20T22:31:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=353601"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=353601","title":{"rendered":"<span>\u0411\u043e\u0442-\u0441\u043a\u0430\u0437\u043e\u0447\u043d\u0438\u043a, \u0438\u043b\u0438 \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ChatGPT \u0438 Telegram<\/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\/w780q1\/webt\/xu\/kc\/b9\/xukcb9ycwrdw3dyyw1peqiqdfk4.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/xu\/kc\/b9\/xukcb9ycwrdw3dyyw1peqiqdfk4.jpeg\" data-blurred=\"true\"\/><\/div>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0445\u0443\u0434\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0440\u043e\u043c\u0430\u043d. \u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0438\u0434\u0435\u0438, \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043d\u043e \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0432 \u043e\u0434\u043d\u0443 \u0438\u0441\u0442\u043e\u0440\u0438\u044e.<\/p>\n<p>  \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0441\u0442\u043e. \u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u2014 \u0437\u0430\u043f\u0438\u0448\u0438, \u043f\u0440\u0438\u0448\u043b\u0430 \u043d\u043e\u0432\u0430\u044f \u043c\u044b\u0441\u043b\u044c \u2014 \u0437\u0430\u043f\u0438\u0448\u0438 \u0435\u0435 \u0442\u043e\u0436\u0435. \u041f\u043e\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u044c \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0438 \u044d\u043c\u043e\u0446\u0438\u0439 \u2014 \u0438 \u0433\u043e\u0442\u043e\u0432\u043e. \u041d\u043e \u044d\u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  \u0422\u0430\u043a\u0430\u044f \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0441\u0442 \u0438\u043b\u0438 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u043e, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437 \u0442\u0435\u0437\u0438\u0441\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ChatGPT, \u0430 \u043f\u043e\u0441\u043b\u0435 \u2014 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 Notion. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 <a href=\"https:\/\/slc.tl\/kl70o\">\u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440<\/a> \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u2014 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<br \/>  <a name=\"habracut\"><\/a><br \/>  <font color=\"#EB4247\"><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Node.js<\/h2>\n<p><\/font><br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 Node.js:<\/p>\n<pre><code class=\"bash\">npm init -y npm i -D nodemon \/\/ \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438  npm i @notionhq\/client config openai telegraf  <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043f\u043e\u043b\u0435 type \u0432 package.json, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0435\u043a\u0442 \u0443\u043c\u0435\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 import &amp; export:<\/p>\n<pre><code class=\"json\">\"type\": \"module\", \"scripts\": {      \"dev\": \"nodemon .\/src\/main.js\",      \"start\": \"node .\/src\/main.js\"  }, <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c .\/src\/main.js:<\/p>\n<pre><code class=\"javascript\">import { Telegraf } from 'telegraf' import { message } from 'telegraf\/filters' import config from 'config'  const bot = new Telegraf(config.get('TELEGRAM_TOKEN'), {   handlerTimeout: Infinity, })  bot.command('start', (ctx) =>   ctx.reply(     '\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c. \u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u0442\u0435\u0437\u0438\u0441\u0430\u043c\u0438 \u043f\u0440\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u044e.'   ) )  bot.on(message('text'), ctx => {  \/\/ \u0442\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f-\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0442\u043e\u0440\u0430 })  bot.launch() <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f Telegram-\u0431\u043e\u0442\u0430<\/h3>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c Telegram-\u0431\u043e\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f API-\u0442\u043e\u043a\u0435\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443 <a href=\"https:\/\/t.me\/BotFather\">@BotFather<\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \/newbot.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/d77\/527\/c91\/d77527c917227cb4ee1b2ac89fbb7794.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d77\/527\/c91\/d77527c917227cb4ee1b2ac89fbb7794.png\"\/><\/div>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0441\u0430\u043c \u0442\u043e\u043a\u0435\u043d:<\/p>\n<pre><code class=\"bash\">mkdir config  touch default.json <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"json\">{  \"TELEGRAM_TOKEN\": \"\u0412\u0410\u0428 \u0422\u041e\u041a\u0415\u041d \u0414\u041b\u042f \u0411\u041e\u0422\u0410 TELEGRAM\",  } <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u0438\u0448\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 ChatGPT<\/h3>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 <a href=\"https:\/\/platform.openai.com\/overview\">\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u043e\u043a\u0435\u043d<\/a> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 OpenAI, \u0430 \u043f\u043e\u0441\u043b\u0435 \u2014 \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0435\u0433\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"json\">{  \"TELEGRAM_TOKEN\": \"\u0412\u0410\u0428 \u0422\u041e\u041a\u0415\u041d \u0414\u041b\u042f \u0411\u041e\u0422\u0410 TELEGRAM\", \"OPENAI_KEY\": \"\u041a\u041b\u042e\u0427 \u0414\u041b\u042f \u0420\u0410\u0411\u041e\u0422\u042b \u0421 ChatGPT\" } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b .\/src\/chatgpt.js \u0438 \u043f\u0438\u0448\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre><code class=\"javascript\">import OpenAI from 'openai' import config from 'config'  const CHATGPT_MODEL = 'gpt-3.5-turbo'  const ROLES = {   ASSISTANT: 'assistant',   SYSTEM: 'system',   USER: 'user', }  const openai = new OpenAI({   apiKey: config.get('OPENAI_KEY'), })  const getMessage = (m) => `   \u041d\u0430\u043f\u0438\u0448\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u0438\u0445 \u0442\u0435\u0437\u0438\u0441\u043e\u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e: ${m}    \u042d\u0442\u0438 \u0442\u0435\u0437\u0438\u0441\u044b \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043d\u044f.    \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u044f \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b \u044d\u0442\u043e\u0442 \u0434\u0435\u043d\u044c \u0438 \u0441\u043c\u043e\u0433 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0435 \u0434\u0440\u0443\u0437\u044c\u044f\u043c. \u0422\u0435\u043a\u0441\u0442 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 100 \u0441\u043b\u043e\u0432. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0438 \u044d\u043c\u043e\u0446\u0438\u0438, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u043b\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. `  export async function chatGPT(message = '') {   const messages = [     {       role: ROLES.SYSTEM,       content:         '\u0422\u044b \u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u043a\u043e\u043f\u0438\u0440\u0430\u0439\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0438\u0448\u0435\u0442 \u043a\u0440\u0430\u0442\u043a\u0438\u0435 \u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0434\u043b\u044f \u0441\u043e\u0446 \u0441\u0435\u0442\u0435\u0439.',     },     { role: ROLES.USER, content: getMessage(message) },   ]   try {     const completion = await openai.chat.completions.create({       messages,       model: CHATGPT_MODEL,     })      return completion.choices[0].message   } catch (e) {     console.error('Error while chat completion', e.message)   } } <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u043c\u044b \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c ChatGPT \u0440\u043e\u043b\u044c \u043a\u043e\u043f\u0438\u0440\u0430\u0439\u0442\u0435\u0440\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f \u0431\u043e\u0442\u0430.<\/p>\n<h3>\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u043c Notion<\/h3>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c Notion \u2014 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e <a href=\"https:\/\/developers.notion.com\/docs\/create-a-notion-integration\">\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043b\u044e\u0447 \u043a \u0431\u0430\u0437\u0435<\/a>. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0432\u0430 \u043a\u043b\u044e\u0447\u0430 \u0438 \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"json\">{   \"TELEGRAM_TOKEN\": \"\u0412\u0410\u0428 \u0422\u041e\u041a\u0415\u041d \u0414\u041b\u042f \u0411\u041e\u0422\u0410 TELEGRAM\",   \"OPENAI_KEY\": \"\u041a\u041b\u042e\u0427 \u0414\u041b\u042f CHATGPT\",   \"NOTION_KEY\": \"\u041a\u041b\u042e\u0427 \u0414\u041b\u042f \u0418\u041d\u0422\u0415\u0413\u0420\u0410\u0426\u0418\u0418\",   \"NOTION_DB_ID\": \"ID \u0411\u0410\u0417\u042b \u0414\u0410\u041d\u041d\u042b\u0425\" } <\/code><\/pre>\n<p>  \u0412 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 Notion (\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 inline database) \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044f \u2014 \u0438\u043c\u044f \u0438 \u0434\u0430\u0442\u0443. \u0412 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b .\/src\/notion.js \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre><code class=\"javascript\">import { Client } from '@notionhq\/client' import config from 'config'  const notion = new Client({   auth: config.get('NOTION_KEY'), })  export async function create(short, text) {   const dbResponse = await notion.pages.create({     parent: { database_id: config.get('NOTION_DB_ID') },     properties: {       Name: {         title: [           {             text: {               content: short,             },           },         ],       },       Date: {         date: {           start: new Date().toISOString(),         },       },     },   })    return dbResponse } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043e\u0442 ChatGPT \u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre><code class=\"javascript\">const pageResponse = await notion.blocks.children.append({     block_id: dbResponse.id,     children: [       {         object: 'block',         type: 'paragraph',         paragraph: {           rich_text: [             {               type: 'text',               text: {                 content: text,               },             },           ],         },       },     ],   }) <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u0435\u043c Loader<\/h3>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f, \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, Loader. \u0412 \u0444\u0430\u0439\u043b\u0435 .\/src\/loader.js \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"javascript\">export class Loader {   icons = [     '?','?','?',     '?','?','?',     '?','?','?',     '?','?','?',   ]   interval = null   message = null    constructor(ctx) {     this.ctx = ctx   }    async show() {     let index = 0     this.message = await this.ctx.reply(this.icons[index])     this.interval = setInterval(() => {       index = index &lt; this.icons.length - 1 ? index + 1 : 0       this.ctx.telegram.editMessageText(         this.ctx.chat.id,         this.message.message_id,         null,         this.icons[index]       )     }, 500)   }    hide() {     this.ctx.telegram.deleteMessage(this.ctx.chat.id, this.message.message_id)     clearInterval(this.interval)   } } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u044b. \u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435?<\/p>\n<h3>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u043e\u0435\u0434\u0438\u043d\u043e: \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Telegram<\/h3>\n<p>  \u0412\u0441\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u00ab\u043f\u0430\u0437\u043b\u00bb \u0432 \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u0438\u043f\u0442 .\/src\/main.js:<\/p>\n<pre><code class=\"javascript\">import { chatGPT } from '.\/chatgpt.js' import { create } from '.\/notion.js' import { Loader } from '.\/loader.js'  \/\/ ============  bot.on(message('text'), proccessGPTResponse)  async function proccessGPTResponse(ctx) {   try {     const text = ctx.message.text     if (!text.trim()) ctx.reply('\u0422\u0435\u043a\u0441\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u043c')     const loader = new Loader(ctx)     loader.show()     const response = await chatGPT(text)      if (!response) return ctx.reply(`\u041e\u0448\u0438\u0431\u043a\u0430 \u0441 API. ${response}`)      const notionResp = await create(text, response.content)     loader.hide()     ctx.reply(`\u0412\u0430\u0448\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430: ${notionResp.url}`)   } catch (e) {     console.log(`Error while proccessing gpt response`, e.message)   } } <\/code><\/pre>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e \u2014 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/26e\/c78\/7f7\/26ec787f7bcd20c562d17ec920c66ce2.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/26e\/c78\/7f7\/26ec787f7bcd20c562d17ec920c66ce2.png\"\/><\/div>\n<p>  <i>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u0437\u0438\u0441\u044b \u0437\u0430 \u0434\u0435\u043d\u044c, ChatGPT \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f Loader.<\/i><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/1fe\/fb8\/bc1\/1fefb8bc1c4ab2a66700ab41952c4a5d.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/1fe\/fb8\/bc1\/1fefb8bc1c4ab2a66700ab41952c4a5d.png\"\/><\/div>\n<p>  <i>\u0411\u043e\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u0438\u0441\u0442\u043e\u0440\u0438\u0435\u0439.<\/i><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/937\/8a1\/670\/9378a1670c680d0023679ce30dfb19cd.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/937\/8a1\/670\/9378a1670c680d0023679ce30dfb19cd.png\"\/><\/div>\n<p>  <i>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/i><\/p>\n<p>  <a href=\"https:\/\/selectel.ru\/services\/cloud\/sharedline\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=cloud_article_history_060923_banner_025_ord\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/f1\/ue\/2l\/f1ue2l9jfmdsk_wexxo70-hhk9c.png\" data-src=\"https:\/\/habrastorage.org\/webt\/f1\/ue\/2l\/f1ue2l9jfmdsk_wexxo70-hhk9c.png\"\/><\/div>\n<p><\/a><br \/>  <font color=\"#EB4247\"><\/p>\n<h2>\u0414\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440<\/h2>\n<p><\/font><br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u043f\u0430\u043f\u043a\u0435 config \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b keep, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 Git. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c .gitignore:<\/p>\n<pre><code class=\"1c\">.gitignore node_modules  .vscode  config\/default.json <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 GitHub, \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442, \u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043e\u043c\u043c\u0438\u0442 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0435\u0433\u043e:<\/p>\n<pre><code class=\"bash\">git init git add . git commit -m \"initial commit\" git remote add origin REPO_URL git push -u origin master <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h3>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u0431\u043e\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u042d\u0442\u043e \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043a\u0440\u0443\u0433\u043b\u043e\u0441\u0443\u0442\u043e\u0447\u043d\u043e. \u0412\u0435\u0434\u044c \u0442\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u0435\u0440\u0435\u0431\u043e\u0439\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u043e\u043c. \u0411\u043e\u0442\u0430 \u043b\u0443\u0447\u0448\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u0431\u043b\u0430\u043a\u043e.<\/p>\n<p>  1. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b <b>\u041e\u0431\u043b\u0430\u0447\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430<\/b> \u0432\u043d\u0443\u0442\u0440\u0438 <a href=\"https:\/\/slc.tl\/13wbe\">\u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/a>:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/5d4\/3db\/100\/5d43db10079abf3f3ab1856e6367854c.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5d4\/3db\/100\/5d43db10079abf3f3ab1856e6367854c.png\"\/><\/div>\n<p>  2. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0433\u043e \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430 vCPU \u0441 \u0434\u043e\u043b\u0435\u0439 20% \u0438 512 \u041c\u0411 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/43d\/850\/81a\/43d85081ac5312d62fc6463438e4cbba.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/43d\/850\/81a\/43d85081ac5312d62fc6463438e4cbba.png\"\/><\/div>\n<p>  3. \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/d63\/1a0\/073\/d631a0073b5748e077f5deade9f1be17.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d63\/1a0\/073\/d631a0073b5748e077f5deade9f1be17.png\"\/><\/div>\n<p>  4. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Git:<\/p>\n<pre><code class=\"bash\">apt update apt install git <\/code><\/pre>\n<p>  5. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Node.js \u2014 \u043f\u043e\u043b\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 <a href=\"https:\/\/slc.tl\/2wx5w\">\u0410\u043a\u0430\u0434\u0435\u043c\u0438\u0438 Selectel<\/a>:<\/p>\n<pre><code class=\"bash\">curl -o- &lt;https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.1\/install.sh> | bash source ~\/.bashrc  nvm install 20  nvm use 20  npm -v  node -v <\/code><\/pre>\n<p>  6. \u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitHub \u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442:<\/p>\n<pre><code class=\"bash\">git clone REPO_URL cd PROJECT_FOLDER_NAME npm i touch config\/default.json nano config\/default.json <\/code><\/pre>\n<p>  7. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442:<\/p>\n<pre><code class=\"bash\">npm install pm2 -g pm2 start .\/src\/main.js <\/code><\/pre>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e \u2014 \u0431\u043e\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\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 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0430 \u0438\u0437\u0443\u0447\u0438\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u044d\u0442\u0430\u043f\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Telegram-\u0431\u043e\u0442\u043e\u0432 \u2014 \u043e\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043e \u0434\u0435\u043f\u043b\u043e\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438. \u0412\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u043e\u043d\u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u2014 \u0432 Selectel \u0435\u0441\u0442\u044c <a href=\"https:\/\/slc.tl\/d6p54\">\u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/a>.<\/p>\n<p>  <font color=\"#EB4247\"><\/p>\n<h2>\u0414\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b<\/h2>\n<p><\/font><br \/>  \u00a0<a href=\"https:\/\/slc.tl\/zkh34\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/2h\/0r\/sm\/2h0rsml8shcns8mw1p0qrgd6edy.png\" width=\"32%\" data-src=\"https:\/\/habrastorage.org\/webt\/2h\/0r\/sm\/2h0rsml8shcns8mw1p0qrgd6edy.png\"\/><\/a>\u00a0<a href=\"https:\/\/slc.tl\/l4nys\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yv\/bi\/xf\/yvbixfhoyi7i3960ulxovv_ssuk.png\" width=\"32%\" data-src=\"https:\/\/habrastorage.org\/webt\/yv\/bi\/xf\/yvbixfhoyi7i3960ulxovv_ssuk.png\"\/><\/a>\u00a0<a href=\"https:\/\/slc.tl\/7gd0e\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ki\/o5\/sg\/kio5sg26hwung5yhdmqblkvwrnu.png\" width=\"32%\" data-src=\"https:\/\/habrastorage.org\/webt\/ki\/o5\/sg\/kio5sg26hwung5yhdmqblkvwrnu.png\"\/><\/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\/757924\/\"> https:\/\/habr.com\/ru\/articles\/757924\/<\/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\/w780q1\/webt\/xu\/kc\/b9\/xukcb9ycwrdw3dyyw1peqiqdfk4.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/xu\/kc\/b9\/xukcb9ycwrdw3dyyw1peqiqdfk4.jpeg\" data-blurred=\"true\"\/><\/div>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0445\u0443\u0434\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0440\u043e\u043c\u0430\u043d. \u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0438\u0434\u0435\u0438, \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043d\u043e \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0432 \u043e\u0434\u043d\u0443 \u0438\u0441\u0442\u043e\u0440\u0438\u044e.<\/p>\n<p>  \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0441\u0442\u043e. \u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u2014 \u0437\u0430\u043f\u0438\u0448\u0438, \u043f\u0440\u0438\u0448\u043b\u0430 \u043d\u043e\u0432\u0430\u044f \u043c\u044b\u0441\u043b\u044c \u2014 \u0437\u0430\u043f\u0438\u0448\u0438 \u0435\u0435 \u0442\u043e\u0436\u0435. \u041f\u043e\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u044c \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0438 \u044d\u043c\u043e\u0446\u0438\u0439 \u2014 \u0438 \u0433\u043e\u0442\u043e\u0432\u043e. \u041d\u043e \u044d\u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  \u0422\u0430\u043a\u0430\u044f \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0441\u0442 \u0438\u043b\u0438 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u043e, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437 \u0442\u0435\u0437\u0438\u0441\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ChatGPT, \u0430 \u043f\u043e\u0441\u043b\u0435 \u2014 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 Notion. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 <a href=\"https:\/\/slc.tl\/kl70o\">\u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440<\/a> \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u2014 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.  <\/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-353601","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/353601","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=353601"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/353601\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=353601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=353601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=353601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}