{"id":430598,"date":"2024-08-28T15:02:15","date_gmt":"2024-08-28T15:02:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=430598"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=430598","title":{"rendered":"<span>\u041a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f ChatGPT \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 NextJS \u0438 Wing<\/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\"><a href=\"https:\/\/habr.com\/ru\/companies\/piter\/articles\/839282\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/1j\/od\/qc\/1jodqccejkmwq5b5rftkxgrsdg8.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/1j\/od\/qc\/1jodqccejkmwq5b5rftkxgrsdg8.png\"\/><\/div>\n<p><\/a><\/p>\n<p> \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f ChatGPT \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Wing \u0438 Next.js.<\/p>\n<p> \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0435 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e (\u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435 \u043e\u0431\u043b\u0430\u043a\u0430), \u043b\u0438\u0431\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430.<a name=\"habracut\"><\/a><\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p> \u0415\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u0432\u0430\u0448\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0442\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442 ChatGPT \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e \u0432 \u0432\u0430\u0448\u0435\u0439 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435.<\/p>\n<p> \u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u044f\u0437\u044b\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c (LLM), \u044d\u0442\u043e \u0443\u043f\u0440\u043e\u0447\u0438\u0442 \u043a\u0430\u043a \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0442\u0430\u043a \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. <\/p>\n<p> \u0418\u043d\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u043f\u043e\u0432\u043e\u0434 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u043f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u044b\u043c\u0438 LLM-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ChatGPT \u043e\u0442 OpenAI. \u0414\u0435\u043b\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e \u0432 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u043c\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443, \u043b\u0438\u0431\u043e \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u0430\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p> \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b \u0432\u044b\u0438\u0433\u0440\u0430\u0435\u0442\u0435, \u0435\u0441\u043b\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u0435 LLM \u0432 \u0432\u0430\u0448\u0435\u0439 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0438\u043b\u0438 \u0441\u0442\u0430\u043d\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 Wing. <\/p>\n<blockquote><p><a href=\"https:\/\/git.new\/wing-repo\">Wing<\/a> \u2014 \u044d\u0442\u043e \u043e\u0431\u043b\u0430\u0447\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u044f\u0441\u044c, \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f. \u042d\u0442\u043e\u0442 \u044f\u0437\u044b\u043a \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043e\u0431\u043b\u0430\u0447\u043d\u0443\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u044e, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2013 \u0432\u0441\u0451 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u044f\u0437\u044b\u043a\u0435.<br \/> Wing \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043e\u0431\u043b\u0430\u043a\u0443, \u0442\u043e \u0435\u0441\u0442\u044c, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043d\u0451\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445.<\/p><\/blockquote>\n<p> <a href=\"https:\/\/git.new\/wing-repo\">\u0417\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c: Wing<\/a><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/_m\/hi\/z4\/_mhiz4uglgszqyxnl9xo_erlbfg.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/_m\/hi\/z4\/_mhiz4uglgszqyxnl9xo_erlbfg.png\"\/><\/div>\n<p> <\/p>\n<hr\/>\n<p> <\/p>\n<h3>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c!<\/h3>\n<p> \u0414\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f: <\/p>\n<ul>\n<li>\u0411\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e Next.js<\/li>\n<li><a href=\"https:\/\/www.winglang.io\/docs\/\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Wing<\/a> \u043d\u0430 \u0432\u0430\u0448\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u2014 \u043d\u0435 \u0432\u043e\u043b\u043d\u0443\u0439\u0442\u0435\u0441\u044c. \u041c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0432\u0441\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043b\u044e\u0447 \u043a API OpenAI.<\/li>\n<\/ul>\n<p> <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/h3>\n<p> \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Wing \u043d\u0430 \u0432\u0430\u0448\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443: <\/p>\n<pre><code class=\"javascript\">npm install -g winglang<\/code><\/pre>\n<p> \u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443, \u043e\u0442\u043c\u0435\u0442\u0438\u0432 \u0432\u0435\u0440\u0441\u0438\u044e:<\/p>\n<pre><code class=\"javascript\">wing -V<\/code><\/pre>\n<p> <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Next.js \u0438 Wing.<\/h3>\n<p> <\/p>\n<pre><code class=\"javascript\">mkdir assistant cd assistant npx create-next-app@latest frontend mkdir backend &amp;&amp; cd backend wing new empty <\/code><\/pre>\n<p> \u041c\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430 Wing \u0438 Next.js \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 assistant directory. \u041d\u0430\u0448 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f ChatGPT \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f Assistant. \u041a\u0440\u0443\u0442\u043e \u0437\u0432\u0443\u0447\u0438\u0442, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<p> \u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445 \u0434\u043b\u044f \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u0438 \u0431\u044d\u043a\u0435\u043d\u0434\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u0448\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Next \u0438 Wing. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>wing new empty<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0442\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u0430: <code>package.json<\/code>, <code>package-lock.json<\/code> \u0438 <code>main.w<\/code>. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0444\u0430\u0439\u043b \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u0442 \u043d\u0430\u043c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0432 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435 Wing <\/h3>\n<p> \u0412 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435 Wing \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u0430\u0448 \u043a\u043e\u0434, \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0430\u0448 \u043a\u043e\u0434 \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u0412\u0430\u043c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0435. \u0422\u0430\u043a \u0443\u0441\u043a\u043e\u0440\u044f\u044e\u0442\u0441\u044f \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<p> \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Wing \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435:<\/p>\n<pre><code class=\"javascript\">wing it<\/code><\/pre>\n<p> \u0412\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Wing \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>localhost:3000<\/code>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ur\/1v\/za\/ur1vzakyhycoxxgq2kbxffanoua.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/ur\/1v\/za\/ur1vzakyhycoxxgq2kbxffanoua.png\"\/><\/div>\n<p> <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0431\u0435\u043a\u044d\u043d\u0434<\/h3>\n<p> <\/p>\n<ul>\n<li>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 OpenAI \u0434\u043b\u044f Wing \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 React. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 OpenAI \u0441\u043b\u0443\u0436\u0438\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 LLM. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 React \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0431\u044d\u043a\u0435\u043d\u0434 \u043d\u0430 Wing \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043d\u0430 Next.\n<pre><code class=\"javascript\">npm i @winglibs\/openai @winglibs\/react<\/code><\/pre>\n<p> <\/li>\n<li>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0432 \u0432\u0430\u0448 \u0444\u0430\u0439\u043b main.w. \u0422\u0430\u043a\u0436\u0435 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u0447\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f.\n<pre><code class=\"javascript\">bring openai bring react bring cloud bring ex bring http<\/code><\/pre>\n<p> <\/li>\n<\/ul>\n<p> <code>bring<\/code> \u2014 \u044d\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0432 Wing. \u041c\u043e\u0436\u0435\u0442\u0435 \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e <code>bring<\/code> \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432 Wing \u0440\u043e\u0432\u043d\u043e \u0442\u043e\u0442 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0447\u0442\u043e \u0438 <code>import<\/code> \u0432 JavaScript.<\/p>\n<p> <code>cloud<\/code> \u2014 \u044d\u0442\u043e \u043e\u0431\u043b\u0430\u0447\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Wing. \u041e\u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f Cloud API, Bucket, Counter, Domain, Endpoint, Function \u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. <code>ex<\/code> \u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 Redis, \u0430 <code>http<\/code> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 HTTP-\u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c, \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0438 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0435\u0451 \u043e\u0442\u0442\u0443\u0434\u0430.<\/p>\n<h3>\u041a\u0430\u043a \u0432\u0430\u043c \u043e\u0431\u0437\u0430\u0432\u0435\u0441\u0442\u0438\u0441\u044c \u043a\u043b\u044e\u0447\u043e\u043c \u043a API OpenAI <\/h3>\n<p> \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f <code>gpt-4-turbo<\/code>, \u043d\u043e \u0432\u0430\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 \u0438 \u043b\u044e\u0431\u0430\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0442 OpenAI. <\/p>\n<ul>\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0432 <a href=\"https:\/\/platform.openai.com\/signup\">OpenAI<\/a>, \u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u044d\u0442\u043e\u0433\u043e. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u044e\u0447 \u043a API, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <a href=\"http:\/\/platform.openai.com\/api-keys\">platform.openai.com\/api-keys<\/a> \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <b>Create new secret key<\/b> (\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447).<\/li>\n<\/ul>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/6j\/wz\/2p\/6jwz2pbl6srua8q8vdx-3ryjlvo.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/6j\/wz\/2p\/6jwz2pbl6srua8q8vdx-3ryjlvo.png\"\/><\/div>\n<p> <\/p>\n<ul>\n<li>\u0417\u0430\u0434\u0430\u0439\u0442\u0435 <b>Name<\/b> (\u0418\u043c\u044f), <b>Project<\/b> (\u041f\u0440\u043e\u0435\u043a\u0442) \u0438 <b>Permissions<\/b> (\u041f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430), \u0437\u0430\u0442\u0435\u043c \u0449\u0451\u043b\u043a\u043d\u0438\u0442\u0435 <b>Create secret key<\/b> (\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447).<\/li>\n<\/ul>\n<p> <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/1h\/wg\/ao\/1hwgao18ewysfxze0k34ob9sbrk.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/1h\/wg\/ao\/1hwgao18ewysfxze0k34ob9sbrk.png\"\/><\/div>\n<h3>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f OpenAI<\/h3>\n<p> \u0414\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e API \u043a OpenAI \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <code>\u043a\u043b\u0430\u0441\u0441<\/code>. \u041c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p> \u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 <code>Assistant<\/code> \u043b\u0438\u0447\u043d\u043e\u0441\u0442\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 (<code>personality<\/code>), \u0447\u0442\u043e\u0431\u044b \u0418\u0418-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0435\u043c\u0443 \u043f\u0440\u043e\u043c\u043f\u0442.<\/p>\n<pre><code class=\"javascript\">let apiKeySecret = new cloud.Secret(name: \"OAIAPIKey\") as \"OpenAI Secret\";  class Assistant {     personality: str;     openai: openai.OpenAI;      new(personality: str) {         this.openai = new openai.OpenAI(apiKeySecret: apiKeySecret);         this.personality = personality;     }      pub inflight ask(question: str): str {         let prompt = `you are an assistant with the following personality: ${this.personality}. ${question}`;         let response = this.openai.createCompletion(prompt, model: \"gpt-4-turbo\");         return response.trim();     } }<\/code><\/pre>\n<p> \u0412 Wing \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442\u0441\u044f \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0439 \u00ab<code>\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0451\u0442\u043d\u043e\u0433\u043e<\/code>\u00bb \u0438 \u00ab<code>\u043f\u043e\u043b\u0451\u0442\u043d\u043e\u0433\u043e<\/code>\u00bb \u043a\u043e\u0434\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p> <b>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0451\u0442\u043d\u044b\u0439<\/b> (Preflight) \u043a\u043e\u0434 (\u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u044d\u0442\u043e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a <b>\u043f\u043e\u043b\u0451\u0442\u043d\u044b\u0439<\/b> (inflight) \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u0441\u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p> \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0451\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u2014 \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u0434\u043b\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 API. \u041f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0451\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e preflight \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, Wing \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0435\u0433\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0435\u0440\u0435\u0434 \u0431\u043b\u043e\u043a\u043e\u043c \u043f\u043e\u043b\u0451\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e inflight.<\/p>\n<blockquote><p>\u0412 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u0431\u043b\u043e\u043a inflight. \u0411\u043b\u043e\u043a\u0438 inflight \u043d\u0443\u0436\u043d\u044b \u0432 \u0442\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u0438\u0445 inflight-API.<\/p><\/blockquote>\n<p> <\/p>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u0441\u0435\u043a\u0440\u0435\u0442\u0430<\/h3>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0437\u0430\u0449\u0438\u0449\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 API, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b <a href=\"https:\/\/techhq.com\/2022\/09\/hardcoded-api-keys-jeopardize-data-in-the-cloud\/\">\u0443\u0434\u0435\u043b\u044f\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/a>.<\/p>\n<p> \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0431\u0435\u043a\u044d\u043d\u0434\u0430 \u0444\u0430\u0439\u043b <code>.env<\/code> \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0442\u0443\u0434\u0430 \u043a\u043b\u044e\u0447 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 API: <\/p>\n<pre><code class=\"javascript\">OAIAPIKey = Your_OpenAI_API_key<\/code><\/pre>\n<p> \u041c\u043e\u0436\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u043a API OpenAI \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0441\u0442\u0430\u0432\u044f \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043d\u0430\u0448 \u0444\u0430\u0439\u043b .env. \u0417\u0430\u0442\u0435\u043c, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 AWS, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0441\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 <a href=\"https:\/\/docs.aws.amazon.com\/secretsmanager\/latest\/userguide\/intro.html\">\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 AWS<\/a>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fr\/i5\/al\/fri5alnzhnndxocnibnbovfltwg.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/fr\/i5\/al\/fri5alnzhnndxocnibnbovfltwg.png\"\/><\/div>\n<p> \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0441\u044f \u043d\u0430 \u0441\u0430\u0439\u0442 AWS \u0438 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0430\u0448 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0442\u0430\u043a\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u043d\u0435\u0442, \u0442\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/rb\/gf\/je\/rbgfje0ooaikfvvv1mtc7nyflne.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/rb\/gf\/je\/rbgfje0ooaikfvvv1mtc7nyflne.png\"\/><\/div>\n<p> \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432 (Secrets Manager) \u0438 \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043d\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u043a API.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vb\/-s\/w-\/vb-sw-9jckslmdn7ygrlmd-tkjq.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/vb\/-s\/w-\/vb-sw-9jckslmdn7ygrlmd-tkjq.png\"\/><\/div>\n<p> <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/-c\/zw\/pz\/-czwpzop5aj-zau6x5wdmak2ldu.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/-c\/zw\/pz\/-czwpzop5aj-zau6x5wdmak2ldu.png\"\/><\/div>\n<p> \u041c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u043a\u043b\u044e\u0447 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 API \u0432 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u043c \u0441\u0435\u043a\u0440\u0435\u0442\u0435 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>OAIAPIKey<\/code>. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447, \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043e\u043a\u043d\u0443 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043a \u0441\u0435\u043a\u0440\u0435\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0435\u043f\u0435\u0440\u044c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 AWS.<\/p>\n<pre><code class=\"javascript\">wing secrets<\/code><\/pre>\n<p> \u0414\u0430\u043b\u0435\u0435 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432 \u043e\u043a\u043d\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0432\u0430\u0448 \u043a\u043b\u044e\u0447 \u043a API \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0430\u0448\u0438 \u043a\u043b\u044e\u0447\u0438 \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<hr\/>\n<p> <\/p>\n<h3>\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0418\u0418 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435<\/h3>\n<p> \u0415\u0441\u043b\u0438 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u043e\u0442\u0432\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u043d\u0435\u0435 \u0443\u0436\u0435 \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043b \u0432\u0430\u0448 \u0418\u0418, \u0442\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0443\u0447\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, \u0430 \u043d\u0435 \u043d\u0430 \u043f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 \u0432\u0440\u043e\u0434\u0435 ChatGPT, \u0433\u0434\u0435 \u0432\u0430\u0448\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445, \u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0432\u043d\u0435 \u0432\u0430\u0448\u0435\u0439 \u0432\u043b\u0430\u0441\u0442\u0438. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u044d\u0442\u0438 \u043e\u0442\u0432\u0435\u0442\u044b \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043d\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f. <\/p>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043b\u0430\u0441\u0441, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 Assistant. \u0412 \u043d\u0435\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u00abpersonality\u00bb \u0432\u0430\u0448\u0435\u0433\u043e \u0418\u0418, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u043c\u043f\u0442. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043a\u0430\u043a \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <code>txt<\/code> \u0438 \u043a\u043b\u0430\u0441\u0442\u044c \u0438\u0445 \u0432 \u043e\u0431\u043b\u0430\u0447\u043d\u0443\u044e \u043a\u043e\u0440\u0437\u0438\u043d\u0443.<\/p>\n<pre><code class=\"javascript\">let counter = new cloud.Counter();  class RespondToQuestions {     id: cloud.Counter;     gpt: Assistant;     store: cloud.Bucket;      new(store: cloud.Bucket) {         this.gpt = new Assistant(\"Respondent\");         this.id = new cloud.Counter() as \"NextID\";         this.store = store;     }      pub inflight sendPrompt(question: str): str {         let reply = this.gpt.ask(\"{question}\");         let n = this.id.inc();         this.store.put(\"message-{n}.original.txt\", reply);         return reply;     } }<\/code><\/pre>\n<p> <\/p>\n<hr\/>\n<p> \u041c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u00ab\u043b\u0438\u0447\u043d\u043e\u0441\u0442\u044c\u00bb \u043d\u0430\u0448\u0435\u0433\u043e \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 \u043a\u0430\u043a \u00abRespondent\u00bb (\u041e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439). \u0422\u043e \u0435\u0441\u0442\u044c, \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043e\u0442\u0432\u0435\u0447\u0430\u043b \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u043c\u0443 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 personality \u0432\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u043f\u0440\u043e\u043c\u043f\u0442\u043e\u0432. <\/p>\n<p> \u0412\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>n<\/code>. \u042d\u0442\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435. \u041d\u043e \u043d\u0430\u043c, \u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u043c\u043f\u0442\u044b, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0435 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0438 \u043e\u0442\u0432\u0435\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043d\u0430\u0448\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<h3>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p> \u0412 Wing \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>ex.Table<\/code> \u2014 \u044d\u0442\u043e \u043d\u0435\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f (NoSQL) \u0431\u0430\u0437\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u043e\u0442\u0442\u0443\u0434\u0430.<\/p>\n<pre><code class=\"javascript\">let db = new ex.Table({     name: \"assistant\",     primaryKey: \"id\",     columns: {         question: ex.ColumnType.STRING,         answer: ex.ColumnType.STRING     } });<\/code><\/pre>\n<p> <\/p>\n<hr\/>\n<p> \u0412 \u043d\u0430\u0448\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0434\u0432\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u0430. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u043c\u043f\u0442\u044b, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u2014 \u043e\u0442\u0432\u0435\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 API \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043a\u0438<\/h3>\n<p> \u041d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0431\u0435\u043a\u044d\u043d\u0434 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0445 \u043e\u0442\u0442\u0443\u0434\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b POST \u0438 GET.<\/p>\n<pre><code class=\"javascript\">let api = new cloud.Api({ cors: true });  api.post(\"\/assistant\", inflight((request) =&gt; {     \/\/ \u0417\u0434\u0435\u0441\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 POST }));  api.get(\"\/assistant\", inflight(() =&gt; {     \/\/ \u0417\u0434\u0435\u0441\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 GET }));<\/code><\/pre>\n<p> <\/p>\n<hr\/>\n<p> <\/p>\n<pre><code class=\"javascript\">let myAssistant = new RespondToQuestions(store) as \"Helpful Assistant\";  api.post(\"\/assistant\", inflight((request) =&gt; {     let prompt = request.body;     let response = myAssistant.sendPrompt(JSON.stringify(prompt));      let id = counter.inc();       \/\/ \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u043c\u043f\u0442 \u0438 \u043e\u0442\u0432\u0435\u0442     db.insert(id, { question: prompt, answer: response });      return cloud.ApiResponse({         status: 200     }); }));<\/code><\/pre>\n<p> \u041f\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0443 POST \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u043c\u043f\u0442, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0439 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442. \u041a\u0430\u043a \u043f\u0440\u043e\u043c\u043f\u0442, \u0442\u0430\u043a \u0438 \u043e\u0442\u0432\u0435\u0442 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>cloud.ApiResponse<\/code> \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u0432\u0435\u0442, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u2026<\/p>\n<p> \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0433\u0434\u0430 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 GET.<\/p>\n<pre><code class=\"javascript\">api.get(\"\/assistant\", inflight(() =&gt; {     let questionsAndAnswers = db.list();      return cloud.ApiResponse({         body: JSON.stringify(questionsAndAnswers),         status: 200     }); }));<\/code><\/pre>\n<p> \u0411\u044d\u043a\u0435\u043d\u0434 \u0433\u043e\u0442\u043e\u0432. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435 \u043e\u0431\u043b\u0430\u043a\u0430.<\/p>\n<p> \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Wing.<\/p>\n<p> \u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>localhost:3000<\/code> \u0438 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0430\u0448\u0435\u043c\u0443 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/np\/k4\/bx\/npk4bxpp-uyzlych4hh4cn57du0.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/np\/k4\/bx\/npk4bxpp-uyzlych4hh4cn57du0.png\"\/><\/div>\n<p> \u041a\u0430\u043a \u043d\u0430\u0448 \u0432\u043e\u043f\u0440\u043e\u0441, \u0442\u0430\u043a \u0438 \u043e\u0442\u0432\u0435\u0442 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u0437\u0433\u043b\u044f\u043d\u0438\u0442\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/p_\/3c\/o3\/p_3co342nblrrt7dkklbfa0gq_c.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/p_\/3c\/o3\/p_3co342nblrrt7dkklbfa0gq_c.png\"\/><\/div>\n<p> <\/p>\n<h3>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 URL \u043d\u0430\u0448\u0435\u0433\u043e API \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435<\/h3>\n<p> \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c URL \u043a \u043d\u0430\u0448\u0435\u043c\u0443 API, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c\u0443 \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434\u0435, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u044d\u0442\u043e\u0442 URL \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Next. \u0418\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 React, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435.<\/p>\n<pre><code class=\"javascript\">let website = new react.App({     projectPath: \"..\/frontend\",     localPort: 4000 });  website.addEnvironment(\"API_URL\", api.url);<\/code><\/pre>\n<p> \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432 \u043d\u0430\u0448 \u0444\u0430\u0439\u043b <code>layout.js<\/code> \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Next.<\/p>\n<pre><code class=\"javascript\">import { Inter } from \"next\/font\/google\"; import \".\/globals.css\";  const inter = Inter({ subsets: [\"latin\"] });  export const metadata = {     title: \"Create Next App\",     description: \"Generated by create next app\", };  export default function RootLayout({ children }) {     return (         &lt;html lang=\"en\"&gt;             &lt;head&gt;             &lt;script src=\".\/wing.js\" defer&gt;&lt;\/script&gt;            &lt;\/head&gt;             &lt;body className={inter.className}&gt;{children}&lt;\/body&gt;         &lt;\/html&gt;     ); }<\/code><\/pre>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a <code>API_URL<\/code> \u043f\u0440\u044f\u043c\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 Next.<\/p>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430<\/h3>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u044d\u043a\u0435\u043d\u0434. <\/p>\n<pre><code class=\"javascript\">import { useEffect, useState, useCallback } from 'react'; import axios from 'axios';  function App() {      const [isThinking, setIsThinking] = useState(false);     const [input, setInput] = useState(\"\");     const [allInteractions, setAllInteractions] = useState([]);      const retrieveAllInteractions = useCallback(async (api_url) =&gt; {             await axios ({               method: \"GET\",               url: `${api_url}\/assistant`,             }).then(res =&gt; {               setAllInteractions(res.data)             })   }, [])      const handleSubmit = useCallback(async (e)=&gt; {         e.preventDefault()          setIsThinking(!isThinking)           if(input.trim() === \"\"){           alert(\"Chat cannot be empty\")           setIsThinking(true)          }            await axios({             method: \"POST\",             url: `${window.wingEnv.API_URL}\/assistant`,             headers: {               \"Content-Type\": \"application\/json\"             },             data: input           })           setInput(\"\");           setIsThinking(false);           await retrieveAllInteractions(window.wingEnv.API_URL);         })      useEffect(() =&gt; {         if (typeof window !== \"undefined\") {             retrieveAllInteractions(window.wingEnv.API_URL);         }     }, []);      \/\/ Here you would return your component's JSX     return (         \/\/ \u0417\u0434\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 JSX     ); }  export default App;<\/code><\/pre>\n<p> \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>retrieveAllInteractions<\/code> \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u043e\u0442\u0432\u0435\u0442\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435\u0441\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u044d\u043a\u0435\u043d\u0434\u0430. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>handSubmit<\/code> \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\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 \u0431\u044d\u043a\u0435\u043d\u0434. <\/p>\n<p> \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e JSX.<\/p>\n<pre><code class=\"javascript\">import { useEffect, useState } from 'react'; import axios from 'axios'; import '.\/App.css';  function App() {     \/\/ ...      return (         &lt;div className=\"container\"&gt;             &lt;div className=\"header\"&gt;                 &lt;h1&gt;My Assistant&lt;\/h1&gt;                 &lt;p&gt;Ask anything...&lt;\/p&gt;             &lt;\/div&gt;              &lt;div className=\"chat-area\"&gt;                 &lt;div className=\"chat-area-content\"&gt;                     {allInteractions.map((chat) =&gt; (                         &lt;div key={chat.id} className=\"user-bot-chat\"&gt;                             &lt;p className='user-question'&gt;{chat.question}&lt;\/p&gt;                             &lt;p className='response'&gt;{chat.answer}&lt;\/p&gt;                         &lt;\/div&gt;                     ))}                     &lt;p className={isThinking ? \"thinking\" : \"notThinking\"}&gt;Generating response...&lt;\/p&gt;                 &lt;\/div&gt;                  &lt;div className=\"type-area\"&gt;                     &lt;input                          type=\"text\"                          placeholder=\"Ask me any question\"                          value={input}                          onChange={(e) =&gt; setInput(e.target.value)}                      \/&gt;                     &lt;button onClick={handleSubmit}&gt;Send&lt;\/button&gt;                 &lt;\/div&gt;             &lt;\/div&gt;         &lt;\/div&gt;     ); }  export default App; <\/code><\/pre>\n<p> <\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435<\/h3>\n<p> \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0432\u0430\u0448\u0438\u043c \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Wing \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <\/p>\n<pre><code class=\"javascript\">cd ~assistant\/backend wing it<\/code><\/pre>\n<p> \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u043a\u043e\u0434 Next.js:<\/p>\n<pre><code class=\"javascript\">cd ~assistant\/frontend npm run dev<\/code><\/pre>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ue\/-0\/_l\/ue-0_lebafvbd9kw_wjcisv3tis.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/ue\/-0\/_l\/ue-0_lebafvbd9kw_wjcisv3tis.png\"\/><\/div>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u0418\u0418-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043f\u0430\u0440\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043d\u0430 Next.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/o5\/is\/8t\/o5is8tla_bdwkmxyfc_9gr2kxl8.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/o5\/is\/8t\/o5is8tla_bdwkmxyfc_9gr2kxl8.png\"\/><\/div>\n<p> <\/p>\n<h3>\u0420\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 AWS<\/h3>\n<p> \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438, \u043a\u0430\u043a \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u041d\u0430 \u044f\u0437\u044b\u043a\u0435 Wing \u0435\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0435, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u043d\u0430 AWS. \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 AWS, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f <a href=\"https:\/\/terraform.io\/downloads\">Terraform<\/a> \u0438 <a href=\"https:\/\/docs.aws.amazon.com\/cli\/\">AWS CLI<\/a>, \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u0443\u0447\u0451\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. <\/p>\n<ul>\n<li>\u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 Terraform\/AWS \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>tf-aws<\/code>. \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u0438\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f Terraform \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0432\u0438\u0436\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0432 \u0438\u0445 \u0432\u0441\u0435 \u043a \u043d\u0430\u0431\u043e\u0440\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 AWS, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u043c\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.\n<pre><code class=\"javascript\">cd ~\/assistant\/backend wing compile --platform tf-aws main.w<\/code><\/pre>\n<p> <\/li>\n<\/ul>\n<hr\/>\n<ul>\n<li>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b Init \u0438 Apply \u0432 Terraform\n<pre><code class=\"javascript\">cd .\/target\/main.tfaws terraform init terraform apply<\/code><\/pre>\n<\/li>\n<\/ul>\n<hr\/>\n<p> \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 <code>terraform<\/code> \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p> \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u0443 \u0432\u044b\u043b\u043e\u0436\u0435\u043d <a href=\"https:\/\/github.com\/NathanTarbert\/chatgpt-client-wing-nextjs\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p> \u041a\u0430\u043a \u0431\u044b\u043b\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e \u0432\u044b\u0448\u0435, \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f ChatGPT \u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u043d\u0430\u0448\u0435\u0439 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0435 <a href=\"https:\/\/docs.aws.amazon.com\/whitepapers\/latest\/aws-overview\/security-and-compliance.html#:~:text=Keep%20Your%20data%20safe%20%E2%80%94%20The,compliance%20programs%20in%20its%20infrastructure.\">\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/a>.<\/p>\n<p> \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u043a\u0430\u043a \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 <a href=\"https:\/\/git.new\/wing-repo\">Wing<\/a> \u043c\u043e\u0436\u043d\u043e \u0441 \u043b\u0451\u0433\u043a\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u0432\u043e\u043b\u043d\u0443\u044f\u0441\u044c \u043e \u0442\u043e\u043c, \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0438\u0445 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u0442\u044c.<\/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\/839282\/\"> https:\/\/habr.com\/ru\/articles\/839282\/<\/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\"><a href=\"https:\/\/habr.com\/ru\/companies\/piter\/articles\/839282\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/1j\/od\/qc\/1jodqccejkmwq5b5rftkxgrsdg8.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/1j\/od\/qc\/1jodqccejkmwq5b5rftkxgrsdg8.png\"\/><\/div>\n<p><\/a><\/p>\n<p> \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f ChatGPT \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Wing \u0438 Next.js.<\/p>\n<p> \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0435 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e (\u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435 \u043e\u0431\u043b\u0430\u043a\u0430), \u043b\u0438\u0431\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430.<\/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-430598","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/430598","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=430598"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/430598\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=430598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=430598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=430598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}