{"id":378943,"date":"2024-06-15T09:00:07","date_gmt":"2024-06-15T09:00:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=378943"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=378943","title":{"rendered":"<span>JSON \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f GPT-\u0431\u043e\u0442\u043e\u0432 (\u0432\u0435\u0440\u0441\u0438\u044f 3.0)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u041a\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0435\u0448\u0430\u0435\u043c?<\/h2>\n<p>\u041b\u044e\u0431\u043e\u0439 GPT-\u0431\u043e\u0442 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043b\u044e\u0431\u043e\u0439 LLM (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 ChatGPT) \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0430\u043c \u0438 <strong><em>\u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/em><\/strong> \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u0438\u0430\u043b\u043e\u0433\u0430.<\/p>\n<h2>\u0428\u0430\u0433\u21161: \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h2>\n<pre><code class=\"python\">{      \"name\": \"ai_memory_v3\",      \"description\": \"Call this function when you need to make adjustments to JSON memory.\",      \"parameters\": {        \"type\": \"object\",        \"properties\": {          \"key\": {            \"type\": \"string\",            \"description\": \"New or existing key from JSON memory\",          },         \"value\": {            \"type\": \"string\",            \"description\": \"Text to be written by the specified key\",          },         \"action\": {             \"type\": \"string\",             \"enum\": [\"+\", '-', '.', '_'],             \"description\": \"Action type. `+` - means adding information to memory. `-` - means deleting information from memory. `.` - means changing information in memory. `_` - means clear all memory\",         },       },        \"required\": [\"key\", \"value\", \"action\"],      },  }, <\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>&#171;key&#187; &#8212; \u041d\u043e\u0432\u044b\u0439 \u0438\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u044e\u0447 \u0438\u0437 JSON \u043f\u0430\u043c\u044f\u0442\u0438. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a \u043a\u0430\u043a\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>&#171;value&#187; &#8212; \u0422\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>&#171;action&#187; &#8212; \u0422\u0438\u043f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0&#8212; <code>+<\/code>\u00a0&#8212; \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c.<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0&#8212; <code>-<\/code>\u00a0&#8212; \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438.<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0&#8212; <code>.<\/code>\u00a0&#8212; \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0&#8212; <code>_<\/code>\u00a0&#8212; \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0432\u0441\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.  <\/p>\n<\/li>\n<\/ul>\n<h2>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/h2>\n<pre><code class=\"python\">from flask import Flask, request, json import os import logging  # \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u0433\u0435\u0440\u0430 logger = logging.getLogger(__name__) config.ROOT_PATH = '\/path\/to\/your\/application\/'  # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e  # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Flask app = Flask(__name__)  # \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c @app.route('\/write_memory_dict', methods=['POST']) def write_memory_dict():     # \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON     data = GetJsonFromRequest(request)     # \u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430     logger.debug(f\"[\/write_memory_dict] {data}\")     # \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     Res = '\u041f\u043e\u043a\u0430\u0436\u0438 \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.n'     # \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439     if data['action'] == '_':         try:             # \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u0430\u043c\u044f\u0442\u0438             os.remove(config.ROOT_PATH + 'json_memory\/' + data['chat_id'])         except Exception as e:             # \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d, \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435             logger.warning(f\"File not found {data['chat_id']}\")         # \u041e\u0442\u0432\u0435\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0430\u043c\u044f\u0442\u044c \u043e\u0447\u0438\u0449\u0435\u043d\u0430         Res = '\u041f\u0430\u043c\u044f\u0442\u044c \u043e\u0447\u0438\u0449\u0435\u043d\u0430.n'     else:         # \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 chat_id         filename = data['chat_id']         memory_json = {}         if filename is not None:             # \u0427\u0442\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u0430\u043c\u044f\u0442\u0438             memory_json = read_file(config.ROOT_PATH + 'json_memory\/' + filename)             try:                 # \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0432 JSON                 memory_json = json.loads(memory_json)             except:                 # \u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0442                 memory_json = {}         # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c         if data['action'] == '+' and data['key'] not in memory_json:             memory_json[data['key']] = data['value']             Res = '\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.n'         if data['action'] == '+' and data['key'] in memory_json:             memory_json[data['key']] += ', ' + data['value']             Res = '\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.\\n'         # \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438         if data['action'] == '-' and data['key'] in memory_json:             memory_json.pop(data['key'])             Res = '\u0414\u0430\u043d\u043d\u044b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0438\u0437 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.n'         # \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438         if data['action'] == '.' and data['key'] in memory_json:             memory_json[data['key']] = data['value']             Res = '\u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b.n'         # \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b         if filename is not None and memory_json is not {}:             with open(config.ROOT_PATH + 'json_memory\/' + filename, 'w', encoding='utf-8') as f:                 json.dump(memory_json, f, ensure_ascii=False, indent=4)             # \u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f             logger.info(f\"\/write memory_json OK {filename}, {memory_json}\")                 Res += '\u0414\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.n'     # \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443     return json.dumps(Res), 200  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0433\u0434\u0435-\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 def read_file(file_path):     # \u0422\u0443\u0442 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u0430\u0448\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430     pass  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f JSON \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0433\u0434\u0435-\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 def GetJsonFromRequest(req):     # \u0422\u0443\u0442 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u0430\u0448\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f JSON \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430     pass  # \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e if __name__ == '__main__':     app.run()<\/code><\/pre>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u043e\u0442\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9f2\/98f\/7cd\/9f298f7cd4cd647b26d5a77c0987d5a0.png\" alt=\"\u0411\u043e\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 ProTalk\" title=\"\u0411\u043e\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 ProTalk\" width=\"642\" height=\"1514\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9f2\/98f\/7cd\/9f298f7cd4cd647b26d5a77c0987d5a0.png\"\/><\/p>\n<div><figcaption>\u0411\u043e\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 ProTalk<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e71\/a00\/a49\/e71a00a493cb4d5676a266e828f94729.png\" alt=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a \u0431\u043e\u0442\u0443\" title=\"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a \u0431\u043e\u0442\u0443\" width=\"1646\" height=\"898\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e71\/a00\/a49\/e71a00a493cb4d5676a266e828f94729.png\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a \u0431\u043e\u0442\u0443<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/df9\/a6e\/435\/df9a6e435bf1aa92ce81f39bc9453c1b.png\" alt=\"\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c\" title=\"\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c\" width=\"1714\" height=\"1408\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/df9\/a6e\/435\/df9a6e435bf1aa92ce81f39bc9453c1b.png\"\/><\/p>\n<div><figcaption>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"markdown\">\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435: \u041f\u0440\u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 \u0432 \u0442\u0432\u043e\u0435\u0439 JSON \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043c\u0435\u043d\u044f\u0439 \u0441\u0432\u043e\u0439 \u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u044d\u0442\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e: \u0412 \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435: \u0438\u043c\u044f, \u043f\u043e\u043b, \u0432\u043e\u0437\u0440\u0430\u0441\u0442, \u043f\u0440\u0438\u0432\u044b\u0447\u043a\u0438, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u044b, \u0443\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f.<\/code><\/pre>\n<h2>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u043e\u0442\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0430\u043c\u044f\u0442\u0438<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0438\u043c\u044f \u0431\u043e\u0442\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4ca\/816\/441\/4ca816441e1143f89b18015dd5bd7236.png\" alt=\"\u041d\u0430\u0447\u0430\u043b\u043e \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0431\u043e\u0442\u043e\u043c \u0441 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u044c\u044e\" title=\"\u041d\u0430\u0447\u0430\u043b\u043e \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0431\u043e\u0442\u043e\u043c \u0441 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u044c\u044e\" width=\"1512\" height=\"918\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ca\/816\/441\/4ca816441e1143f89b18015dd5bd7236.png\"\/><\/p>\n<div><figcaption>\u041d\u0430\u0447\u0430\u043b\u043e \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0431\u043e\u0442\u043e\u043c \u0441 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0438\u043c\u044f \u043f\u043e\u043f\u0430\u043b\u043e \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0432\u043e\u0437\u0440\u0430\u0441\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3b4\/85a\/0ac\/3b485a0ac8a39f7119b099a450726837.png\" alt=\"\u0423\u0436\u0435 \u0434\u0432\u0430 \u043a\u043b\u044e\u0447\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c JSON \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438\" title=\"\u0423\u0436\u0435 \u0434\u0432\u0430 \u043a\u043b\u044e\u0447\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c JSON \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438\" width=\"1646\" height=\"654\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3b4\/85a\/0ac\/3b485a0ac8a39f7119b099a450726837.png\"\/><\/p>\n<div><figcaption>\u0423\u0436\u0435 \u0434\u0432\u0430 \u043a\u043b\u044e\u0447\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c JSON \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u043e\u0442\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8d0\/4eb\/ad0\/8d04ebad06d75b76dea15281c6a42ae8.png\" alt=\"\u041a\u043b\u044e\u0447 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u044b\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u043d\u0430 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\" title=\"\u041a\u043b\u044e\u0447 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u044b\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u043d\u0430 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\" width=\"1458\" height=\"648\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8d0\/4eb\/ad0\/8d04ebad06d75b76dea15281c6a42ae8.png\"\/><\/p>\n<div><figcaption>\u041a\u043b\u044e\u0447 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u044b\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u043d\u0430 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043a\u0430\u043a \u0431\u043e\u0442 \u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438:<\/p>\n<pre><code class=\"python\">{     \"user_name\": \"\u0410\u043d\u0434\u0440\u0435\u0439\",     \"user_age\": \"45\",     \"user_habits\": \"\u043a\u043e\u0444\u0435\",     \"user_interests\": \"\u0433\u043e\u0440\u044b, \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u044b, \u043c\u043e\u0440\u0435, \u043f\u0440\u043e\u0431\u0435\u0436\u043a\u0438 \u043f\u043e \u0443\u0442\u0440\u0430\u043c\" }<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b83\/d1c\/435\/b83d1c4351dd7863986882a7ed49f0d6.png\" alt=\"\u0411\u043e\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 \u0438\u0437 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438\" title=\"\u0411\u043e\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 \u0438\u0437 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438\" width=\"1482\" height=\"694\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b83\/d1c\/435\/b83d1c4351dd7863986882a7ed49f0d6.png\"\/><\/p>\n<div><figcaption>\u0411\u043e\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 \u0438\u0437 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u0438 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0438\u043b\u0438 \u043c\u043d\u0435 \u0432 <a href=\"https:\/\/t.me\/TAU15\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c<\/a>.<\/p>\n<h2>P.S.<\/h2>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0443\u0436\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 (<a href=\"https:\/\/habr.com\/ru\/articles\/791916\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/articles\/791916\/<\/a>), \u043d\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0418\u0418 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/821973\/\"> https:\/\/habr.com\/ru\/articles\/821973\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u041a\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0435\u0448\u0430\u0435\u043c?<\/h2>\n<p>\u041b\u044e\u0431\u043e\u0439 GPT-\u0431\u043e\u0442 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043b\u044e\u0431\u043e\u0439 LLM (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 ChatGPT) \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0430\u043c \u0438 <strong><em>\u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/em><\/strong> \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u0438\u0430\u043b\u043e\u0433\u0430.<\/p>\n<h2>\u0428\u0430\u0433\u21161: \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h2>\n<pre><code class=\"python\">{      \"name\": \"ai_memory_v3\",      \"description\": \"Call this function when you need to make adjustments to JSON memory.\",      \"parameters\": {        \"type\": \"object\",        \"properties\": {          \"key\": {            \"type\": \"string\",            \"description\": \"New or existing key from JSON memory\",          },         \"value\": {            \"type\": \"string\",            \"description\": \"Text to be written by the specified key\",          },         \"action\": {             \"type\": \"string\",             \"enum\": [\"+\", '-', '.', '_'],             \"description\": \"Action type. `+` - means adding information to memory. `-` - means deleting information from memory. `.` - means changing information in memory. `_` - means clear all memory\",         },       },        \"required\": [\"key\", \"value\", \"action\"],      },  }, <\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>&#171;key&#187; &#8212; \u041d\u043e\u0432\u044b\u0439 \u0438\u043b\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u044e\u0447 \u0438\u0437 JSON \u043f\u0430\u043c\u044f\u0442\u0438. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a \u043a\u0430\u043a\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>&#171;value&#187; &#8212; \u0422\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>&#171;action&#187; &#8212; \u0422\u0438\u043f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0&#8212; <code>+<\/code>\u00a0&#8212; \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c.<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0&#8212; <code>-<\/code>\u00a0&#8212; \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438.<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0&#8212; <code>.<\/code>\u00a0&#8212; \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0&#8212; <code>_<\/code>\u00a0&#8212; \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0432\u0441\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.  <\/p>\n<\/li>\n<\/ul>\n<h2>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/h2>\n<pre><code class=\"python\">from flask import Flask, request, json import os import logging  # \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u0433\u0435\u0440\u0430 logger = logging.getLogger(__name__) config.ROOT_PATH = '\/path\/to\/your\/application\/'  # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e  # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Flask app = Flask(__name__)  # \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c @app.route('\/write_memory_dict', methods=['POST']) def write_memory_dict():     # \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON     data = GetJsonFromRequest(request)     # \u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430     logger.debug(f\"[\/write_memory_dict] {data}\")     # \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     Res = '\u041f\u043e\u043a\u0430\u0436\u0438 \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.n'     # \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439     if data['action'] == '_':         try:             # \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u0430\u043c\u044f\u0442\u0438             os.remove(config.ROOT_PATH + 'json_memory\/' + data['chat_id'])         except Exception as e:             # \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d, \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435             logger.warning(f\"File not found {data['chat_id']}\")         # \u041e\u0442\u0432\u0435\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0430\u043c\u044f\u0442\u044c \u043e\u0447\u0438\u0449\u0435\u043d\u0430         Res = '\u041f\u0430\u043c\u044f\u0442\u044c \u043e\u0447\u0438\u0449\u0435\u043d\u0430.n'     else:         # \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 chat_id         filename = data['chat_id']         memory_json = {}         if filename is not None:             # \u0427\u0442\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u0430\u043c\u044f\u0442\u0438             memory_json = read_file(config.ROOT_PATH + 'json_memory\/' + filename)             try:                 # \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0432 JSON                 memory_json = json.loads(memory_json)             except:                 # \u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0442                 memory_json = {}         # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c         if data['action'] == '+' and data['key'] not in memory_json:             memory_json[data['key']] = data['value']             Res = '\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.n'         if data['action'] == '+' and data['key'] in memory_json:             memory_json[data['key']] += ', ' + data['value']             Res = '\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.\\n'         # \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438         if data['action'] == '-' and data['key'] in memory_json:             memory_json.pop(data['key'])             Res = '\u0414\u0430\u043d\u043d\u044b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0438\u0437 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.n'         # \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438         if data['action'] == '.' and data['key'] in memory_json:             memory_json[data['key']] = data['value']             Res = '\u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b.n'         # \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b         if filename is not None and memory_json is not {}:             with open(config.ROOT_PATH + 'json_memory\/' + filename, 'w', encoding='utf-8') as f:                 json.dump(memory_json, f, ensure_ascii=False, indent=4)             # \u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f             logger.info(f\"\/write memory_json OK {filename}, {memory_json}\")                 Res += '\u0414\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.n'     # \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443     return json.dumps(Res), 200  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0433\u0434\u0435-\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 def read_file(file_path):     # \u0422\u0443\u0442 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u0430\u0448\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430     pass  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f JSON \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0433\u0434\u0435-\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 def GetJsonFromRequest(req):     # \u0422\u0443\u0442 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u0430\u0448\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f JSON \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430     pass  # \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e if __name__ == '__main__':     app.run()<\/code><\/pre>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u043e\u0442\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438<\/h2>\n<figure class=\"full-width\">\n<div><figcaption>\u0411\u043e\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 ProTalk<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a \u0431\u043e\u0442\u0443<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"markdown\">\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435: \u041f\u0440\u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 \u0432 \u0442\u0432\u043e\u0435\u0439 JSON \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043c\u0435\u043d\u044f\u0439 \u0441\u0432\u043e\u0439 \u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u044d\u0442\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c. \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e: \u0412 \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435: \u0438\u043c\u044f, \u043f\u043e\u043b, \u0432\u043e\u0437\u0440\u0430\u0441\u0442, \u043f\u0440\u0438\u0432\u044b\u0447\u043a\u0438, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u044b, \u0443\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f.<\/code><\/pre>\n<h2>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u043e\u0442\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0430\u043c\u044f\u0442\u0438<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0438\u043c\u044f \u0431\u043e\u0442\u0443:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041d\u0430\u0447\u0430\u043b\u043e \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0431\u043e\u0442\u043e\u043c \u0441 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0438\u043c\u044f \u043f\u043e\u043f\u0430\u043b\u043e \u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0432\u043e\u0437\u0440\u0430\u0441\u0442:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0423\u0436\u0435 \u0434\u0432\u0430 \u043a\u043b\u044e\u0447\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c JSON \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u043e\u0442\u0430:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041a\u043b\u044e\u0447 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u044b\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u043d\u0430 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043a\u0430\u043a \u0431\u043e\u0442 \u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438:<\/p>\n<pre><code class=\"python\">{     \"user_name\": \"\u0410\u043d\u0434\u0440\u0435\u0439\",     \"user_age\": \"45\",     \"user_habits\": \"\u043a\u043e\u0444\u0435\",     \"user_interests\": \"\u0433\u043e\u0440\u044b, \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u044b, \u043c\u043e\u0440\u0435, \u043f\u0440\u043e\u0431\u0435\u0436\u043a\u0438 \u043f\u043e \u0443\u0442\u0440\u0430\u043c\" }<\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption>\u0411\u043e\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 \u0438\u0437 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u0438 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0438\u043b\u0438 \u043c\u043d\u0435 \u0432 <a href=\"https:\/\/t.me\/TAU15\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c<\/a>.<\/p>\n<h2>P.S.<\/h2>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0443\u0436\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 (<a href=\"https:\/\/habr.com\/ru\/articles\/791916\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/articles\/791916\/<\/a>), \u043d\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0418\u0418 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/821973\/\"> https:\/\/habr.com\/ru\/articles\/821973\/<\/a><br \/><\/br><\/br><\/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-378943","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378943","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=378943"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378943\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=378943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=378943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=378943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}