{"id":456112,"date":"2025-04-15T09:00:14","date_gmt":"2025-04-15T09:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=456112"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=456112","title":{"rendered":"<span>\u041f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f: \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441\u044e\u0436\u0435\u0442<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u044f\u0445 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0441 \u043d\u0443\u043b\u044f \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0445\u0443\u0434\u043e-\u0431\u0435\u0434\u043d\u043e\u0439 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u043b\u043e \u043f\u0440\u0435\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e. \u0422\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043f\u0435\u0432\u0430\u0439 \u0434\u043e\u0445\u043e\u0434\u0447\u0438\u0432\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0445\u043e\u0442\u0435\u043b\u043a\u0438, \u0434\u0430 \u0432\u043e\u0432\u0440\u0435\u043c\u044f \u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e \u0440\u0443\u043a\u0430\u043c \u0431\u0435\u0437\u0434\u0443\u0448\u043d\u043e\u0439 LLM. \u041f\u043e\u0441\u0435\u043c\u0443 \u0434\u0435\u043b\u044e\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0432\u0430\u0439\u0431\u043a\u043e\u0434\u0438\u043d\u0433\u0430 \u2014 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0435\u0439 ai-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0435\u043a\u0441\u0442\u0430. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0445\u0443\u0434\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e.<\/p>\n<h4>\u041e\u0442\u043a\u0443\u0434\u0430 \u0440\u0430\u0441\u0442\u0443\u0442 \u043d\u043e\u0433\u0438.<\/h4>\n<p>\u0414\u0443\u043c\u0430\u044e, \u043c\u043d\u043e\u0433\u0438\u0435, \u043a\u0442\u043e \u043e\u043a\u0443\u043d\u0430\u0435\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u0435, \u0445\u043e\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u043f\u043e\u0440\u043e\u044e \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u0445\u0438\u0442\u0440\u043e\u0441\u043f\u043b\u0435\u0442\u0435\u043d\u0438\u044f\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0433\u0435\u0440\u043e\u0435\u0432, \u043f\u0440\u0438\u0447\u0438\u043d \u0438\u0445 \u043f\u043e\u0441\u0442\u0443\u043f\u043a\u043e\u0432 \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u0435\u0449\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0447\u0438\u043a\u043e\u0432, \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u0435 \u0432 \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0438\u043c\u0435\u0435\u0442 \u043c\u0435\u0441\u0442\u043e \u0440\u0435\u0432\u0435\u0440\u0441\u0438\u0432\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f, \u0438\u043b\u0438 \u043b\u0438\u043d\u0438\u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e. \u0423 \u0445\u0438\u0442\u0440\u043e\u0433\u043e-\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044f \u0432\u0441\u0435 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u043e \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434 \u0433\u043b\u0430\u0437\u0430\u043c\u0438. \u041a\u0442\u043e \u0435\u0441\u0442\u044c \u043a\u0442\u043e, \u0447\u0442\u043e \u0443 \u043a\u043e\u0433\u043e \u043d\u0430 \u0443\u043c\u0435, \u0433\u0434\u0435 \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430 \u0438 \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442 \u0440\u0443\u0436\u044c\u0435. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043e\u043a\u043e\u043f\u0430\u043b \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u0441\u0432\u043e\u0435\u0439 \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0438, \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u00ab\u0411\u0435\u0441\u043e\u0432\u00bb \u0414\u043e\u0441\u0442\u043e\u0435\u0432\u0441\u043a\u043e\u0433\u043e:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ed\/4c9\/41f\/8ed4c941fd2f1f3988cb9ac5dee4b402.jpg\" alt=\"\u0425\u0438\u0442\u0440\u043e\u0441\u043f\u043b\u0435\u0442\u0435\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0433\u0435\u0440\u043e\u0435\u0432\" title=\"\u0425\u0438\u0442\u0440\u043e\u0441\u043f\u043b\u0435\u0442\u0435\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0433\u0435\u0440\u043e\u0435\u0432\" width=\"1080\" height=\"1920\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/8ed\/4c9\/41f\/8ed4c941fd2f1f3988cb9ac5dee4b402.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ed\/4c9\/41f\/8ed4c941fd2f1f3988cb9ac5dee4b402.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0425\u0438\u0442\u0440\u043e\u0441\u043f\u043b\u0435\u0442\u0435\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0433\u0435\u0440\u043e\u0435\u0432<\/figcaption><\/div>\n<\/figure>\n<div class=\"floating-image\">\n<p>\u0410 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043e\u043a\u0438\u043d\u0443\u0442\u044c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0441 \u043f\u0440\u0438\u0441\u043a\u043e\u0440\u0431\u0438\u0435\u043c \u043e\u0441\u043e\u0437\u043d\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0435\u0432 \u0438 \u0441\u043c\u044b\u0441\u043b\u043e\u0432 \u0443\u0441\u043a\u043e\u043b\u044c\u0437\u043d\u0443\u043b\u043e \u043e\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f.<\/p>\n<\/div>\n<h4>\u0427\u0438\u0442\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438<\/h4>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u044f \u0432\u043e\u043b\u0435\u0439 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432 \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0441\u044f \u043d\u0430 YandexGPT, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM \u042f\u043d\u0434\u0435\u043a\u0441\u0430. <\/p>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0432 <code>langchain_community<\/code> \u043a\u043b\u0430\u0441\u0441 <code>YandexGPTEmbeddings <\/code>\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 \u043b\u0438\u043c\u0438\u0442\u0435\u0440, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u0435 \u0437\u0430\u0441\u043f\u0430\u043c\u0438\u0442\u044c API, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u0435\u0441\u044f\u0442\u044c\u044e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 (\u043e\u043f\u0443\u0441\u043a\u0430\u044e \u0434\u0435\u0442\u0430\u043b\u0438, \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 <a href=\"https:\/\/github.com\/prozoroff\/reader_assistant\/blob\/main\/src\/core\/embeddings.py\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>):<\/p>\n<pre><code class=\"python\">from tenacity import (     retry,     stop_after_attempt,     wait_exponential,     retry_if_exception_type ) from pydantic import Field, ConfigDict, BaseModel from langchain_community.embeddings.yandex import YandexGPTEmbeddings # ...  class RateLimitedEmbeddings(YandexGPTEmbeddings):     # ...     @retry(         retry=retry_if_exception_type(Exception),         stop=stop_after_attempt(3),         wait=wait_exponential(multiplier=1, min=2, max=10)     )     def _embed_batch(self, batch: List[str]) -&gt; List[List[float]]:         time.sleep(0.1)         return super().embed_documents(batch)      def embed_documents(self, texts: List[str]) -&gt; List[List[float]]:         # ...         result = []                      for i in range(0, len(texts), self.batch_size):             batch = texts[i:i + self.batch_size]             # ...             batch_result = self._embed_batch(batch)             result.extend(batch_result)                          if i + self.batch_size &lt; len(texts):             time.sleep(self.delay_between_batches)                      return result<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u0435\u043b\u0430\u0435\u043c <a href=\"https:\/\/github.com\/prozoroff\/reader_assistant\/blob\/main\/src\/core\/qa_system.py\" rel=\"noopener noreferrer nofollow\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435<\/a>:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c TextLoader \u0447\u0438\u0442\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u0438\u043a \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>RecursiveCharacterTextSplitter<\/code> \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <code>chunk_size<\/code> \u0438 <code>chunk_overlap<\/code> (\u0437\u0434\u0435\u0441\u044c 1000 \u0438 100 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e).  <\/p>\n<\/li>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435 <code>RateLimitedEmbeddings<\/code>, \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 FAISS.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u044f\u0437\u044b\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c YandexGPT (\u0437\u0434\u0435\u0441\u044c <code>yandexgpt-32k<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>RetrievalQA<\/code> \u0434\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430.<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">from langchain.document_loaders import TextLoader from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain.vectorstores import FAISS from langchain.chains import RetrievalQA from langchain_community.llms import YandexGPT # ...  loader = TextLoader(file_path, encoding=\"utf-8\") documents = loader.load()          text_splitter = RecursiveCharacterTextSplitter(     chunk_size=config.chunk_size,     chunk_overlap=config.chunk_overlap ) texts = text_splitter.split_documents(documents)  embeddings = RateLimitedEmbeddings()  vectorstore = FAISS.from_documents(texts, embeddings)          llm = YandexGPT(     api_key=config.api_key,     folder_id=config.folder_id,     model_uri=config.model_uri )  qa = RetrievalQA.from_chain_type(     llm=llm,     chain_type=\"map_reduce\",     retriever=vectorstore.as_retriever(search_kwargs={\"k\": config.search_k}),     return_source_documents=False )<\/code><\/pre>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443. \u041d\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0430\u0436\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435. <\/p>\n<h4>\u0413\u0440\u0430\u0444 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430\u043c\u0438<\/h4>\n<div class=\"floating-image\">\n<p>\u041f\u0440\u043e\u043c\u043f\u0442-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0438\u044f, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e. \u0421 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432\u0441\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u0441\u0445\u043e\u0434\u0443 \u043d\u0430 \u043c\u0430\u0433\u0438\u044e, \u043d\u043e \u0432\u0441\u0435 \u0436\u0435. \u0412 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e:<\/p>\n<\/div>\n<pre><code class=\"python\">qa(\"\"\" \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c \u0441\u0432\u044f\u0437\u044c \u0432\u0441\u0435\u0445 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0433\u0435\u0440\u043e\u0435\u0432 \u043a\u043d\u0438\u0433\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442:  {  \"name\": \"\u0438\u043c\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f\",  \"links\": {  \"\u0438\u043c\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f\": \"\u0442\u0438\u043f \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438\",  ...  }  }  \u0422\u0438\u043f \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u043e\u0442\u0435\u0446, \u0441\u0435\u0441\u0442\u0440\u0430, \u0434\u0440\u0443\u0433, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439, c\u0443\u043f\u0440\u0443\u0433 \u0438 \u0442.\u043f. \"\"\")<\/code><\/pre>\n<div class=\"floating-image\">\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 JSON, \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0427\u0435\u0445\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0418\u043e\u043d\u044b\u0447\u0430:<\/p>\n<\/div>\n<pre><code class=\"json\">[    {       \"name\":\"\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0421\u0442\u0430\u0440\u0446\u0435\u0432 (\u0418\u043e\u043d\u044b\u0447)\",       \"links\":{          \"\u0418\u0432\u0430\u043d \u041f\u0435\u0442\u0440\u043e\u0432\u0438\u0447 \u0422\u0443\u0440\u043a\u0438\u043d\":\"\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439\",          \"\u0412\u0435\u0440\u0430 \u0418\u043e\u0441\u0438\u0444\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\":\"\u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043a\u0430\",          \"\u0415\u043a\u0430\u0442\u0435\u0440\u0438\u043d\u0430 \u0418\u0432\u0430\u043d\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430 (\u041a\u043e\u0442\u0438\u043a)\":\"\u043e\u0431\u044a\u0435\u043a\u0442 \u043b\u044e\u0431\u0432\u0438\"       }    },    {       \"name\":\"\u0418\u0432\u0430\u043d \u041f\u0435\u0442\u0440\u043e\u0432\u0438\u0447 \u0422\u0443\u0440\u043a\u0438\u043d\",       \"links\":{          \"\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0421\u0442\u0430\u0440\u0446\u0435\u0432\":\"\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439\",          \"\u0412\u0435\u0440\u0430 \u0418\u043e\u0441\u0438\u0444\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\":\"\u0436\u0435\u043d\u0430\",          \"\u0415\u043a\u0430\u0442\u0435\u0440\u0438\u043d\u0430 \u0418\u0432\u0430\u043d\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\":\"\u0434\u043e\u0447\u044c\"       }    },    {       \"name\":\"\u0412\u0435\u0440\u0430 \u0418\u043e\u0441\u0438\u0444\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\",       \"links\":{          \"\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0421\u0442\u0430\u0440\u0446\u0435\u0432\":\"\u043f\u0430\u0446\u0438\u0435\u043d\u0442\",          \"\u0418\u0432\u0430\u043d \u041f\u0435\u0442\u0440\u043e\u0432\u0438\u0447 \u0422\u0443\u0440\u043a\u0438\u043d\":\"\u043c\u0443\u0436\",          \"\u0415\u043a\u0430\u0442\u0435\u0440\u0438\u043d\u0430 \u0418\u0432\u0430\u043d\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\":\"\u0434\u043e\u0447\u044c\"       }    },    {       \"name\":\"\u0415\u043a\u0430\u0442\u0435\u0440\u0438\u043d\u0430 \u0418\u0432\u0430\u043d\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430 (\u041a\u043e\u0442\u0438\u043a)\",       \"links\":{          \"\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0421\u0442\u0430\u0440\u0446\u0435\u0432\":\"\u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0438\",          \"\u0418\u0432\u0430\u043d \u041f\u0435\u0442\u0440\u043e\u0432\u0438\u0447 \u0422\u0443\u0440\u043a\u0438\u043d\":\"\u043e\u0442\u0435\u0446\",          \"\u0412\u0435\u0440\u0430 \u0418\u043e\u0441\u0438\u0444\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\":\"\u043c\u0430\u0442\u044c\"       }    } ]<\/code><\/pre>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0435\u0448\u0435\u0432\u043e \u0438 \u0441\u0435\u0440\u0434\u0438\u0442\u043e, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e matplotlib \u0438 networkx (\u0432\u0435\u0441\u044c \u043a\u043e\u0434, \u043e\u043f\u044f\u0442\u044c \u0436\u0435, <a href=\"https:\/\/github.com\/prozoroff\/reader_assistant\/blob\/main\/src\/agents\/visualization_agent.py\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>):<\/p>\n<pre><code class=\"python\">import networkx as nx import matplotlib.pyplot as plt # ...  G = nx.Graph()              for character in data:     name = character[\"name\"]     G.add_node(name)     for linked_character, relation in character[\"links\"].items():         G.add_edge(name, linked_character, relation=relation)  pos = nx.spring_layout(G) nx.draw(     G, pos,     with_labels=True,     node_color=self.config.graph.node_color,     node_size=self.config.graph.node_size,     font_size=self.config.graph.font_size )  edge_labels = nx.get_edge_attributes(G, \"relation\") nx.draw_networkx_edge_labels(     G, pos,     edge_labels=edge_labels,     font_size=self.config.graph.edge_font_size )              plt.title(self.config.graph.title) plt.axis(\"off\") plt.show()<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u00ab\u0411\u0435\u0441\u043e\u0432\u00bb \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0435\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0433\u0440\u0430\u0444 \u0434\u043b\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0433\u0435\u0440\u043e\u0435\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e59\/ceb\/482\/e59ceb48207a57931ffeee84b71cc849.png\" alt=\"\u0413\u0440\u0430\u0444 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430\u043c\u0438\" title=\"\u0413\u0440\u0430\u0444 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430\u043c\u0438\" width=\"2264\" height=\"1502\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e59\/ceb\/482\/e59ceb48207a57931ffeee84b71cc849.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e59\/ceb\/482\/e59ceb48207a57931ffeee84b71cc849.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0413\u0440\u0430\u0444 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430\u043c\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0433\u0435\u0440\u043e\u044f\u043c\u0438, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0435\u0439. \u0414\u043b\u044f \u0433\u043b\u0430\u0432\u044b \u0411\u044d\u043b\u0430 \u0438\u0437 \u00ab\u0413\u0435\u0440\u043e\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438\u00bb \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043f\u0435\u043d\u0442\u0430\u0433\u0440\u0430\u043c\u043c\u0430:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fd3\/b26\/198\/fd3b261986050d4fbe99e75b6bcf19ef.png\" alt=\"\u0413\u0440\u0430\u0444 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430\u043c\u0438\" title=\"\u0413\u0440\u0430\u0444 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430\u043c\u0438\" width=\"1838\" height=\"1264\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/fd3\/b26\/198\/fd3b261986050d4fbe99e75b6bcf19ef.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fd3\/b26\/198\/fd3b261986050d4fbe99e75b6bcf19ef.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0413\u0440\u0430\u0444 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430\u043c\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u0435\u043d \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0438. \u0422\u0435 \u0436\u0435 \u00ab\u0411\u0435\u0441\u044b\u00bb \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 700k \u0442\u043e\u043a\u0435\u043d\u043e\u0432. \u0422\u0430\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043e\u0431\u044a\u044f\u0442\u044c \u043b\u0438\u0448\u044c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<h4>\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 <\/h4>\n<p>\u0414\u0432\u0438\u0436\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u043a\u043d\u0438\u0433\u0435. \u0417\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"python\">qa(\"\"\" \u0421\u043e\u0441\u0442\u0430\u0432\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u043a\u043d\u0438\u0433\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON: [     {         \"date\": \"\u0414\u0430\u0442\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438 \u0432 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u0438\",         \"event\": \"\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e \u0440\u0443\u0441\u0441\u043a\u0438\"     } ] \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 10 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438 \"\"\")<\/code><\/pre>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<pre><code class=\"python\">for event in data:     event['date'] = datetime.datetime.strptime(event['date'], '%d %B %y')  data.sort(key=lambda x: x['date'])  dates = [event['date'] for event in data] events = [event['event'] for event in data]  fig, ax = plt.subplots(figsize=self.config.timeline.figsize) ax.plot(     [1] * len(dates), dates,     marker='o',     color=self.config.timeline.marker_color,     linestyle=self.config.timeline.linestyle )  for i, event in enumerate(events):     ax.annotate(         event,         (1, dates[i]),         xytext=(10, 0),         textcoords='offset points',         ha='left',         va='center',         fontsize=self.config.timeline.fontsize     )  ax.yaxis.set_major_formatter(DateFormatter('%d %b %Y')) #...  plt.show()<\/code><\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u0434\u043d\u0435\u0432\u043d\u0438\u043a\u0430 \u0434\u043e\u043a\u0442\u043e\u0440\u0430 \u0411\u043e\u0440\u043c\u0435\u043d\u0442\u0430\u043b\u044f \u0438\u0437 \u0411\u0443\u043b\u0433\u0430\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u00ab\u0421\u043e\u0431\u0430\u0447\u044c\u0435\u0433\u043e \u0441\u0435\u0440\u0434\u0446\u0430\u00bb:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/69a\/f9c\/0f5\/69af9c0f5ab6fd53cd2dcc29e3734d9e.png\" alt=\"\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u0434\u043d\u0435\u0432\u043d\u0438\u043a\u0430\" title=\"\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u0434\u043d\u0435\u0432\u043d\u0438\u043a\u0430\" width=\"1378\" height=\"1490\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/69a\/f9c\/0f5\/69af9c0f5ab6fd53cd2dcc29e3734d9e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/69a\/f9c\/0f5\/69af9c0f5ab6fd53cd2dcc29e3734d9e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u0434\u043d\u0435\u0432\u043d\u0438\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u0434\u043d\u0435\u0432\u043d\u0438\u043a\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u0422\u044f\u0436\u0435\u043b\u0435\u0435 \u043e\u0431\u0441\u0442\u043e\u0438\u0442 \u0434\u0435\u043b\u043e \u0441 \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u043e \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0434\u0430\u0442\u0430\u043c\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0436\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438 \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u043a\u0438. \u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u0427\u0435\u0445\u043e\u0432\u0441\u043a\u0438\u0439 \u00ab\u041e\u0441\u0442\u0440\u043e\u0432 \u0421\u0430\u0445\u0430\u043b\u0438\u043d\u00bb. \u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u0441 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0447\u0438\u043a\u043e\u043c, \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0442\u0430\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f64\/e47\/366\/f64e4736660e74ec496836f1dd6273d5.png\" alt=\"\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u0441 \u0427\u0435\u0445\u043e\u0432\u044b\u043c\" title=\"\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u0441 \u0427\u0435\u0445\u043e\u0432\u044b\u043c\" width=\"1474\" height=\"578\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f64\/e47\/366\/f64e4736660e74ec496836f1dd6273d5.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f64\/e47\/366\/f64e4736660e74ec496836f1dd6273d5.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u0441 \u0427\u0435\u0445\u043e\u0432\u044b\u043c<\/figcaption><\/div>\n<\/figure>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u043e\u043b \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0432 \u043a\u043d\u0438\u0433\u0435, \u0442\u043e \u0438\u043d\u0430\u044f:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/238\/3e9\/55b\/2383e955b67756ba106a6be2b10ffbff.png\" alt=\"\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0432 \u043a\u043d\u0438\u0433\u0435\" title=\"\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0432 \u043a\u043d\u0438\u0433\u0435\" width=\"1474\" height=\"562\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/238\/3e9\/55b\/2383e955b67756ba106a6be2b10ffbff.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/238\/3e9\/55b\/2383e955b67756ba106a6be2b10ffbff.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0432 \u043a\u043d\u0438\u0433\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0442\u043e \u043f\u043e\u0441\u043f\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0432\u0438\u0437\u0438\u0442 \u0410\u043d\u0442\u043e\u043d\u0430 \u041f\u0430\u043b\u044b\u0447\u0430 \u043d\u0430 \u0421\u0430\u0445\u0430\u043b\u0438\u043d \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043a \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b\u043c \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c.<\/p>\n<h4>\u041a\u0430\u0440\u0442\u0430 \u043c\u0435\u0441\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f <\/h4>\n<p>\u0418 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u043c\u0435\u043d\u0435\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043a\u043d\u0438\u0433\u0438. \u0417\u0434\u0435\u0441\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u043e\u0439 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u0442\u0430\u043f \u0433\u0435\u043e\u043a\u043e\u0434\u0438\u043d\u0433\u0430. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u043e\u043f\u043e\u043d\u0438\u043c\u0430\u043c. <\/p>\n<p>\u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u043e\u0441\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0441\u0442:<\/p>\n<pre><code class=\"python\">qa(\"\"\"   \u0412\u044b\u0432\u0435\u0434\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e. \"\"\")<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b:<\/p>\n<pre><code class=\"python\">from yandex_geocoder import Client # ...  locator = Client(YANDEX_GEOCODER_API_KEY)  locations = text.split(', ') result = []  for loc in set(locations):     # ...     coords = locator.coordinates(loc)     if coords:         result.append({\"name\": loc, \"coordinates\": [str(c) for c in coords]})<\/code><\/pre>\n<p>\u0418 \u0443\u0436\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u043b\u0430\u0434\u0435\u043c \u0438\u0445 \u043d\u0430 \u043a\u0430\u0440\u0442\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>cartopy<\/code>, <\/p>\n<pre><code class=\"python\">import cartopy.crs as ccrs import cartopy.feature as cfeature # ...  longitudes = [float(coord[0]) for coord in [d['coordinates'] for d in data]] latitudes = [float(coord[1]) for coord in [d['coordinates'] for d in data]] names = [d['name'] for d in data] # ...  fig, ax = plt.subplots(     figsize=self.config.map.figsize,     subplot_kw={'projection': ccrs.PlateCarree()} )  ax.add_feature(cfeature.LAND) ax.add_feature(cfeature.OCEAN) ax.add_feature(cfeature.COASTLINE, linewidth=0.3) ax.add_feature(cfeature.BORDERS, linestyle=':', linewidth=0.3) ax.add_feature(cfeature.LAKES, alpha=0.5) ax.add_feature(cfeature.RIVERS)  for lon, lat, name in zip(longitudes, latitudes, names):     ax.plot(           lon, lat,           marker='o',           color=self.config.map.marker_color,           markersize=self.config.map.marker_size,           transform=ccrs.PlateCarree()     ) # ...      plt.show()<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u00ab\u0412\u043e\u043a\u0440\u0443\u0433 \u0441\u0432\u0435\u0442\u0430 \u0437\u0430 80 \u0434\u043d\u0435\u0439\u00bb:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e99\/e41\/290\/e99e4129025b83dcee818b64bf5561e1.png\" alt=\"\u041a\u0430\u0440\u0442\u0430 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u044f \u0433\u0435\u0440\u043e\u0435\u0432 \u043a\u043d\u0438\u0433\u0438\" title=\"\u041a\u0430\u0440\u0442\u0430 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u044f \u0433\u0435\u0440\u043e\u0435\u0432 \u043a\u043d\u0438\u0433\u0438\" width=\"1850\" height=\"812\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e99\/e41\/290\/e99e4129025b83dcee818b64bf5561e1.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e99\/e41\/290\/e99e4129025b83dcee818b64bf5561e1.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041a\u0430\u0440\u0442\u0430 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u044f \u0433\u0435\u0440\u043e\u0435\u0432 \u043a\u043d\u0438\u0433\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0418 \u0447\u0442\u043e-\u0442\u043e \u043c\u0435\u043d\u0435\u0435 \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u00ab\u041d\u0430 \u0417\u0430\u043f\u0430\u0434\u043d\u043e\u043c \u0444\u0440\u043e\u043d\u0442\u0435 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u00bb:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f9d\/545\/4dc\/f9d5454dce868e245fc93efa4e301d85.png\" alt=\"\u041a\u0430\u0440\u0442\u0430 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0435\u0441\u0442, \u0443\u043c\u043e\u043c\u0438\u043d\u0430\u0435\u043c\u044b\u0445 \u0432 \u043a\u043d\u0438\u0433\u0435\" title=\"\u041a\u0430\u0440\u0442\u0430 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0435\u0441\u0442, \u0443\u043c\u043e\u043c\u0438\u043d\u0430\u0435\u043c\u044b\u0445 \u0432 \u043a\u043d\u0438\u0433\u0435\" width=\"1554\" height=\"964\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f9d\/545\/4dc\/f9d5454dce868e245fc93efa4e301d85.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f9d\/545\/4dc\/f9d5454dce868e245fc93efa4e301d85.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041a\u0430\u0440\u0442\u0430 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0435\u0441\u0442, \u0443\u043c\u043e\u043c\u0438\u043d\u0430\u0435\u043c\u044b\u0445 \u0432 \u043a\u043d\u0438\u0433\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u0432\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u043e\u0434\u0435\u043b\u0438. \u0421 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u043e\u0440\u043e\u044e \u0441\u043b\u043e\u0436\u043d\u043e. \u041d\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0443\u0436\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0438\u0445 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0441 \u0442\u0440\u0443\u0434\u043e\u043c \u0432\u043b\u0435\u0437\u0430\u0435\u0442 \u0434\u0430\u0436\u0435 \u043c\u0430\u043b\u0430\u044f \u043f\u0440\u043e\u0437\u0430. \u0410 \u0432\u043e\u0442 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 SOTA \u043c\u043e\u0434\u0435\u043b\u0438, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043f\u043e API, \u0432\u044b\u0434\u0430\u044e\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0443\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441. \u0411\u0435\u0437 \u0442\u0440\u0443\u0434\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u0441\u0442\u0440\u043e\u0439\u043d\u044b\u0439 JSON \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0440\u043e\u043c\u043f\u0442\u043e\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, \u0438 \u043d\u0435 \u043e\u0448\u0438\u0431\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u043c\u044b\u0441\u043b\u043e\u0432\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435.<\/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\/900870\/\"> https:\/\/habr.com\/ru\/articles\/900870\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u044f\u0445 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0441 \u043d\u0443\u043b\u044f \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0445\u0443\u0434\u043e-\u0431\u0435\u0434\u043d\u043e\u0439 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u043b\u043e \u043f\u0440\u0435\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e. \u0422\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043f\u0435\u0432\u0430\u0439 \u0434\u043e\u0445\u043e\u0434\u0447\u0438\u0432\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0445\u043e\u0442\u0435\u043b\u043a\u0438, \u0434\u0430 \u0432\u043e\u0432\u0440\u0435\u043c\u044f \u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e \u0440\u0443\u043a\u0430\u043c \u0431\u0435\u0437\u0434\u0443\u0448\u043d\u043e\u0439 LLM. \u041f\u043e\u0441\u0435\u043c\u0443 \u0434\u0435\u043b\u044e\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0432\u0430\u0439\u0431\u043a\u043e\u0434\u0438\u043d\u0433\u0430 \u2014 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0435\u0439 ai-\u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u0435\u043a\u0441\u0442\u0430. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0445\u0443\u0434\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e.<\/p>\n<h4>\u041e\u0442\u043a\u0443\u0434\u0430 \u0440\u0430\u0441\u0442\u0443\u0442 \u043d\u043e\u0433\u0438.<\/h4>\n<p>\u0414\u0443\u043c\u0430\u044e, \u043c\u043d\u043e\u0433\u0438\u0435, \u043a\u0442\u043e \u043e\u043a\u0443\u043d\u0430\u0435\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u0435, \u0445\u043e\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u043f\u043e\u0440\u043e\u044e \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u0445\u0438\u0442\u0440\u043e\u0441\u043f\u043b\u0435\u0442\u0435\u043d\u0438\u044f\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0433\u0435\u0440\u043e\u0435\u0432, \u043f\u0440\u0438\u0447\u0438\u043d \u0438\u0445 \u043f\u043e\u0441\u0442\u0443\u043f\u043a\u043e\u0432 \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u0435\u0449\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0447\u0438\u043a\u043e\u0432, \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u0435 \u0432 \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0438\u043c\u0435\u0435\u0442 \u043c\u0435\u0441\u0442\u043e \u0440\u0435\u0432\u0435\u0440\u0441\u0438\u0432\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f, \u0438\u043b\u0438 \u043b\u0438\u043d\u0438\u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e. \u0423 \u0445\u0438\u0442\u0440\u043e\u0433\u043e-\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044f \u0432\u0441\u0435 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u043e \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434 \u0433\u043b\u0430\u0437\u0430\u043c\u0438. \u041a\u0442\u043e \u0435\u0441\u0442\u044c \u043a\u0442\u043e, \u0447\u0442\u043e \u0443 \u043a\u043e\u0433\u043e \u043d\u0430 \u0443\u043c\u0435, \u0433\u0434\u0435 \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430 \u0438 \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442 \u0440\u0443\u0436\u044c\u0435. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043e\u043a\u043e\u043f\u0430\u043b \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u0441\u0432\u043e\u0435\u0439 \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0438, \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u00ab\u0411\u0435\u0441\u043e\u0432\u00bb \u0414\u043e\u0441\u0442\u043e\u0435\u0432\u0441\u043a\u043e\u0433\u043e:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0425\u0438\u0442\u0440\u043e\u0441\u043f\u043b\u0435\u0442\u0435\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0433\u0435\u0440\u043e\u0435\u0432<\/figcaption><\/div>\n<\/figure>\n<div class=\"floating-image\">\n<p>\u0410 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043e\u043a\u0438\u043d\u0443\u0442\u044c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0441 \u043f\u0440\u0438\u0441\u043a\u043e\u0440\u0431\u0438\u0435\u043c \u043e\u0441\u043e\u0437\u043d\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0435\u0432 \u0438 \u0441\u043c\u044b\u0441\u043b\u043e\u0432 \u0443\u0441\u043a\u043e\u043b\u044c\u0437\u043d\u0443\u043b\u043e \u043e\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f.<\/p>\n<\/div>\n<h4>\u0427\u0438\u0442\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438<\/h4>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u044f \u0432\u043e\u043b\u0435\u0439 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432 \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0441\u044f \u043d\u0430 YandexGPT, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM \u042f\u043d\u0434\u0435\u043a\u0441\u0430. <\/p>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0432 <code>langchain_community<\/code> \u043a\u043b\u0430\u0441\u0441 <code>YandexGPTEmbeddings <\/code>\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 \u043b\u0438\u043c\u0438\u0442\u0435\u0440, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u0435 \u0437\u0430\u0441\u043f\u0430\u043c\u0438\u0442\u044c API, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u0435\u0441\u044f\u0442\u044c\u044e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 (\u043e\u043f\u0443\u0441\u043a\u0430\u044e \u0434\u0435\u0442\u0430\u043b\u0438, \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 <a href=\"https:\/\/github.com\/prozoroff\/reader_assistant\/blob\/main\/src\/core\/embeddings.py\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>):<\/p>\n<pre><code class=\"python\">from tenacity import (     retry,     stop_after_attempt,     wait_exponential,     retry_if_exception_type ) from pydantic import Field, ConfigDict, BaseModel from langchain_community.embeddings.yandex import YandexGPTEmbeddings # ...  class RateLimitedEmbeddings(YandexGPTEmbeddings):     # ...     @retry(         retry=retry_if_exception_type(Exception),         stop=stop_after_attempt(3),         wait=wait_exponential(multiplier=1, min=2, max=10)     )     def _embed_batch(self, batch: List[str]) -&gt; List[List[float]]:         time.sleep(0.1)         return super().embed_documents(batch)      def embed_documents(self, texts: List[str]) -&gt; List[List[float]]:         # ...         result = []                      for i in range(0, len(texts), self.batch_size):             batch = texts[i:i + self.batch_size]             # ...             batch_result = self._embed_batch(batch)             result.extend(batch_result)                          if i + self.batch_size &lt; len(texts):             time.sleep(self.delay_between_batches)                      return result<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u0435\u043b\u0430\u0435\u043c <a href=\"https:\/\/github.com\/prozoroff\/reader_assistant\/blob\/main\/src\/core\/qa_system.py\" rel=\"noopener noreferrer nofollow\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435<\/a>:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c TextLoader \u0447\u0438\u0442\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u0438\u043a \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>RecursiveCharacterTextSplitter<\/code> \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 <code>chunk_size<\/code> \u0438 <code>chunk_overlap<\/code> (\u0437\u0434\u0435\u0441\u044c 1000 \u0438 100 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e).  <\/p>\n<\/li>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435 <code>RateLimitedEmbeddings<\/code>, \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 FAISS.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u044f\u0437\u044b\u043a\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c YandexGPT (\u0437\u0434\u0435\u0441\u044c <code>yandexgpt-32k<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>RetrievalQA<\/code> \u0434\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430.<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">from langchain.document_loaders import TextLoader from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain.vectorstores import FAISS from langchain.chains import RetrievalQA from langchain_community.llms import YandexGPT # ...  loader = TextLoader(file_path, encoding=\"utf-8\") documents = loader.load()          text_splitter = RecursiveCharacterTextSplitter(     chunk_size=config.chunk_size,     chunk_overlap=config.chunk_overlap ) texts = text_splitter.split_documents(documents)  embeddings = RateLimitedEmbeddings()  vectorstore = FAISS.from_documents(texts, embeddings)          llm = YandexGPT(     api_key=config.api_key,     folder_id=config.folder_id,     model_uri=config.model_uri )  qa = RetrievalQA.from_chain_type(     llm=llm,     chain_type=\"map_reduce\",     retriever=vectorstore.as_retriever(search_kwargs={\"k\": config.search_k}),     return_source_documents=False )<\/code><\/pre>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443. \u041d\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0430\u0436\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435. <\/p>\n<h4>\u0413\u0440\u0430\u0444 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430\u043c\u0438<\/h4>\n<div class=\"floating-image\">\n<p>\u041f\u0440\u043e\u043c\u043f\u0442-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0438\u044f, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e. \u0421 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432\u0441\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u0441\u0445\u043e\u0434\u0443 \u043d\u0430 \u043c\u0430\u0433\u0438\u044e, \u043d\u043e \u0432\u0441\u0435 \u0436\u0435. \u0412 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e:<\/p>\n<\/div>\n<pre><code class=\"python\">qa(\"\"\" \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c \u0441\u0432\u044f\u0437\u044c \u0432\u0441\u0435\u0445 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0433\u0435\u0440\u043e\u0435\u0432 \u043a\u043d\u0438\u0433\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442:  {  \"name\": \"\u0438\u043c\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f\",  \"links\": {  \"\u0438\u043c\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f\": \"\u0442\u0438\u043f \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438\",  ...  }  }  \u0422\u0438\u043f \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u043e\u0442\u0435\u0446, \u0441\u0435\u0441\u0442\u0440\u0430, \u0434\u0440\u0443\u0433, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439, c\u0443\u043f\u0440\u0443\u0433 \u0438 \u0442.\u043f. \"\"\")<\/code><\/pre>\n<div class=\"floating-image\">\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 JSON, \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0427\u0435\u0445\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0418\u043e\u043d\u044b\u0447\u0430:<\/p>\n<\/div>\n<pre><code class=\"json\">[    {       \"name\":\"\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0421\u0442\u0430\u0440\u0446\u0435\u0432 (\u0418\u043e\u043d\u044b\u0447)\",       \"links\":{          \"\u0418\u0432\u0430\u043d \u041f\u0435\u0442\u0440\u043e\u0432\u0438\u0447 \u0422\u0443\u0440\u043a\u0438\u043d\":\"\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439\",          \"\u0412\u0435\u0440\u0430 \u0418\u043e\u0441\u0438\u0444\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\":\"\u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043a\u0430\",          \"\u0415\u043a\u0430\u0442\u0435\u0440\u0438\u043d\u0430 \u0418\u0432\u0430\u043d\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430 (\u041a\u043e\u0442\u0438\u043a)\":\"\u043e\u0431\u044a\u0435\u043a\u0442 \u043b\u044e\u0431\u0432\u0438\"       }    },    {       \"name\":\"\u0418\u0432\u0430\u043d \u041f\u0435\u0442\u0440\u043e\u0432\u0438\u0447 \u0422\u0443\u0440\u043a\u0438\u043d\",       \"links\":{          \"\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0421\u0442\u0430\u0440\u0446\u0435\u0432\":\"\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439\",          \"\u0412\u0435\u0440\u0430 \u0418\u043e\u0441\u0438\u0444\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\":\"\u0436\u0435\u043d\u0430\",          \"\u0415\u043a\u0430\u0442\u0435\u0440\u0438\u043d\u0430 \u0418\u0432\u0430\u043d\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\":\"\u0434\u043e\u0447\u044c\"       }    },    {       \"name\":\"\u0412\u0435\u0440\u0430 \u0418\u043e\u0441\u0438\u0444\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\",       \"links\":{          \"\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0421\u0442\u0430\u0440\u0446\u0435\u0432\":\"\u043f\u0430\u0446\u0438\u0435\u043d\u0442\",          \"\u0418\u0432\u0430\u043d \u041f\u0435\u0442\u0440\u043e\u0432\u0438\u0447 \u0422\u0443\u0440\u043a\u0438\u043d\":\"\u043c\u0443\u0436\",          \"\u0415\u043a\u0430\u0442\u0435\u0440\u0438\u043d\u0430 \u0418\u0432\u0430\u043d\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\":\"\u0434\u043e\u0447\u044c\"       }    },    {       \"name\":\"\u0415\u043a\u0430\u0442\u0435\u0440\u0438\u043d\u0430 \u0418\u0432\u0430\u043d\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430 (\u041a\u043e\u0442\u0438\u043a)\",       \"links\":{          \"\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0421\u0442\u0430\u0440\u0446\u0435\u0432\":\"\u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0438\",          \"\u0418\u0432\u0430\u043d \u041f\u0435\u0442\u0440\u043e\u0432\u0438\u0447 \u0422\u0443\u0440\u043a\u0438\u043d\":\"\u043e\u0442\u0435\u0446\",          \"\u0412\u0435\u0440\u0430 \u0418\u043e\u0441\u0438\u0444\u043e\u0432\u043d\u0430 \u0422\u0443\u0440\u043a\u0438\u043d\u0430\":\"\u043c\u0430\u0442\u044c\"       }    } ]<\/code><\/pre>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0435\u0448\u0435\u0432\u043e \u0438 \u0441\u0435\u0440\u0434\u0438\u0442\u043e, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e matplotlib \u0438 networkx (\u0432\u0435\u0441\u044c \u043a\u043e\u0434, \u043e\u043f\u044f\u0442\u044c \u0436\u0435, <a href=\"https:\/\/github.com\/prozoroff\/reader_assistant\/blob\/main\/src\/agents\/visualization_agent.py\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>):<\/p>\n<pre><code class=\"python\">import networkx as nx import matplotlib.pyplot as plt # ...  G = nx.Graph()              for character in data:     name = character[\"name\"]     G.add_node(name)     for linked_character, relation in character[\"links\"].items():         G.add_edge(name, linked_character, relation=relation)  pos = nx.spring_layout(G) nx.draw(     G, pos,     with_labels=True,     node_color=self.config.graph.node_color,     node_size=self.config.graph.node_size,     font_size=self.config.graph.font_size )  edge_labels = nx.get_edge_attributes(G, \"relation\") nx.draw_networkx_edge_labels(     G, pos,     edge_labels=edge_labels,     font_size=self.config.graph.edge_font_size )              plt.title(self.config.graph.title) plt.axis(\"off\") plt.show()<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u00ab\u0411\u0435\u0441\u043e\u0432\u00bb \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0435\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0433\u0440\u0430\u0444 \u0434\u043b\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0433\u0435\u0440\u043e\u0435\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0413\u0440\u0430\u0444 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430\u043c\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0433\u0435\u0440\u043e\u044f\u043c\u0438, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0435\u0439. \u0414\u043b\u044f \u0433\u043b\u0430\u0432\u044b \u0411\u044d\u043b\u0430 \u0438\u0437 \u00ab\u0413\u0435\u0440\u043e\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438\u00bb \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043f\u0435\u043d\u0442\u0430\u0433\u0440\u0430\u043c\u043c\u0430:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0413\u0440\u0430\u0444 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430\u043c\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u0435\u043d \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0438. \u0422\u0435 \u0436\u0435 \u00ab\u0411\u0435\u0441\u044b\u00bb \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 700k \u0442\u043e\u043a\u0435\u043d\u043e\u0432. \u0422\u0430\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043e\u0431\u044a\u044f\u0442\u044c \u043b\u0438\u0448\u044c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<h4>\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 <\/h4>\n<p>\u0414\u0432\u0438\u0436\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u043a\u043d\u0438\u0433\u0435. \u0417\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"python\">qa(\"\"\" \u0421\u043e\u0441\u0442\u0430\u0432\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u043a\u043d\u0438\u0433\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON: [     {         \"date\": \"\u0414\u0430\u0442\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438 \u0432 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u0438\",         \"event\": \"\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e \u0440\u0443\u0441\u0441\u043a\u0438\"     } ] \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 10 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438 \"\"\")<\/code><\/pre>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<pre><code class=\"python\">for event in data:     event['date'] = datetime.datetime.strptime(event['date'], '%d %B %y')  data.sort(key=lambda x: x['date'])  dates = [event['date'] for event in data] events = [event['event'] for event in data]  fig, ax = plt.subplots(figsize=self.config.timeline.figsize) ax.plot(     [1] * len(dates), dates,     marker='o',     color=self.config.timeline.marker_color,     linestyle=self.config.timeline.linestyle )  for i, event in enumerate(events):     ax.annotate(         event,         (1, dates[i]),         xytext=(10, 0),         textcoords='offset points',         ha='left',         va='center',         fontsize=self.config.timeline.fontsize     )  ax.yaxis.set_major_formatter(DateFormatter('%d %b %Y')) #...  plt.show()<\/code><\/pre>\n<p>\u041f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u0434\u043d\u0435\u0432\u043d\u0438\u043a\u0430 \u0434\u043e\u043a\u0442\u043e\u0440\u0430 \u0411\u043e\u0440\u043c\u0435\u043d\u0442\u0430\u043b\u044f \u0438\u0437 \u0411\u0443\u043b\u0433\u0430\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u00ab\u0421\u043e\u0431\u0430\u0447\u044c\u0435\u0433\u043e \u0441\u0435\u0440\u0434\u0446\u0430\u00bb:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u0434\u043d\u0435\u0432\u043d\u0438\u043a\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u0434\u043d\u0435\u0432\u043d\u0438\u043a\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u0422\u044f\u0436\u0435\u043b\u0435\u0435 \u043e\u0431\u0441\u0442\u043e\u0438\u0442 \u0434\u0435\u043b\u043e \u0441 \u0445\u0430\u043e\u0442\u0438\u0447\u043d\u043e \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0434\u0430\u0442\u0430\u043c\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0436\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438 \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u043a\u0438. \u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u0427\u0435\u0445\u043e\u0432\u0441\u043a\u0438\u0439 \u00ab\u041e\u0441\u0442\u0440\u043e\u0432 \u0421\u0430\u0445\u0430\u043b\u0438\u043d\u00bb. \u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u0441 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0447\u0438\u043a\u043e\u043c, \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0442\u0430\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u0441 \u0427\u0435\u0445\u043e\u0432\u044b\u043c<\/figcaption><\/div>\n<\/figure>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u043e\u043b \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0432 \u043a\u043d\u0438\u0433\u0435, \u0442\u043e \u0438\u043d\u0430\u044f:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0432 \u043a\u043d\u0438\u0433\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0442\u043e \u043f\u043e\u0441\u043f\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0432\u0438\u0437\u0438\u0442 \u0410\u043d\u0442\u043e\u043d\u0430 \u041f\u0430\u043b\u044b\u0447\u0430 \u043d\u0430 \u0421\u0430\u0445\u0430\u043b\u0438\u043d \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043a \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b\u043c \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c.<\/p>\n<h4>\u041a\u0430\u0440\u0442\u0430 \u043c\u0435\u0441\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f <\/h4>\n<p>\u0418 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u043c\u0435\u043d\u0435\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043a\u043d\u0438\u0433\u0438. \u0417\u0434\u0435\u0441\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u043e\u0439 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u0442\u0430\u043f \u0433\u0435\u043e\u043a\u043e\u0434\u0438\u043d\u0433\u0430. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u043e\u043f\u043e\u043d\u0438\u043c\u0430\u043c. <\/p>\n<p>\u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u043e\u0441\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0441\u0442:<\/p>\n<pre><code class=\"python\">qa(\"\"\"   \u0412\u044b\u0432\u0435\u0434\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e. \"\"\")<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b:<\/p>\n<pre><code class=\"python\">from yandex_geocoder import Client # ...  locator = Client(YANDEX_GEOCODER_API_KEY)  locations = text.split(', ') result = []  for loc in set(locations):     # ...     coords = locator.coordinates(loc)     if coords:         result.append({\"name\": loc, \"coordinates\": [str(c) for c in coords]})<\/code><\/pre>\n<p>\u0418 \u0443\u0436\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u043b\u0430\u0434\u0435\u043c \u0438\u0445 \u043d\u0430 \u043a\u0430\u0440\u0442\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>cartopy<\/code>, <\/p>\n<pre><code class=\"python\">import cartopy.crs as ccrs import cartopy.feature as cfeature # ...  longitudes = [float(coord[0]) for coord in [d['coordinates'] for d in data]] latitudes = [float(coord[1]) for coord in [d['coordinates'] for d in data]] names = [d['name'] for d in data] # ...  fig, ax =<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-456112","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/456112","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=456112"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/456112\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=456112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=456112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=456112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}