ChatCompressa
",id:"chatcompressa",level:4},{value:"CompressaEmbeddings
",id:"compressaembeddings",level:4},{value:"CompressaRerank
",id:"compressarerank",level:4},{value:"ChatCompressa",id:"chatcompressa-1",level:2},{value:"\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b",id:"\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435-\u043a\u043b\u0430\u0441\u0441\u044b",level:3},{value:"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430",id:"\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435-\u043a\u043b\u0430\u0441\u0441\u0430",level:3},{value:"CompressaEmbeddings",id:"compressaembeddings-1",level:2},{value:"\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b",id:"\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435-\u043a\u043b\u0430\u0441\u0441\u044b-1",level:3},{value:"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430",id:"\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435-\u043a\u043b\u0430\u0441\u0441\u0430-1",level:3},{value:"\u041c\u0435\u0442\u043e\u0434\u044b",id:"\u043c\u0435\u0442\u043e\u0434\u044b",level:3},{value:"CompressaRerank",id:"compressarerank-1",level:2},{value:"\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b",id:"\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435-\u043a\u043b\u0430\u0441\u0441\u044b-2",level:3},{value:"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430",id:"\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435-\u043a\u043b\u0430\u0441\u0441\u0430-2",level:3},{value:"\u041c\u0435\u0442\u043e\u0434\u044b",id:"\u043c\u0435\u0442\u043e\u0434\u044b-1",level:3},{value:"Args",id:"args",level:4},{value:"Returns",id:"returns",level:4}];function h(e){const n={br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.h1,{id:"\u043f\u0430\u043a\u0435\u0442-langchain_compressa",children:["\u041f\u0430\u043a\u0435\u0442 ",(0,r.jsx)(n.code,{children:"langchain_compressa"})]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.h3,{id:"\u0441\u0443\u0431\u043c\u043e\u0434\u0443\u043b\u0438",children:"\u0421\u0443\u0431\u043c\u043e\u0434\u0443\u043b\u0438"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"langchain_compressa.chat_models"})," \u0427\u0430\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 Compressa"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"langchain_compressa.embeddings"})," Embedding \u043c\u043e\u0434\u0435\u043b\u0438 Compressa"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"langchain_compressa.reranks"})," Rerank \u043c\u043e\u0434\u0435\u043b\u0438 Compressa"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.h3,{id:"\u043a\u043b\u0430\u0441\u0441\u044b",children:"\u041a\u043b\u0430\u0441\u0441\u044b"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.h4,{id:"chatcompressa",children:(0,r.jsx)(n.code,{children:"ChatCompressa"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"client"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"compressa_api_key"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"model_kwargs"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"model_name"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"streaming"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"temperature"})}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.h4,{id:"compressaembeddings",children:(0,r.jsx)(n.code,{children:"CompressaEmbeddings"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"client"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"compressa_api_key"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"embed_documents"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"embed_query"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"model"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"model_kwargs"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"tiktoken_enabled"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"tiktoken_model_name"})}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.h4,{id:"compressarerank",children:(0,r.jsx)(n.code,{children:"CompressaRerank"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"client"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"compress_documents"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"compressa_api_key"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"model"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"top_n"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"chatcompressa-1",children:"ChatCompressa"}),"\n",(0,r.jsx)(n.p,{children:"\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0447\u0430\u0442 \u043c\u043e\u0434\u0435\u043b\u0435\u0439."}),"\n",(0,r.jsxs)(n.p,{children:["\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u043a\u0435\u0442",(0,r.jsx)(n.code,{children:"langchain_compressa"})," \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\n",(0,r.jsx)(n.code,{children:"COMPRESSA_API_KEY"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'pip install langchain-compressa\nexport COMPRESSA_API_KEY="\u0432\u0430\u0448-\u043a\u043b\u044e\u0447-\u0437\u0434\u0435\u0441\u044c"\n'})}),"\n",(0,r.jsxs)(n.p,{children:["\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043b\u0438\u0448\u043d:",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.code,{children:"model: str"})," \u0418\u043c\u044f \u043c\u043e\u0434\u0435\u043b\u0438 Compressa \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.code,{children:"temperature: float"})," \u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438."]}),"\n",(0,r.jsxs)(n.p,{children:["\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430:",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.code,{children:"api_key: Optional[str]"})," \u041a\u043b\u044e\u0447 Compressa API. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f COMPRESSA_API_KEY."]}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043c. \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432."}),"\n",(0,r.jsx)(n.p,{children:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:' from langchain_compressa import ChatCompressa\n \n llm = ChatCompressa(\n model="...",\n temperature=0,\n # api_key="...",\n )\n'})}),"\n",(0,r.jsx)(n.p,{children:"\u0412\u044b\u0437\u043e\u0432:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:' messages = [\n ("system", "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a. \u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u0438\u0439."),\n ("human", "\u042f \u043b\u044e\u0431\u043b\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435."),\n ]\n llm.invoke(messages)\n'})}),"\n",(0,r.jsx)(n.p,{children:"\u0421\u0442\u0440\u0438\u043c\u0438\u043d\u0433:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:" for chunk in llm.stream(messages):\n print(chunk)\n \n stream = llm.stream(messages)\n full = next(stream)\n for chunk in stream:\n full += chunk\n full\n"})}),"\n",(0,r.jsxs)(n.p,{children:["\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0443\u0442\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.",(0,r.jsx)(n.br,{}),"\n","\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 ValidationError, \u0435\u0441\u043b\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438."]}),"\n",(0,r.jsx)(n.h3,{id:"\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435-\u043a\u043b\u0430\u0441\u0441\u044b",children:"\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"langchain_core.language_models.chat_models.BaseChatModel"}),"\n",(0,r.jsx)(n.li,{children:"langchain_core.language_models.base.BaseLanguageModel"}),"\n",(0,r.jsx)(n.li,{children:"langchain_core.runnables.base.RunnableSerializable"}),"\n",(0,r.jsx)(n.li,{children:"langchain_core.load.serializable.Serializable"}),"\n",(0,r.jsx)(n.li,{children:"pydantic.v1.main.BaseModel"}),"\n",(0,r.jsx)(n.li,{children:"pydantic.v1.utils.Representation"}),"\n",(0,r.jsx)(n.li,{children:"langchain_core.runnables.base.Runnable"}),"\n",(0,r.jsx)(n.li,{children:"typing.Generic"}),"\n",(0,r.jsx)(n.li,{children:"abc.ABC"}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435-\u043a\u043b\u0430\u0441\u0441\u0430",children:"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var client : Any"}),(0,r.jsx)(n.br,{}),"\n","\u0421\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a API Compressa."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var compressa_api_key : Optional[pydantic.v1.types.SecretStr]"}),(0,r.jsx)(n.br,{}),"\n","\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f ",(0,r.jsx)(n.code,{children:"COMPRESSA_API_KEY"})," \u0435\u0441\u043b\u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var model_kwargs : Dict[str, Any]"}),(0,r.jsx)(n.br,{}),"\n","\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043b\u044e\u0431\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 create, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u044f\u0432\u043d\u043e."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var model_name : str"}),(0,r.jsx)(n.br,{}),"\n","\u0418\u043c\u044f \u0447\u0430\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var streaming : bool"}),(0,r.jsx)(n.br,{}),"\n","\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0438\u043b\u0438 \u043d\u0435\u0442"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var temperature : float"}),(0,r.jsx)(n.br,{}),"\n","\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f."]}),"\n",(0,r.jsx)(n.h2,{id:"compressaembeddings-1",children:"CompressaEmbeddings"}),"\n",(0,r.jsxs)(n.p,{children:["\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043c\u0435\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f ",(0,r.jsx)(n.code,{children:"COMPRESSA_API_KEY"})," \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0432\u0430\u0448\u0438\u043c \u043a\u043b\u044e\u0447\u043e\u043c Compressa API, \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430."]}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"from langchain_compressa import CompressaEmbeddings\nmodel = CompressaEmbeddings() \n"})}),"\n",(0,r.jsxs)(n.p,{children:["\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0443\u0442\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.",(0,r.jsx)(n.br,{}),"\n","\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 ValidationError, \u0435\u0441\u043b\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438."]}),"\n",(0,r.jsx)(n.h3,{id:"\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435-\u043a\u043b\u0430\u0441\u0441\u044b-1",children:"\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"pydantic.v1.main.BaseModel"}),"\n",(0,r.jsx)(n.li,{children:"pydantic.v1.utils.Representation"}),"\n",(0,r.jsx)(n.li,{children:"langchain_core.embeddings.embeddings.Embeddings"}),"\n",(0,r.jsx)(n.li,{children:"abc.ABC"}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435-\u043a\u043b\u0430\u0441\u0441\u0430-1",children:"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var client : Any"}),(0,r.jsx)(n.br,{}),"\n","\u0421\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a API Compressa."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var compressa_api_key : Optional[pydantic.v1.types.SecretStr]"}),(0,r.jsx)(n.br,{}),"\n","\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f ",(0,r.jsx)(n.code,{children:"COMPRESSA_API_KEY"})," \u0435\u0441\u043b\u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var model : str"}),(0,r.jsx)(n.br,{}),"\n","\u0418\u043c\u044f embedding \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var model_kwargs : Dict[str, Any]"}),(0,r.jsx)(n.br,{}),"\n","\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043b\u044e\u0431\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 create, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u044f\u0432\u043d\u043e."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var tiktoken_enabled : bool"}),(0,r.jsx)(n.br,{}),"\n","\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e False"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var tiktoken_model_name : Optional[str]"}),(0,r.jsx)(n.br,{}),"\n","\u0418\u043c\u044f tiktoken \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f."]}),"\n",(0,r.jsx)(n.h3,{id:"\u043c\u0435\u0442\u043e\u0434\u044b",children:"\u041c\u0435\u0442\u043e\u0434\u044b"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"def embed_documents(self, texts: List[str]) \u2011> List[List[float]]"}),(0,r.jsx)(n.br,{}),"\n","Embed \u0434\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"def embed_query(self, text: str) \u2011> List[float]"}),(0,r.jsx)(n.br,{}),"\n","Embed \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430"]}),"\n",(0,r.jsx)(n.h2,{id:"compressarerank-1",children:"CompressaRerank"}),"\n",(0,r.jsxs)(n.p,{children:["\u041a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u043e\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 ",(0,r.jsx)(n.code,{children:"Compressa Rerank API"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0443\u0442\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.",(0,r.jsx)(n.br,{}),"\n","\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 ValidationError, \u0435\u0441\u043b\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438."]}),"\n",(0,r.jsx)(n.h3,{id:"\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435-\u043a\u043b\u0430\u0441\u0441\u044b-2",children:"\u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"langchain_core.documents.compressor.BaseDocumentCompressor"}),"\n",(0,r.jsx)(n.li,{children:"pydantic.v1.main.BaseModel"}),"\n",(0,r.jsx)(n.li,{children:"pydantic.v1.utils.Representation"}),"\n",(0,r.jsx)(n.li,{children:"abc.ABC"}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435-\u043a\u043b\u0430\u0441\u0441\u0430-2",children:"\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var client : Any"}),(0,r.jsx)(n.br,{}),"\n","\u0421\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a API Compressa."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var compressa_api_key : Optional[pydantic.v1.types.SecretStr]"}),(0,r.jsx)(n.br,{}),"\n","\u041a\u043b\u044e\u0447 Compressa API. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u043b\u0438 \u043f\u0443\u0442\u0451\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f COMPRESSA_API_KEY."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var model : str"}),(0,r.jsx)(n.br,{}),"\n","\u041c\u043e\u0434\u0435\u043b\u044c Compressa, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0434\u043b\u044f \u0440\u0435\u0440\u0430\u043d\u043a\u0430"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"var top_n : Optional[int]"}),(0,r.jsx)(n.br,{}),"\n","\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432."]}),"\n",(0,r.jsx)(n.h3,{id:"\u043c\u0435\u0442\u043e\u0434\u044b-1",children:"\u041c\u0435\u0442\u043e\u0434\u044b"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"compress_documents"}),(0,r.jsx)(n.br,{}),"\n","\u0421\u0436\u0430\u0442\u0438\u0435 (compress) \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Compressa rerank API."]}),"\n",(0,r.jsx)(n.h4,{id:"args",children:"Args"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"documents"})}),(0,r.jsx)(n.br,{}),"\n","\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u0436\u0430\u0442\u0438\u044f.",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"query"})}),(0,r.jsx)(n.br,{}),"\n","\u0417\u0430\u043f\u0440\u043e\u0441, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.",(0,r.jsx)(n.br,{}),"\n",(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"callbacks"})}),(0,r.jsx)(n.br,{}),"\n","\u041e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u0436\u0430\u0442\u0438\u044f."]}),"\n",(0,r.jsx)(n.h4,{id:"returns",children:"Returns"}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0436\u0430\u0442\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432."})]})}function t(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>d});var r=s(6540);const i={},c=r.createContext(i);function l(e){const n=r.useContext(c);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),r.createElement(c.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/08d79e2c.82c1198d.js b/assets/js/08d79e2c.82c1198d.js
deleted file mode 100644
index f0aaca2..0000000
--- a/assets/js/08d79e2c.82c1198d.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[2895],{7862:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var s=t(4848),o=t(8453);const i={sidebar_position:3,title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI",sidebar_class_name:"docs_sidebar_index"},r=void 0,a={id:"docs/Quickstart/openai",title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI",description:"API Compsessa \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c \u0441 OpenAI.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/openai.md",sourceDirName:"docs/Quickstart",slug:"/docs/Quickstart/openai",permalink:"/docs/Quickstart/openai",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/openai.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI",sidebar_class_name:"docs_sidebar_index"},sidebar:"docsSidebar",previous:{title:"REST API",permalink:"/docs/Quickstart/REST_API"},next:{title:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442",permalink:"/docs/quick_start"}},c={},d=[];function p(e){const n={br:"br",code:"code",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["API Compsessa \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c \u0441 OpenAI.",(0,s.jsx)(n.br,{}),"\n","\u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043f\u0430\u043a\u0435\u0442 OpenAI \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Langchain, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442 OpenAI \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430\u043c\u0438."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 openai \u0438\u0437 PyPI\npip install openai\n"})}),"\n",(0,s.jsx)(n.p,{children:"\u0421\u043d\u0430\u0447\u0430\u043b\u0430, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'COMPRESSA_BASE=https://compressa-api.mil-team.ru/v1\nEMBED_MODEL=Compressa-Embedding\nCHAT_MODEL=Compressa-LLM\nTIKTOKEN_MODEL=Salesforce/SFR-Embedding-Mistral\nENCODING_FORMAT=float\nCOMPRESSA_API_KEY=<"your_compressa_key_here">\n'})}),"\n",(0,s.jsx)(n.p,{children:"\u0418 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'from openai import OpenAI # \u0432\u0435\u0440\u0441\u0438\u044f openai >= 1.0\nimport os\n\nfrom dotenv import load_dotenv\nload_dotenv()\n\nCOMPRESSA_API_KEY=os.getenv("COMPRESSA_API_KEY")\nCOMPRESSA_BASE=os.getenv("COMPRESSA_BASE") # \u043d\u0430\u0448 API Endpoint\nCHAT_MODEL=os.getenv("CHAT_MODEL")\nEMBED_MODEL=os.getenv("EMBED_MODEL")\nENCODING_FORMAT=os.getenv("ENCODING_FORMAT")\n\nclient = OpenAI(api_key = COMPRESSA_API_KEY, base_url = COMPRESSA_BASE)\n\nchat_completion = client.chat.completions.create(\n messages=[\n {\n "role": "user",\n "content": "Say this is a test",\n }\n ],\n model=CHAT_MODEL,\n)\n\nprint(chat_completion)\n\nembedding = client.embeddings.create(\n model=EMBED_MODEL,\n input="What is the capital of the United States?",\n encoding_format=ENCODING_FORMAT\n)\n\nprint(embedding)\n'})})]})}function l(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var s=t(6540);const o={},i=s.createContext(o);function r(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/09cf7ae2.50df3723.js b/assets/js/09cf7ae2.50df3723.js
deleted file mode 100644
index fa8f680..0000000
--- a/assets/js/09cf7ae2.50df3723.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[2280],{6687:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>t});var s=i(4848),r=i(8453);const o={},l="\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",c={id:"onprem/Compressa LLM/compressa_llm_install/index",title:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",description:"Compressa LLM \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 Github package storage \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_install/index.md",sourceDirName:"onprem/Compressa LLM/compressa_llm_install",slug:"/onprem/Compressa LLM/compressa_llm_install/",permalink:"/onprem/Compressa LLM/compressa_llm_install/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_install/index.md",tags:[],version:"current",frontMatter:{},sidebar:"onpremSidebar",previous:{title:"Compressa LLM",permalink:"/onprem/Compressa LLM/"},next:{title:"\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443",permalink:"/onprem/Compressa LLM/compressa_llm_install/without_internet"}},d={},t=[{value:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f",id:"\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f",level:2},{value:"1. Linux-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c Nvidia GPU",id:"1-linux-\u0441\u0435\u0440\u0432\u0435\u0440-\u0441-\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c-nvidia-gpu",level:4},{value:"2. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b CUDA",id:"2-\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435-\u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b-cuda",level:4},{value:"3. Docker",id:"3-docker",level:4},{value:"4. Nvidia Container Toolkit",id:"4-nvidia-container-toolkit",level:4},{value:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435",id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435",level:2},{value:"1. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0439:",id:"1-\u0434\u0430\u043b\u0435\u0435-\u043f\u0440\u043e\u0446\u0435\u0441\u0441-\u043f\u0440\u043e\u0441\u0442\u043e\u0439",level:4},{value:"2. \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Docker \u0441 \u0432\u0430\u0448\u0438\u043c \u0442\u043e\u043a\u0435\u043d\u043e\u043c:",id:"2-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f-\u0432-docker-\u0441-\u0432\u0430\u0448\u0438\u043c-\u0442\u043e\u043a\u0435\u043d\u043e\u043c",level:4},{value:"3. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043b docker-compose.yaml
:",id:"3-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435-\u0444\u0430\u0439\u043b-docker-composeyaml",level:4},{value:"4. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e nginx:",id:"4-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e-nginx",level:4},{value:"5. \u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e Compressa:",id:"5-\u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435-\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e-\u0432\u0435\u0440\u0441\u0438\u044e-compressa",level:4},{value:"6. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441:",id:"6-\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f-\u0438-\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435-\u0441\u0435\u0440\u0432\u0438\u0441",level:4}];function a(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",h1:"h1",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",children:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430"}),"\n",(0,s.jsx)(n.p,{children:"Compressa LLM \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 Github package storage \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439."}),"\n",(0,s.jsx)(n.h2,{id:"\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f",children:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f"}),"\n",(0,s.jsx)(n.h4,{id:"1-linux-\u0441\u0435\u0440\u0432\u0435\u0440-\u0441-\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c-nvidia-gpu",children:"1. Linux-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c Nvidia GPU"}),"\n",(0,s.jsx)(n.p,{children:"\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Nvidia A100"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia V100"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia T4"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 4090"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 4080"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 4070 / 4070Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 3080 / 3080Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 3070 / 3070Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 3060 / 3060Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 2080Ti"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"\u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043e\u0431\u044a\u0435\u043c\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 GPU (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f 1.2 \u043e\u0442 \u043e\u0431\u044a\u0435\u043c\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 GPU)."}),"\n",(0,s.jsx)(n.h4,{id:"2-\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435-\u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b-cuda",children:"2. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b CUDA"}),"\n",(0,s.jsx)(n.p,{children:"\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430."}),"\n",(0,s.jsxs)(n.admonition,{type:"note",children:[(0,s.jsx)(n.p,{children:"\u0412\u0435\u0440\u0441\u0438\u044e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 CUDA \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo apt update\nsudo apt install software-properties-common -y\nsudo apt install ubuntu-drivers-common -y\nsudo ubuntu-drivers autoinstall\nsudo apt install nvidia-cuda-toolkit\n"})})]}),"\n",(0,s.jsx)(n.h4,{id:"3-docker",children:"3. Docker"}),"\n",(0,s.jsxs)(n.p,{children:["\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0434\u043b\u044f Ubuntu:",(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.a,{href:"https://docs.docker.com/engine/install/ubuntu/",children:"https://docs.docker.com/engine/install/ubuntu/"})]}),"\n",(0,s.jsxs)(n.p,{children:["\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/compose/migrate/",children:"Docker Compose V2"}),"."]}),"\n",(0,s.jsx)(n.h4,{id:"4-nvidia-container-toolkit",children:"4. Nvidia Container Toolkit"}),"\n",(0,s.jsxs)(n.p,{children:["\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0434\u043b\u044f Linux:",(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.a,{href:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html",children:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html"})]}),"\n",(0,s.jsx)(n.h2,{id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435",children:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435"}),"\n",(0,s.jsx)(n.p,{children:"\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Compressa \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430."}),"\n",(0,s.jsx)(n.h4,{id:"1-\u0434\u0430\u043b\u0435\u0435-\u043f\u0440\u043e\u0446\u0435\u0441\u0441-\u043f\u0440\u043e\u0441\u0442\u043e\u0439",children:"1. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0439:"}),"\n",(0,s.jsx)(n.p,{children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"export COMPRESSA_TOKEN=docker-compose.yaml
:",id:"3-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435-\u0444\u0430\u0439\u043b-docker-composeyaml",level:4},{value:"4. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e nginx:",id:"4-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e-nginx",level:4},{value:"5. \u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e Compressa:",id:"5-\u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435-\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e-\u0432\u0435\u0440\u0441\u0438\u044e-compressa",level:4},{value:"6. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441:",id:"6-\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f-\u0438-\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435-\u0441\u0435\u0440\u0432\u0438\u0441",level:4}];function a(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",h1:"h1",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",children:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430"}),"\n",(0,s.jsx)(n.p,{children:"Compressa LLM \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 Github package storage \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439."}),"\n",(0,s.jsx)(n.h2,{id:"\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f",children:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f"}),"\n",(0,s.jsx)(n.h4,{id:"1-linux-\u0441\u0435\u0440\u0432\u0435\u0440-\u0441-\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c-nvidia-gpu",children:"1. Linux-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c Nvidia GPU"}),"\n",(0,s.jsx)(n.p,{children:"\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Nvidia A100"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia V100"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia T4"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 4090"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 4080"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 4070 / 4070Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 3080 / 3080Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 3070 / 3070Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 3060 / 3060Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 2080Ti"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"\u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043e\u0431\u044a\u0435\u043c\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 GPU (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f 1.2 \u043e\u0442 \u043e\u0431\u044a\u0435\u043c\u0430 \u043f\u0430\u043c\u044f\u0442\u0438 GPU)."}),"\n",(0,s.jsx)(n.h4,{id:"2-\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435-\u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b-cuda",children:"2. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b CUDA"}),"\n",(0,s.jsx)(n.p,{children:"\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430."}),"\n",(0,s.jsxs)(n.admonition,{type:"note",children:[(0,s.jsx)(n.p,{children:"\u0412\u0435\u0440\u0441\u0438\u044e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 CUDA \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo apt update\nsudo apt install software-properties-common -y\nsudo apt install ubuntu-drivers-common -y\nsudo ubuntu-drivers autoinstall\nsudo apt install nvidia-cuda-toolkit\n"})})]}),"\n",(0,s.jsx)(n.h4,{id:"3-docker",children:"3. Docker"}),"\n",(0,s.jsxs)(n.p,{children:["\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0434\u043b\u044f Ubuntu:",(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.a,{href:"https://docs.docker.com/engine/install/ubuntu/",children:"https://docs.docker.com/engine/install/ubuntu/"})]}),"\n",(0,s.jsxs)(n.p,{children:["\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/compose/migrate/",children:"Docker Compose V2"}),"."]}),"\n",(0,s.jsx)(n.h4,{id:"4-nvidia-container-toolkit",children:"4. Nvidia Container Toolkit"}),"\n",(0,s.jsxs)(n.p,{children:["\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0434\u043b\u044f Linux:",(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.a,{href:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html",children:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html"})]}),"\n",(0,s.jsx)(n.h2,{id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435",children:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435"}),"\n",(0,s.jsx)(n.p,{children:"\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Compressa \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430."}),"\n",(0,s.jsx)(n.h4,{id:"1-\u0434\u0430\u043b\u0435\u0435-\u043f\u0440\u043e\u0446\u0435\u0441\u0441-\u043f\u0440\u043e\u0441\u0442\u043e\u0439",children:"1. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0439:"}),"\n",(0,s.jsx)(n.p,{children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"export COMPRESSA_TOKEN=["'])(?.*?)\1/,ve=/\{(? [\d,-]+)\}/,Ne={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},Ce={...Ne,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},Ae=Object.keys(Ne);function ke(e,t){const n=e.map((e=>{const{start:n,end:s}=Ce[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function ye(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:a,metastring:o}=t;if(o&&ve.test(o)){const e=o.match(ve).groups.range;if(0===a.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=a[0].className,s=ge()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return ke(["js","jsBlock"],t);case"jsx":case"tsx":return ke(["js","jsBlock","jsx"],t);case"html":return ke(["js","jsBlock","html"],t);case"python":case"py":case"bash":return ke(["bash"],t);case"markdown":case"md":return ke(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return ke(["tex"],t);case"lua":case"haskell":case"sql":return ke(["lua"],t);case"wasm":return ke(["wasm"],t);case"vb":case"vba":case"visual-basic":return ke(["vb","rem"],t);case"vbnet":return ke(["vbnet","rem"],t);case"batch":return ke(["rem"],t);case"basic":return ke(["rem","f90"],t);case"fsharp":return ke(["js","ml"],t);case"ocaml":case"sml":return ke(["ml"],t);case"fortran":return ke(["f90"],t);case"cobol":return ke(["cobol"],t);default:return ke(Ae,t)}}(s,a),l=n.split("\n"),c=Object.fromEntries(a.map((e=>[e.className,{start:0,range:""}]))),r=Object.fromEntries(a.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),u=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let h=0;h void 0!==e));r[t]?c[r[t]].range+=`${h},`:d[t]?c[d[t]].start=h:u[t]&&(c[u[t]].range+=`${c[u[t]].start}-${h-1},`),l.splice(h,1)}n=l.join("\n");const m={};return Object.entries(c).forEach((e=>{let[t,{range:n}]=e;ge()(n).forEach((e=>{m[e]??=[],m[e].push(t)}))})),{lineClassNames:m,code:n}}const Le={codeBlockContainer:"codeBlockContainer_Ckt0"};function _e(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,a]=e;const o=t[s];o&&"string"==typeof a&&(n[o]=a)})),n}(xe());return(0,i.jsx)(t,{...n,style:s,className:(0,u.A)(n.className,Le.codeBlockContainer,v.G.common.codeBlock)})}const Be={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function we(e){let{children:t,className:n}=e;return(0,i.jsx)(_e,{as:"pre",tabIndex:0,className:(0,u.A)(Be.codeBlockStandalone,"thin-scrollbar",n),children:(0,i.jsx)("code",{className:Be.codeBlockLines,children:t})})}const Te={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Ee(e,t){const[n,a]=(0,s.useState)(),i=(0,s.useCallback)((()=>{a(e.current?.closest("[role=tabpanel][hidden]"))}),[e,a]);(0,s.useEffect)((()=>{i()}),[i]),function(e,t,n){void 0===n&&(n=Te);const a=(0,o._q)(t),i=(0,o.Be)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(a);return e&&t.observe(e,i),()=>t.disconnect()}),[e,a,i])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),i())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var He=n(1765);const Me={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function Ie(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:a,getTokenProps:o}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const l=a({line:t,className:(0,u.A)(n,s&&Me.codeLine)}),c=t.map(((e,t)=>(0,i.jsx)("span",{...o({token:e})},t)));return(0,i.jsxs)("span",{...l,children:[s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:Me.codeLineNumber}),(0,i.jsx)("span",{className:Me.codeLineContent,children:c})]}):c,(0,i.jsx)("br",{})]})}function Se(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function Ue(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const Ve={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function Re(e){let{code:t,className:n}=e;const[a,o]=(0,s.useState)(!1),l=(0,s.useRef)(void 0),c=(0,s.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),a=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const o=document.getSelection(),i=o.rangeCount>0&&o.getRangeAt(0);n.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let l=!1;try{l=document.execCommand("copy")}catch{}s.remove(),i&&(o.removeAllRanges(),o.addRange(i)),a&&a.focus()}(t),o(!0),l.current=window.setTimeout((()=>{o(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(l.current)),[]),(0,i.jsx)("button",{type:"button","aria-label":a?(0,h.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,h.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,h.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.A)("clean-btn",n,Ve.copyButton,a&&Ve.copyButtonCopied),onClick:c,children:(0,i.jsxs)("span",{className:Ve.copyButtonIcons,"aria-hidden":"true",children:[(0,i.jsx)(Se,{className:Ve.copyButtonIcon}),(0,i.jsx)(Ue,{className:Ve.copyButtonSuccessIcon})]})})}function ze(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const Oe={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Pe(e){let{className:t,onClick:n,isEnabled:s}=e;const a=(0,h.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,i.jsx)("button",{type:"button",onClick:n,className:(0,u.A)("clean-btn",t,s&&Oe.wordWrapButtonEnabled),"aria-label":a,title:a,children:(0,i.jsx)(ze,{className:Oe.wordWrapButtonIcon,"aria-hidden":"true"})})}function Ge(e){let{children:t,className:n="",metastring:a,title:o,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:r,magicComments:d}}=(0,W.p)(),m=function(e){return e?.toLowerCase()}(c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??r),h=xe(),p=function(){const[e,t]=(0,s.useState)(!1),[n,a]=(0,s.useState)(!1),o=(0,s.useRef)(null),i=(0,s.useCallback)((()=>{const n=o.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[o,e]),l=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=o.current,n=e>t||o.current.querySelector("code").hasAttribute("style");a(n)}),[o]);return Ee(o,l),(0,s.useEffect)((()=>{l()}),[e,l]),(0,s.useEffect)((()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)})),[l]),{codeBlockRef:o,isEnabled:e,isCodeScrollable:n,toggle:i}}(),f=function(e){return e?.match(je)?.groups.title??""}(a)||o,{lineClassNames:x,code:b}=ye(t,{metastring:a,language:m,magicComments:d}),g=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(a);return(0,i.jsxs)(_e,{as:"div",className:(0,u.A)(n,m&&!n.includes(`language-${m}`)&&`language-${m}`),children:[f&&(0,i.jsx)("div",{className:Be.codeBlockTitle,children:f}),(0,i.jsxs)("div",{className:Be.codeBlockContent,children:[(0,i.jsx)(He.f4,{theme:h,code:b,language:m??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:a,getTokenProps:o}=e;return(0,i.jsx)("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,u.A)(t,Be.codeBlock,"thin-scrollbar"),style:n,children:(0,i.jsx)("code",{className:(0,u.A)(Be.codeBlockLines,g&&Be.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,i.jsx)(Ie,{line:e,getLineProps:a,getTokenProps:o,classNames:x[t],showLineNumbers:g},t)))})})}}),(0,i.jsxs)("div",{className:Be.buttonGroup,children:[(p.isEnabled||p.isCodeScrollable)&&(0,i.jsx)(Pe,{className:Be.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),(0,i.jsx)(Re,{className:Be.codeButton,code:b})]})]})]})}function De(e){let{children:t,...n}=e;const a=(0,pe.A)(),o=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof o?Ge:we;return(0,i.jsx)(l,{...n,children:o},String(a))}function We(e){return(0,i.jsx)("code",{...e})}var $e=n(3427);const Fe={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function qe(e){return!!e&&("SUMMARY"===e.tagName||qe(e.parentElement))}function Ze(e,t){return!!e&&(e===t||Ze(e.parentElement,t))}function Je(e){let{summary:t,children:n,...a}=e;(0,$e.A)().collectAnchor(a.id);const o=(0,pe.A)(),l=(0,s.useRef)(null),{collapsed:c,setCollapsed:r}=(0,D.u)({initialState:!a.open}),[d,m]=(0,s.useState)(a.open),h=s.isValidElement(t)?t:(0,i.jsx)("summary",{children:t??"Details"});return(0,i.jsxs)("details",{...a,ref:l,open:d,"data-collapsed":c,className:(0,u.A)(Fe.details,o&&Fe.isBrowser,a.className),onMouseDown:e=>{qe(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;qe(t)&&Ze(t,l.current)&&(e.preventDefault(),c?(r(!1),m(!0)):r(!0))},children:[h,(0,i.jsx)(D.N,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{r(e),m(!e)},children:(0,i.jsx)("div",{className:Fe.collapsibleContent,children:n})})]})}const Ye={details:"details_b_Ee"},Ke="alert alert--info";function Qe(e){let{...t}=e;return(0,i.jsx)(Je,{...t,className:(0,u.A)(Ke,Ye.details,t.className)})}function Xe(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),a=(0,i.jsx)(i.Fragment,{children:t.filter((e=>e!==n))});return(0,i.jsx)(Qe,{...e,summary:n,children:a})}function et(e){return(0,i.jsx)(ue.A,{...e})}const tt={containsTaskList:"containsTaskList_mC6p"};function nt(e){if(void 0!==e)return(0,u.A)(e,e?.includes("contains-task-list")&&tt.containsTaskList)}const st={img:"img_ev3q"};function at(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),a=t.filter((e=>e!==n)),o=n?.props.children;return{mdxAdmonitionTitle:o,rest:a.length>0?(0,i.jsx)(i.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}const ot={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function it(e){let{type:t,className:n,children:s}=e;return(0,i.jsx)("div",{className:(0,u.A)(v.G.common.admonition,v.G.common.admonitionType(t),ot.admonition,n),children:s})}function lt(e){let{icon:t,title:n}=e;return(0,i.jsxs)("div",{className:ot.admonitionHeading,children:[(0,i.jsx)("span",{className:ot.admonitionIcon,children:t}),n]})}function ct(e){let{children:t}=e;return t?(0,i.jsx)("div",{className:ot.admonitionContent,children:t}):null}function rt(e){const{type:t,icon:n,title:s,children:a,className:o}=e;return(0,i.jsxs)(it,{type:t,className:o,children:[s||n?(0,i.jsx)(lt,{title:s,icon:n}):null,(0,i.jsx)(ct,{children:a})]})}function dt(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const ut={icon:(0,i.jsx)(dt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function mt(e){return(0,i.jsx)(rt,{...ut,...e,className:(0,u.A)("alert alert--secondary",e.className),children:e.children})}function ht(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const pt={icon:(0,i.jsx)(ht,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function ft(e){return(0,i.jsx)(rt,{...pt,...e,className:(0,u.A)("alert alert--success",e.className),children:e.children})}function xt(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const bt={icon:(0,i.jsx)(xt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function gt(e){return(0,i.jsx)(rt,{...bt,...e,className:(0,u.A)("alert alert--info",e.className),children:e.children})}function jt(e){return(0,i.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const vt={icon:(0,i.jsx)(jt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function Nt(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const Ct={icon:(0,i.jsx)(Nt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const At={icon:(0,i.jsx)(jt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const kt={...{note:mt,tip:ft,info:gt,warning:function(e){return(0,i.jsx)(rt,{...vt,...e,className:(0,u.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,i.jsx)(rt,{...Ct,...e,className:(0,u.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,i.jsx)(mt,{title:"secondary",...e}),important:e=>(0,i.jsx)(gt,{title:"important",...e}),success:e=>(0,i.jsx)(ft,{title:"success",...e}),caution:function(e){return(0,i.jsx)(rt,{...At,...e,className:(0,u.A)("alert alert--warning",e.className),children:e.children})}}};function yt(e){const t=at(e),n=(s=t.type,kt[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),kt.info));var s;return(0,i.jsx)(n,{...t})}var Lt=n(418);const _t={Head:he.A,details:Xe,Details:Xe,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,i.jsx)(We,{...e}):(0,i.jsx)(De,{...e})},a:function(e){return(0,i.jsx)(p.A,{...e})},pre:function(e){return(0,i.jsx)(i.Fragment,{children:e.children})},ul:function(e){return(0,i.jsx)("ul",{...e,className:nt(e.className)})},li:function(e){return(0,$e.A)().collectAnchor(e.id),(0,i.jsx)("li",{...e})},img:function(e){return(0,i.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,u.A)(t,st.img))});var t},h1:e=>(0,i.jsx)(et,{as:"h1",...e}),h2:e=>(0,i.jsx)(et,{as:"h2",...e}),h3:e=>(0,i.jsx)(et,{as:"h3",...e}),h4:e=>(0,i.jsx)(et,{as:"h4",...e}),h5:e=>(0,i.jsx)(et,{as:"h5",...e}),h6:e=>(0,i.jsx)(et,{as:"h6",...e}),admonition:yt,mermaid:Lt.A};function Bt(e){let{children:t}=e;return(0,i.jsx)(me.x,{components:_t,children:t})}function wt(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=r();return t.hide_title||void 0!==n?null:e.title}();return(0,i.jsxs)("div",{className:(0,u.A)(v.G.docs.docMarkdown,"markdown"),children:[n&&(0,i.jsx)("header",{children:(0,i.jsx)(ue.A,{as:"h1",children:n})}),(0,i.jsx)(Bt,{children:t})]})}var Tt=n(4142),Et=n(9169),Ht=n(6025);function Mt(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const It={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function St(){const e=(0,Ht.A)("/");return(0,i.jsx)("li",{className:"breadcrumbs__item",children:(0,i.jsx)(p.A,{"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,i.jsx)(Mt,{className:It.breadcrumbHomeIcon})})})}const Ut={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function Vt(e){let{children:t,href:n,isLast:s}=e;const a="breadcrumbs__link";return s?(0,i.jsx)("span",{className:a,itemProp:"name",children:t}):n?(0,i.jsx)(p.A,{className:a,href:n,itemProp:"item",children:(0,i.jsx)("span",{itemProp:"name",children:t})}):(0,i.jsx)("span",{className:a,children:t})}function Rt(e){let{children:t,active:n,index:s,addMicrodata:a}=e;return(0,i.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,u.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,i.jsx)("meta",{itemProp:"position",content:String(s+1)})]})}function zt(){const e=(0,Tt.OF)(),t=(0,Et.Dt)();return e?(0,i.jsx)("nav",{className:(0,u.A)(v.G.docs.docBreadcrumbs,Ut.breadcrumbsContainer),"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,i.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,i.jsx)(St,{}),e.map(((t,n)=>{const s=n===e.length-1,a="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,i.jsx)(Rt,{active:s,index:n,addMicrodata:!!a,children:(0,i.jsx)(Vt,{href:a,isLast:s,children:t.label})},n)}))]})}):null}function Ot(){return(0,i.jsx)(h.A,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Pt(){return(0,i.jsx)(h.A,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function Gt(){return(0,i.jsx)(he.A,{children:(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function Dt(e){let{className:t}=e;return(0,i.jsx)(yt,{type:"caution",title:(0,i.jsx)(Ot,{}),className:(0,u.A)(t,v.G.common.unlistedBanner),children:(0,i.jsx)(Pt,{})})}function Wt(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Gt,{}),(0,i.jsx)(Dt,{...e})]})}const $t={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Ft(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=r(),n=(0,m.l)(),s=e.hide_table_of_contents,a=!s&&t.length>0;return{hidden:s,mobile:a?(0,i.jsx)(oe,{}):void 0,desktop:!a||"desktop"!==n&&"ssr"!==n?void 0:(0,i.jsx)(de,{})}}(),{metadata:{unlisted:s}}=r();return(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:(0,u.A)("col",!n.hidden&&$t.docItemCol),children:[s&&(0,i.jsx)(Wt,{}),(0,i.jsx)(_,{}),(0,i.jsxs)("div",{className:$t.docItemContainer,children:[(0,i.jsxs)("article",{children:[(0,i.jsx)(zt,{}),(0,i.jsx)(B,{}),n.mobile,(0,i.jsx)(wt,{children:t}),(0,i.jsx)(G,{})]}),(0,i.jsx)(b,{})]})]}),n.desktop&&(0,i.jsx)("div",{className:"col col--3",children:n.desktop})]})}function qt(e){const t=`docs-doc-id-${e.content.metadata.id}`,n=e.content;return(0,i.jsx)(c,{content:e.content,children:(0,i.jsxs)(a.e3,{className:t,children:[(0,i.jsx)(d,{}),(0,i.jsx)(Ft,{children:(0,i.jsx)(n,{})})]})})}},8426:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,a,o]=t;if(s&&o){s=parseInt(s),o=parseInt(o);const e=s {"use strict";n.d(t,{R:()=>i,x:()=>l});var s=n(6540);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/17896441.eca13bdb.js b/assets/js/17896441.eca13bdb.js deleted file mode 100644 index a912443..0000000 --- a/assets/js/17896441.eca13bdb.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[8401],{4313:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>qt});var s=n(6540),a=n(1003),o=n(9532),i=n(4848);const l=s.createContext(null);function c(e){let{children:t,content:n}=e;const a=function(e){return(0,s.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(n);return(0,i.jsx)(l.Provider,{value:a,children:t})}function r(){const e=(0,s.useContext)(l);if(null===e)throw new o.dV("DocProvider");return e}function d(){const{metadata:e,frontMatter:t,assets:n}=r();return(0,i.jsx)(a.be,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var u=n(4164),m=n(4581),h=n(1312),p=n(8774);function f(e){const{permalink:t,title:n,subLabel:s,isNext:a}=e;return(0,i.jsxs)(p.A,{className:(0,u.A)("pagination-nav__link",a?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[s&&(0,i.jsx)("div",{className:"pagination-nav__sublabel",children:s}),(0,i.jsx)("div",{className:"pagination-nav__label",children:n})]})}function x(e){const{previous:t,next:n}=e;return(0,i.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,h.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,i.jsx)(f,{...t,subLabel:(0,i.jsx)(h.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),n&&(0,i.jsx)(f,{...n,subLabel:(0,i.jsx)(h.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}function b(){const{metadata:e}=r();return(0,i.jsx)(x,{previous:e.previous,next:e.next})}var g=n(4586),j=n(8295),v=n(7559),N=n(5597),C=n(2252);const A={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,i.jsx)(h.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,i.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,i.jsx)(h.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,i.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function k(e){const t=A[e.versionMetadata.banner];return(0,i.jsx)(t,{...e})}function y(e){let{versionLabel:t,to:n,onClick:s}=e;return(0,i.jsx)(h.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,i.jsx)("b",{children:(0,i.jsx)(p.A,{to:n,onClick:s,children:(0,i.jsx)(h.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function L(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:s}}=(0,g.A)(),{pluginId:a}=(0,j.vT)({failfast:!0}),{savePreferredVersionName:o}=(0,N.g1)(a),{latestDocSuggestion:l,latestVersionSuggestion:c}=(0,j.HW)(a),r=l??(d=c).docs.find((e=>e.id===d.mainDocId));var d;return(0,i.jsxs)("div",{className:(0,u.A)(t,v.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,i.jsx)("div",{children:(0,i.jsx)(k,{siteTitle:s,versionMetadata:n})}),(0,i.jsx)("div",{className:"margin-top--md",children:(0,i.jsx)(y,{versionLabel:c.label,to:r.path,onClick:()=>o(c.name)})})]})}function _(e){let{className:t}=e;const n=(0,C.r)();return n.banner?(0,i.jsx)(L,{className:t,versionMetadata:n}):null}function B(e){let{className:t}=e;const n=(0,C.r)();return n.badge?(0,i.jsx)("span",{className:(0,u.A)(t,v.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,i.jsx)(h.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}const w={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function T(e){let{permalink:t,label:n,count:s}=e;return(0,i.jsxs)(p.A,{href:t,className:(0,u.A)(w.tag,s?w.tagWithCount:w.tagRegular),children:[n,s&&(0,i.jsx)("span",{children:s})]})}const E={tags:"tags_jXut",tag:"tag_QGVx"};function H(e){let{tags:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("b",{children:(0,i.jsx)(h.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,i.jsx)("ul",{className:(0,u.A)(E.tags,"padding--none","margin-left--sm"),children:t.map((e=>{let{label:t,permalink:n}=e;return(0,i.jsx)("li",{className:E.tag,children:(0,i.jsx)(T,{label:t,permalink:n})},n)}))})]})}const M={iconEdit:"iconEdit_Z9Sw"};function I(e){let{className:t,...n}=e;return(0,i.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.A)(M.iconEdit,t),"aria-hidden":"true",...n,children:(0,i.jsx)("g",{children:(0,i.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function S(e){let{editUrl:t}=e;return(0,i.jsxs)(p.A,{to:t,className:v.G.common.editThisPage,children:[(0,i.jsx)(I,{}),(0,i.jsx)(h.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}function U(e){void 0===e&&(e={});const{i18n:{currentLocale:t}}=(0,g.A)(),n=function(){const{i18n:{currentLocale:e,localeConfigs:t}}=(0,g.A)();return t[e].calendar}();return new Intl.DateTimeFormat(t,{calendar:n,...e})}function V(e){let{lastUpdatedAt:t}=e;const n=new Date(t),s=U({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(n);return(0,i.jsx)(h.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,i.jsx)("b",{children:(0,i.jsx)("time",{dateTime:n.toISOString(),itemProp:"dateModified",children:s})})},children:" on {date}"})}function R(e){let{lastUpdatedBy:t}=e;return(0,i.jsx)(h.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,i.jsx)("b",{children:t})},children:" by {user}"})}function z(e){let{lastUpdatedAt:t,lastUpdatedBy:n}=e;return(0,i.jsxs)("span",{className:v.G.common.lastUpdated,children:[(0,i.jsx)(h.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t?(0,i.jsx)(V,{lastUpdatedAt:t}):"",byUser:n?(0,i.jsx)(R,{lastUpdatedBy:n}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const O={lastUpdated:"lastUpdated_JAkA"};function P(e){let{className:t,editUrl:n,lastUpdatedAt:s,lastUpdatedBy:a}=e;return(0,i.jsxs)("div",{className:(0,u.A)("row",t),children:[(0,i.jsx)("div",{className:"col",children:n&&(0,i.jsx)(S,{editUrl:n})}),(0,i.jsx)("div",{className:(0,u.A)("col",O.lastUpdated),children:(s||a)&&(0,i.jsx)(z,{lastUpdatedAt:s,lastUpdatedBy:a})})]})}function G(){const{metadata:e}=r(),{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s,tags:a}=e,o=a.length>0,l=!!(t||n||s);return o||l?(0,i.jsxs)("footer",{className:(0,u.A)(v.G.docs.docFooter,"docusaurus-mt-lg"),children:[o&&(0,i.jsx)("div",{className:(0,u.A)("row margin-top--sm",v.G.docs.docFooterTagsRow),children:(0,i.jsx)("div",{className:"col",children:(0,i.jsx)(H,{tags:a})})}),l&&(0,i.jsx)(P,{className:(0,u.A)("margin-top--sm",v.G.docs.docFooterEditMetaRow),editUrl:t,lastUpdatedAt:n,lastUpdatedBy:s})]}):null}var D=n(1422),W=n(6342);function $(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const s=n.slice(2,e.level);e.parentIndex=Math.max(...s),n[e.level]=t}));const s=[];return t.forEach((e=>{const{parentIndex:n,...a}=e;n>=0?t[n].children.push(a):s.push(a)})),s}function F(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:s}=e;return t.flatMap((e=>{const t=F({toc:e.children,minHeadingLevel:n,maxHeadingLevel:s});return function(e){return e.level>=n&&e.level<=s}(e)?[{...e,children:t}]:t}))}function q(e){const t=e.getBoundingClientRect();return t.top===t.bottom?q(e.parentNode):t}function Z(e,t){let{anchorTopOffset:n}=t;const s=e.find((e=>q(e).top>=n));if(s){return function(e){return e.top>0&&e.bottom {e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function Y(e){const t=(0,s.useRef)(void 0),n=J();(0,s.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:s,linkActiveClassName:a,minHeadingLevel:o,maxHeadingLevel:i}=e;function l(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(s),l=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const s=[];for(let a=t;a<=n;a+=1)s.push(`h${a}.anchor`);return Array.from(document.querySelectorAll(s.join()))}({minHeadingLevel:o,maxHeadingLevel:i}),c=Z(l,{anchorTopOffset:n.current}),r=e.find((e=>c&&c.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(a),e.classList.add(a),t.current=e):e.classList.remove(a)}(e,e===r)}))}return document.addEventListener("scroll",l),document.addEventListener("resize",l),l(),()=>{document.removeEventListener("scroll",l),document.removeEventListener("resize",l)}}),[e,n])}function K(e){let{toc:t,className:n,linkClassName:s,isChild:a}=e;return t.length?(0,i.jsx)("ul",{className:a?void 0:n,children:t.map((e=>(0,i.jsxs)("li",{children:[(0,i.jsx)(p.A,{to:`#${e.id}`,className:s??void 0,dangerouslySetInnerHTML:{__html:e.value}}),(0,i.jsx)(K,{isChild:!0,toc:e.children,className:n,linkClassName:s})]},e.id)))}):null}const Q=s.memo(K);function X(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:a="table-of-contents__link",linkActiveClassName:o,minHeadingLevel:l,maxHeadingLevel:c,...r}=e;const d=(0,W.p)(),u=l??d.tableOfContents.minHeadingLevel,m=c??d.tableOfContents.maxHeadingLevel,h=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:a}=e;return(0,s.useMemo)((()=>F({toc:$(t),minHeadingLevel:n,maxHeadingLevel:a})),[t,n,a])}({toc:t,minHeadingLevel:u,maxHeadingLevel:m});return Y((0,s.useMemo)((()=>{if(a&&o)return{linkClassName:a,linkActiveClassName:o,minHeadingLevel:u,maxHeadingLevel:m}}),[a,o,u,m])),(0,i.jsx)(Q,{toc:h,className:n,linkClassName:a,...r})}const ee={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function te(e){let{collapsed:t,...n}=e;return(0,i.jsx)("button",{type:"button",...n,className:(0,u.A)("clean-btn",ee.tocCollapsibleButton,!t&&ee.tocCollapsibleButtonExpanded,n.className),children:(0,i.jsx)(h.A,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component",children:"On this page"})})}const ne={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function se(e){let{toc:t,className:n,minHeadingLevel:s,maxHeadingLevel:a}=e;const{collapsed:o,toggleCollapsed:l}=(0,D.u)({initialState:!0});return(0,i.jsxs)("div",{className:(0,u.A)(ne.tocCollapsible,!o&&ne.tocCollapsibleExpanded,n),children:[(0,i.jsx)(te,{collapsed:o,onClick:l}),(0,i.jsx)(D.N,{lazy:!0,className:ne.tocCollapsibleContent,collapsed:o,children:(0,i.jsx)(X,{toc:t,minHeadingLevel:s,maxHeadingLevel:a})})]})}const ae={tocMobile:"tocMobile_ITEo"};function oe(){const{toc:e,frontMatter:t}=r();return(0,i.jsx)(se,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,u.A)(v.G.docs.docTocMobile,ae.tocMobile)})}const ie={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},le="table-of-contents__link toc-highlight",ce="table-of-contents__link--active";function re(e){let{className:t,...n}=e;return(0,i.jsx)("div",{className:(0,u.A)(ie.tableOfContents,"thin-scrollbar",t),children:(0,i.jsx)(X,{...n,linkClassName:le,linkActiveClassName:ce})})}function de(){const{toc:e,frontMatter:t}=r();return(0,i.jsx)(re,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:v.G.docs.docTocDesktop})}var ue=n(1107),me=n(8453),he=n(5260),pe=n(2303),fe=n(5293);function xe(){const{prism:e}=(0,W.p)(),{colorMode:t}=(0,fe.G)(),n=e.theme,s=e.darkTheme||n;return"dark"===t?s:n}var be=n(8426),ge=n.n(be);const je=/title=(? ["'])(?.*?)\1/,ve=/\{(? [\d,-]+)\}/,Ne={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},Ce={...Ne,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},Ae=Object.keys(Ne);function ke(e,t){const n=e.map((e=>{const{start:n,end:s}=Ce[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function ye(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:a,metastring:o}=t;if(o&&ve.test(o)){const e=o.match(ve).groups.range;if(0===a.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=a[0].className,s=ge()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return ke(["js","jsBlock"],t);case"jsx":case"tsx":return ke(["js","jsBlock","jsx"],t);case"html":return ke(["js","jsBlock","html"],t);case"python":case"py":case"bash":return ke(["bash"],t);case"markdown":case"md":return ke(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return ke(["tex"],t);case"lua":case"haskell":case"sql":return ke(["lua"],t);case"wasm":return ke(["wasm"],t);case"vb":case"vba":case"visual-basic":return ke(["vb","rem"],t);case"vbnet":return ke(["vbnet","rem"],t);case"batch":return ke(["rem"],t);case"basic":return ke(["rem","f90"],t);case"fsharp":return ke(["js","ml"],t);case"ocaml":case"sml":return ke(["ml"],t);case"fortran":return ke(["f90"],t);case"cobol":return ke(["cobol"],t);default:return ke(Ae,t)}}(s,a),l=n.split("\n"),c=Object.fromEntries(a.map((e=>[e.className,{start:0,range:""}]))),r=Object.fromEntries(a.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),u=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let h=0;h void 0!==e));r[t]?c[r[t]].range+=`${h},`:d[t]?c[d[t]].start=h:u[t]&&(c[u[t]].range+=`${c[u[t]].start}-${h-1},`),l.splice(h,1)}n=l.join("\n");const m={};return Object.entries(c).forEach((e=>{let[t,{range:n}]=e;ge()(n).forEach((e=>{m[e]??=[],m[e].push(t)}))})),{lineClassNames:m,code:n}}const Le={codeBlockContainer:"codeBlockContainer_Ckt0"};function _e(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,a]=e;const o=t[s];o&&"string"==typeof a&&(n[o]=a)})),n}(xe());return(0,i.jsx)(t,{...n,style:s,className:(0,u.A)(n.className,Le.codeBlockContainer,v.G.common.codeBlock)})}const Be={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function we(e){let{children:t,className:n}=e;return(0,i.jsx)(_e,{as:"pre",tabIndex:0,className:(0,u.A)(Be.codeBlockStandalone,"thin-scrollbar",n),children:(0,i.jsx)("code",{className:Be.codeBlockLines,children:t})})}const Te={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Ee(e,t){const[n,a]=(0,s.useState)(),i=(0,s.useCallback)((()=>{a(e.current?.closest("[role=tabpanel][hidden]"))}),[e,a]);(0,s.useEffect)((()=>{i()}),[i]),function(e,t,n){void 0===n&&(n=Te);const a=(0,o._q)(t),i=(0,o.Be)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(a);return e&&t.observe(e,i),()=>t.disconnect()}),[e,a,i])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),i())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var He=n(1765);const Me={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function Ie(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:a,getTokenProps:o}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const l=a({line:t,className:(0,u.A)(n,s&&Me.codeLine)}),c=t.map(((e,t)=>(0,i.jsx)("span",{...o({token:e})},t)));return(0,i.jsxs)("span",{...l,children:[s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:Me.codeLineNumber}),(0,i.jsx)("span",{className:Me.codeLineContent,children:c})]}):c,(0,i.jsx)("br",{})]})}function Se(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function Ue(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const Ve={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function Re(e){let{code:t,className:n}=e;const[a,o]=(0,s.useState)(!1),l=(0,s.useRef)(void 0),c=(0,s.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),a=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const o=document.getSelection(),i=o.rangeCount>0&&o.getRangeAt(0);n.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let l=!1;try{l=document.execCommand("copy")}catch{}s.remove(),i&&(o.removeAllRanges(),o.addRange(i)),a&&a.focus()}(t),o(!0),l.current=window.setTimeout((()=>{o(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(l.current)),[]),(0,i.jsx)("button",{type:"button","aria-label":a?(0,h.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,h.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,h.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.A)("clean-btn",n,Ve.copyButton,a&&Ve.copyButtonCopied),onClick:c,children:(0,i.jsxs)("span",{className:Ve.copyButtonIcons,"aria-hidden":"true",children:[(0,i.jsx)(Se,{className:Ve.copyButtonIcon}),(0,i.jsx)(Ue,{className:Ve.copyButtonSuccessIcon})]})})}function ze(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const Oe={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Pe(e){let{className:t,onClick:n,isEnabled:s}=e;const a=(0,h.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,i.jsx)("button",{type:"button",onClick:n,className:(0,u.A)("clean-btn",t,s&&Oe.wordWrapButtonEnabled),"aria-label":a,title:a,children:(0,i.jsx)(ze,{className:Oe.wordWrapButtonIcon,"aria-hidden":"true"})})}function Ge(e){let{children:t,className:n="",metastring:a,title:o,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:r,magicComments:d}}=(0,W.p)(),m=function(e){return e?.toLowerCase()}(c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??r),h=xe(),p=function(){const[e,t]=(0,s.useState)(!1),[n,a]=(0,s.useState)(!1),o=(0,s.useRef)(null),i=(0,s.useCallback)((()=>{const n=o.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[o,e]),l=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=o.current,n=e>t||o.current.querySelector("code").hasAttribute("style");a(n)}),[o]);return Ee(o,l),(0,s.useEffect)((()=>{l()}),[e,l]),(0,s.useEffect)((()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)})),[l]),{codeBlockRef:o,isEnabled:e,isCodeScrollable:n,toggle:i}}(),f=function(e){return e?.match(je)?.groups.title??""}(a)||o,{lineClassNames:x,code:b}=ye(t,{metastring:a,language:m,magicComments:d}),g=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(a);return(0,i.jsxs)(_e,{as:"div",className:(0,u.A)(n,m&&!n.includes(`language-${m}`)&&`language-${m}`),children:[f&&(0,i.jsx)("div",{className:Be.codeBlockTitle,children:f}),(0,i.jsxs)("div",{className:Be.codeBlockContent,children:[(0,i.jsx)(He.f4,{theme:h,code:b,language:m??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:a,getTokenProps:o}=e;return(0,i.jsx)("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,u.A)(t,Be.codeBlock,"thin-scrollbar"),style:n,children:(0,i.jsx)("code",{className:(0,u.A)(Be.codeBlockLines,g&&Be.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,i.jsx)(Ie,{line:e,getLineProps:a,getTokenProps:o,classNames:x[t],showLineNumbers:g},t)))})})}}),(0,i.jsxs)("div",{className:Be.buttonGroup,children:[(p.isEnabled||p.isCodeScrollable)&&(0,i.jsx)(Pe,{className:Be.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),(0,i.jsx)(Re,{className:Be.codeButton,code:b})]})]})]})}function De(e){let{children:t,...n}=e;const a=(0,pe.A)(),o=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof o?Ge:we;return(0,i.jsx)(l,{...n,children:o},String(a))}function We(e){return(0,i.jsx)("code",{...e})}var $e=n(3427);const Fe={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function qe(e){return!!e&&("SUMMARY"===e.tagName||qe(e.parentElement))}function Ze(e,t){return!!e&&(e===t||Ze(e.parentElement,t))}function Je(e){let{summary:t,children:n,...a}=e;(0,$e.A)().collectAnchor(a.id);const o=(0,pe.A)(),l=(0,s.useRef)(null),{collapsed:c,setCollapsed:r}=(0,D.u)({initialState:!a.open}),[d,m]=(0,s.useState)(a.open),h=s.isValidElement(t)?t:(0,i.jsx)("summary",{children:t??"Details"});return(0,i.jsxs)("details",{...a,ref:l,open:d,"data-collapsed":c,className:(0,u.A)(Fe.details,o&&Fe.isBrowser,a.className),onMouseDown:e=>{qe(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;qe(t)&&Ze(t,l.current)&&(e.preventDefault(),c?(r(!1),m(!0)):r(!0))},children:[h,(0,i.jsx)(D.N,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{r(e),m(!e)},children:(0,i.jsx)("div",{className:Fe.collapsibleContent,children:n})})]})}const Ye={details:"details_b_Ee"},Ke="alert alert--info";function Qe(e){let{...t}=e;return(0,i.jsx)(Je,{...t,className:(0,u.A)(Ke,Ye.details,t.className)})}function Xe(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),a=(0,i.jsx)(i.Fragment,{children:t.filter((e=>e!==n))});return(0,i.jsx)(Qe,{...e,summary:n,children:a})}function et(e){return(0,i.jsx)(ue.A,{...e})}const tt={containsTaskList:"containsTaskList_mC6p"};function nt(e){if(void 0!==e)return(0,u.A)(e,e?.includes("contains-task-list")&&tt.containsTaskList)}const st={img:"img_ev3q"};function at(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),a=t.filter((e=>e!==n)),o=n?.props.children;return{mdxAdmonitionTitle:o,rest:a.length>0?(0,i.jsx)(i.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}const ot={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function it(e){let{type:t,className:n,children:s}=e;return(0,i.jsx)("div",{className:(0,u.A)(v.G.common.admonition,v.G.common.admonitionType(t),ot.admonition,n),children:s})}function lt(e){let{icon:t,title:n}=e;return(0,i.jsxs)("div",{className:ot.admonitionHeading,children:[(0,i.jsx)("span",{className:ot.admonitionIcon,children:t}),n]})}function ct(e){let{children:t}=e;return t?(0,i.jsx)("div",{className:ot.admonitionContent,children:t}):null}function rt(e){const{type:t,icon:n,title:s,children:a,className:o}=e;return(0,i.jsxs)(it,{type:t,className:o,children:[s||n?(0,i.jsx)(lt,{title:s,icon:n}):null,(0,i.jsx)(ct,{children:a})]})}function dt(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const ut={icon:(0,i.jsx)(dt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function mt(e){return(0,i.jsx)(rt,{...ut,...e,className:(0,u.A)("alert alert--secondary",e.className),children:e.children})}function ht(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const pt={icon:(0,i.jsx)(ht,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function ft(e){return(0,i.jsx)(rt,{...pt,...e,className:(0,u.A)("alert alert--success",e.className),children:e.children})}function xt(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const bt={icon:(0,i.jsx)(xt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function gt(e){return(0,i.jsx)(rt,{...bt,...e,className:(0,u.A)("alert alert--info",e.className),children:e.children})}function jt(e){return(0,i.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const vt={icon:(0,i.jsx)(jt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function Nt(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const Ct={icon:(0,i.jsx)(Nt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const At={icon:(0,i.jsx)(jt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const kt={...{note:mt,tip:ft,info:gt,warning:function(e){return(0,i.jsx)(rt,{...vt,...e,className:(0,u.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,i.jsx)(rt,{...Ct,...e,className:(0,u.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,i.jsx)(mt,{title:"secondary",...e}),important:e=>(0,i.jsx)(gt,{title:"important",...e}),success:e=>(0,i.jsx)(ft,{title:"success",...e}),caution:function(e){return(0,i.jsx)(rt,{...At,...e,className:(0,u.A)("alert alert--warning",e.className),children:e.children})}}};function yt(e){const t=at(e),n=(s=t.type,kt[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),kt.info));var s;return(0,i.jsx)(n,{...t})}var Lt=n(418);const _t={Head:he.A,details:Xe,Details:Xe,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,i.jsx)(We,{...e}):(0,i.jsx)(De,{...e})},a:function(e){return(0,i.jsx)(p.A,{...e})},pre:function(e){return(0,i.jsx)(i.Fragment,{children:e.children})},ul:function(e){return(0,i.jsx)("ul",{...e,className:nt(e.className)})},li:function(e){return(0,$e.A)().collectAnchor(e.id),(0,i.jsx)("li",{...e})},img:function(e){return(0,i.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,u.A)(t,st.img))});var t},h1:e=>(0,i.jsx)(et,{as:"h1",...e}),h2:e=>(0,i.jsx)(et,{as:"h2",...e}),h3:e=>(0,i.jsx)(et,{as:"h3",...e}),h4:e=>(0,i.jsx)(et,{as:"h4",...e}),h5:e=>(0,i.jsx)(et,{as:"h5",...e}),h6:e=>(0,i.jsx)(et,{as:"h6",...e}),admonition:yt,mermaid:Lt.A};function Bt(e){let{children:t}=e;return(0,i.jsx)(me.x,{components:_t,children:t})}function wt(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=r();return t.hide_title||void 0!==n?null:e.title}();return(0,i.jsxs)("div",{className:(0,u.A)(v.G.docs.docMarkdown,"markdown"),children:[n&&(0,i.jsx)("header",{children:(0,i.jsx)(ue.A,{as:"h1",children:n})}),(0,i.jsx)(Bt,{children:t})]})}var Tt=n(4142),Et=n(9169),Ht=n(6025);function Mt(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const It={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function St(){const e=(0,Ht.A)("/");return(0,i.jsx)("li",{className:"breadcrumbs__item",children:(0,i.jsx)(p.A,{"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,i.jsx)(Mt,{className:It.breadcrumbHomeIcon})})})}const Ut={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function Vt(e){let{children:t,href:n,isLast:s}=e;const a="breadcrumbs__link";return s?(0,i.jsx)("span",{className:a,itemProp:"name",children:t}):n?(0,i.jsx)(p.A,{className:a,href:n,itemProp:"item",children:(0,i.jsx)("span",{itemProp:"name",children:t})}):(0,i.jsx)("span",{className:a,children:t})}function Rt(e){let{children:t,active:n,index:s,addMicrodata:a}=e;return(0,i.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,u.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,i.jsx)("meta",{itemProp:"position",content:String(s+1)})]})}function zt(){const e=(0,Tt.OF)(),t=(0,Et.Dt)();return e?(0,i.jsx)("nav",{className:(0,u.A)(v.G.docs.docBreadcrumbs,Ut.breadcrumbsContainer),"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,i.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,i.jsx)(St,{}),e.map(((t,n)=>{const s=n===e.length-1,a="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,i.jsx)(Rt,{active:s,index:n,addMicrodata:!!a,children:(0,i.jsx)(Vt,{href:a,isLast:s,children:t.label})},n)}))]})}):null}function Ot(){return(0,i.jsx)(h.A,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Pt(){return(0,i.jsx)(h.A,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function Gt(){return(0,i.jsx)(he.A,{children:(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function Dt(e){let{className:t}=e;return(0,i.jsx)(yt,{type:"caution",title:(0,i.jsx)(Ot,{}),className:(0,u.A)(t,v.G.common.unlistedBanner),children:(0,i.jsx)(Pt,{})})}function Wt(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Gt,{}),(0,i.jsx)(Dt,{...e})]})}const $t={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Ft(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=r(),n=(0,m.l)(),s=e.hide_table_of_contents,a=!s&&t.length>0;return{hidden:s,mobile:a?(0,i.jsx)(oe,{}):void 0,desktop:!a||"desktop"!==n&&"ssr"!==n?void 0:(0,i.jsx)(de,{})}}(),{metadata:{unlisted:s}}=r();return(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:(0,u.A)("col",!n.hidden&&$t.docItemCol),children:[s&&(0,i.jsx)(Wt,{}),(0,i.jsx)(_,{}),(0,i.jsxs)("div",{className:$t.docItemContainer,children:[(0,i.jsxs)("article",{children:[(0,i.jsx)(zt,{}),(0,i.jsx)(B,{}),n.mobile,(0,i.jsx)(wt,{children:t}),(0,i.jsx)(G,{})]}),(0,i.jsx)(b,{})]})]}),n.desktop&&(0,i.jsx)("div",{className:"col col--3",children:n.desktop})]})}function qt(e){const t=`docs-doc-id-${e.content.metadata.id}`,n=e.content;return(0,i.jsx)(c,{content:e.content,children:(0,i.jsxs)(a.e3,{className:t,children:[(0,i.jsx)(d,{}),(0,i.jsx)(Ft,{children:(0,i.jsx)(n,{})})]})})}},8426:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,a,o]=t;if(s&&o){s=parseInt(s),o=parseInt(o);const e=s {"use strict";n.d(t,{R:()=>i,x:()=>l});var s=n(6540);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1b737de1.626a278a.js b/assets/js/1b737de1.626a278a.js new file mode 100644 index 0000000..3f9ef3c --- /dev/null +++ b/assets/js/1b737de1.626a278a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[687],{959:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>a,default:()=>l,frontMatter:()=>r,metadata:()=>m,toc:()=>p});var t=s(4848),o=s(8453);const r={},a="\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438",m={id:"onprem/Compressa LLM/compressa_llm_management/index",title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438",description:"\u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0433\u0430\u0439\u0434\u043e\u043c \u043f\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043c\u043e\u0434\u0435\u043b\u0438 Mistral",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_management/index.md",sourceDirName:"onprem/Compressa LLM/compressa_llm_management",slug:"/onprem/Compressa LLM/compressa_llm_management/",permalink:"/onprem/Compressa LLM/compressa_llm_management/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_management/index.md",tags:[],version:"current",frontMatter:{},sidebar:"onpremSidebar",previous:{title:"\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443",permalink:"/onprem/Compressa LLM/compressa_llm_install/without_internet"},next:{title:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise",permalink:"/onprem/Compressa LLM/compressa_llm_management/mistral_7b"}},i={},p=[];function c(e){const n={a:"a",admonition:"admonition",h1:"h1",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438",children:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438"}),"\n",(0,t.jsx)(n.p,{children:"\u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0433\u0430\u0439\u0434\u043e\u043c \u043f\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043c\u043e\u0434\u0435\u043b\u0438 Mistral"}),"\n",(0,t.jsxs)(n.p,{children:["\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e LLM c \u043f\u043e\u043c\u043e\u0449\u044c\u044e API \u0438\u043b\u0438 UI, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 ",(0,t.jsx)(n.a,{href:"/onprem/%D0%9F%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D0%B0%20Compressa/LLM_management/",children:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 LLM (UI & API)"})," \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u0412\u0430\u0436\u043d\u043e!"})," \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u0431\u0430\u0437\u043e\u0432\u044b\u0439 URL \u0434\u043b\u044f LLM - ",(0,t.jsx)(n.a,{href:"http://localhost:8080/pod-1/api/v1/",children:"http://localhost:8080/pod-1/api/v1/"}),". \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Compressa LLM \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ",(0,t.jsx)(n.a,{href:"http://localhost:8080/api/v1/",children:"http://localhost:8080/api/v1/"})]})})]})}function l(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>m});var t=s(6540);const o={},r=t.createContext(o);function a(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function m(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1b737de1.b5c4a761.js b/assets/js/1b737de1.b5c4a761.js deleted file mode 100644 index 6cc461b..0000000 --- a/assets/js/1b737de1.b5c4a761.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[1687],{959:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>a,default:()=>l,frontMatter:()=>r,metadata:()=>m,toc:()=>p});var t=s(4848),o=s(8453);const r={},a="\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438",m={id:"onprem/Compressa LLM/compressa_llm_management/index",title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438",description:"\u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0433\u0430\u0439\u0434\u043e\u043c \u043f\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043c\u043e\u0434\u0435\u043b\u0438 Mistral",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_management/index.md",sourceDirName:"onprem/Compressa LLM/compressa_llm_management",slug:"/onprem/Compressa LLM/compressa_llm_management/",permalink:"/onprem/Compressa LLM/compressa_llm_management/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_management/index.md",tags:[],version:"current",frontMatter:{},sidebar:"onpremSidebar",previous:{title:"\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443",permalink:"/onprem/Compressa LLM/compressa_llm_install/without_internet"},next:{title:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise",permalink:"/onprem/Compressa LLM/compressa_llm_management/mistral_7b"}},i={},p=[];function c(e){const n={a:"a",admonition:"admonition",h1:"h1",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438",children:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438"}),"\n",(0,t.jsx)(n.p,{children:"\u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0433\u0430\u0439\u0434\u043e\u043c \u043f\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043c\u043e\u0434\u0435\u043b\u0438 Mistral"}),"\n",(0,t.jsxs)(n.p,{children:["\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e LLM c \u043f\u043e\u043c\u043e\u0449\u044c\u044e API \u0438\u043b\u0438 UI, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 ",(0,t.jsx)(n.a,{href:"/onprem/%D0%9F%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D0%B0%20Compressa/LLM_management/",children:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 LLM (UI & API)"})," \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"\u0412\u0430\u0436\u043d\u043e!"})," \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u0431\u0430\u0437\u043e\u0432\u044b\u0439 URL \u0434\u043b\u044f LLM - ",(0,t.jsx)(n.a,{href:"http://localhost:8080/pod-1/api/v1/",children:"http://localhost:8080/pod-1/api/v1/"}),". \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Compressa LLM \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ",(0,t.jsx)(n.a,{href:"http://localhost:8080/api/v1/",children:"http://localhost:8080/api/v1/"})]})})]})}function l(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>m});var t=s(6540);const o={},r=t.createContext(o);function a(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function m(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1d5944e0.6bb3aad3.js b/assets/js/1d5944e0.6bb3aad3.js deleted file mode 100644 index 4b61a41..0000000 --- a/assets/js/1d5944e0.6bb3aad3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[9701],{8118:(t,s,e)=>{e.r(s),e.d(s,{assets:()=>o,contentTitle:()=>c,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var n=e(4848),r=e(8453);const i={sidebar_position:2,title:"Quickstart",sidebar_class_name:"docs_sidebar_index"},c="Quickstart",a={id:"docs/Quickstart/index",title:"Quickstart",description:"\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430 \u0432\u044b\u0431\u043e\u0440:",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/index.md",sourceDirName:"docs/Quickstart",slug:"/docs/Quickstart/",permalink:"/docs/Quickstart/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/index.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Quickstart",sidebar_class_name:"docs_sidebar_index"},sidebar:"docsSidebar",previous:{title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",permalink:"/docs/intro"},next:{title:"Python SDK (Langchain)",permalink:"/docs/Quickstart/langchain"}},o={},d=[];function u(t){const s={a:"a",br:"br",h1:"h1",p:"p",...(0,r.R)(),...t.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h1,{id:"quickstart",children:"Quickstart"}),"\n",(0,n.jsx)(s.p,{children:"\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430 \u0432\u044b\u0431\u043e\u0440:"}),"\n",(0,n.jsxs)(s.p,{children:["\u2043 ",(0,n.jsx)(s.a,{href:"/docs/Quickstart/langchain",children:"Python SDK (Langchain)"}),(0,n.jsx)(s.br,{}),"\n","\u2043 ",(0,n.jsx)(s.a,{href:"/docs/Quickstart/REST_API",children:"REST API"}),(0,n.jsx)(s.br,{}),"\n","\u2043 ",(0,n.jsx)(s.a,{href:"/docs/Quickstart/openai",children:"\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 OpenAI"})]}),"\n",(0,n.jsxs)(s.p,{children:["\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439 Compressa \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f API \u043a\u043b\u044e\u0447. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 ",(0,n.jsx)(s.a,{href:"https://compressa.ai/form",children:"\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"}),"."]}),"\n",(0,n.jsxs)(s.p,{children:["\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0432\u043e\u0433\u043e RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430\u0448 ",(0,n.jsx)(s.a,{href:"/guides/langchain_rag/",children:"\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0430\u0439\u0434"}),"."]})]})}function l(t={}){const{wrapper:s}={...(0,r.R)(),...t.components};return s?(0,n.jsx)(s,{...t,children:(0,n.jsx)(u,{...t})}):u(t)}},8453:(t,s,e)=>{e.d(s,{R:()=>c,x:()=>a});var n=e(6540);const r={},i=n.createContext(r);function c(t){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof t?t(s):{...s,...t}}),[s,t])}function a(t){let s;return s=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:c(t.components),n.createElement(i.Provider,{value:s},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/1e2aa677.83bc389f.js b/assets/js/1e2aa677.83bc389f.js deleted file mode 100644 index 2c0259e..0000000 --- a/assets/js/1e2aa677.83bc389f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[7805],{8522:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>u,metadata:()=>c,toc:()=>d});var r=t(4848),a=t(8453),s=t(1470),o=t(9365);const u={sidebar_position:4},l="Rerank",c={id:"docs/basic_modules/Rerank",title:"Rerank",description:"Rerank-\u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043e\u0442\u0440\u044b\u0432\u043a\u0438 / \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u041e\u043d\u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0438\u0441\u043a\u0430, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Rerank.md",sourceDirName:"docs/basic_modules",slug:"/docs/basic_modules/Rerank",permalink:"/docs/basic_modules/Rerank",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Rerank.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"docsSidebar",previous:{title:"Embeddings",permalink:"/docs/basic_modules/Embeddings"},next:{title:"Fine-tuning",permalink:"/docs/basic_modules/Fine-tuning"}},i={},d=[{value:"\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c 3 \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c-\u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c-3-\u0441\u0430\u043c\u044b\u0445-\u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-\u0434\u043b\u044f-\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e-\u0432\u043e\u043f\u0440\u043e\u0441\u0430",level:3}];function p(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"rerank",children:"Rerank"}),"\n",(0,r.jsx)(n.p,{children:"Rerank-\u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043e\u0442\u0440\u044b\u0432\u043a\u0438 / \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u041e\u043d\u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0438\u0441\u043a\u0430, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c."}),"\n",(0,r.jsx)(n.h3,{id:"\u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c-\u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c-3-\u0441\u0430\u043c\u044b\u0445-\u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-\u0434\u043b\u044f-\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e-\u0432\u043e\u043f\u0440\u043e\u0441\u0430",children:"\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c 3 \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430:"}),"\n","\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(o.A,{value:"python",label:"Python (Langchain)",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'from langchain_core.documents import Document\nfrom langchain_compressa.reranks import CompressaRerank\n\nreranker = CompressaRerank(\n base_url="https://compressa-api.mil-team.ru/v1", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n top_n=3 \n) \n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Langchain, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c metadata\ndocuments = [\n Document(\n page_content="""\u041a\u0430\u0440\u0441\u043e\u043d-\u0421\u0438\u0442\u0438 \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u0448\u0442\u0430\u0442\u0430 \u041d\u0435\u0432\u0430\u0434\u0430. \n \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0438 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f \u0421\u0428\u0410 2010 \u0433\u043e\u0434\u0430, \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435 \u041a\u0430\u0440\u0441\u043e\u043d-\u0421\u0438\u0442\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e 55 274 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/1"}\n ),\n Document(\n page_content="""\u0421\u043e\u0434\u0440\u0443\u0436\u0435\u0441\u0442\u0432\u043e \u0421\u0435\u0432\u0435\u0440\u043d\u044b\u0445 \u041c\u0430\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u2014 \u0433\u0440\u0443\u043f\u043f\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u0432 \u0422\u0438\u0445\u043e\u043c \u043e\u043a\u0435\u0430\u043d\u0435, \n \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0428\u0442\u0430\u0442\u0430\u043c\u0438. \n \u0421\u0442\u043e\u043b\u0438\u0446\u0430 \u2014 \u0421\u0430\u0439\u043f\u0430\u043d.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/2"}\n ),\n Document(\n page_content="""\u0428\u0430\u0440\u043b\u043e\u0442\u0442\u0430-\u0410\u043c\u0430\u043b\u0438\u044f \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0438 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u0439 \u0433\u043e\u0440\u043e\u0434 \u0412\u0438\u0440\u0433\u0438\u043d\u0441\u043a\u0438\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u0421\u0428\u0410. \n \u0412 \u043d\u0435\u043c \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 20 000 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u0413\u043e\u0440\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u0435 \u0421\u0435\u043d\u0442-\u0422\u043e\u043c\u0430\u0441.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/3"}\n ),\n Document(\n page_content="""\u0412\u0430\u0448\u0438\u043d\u0433\u0442\u043e\u043d, \u043e\u043a\u0440\u0443\u0433 \u041a\u043e\u043b\u0443\u043c\u0431\u0438\u044f (\u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0412\u0430\u0448\u0438\u043d\u0433\u0442\u043e\u043d \u0438\u043b\u0438 \n \u043e\u043a\u0440\u0443\u0433 \u041a\u043e\u043b\u0443\u043c\u0431\u0438\u044f, \u0438 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043a\u0430\u043a \u043e\u043a\u0440\u0443\u0433 \u041a\u043e\u043b\u0443\u043c\u0431\u0438\u044f) \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u043e\u0432. \n \u042d\u0442\u043e \u0444\u0435\u0434\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433. \u041d\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0446\u0438\u044f \u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u0430 \u0421\u0428\u0410 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \n \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0443\u0447\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0446\u0435\u043d\u0442\u0440\u043e\u043c \n \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u043e\u0432 \u0410\u043c\u0435\u0440\u0438\u043a\u0438.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/4"}\n ), \n Document(\n page_content="""\u0421\u043c\u0435\u0440\u0442\u043d\u0430\u044f \u043a\u0430\u0437\u043d\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u0432 \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u0430\u0445 \u0435\u0449\u0435 \u0434\u043e \u0442\u043e\u0433\u043e, \n \u043a\u0430\u043a \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0435 \u0428\u0442\u0430\u0442\u044b \u0441\u0442\u0430\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u043e\u0439. \u041f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043d\u0430 2017 \u0433\u043e\u0434 \u0441\u043c\u0435\u0440\u0442\u043d\u0430\u044f \u043a\u0430\u0437\u043d\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0430 \n \u0432 30 \u0438\u0437 50 \u0448\u0442\u0430\u0442\u043e\u0432. \u0424\u0435\u0434\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u043b\u044b \u0421\u0428\u0410) \u0442\u0430\u043a\u0436\u0435 \n \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043c\u0435\u0440\u0442\u043d\u0443\u044e \u043a\u0430\u0437\u043d\u044c.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/5"}\n )\n]\n\n# \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0432\u043e\u043f\u0440\u043e\u0441, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u043c 3 \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430\nquery = "\u041a\u0430\u043a\u0430\u044f \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0443 \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u043e\u0432 \u0410\u043c\u0435\u0440\u0438\u043a\u0438?"\n\ncompress_res = reranker.compress_documents(query=query, documents=documents)\n'})})}),(0,r.jsx)(o.A,{value:"curl",label:"cURL",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/rerank\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X POST "https://compressa-api.mil-team.ru/v1/rerank" \\\n -H "accept: application/json" \\\n -H "Content-Type: application/json" \\\n -H \'Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa\' \\\n -d \'{\n "model": "Compressa-ReRank",\n "query": "\u041a\u0430\u043a\u0430\u044f \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0443 \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u043e\u0432 \u0410\u043c\u0435\u0440\u0438\u043a\u0438?",\n "documents": [\n "\u041a\u0430\u0440\u0441\u043e\u043d-\u0421\u0438\u0442\u0438 \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u0448\u0442\u0430\u0442\u0430 \u041d\u0435\u0432\u0430\u0434\u0430. \n \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0438 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f \u0421\u0428\u0410 2010 \u0433\u043e\u0434\u0430, \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435 \u041a\u0430\u0440\u0441\u043e\u043d-\u0421\u0438\u0442\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e 55 274 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430.",\n "\u0421\u043e\u0434\u0440\u0443\u0436\u0435\u0441\u0442\u0432\u043e \u0421\u0435\u0432\u0435\u0440\u043d\u044b\u0445 \u041c\u0430\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u2014 \u0433\u0440\u0443\u043f\u043f\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u0432 \u0422\u0438\u0445\u043e\u043c \u043e\u043a\u0435\u0430\u043d\u0435, \n \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0428\u0442\u0430\u0442\u0430\u043c\u0438. \n \u0421\u0442\u043e\u043b\u0438\u0446\u0430 \u2014 \u0421\u0430\u0439\u043f\u0430\u043d.",\n "\u0428\u0430\u0440\u043b\u043e\u0442\u0442\u0430-\u0410\u043c\u0430\u043b\u0438\u044f \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0438 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u0439 \u0433\u043e\u0440\u043e\u0434 \u0412\u0438\u0440\u0433\u0438\u043d\u0441\u043a\u0438\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u0421\u0428\u0410. \n \u0412 \u043d\u0435\u043c \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 20 000 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u0413\u043e\u0440\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u0435 \u0421\u0435\u043d\u0442-\u0422\u043e\u043c\u0430\u0441."\n ],\n "return_documents": false\n }\'\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsxs)(n.strong,{children:["\u041f\u043e\u043b\u044c\u0437\u0443 \u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 ",(0,r.jsx)(n.a,{href:"/guides/langchain_basic_rerank/",children:"\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0430\u0439\u0434"}),", \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u043c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 CompressaRerank."]})})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var r=t(4164);const a={tabItem:"tabItem_Ymn6"};var s=t(4848);function o(e){let{children:n,hidden:t,className:o}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(a.tabItem,o),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>y});var r=t(6540),a=t(4164),s=t(3104),o=t(6347),u=t(205),l=t(7485),c=t(1682),i=t(9466);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:a}}=e;return{value:n,label:t,attributes:r,default:a}}))}(t);return function(e){const n=(0,c.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function m(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function h(e){let{queryString:n=!1,groupId:t}=e;const a=(0,o.W6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(a.location.search);n.set(s,e),a.replace({...a.location,search:n.toString()})}),[s,a])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,s=p(e),[o,l]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!m({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:s}))),[c,d]=h({queryString:t,groupId:a}),[b,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,s]=(0,i.Dv)(t);return[a,(0,r.useCallback)((e=>{t&&s.set(e)}),[t,s])]}({groupId:a}),g=(()=>{const e=c??b;return m({value:e,tabValues:s})?e:null})();(0,u.A)((()=>{g&&l(g)}),[g]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);l(e),d(e),f(e)}),[d,f,s]),tabValues:s}}var f=t(2303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(4848);function _(e){let{className:n,block:t,selectedValue:r,selectValue:o,tabValues:u}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.a_)(),i=e=>{const n=e.currentTarget,t=l.indexOf(n),a=u[t].value;a!==r&&(c(n),o(a))},d=e=>{let n=null;switch(e.key){case"Enter":i(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:u.map((e=>{let{value:n,label:t,attributes:s}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>l.push(e),onKeyDown:d,onClick:i,...s,className:(0,a.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function k(e){let{lazy:n,children:t,selectedValue:a}=e;const s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=s.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:s.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function x(e){const n=b(e);return(0,v.jsxs)("div",{className:(0,a.A)("tabs-container",g.tabList),children:[(0,v.jsx)(_,{...n,...e}),(0,v.jsx)(k,{...n,...e})]})}function y(e){const n=(0,f.A)();return(0,v.jsx)(x,{...e,children:d(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>u});var r=t(6540);const a={},s=r.createContext(a);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function u(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1e2aa677.c63d9e6a.js b/assets/js/1e2aa677.c63d9e6a.js new file mode 100644 index 0000000..7ceffa4 --- /dev/null +++ b/assets/js/1e2aa677.c63d9e6a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[805],{8522:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>l,default:()=>m,frontMatter:()=>u,metadata:()=>c,toc:()=>d});var r=t(4848),a=t(8453),s=t(1470),o=t(9365);const u={sidebar_position:4},l="Rerank",c={id:"docs/basic_modules/Rerank",title:"Rerank",description:"Rerank-\u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043e\u0442\u0440\u044b\u0432\u043a\u0438 / \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u041e\u043d\u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0438\u0441\u043a\u0430, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Rerank.md",sourceDirName:"docs/basic_modules",slug:"/docs/basic_modules/Rerank",permalink:"/docs/basic_modules/Rerank",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Rerank.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"docsSidebar",previous:{title:"Embeddings",permalink:"/docs/basic_modules/Embeddings"},next:{title:"Fine-tuning",permalink:"/docs/basic_modules/Fine-tuning"}},i={},d=[{value:"\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c 3 \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c-\u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c-3-\u0441\u0430\u043c\u044b\u0445-\u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-\u0434\u043b\u044f-\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e-\u0432\u043e\u043f\u0440\u043e\u0441\u0430",level:3}];function p(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"rerank",children:"Rerank"}),"\n",(0,r.jsx)(n.p,{children:"Rerank-\u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043e\u0442\u0440\u044b\u0432\u043a\u0438 / \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u041e\u043d\u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0438\u0441\u043a\u0430, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c."}),"\n",(0,r.jsx)(n.h3,{id:"\u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c-\u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c-3-\u0441\u0430\u043c\u044b\u0445-\u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-\u0434\u043b\u044f-\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e-\u0432\u043e\u043f\u0440\u043e\u0441\u0430",children:"\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c 3 \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430:"}),"\n","\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(o.A,{value:"python",label:"Python (Langchain)",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'from langchain_core.documents import Document\nfrom langchain_compressa.reranks import CompressaRerank\n\nreranker = CompressaRerank(\n base_url="https://compressa-api.mil-team.ru/v1", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n top_n=3 \n) \n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Langchain, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c metadata\ndocuments = [\n Document(\n page_content="""\u041a\u0430\u0440\u0441\u043e\u043d-\u0421\u0438\u0442\u0438 \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u0448\u0442\u0430\u0442\u0430 \u041d\u0435\u0432\u0430\u0434\u0430. \n \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0438 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f \u0421\u0428\u0410 2010 \u0433\u043e\u0434\u0430, \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435 \u041a\u0430\u0440\u0441\u043e\u043d-\u0421\u0438\u0442\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e 55 274 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/1"}\n ),\n Document(\n page_content="""\u0421\u043e\u0434\u0440\u0443\u0436\u0435\u0441\u0442\u0432\u043e \u0421\u0435\u0432\u0435\u0440\u043d\u044b\u0445 \u041c\u0430\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u2014 \u0433\u0440\u0443\u043f\u043f\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u0432 \u0422\u0438\u0445\u043e\u043c \u043e\u043a\u0435\u0430\u043d\u0435, \n \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0428\u0442\u0430\u0442\u0430\u043c\u0438. \n \u0421\u0442\u043e\u043b\u0438\u0446\u0430 \u2014 \u0421\u0430\u0439\u043f\u0430\u043d.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/2"}\n ),\n Document(\n page_content="""\u0428\u0430\u0440\u043b\u043e\u0442\u0442\u0430-\u0410\u043c\u0430\u043b\u0438\u044f \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0438 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u0439 \u0433\u043e\u0440\u043e\u0434 \u0412\u0438\u0440\u0433\u0438\u043d\u0441\u043a\u0438\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u0421\u0428\u0410. \n \u0412 \u043d\u0435\u043c \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 20 000 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u0413\u043e\u0440\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u0435 \u0421\u0435\u043d\u0442-\u0422\u043e\u043c\u0430\u0441.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/3"}\n ),\n Document(\n page_content="""\u0412\u0430\u0448\u0438\u043d\u0433\u0442\u043e\u043d, \u043e\u043a\u0440\u0443\u0433 \u041a\u043e\u043b\u0443\u043c\u0431\u0438\u044f (\u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0412\u0430\u0448\u0438\u043d\u0433\u0442\u043e\u043d \u0438\u043b\u0438 \n \u043e\u043a\u0440\u0443\u0433 \u041a\u043e\u043b\u0443\u043c\u0431\u0438\u044f, \u0438 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043a\u0430\u043a \u043e\u043a\u0440\u0443\u0433 \u041a\u043e\u043b\u0443\u043c\u0431\u0438\u044f) \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u043e\u0432. \n \u042d\u0442\u043e \u0444\u0435\u0434\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433. \u041d\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0446\u0438\u044f \u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u0430 \u0421\u0428\u0410 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \n \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0443\u0447\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0446\u0435\u043d\u0442\u0440\u043e\u043c \n \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u043e\u0432 \u0410\u043c\u0435\u0440\u0438\u043a\u0438.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/4"}\n ), \n Document(\n page_content="""\u0421\u043c\u0435\u0440\u0442\u043d\u0430\u044f \u043a\u0430\u0437\u043d\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u0432 \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u0430\u0445 \u0435\u0449\u0435 \u0434\u043e \u0442\u043e\u0433\u043e, \n \u043a\u0430\u043a \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0435 \u0428\u0442\u0430\u0442\u044b \u0441\u0442\u0430\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u043e\u0439. \u041f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043d\u0430 2017 \u0433\u043e\u0434 \u0441\u043c\u0435\u0440\u0442\u043d\u0430\u044f \u043a\u0430\u0437\u043d\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0430 \n \u0432 30 \u0438\u0437 50 \u0448\u0442\u0430\u0442\u043e\u0432. \u0424\u0435\u0434\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u043b\u044b \u0421\u0428\u0410) \u0442\u0430\u043a\u0436\u0435 \n \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043c\u0435\u0440\u0442\u043d\u0443\u044e \u043a\u0430\u0437\u043d\u044c.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/5"}\n )\n]\n\n# \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0432\u043e\u043f\u0440\u043e\u0441, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u043c 3 \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430\nquery = "\u041a\u0430\u043a\u0430\u044f \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0443 \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u043e\u0432 \u0410\u043c\u0435\u0440\u0438\u043a\u0438?"\n\ncompress_res = reranker.compress_documents(query=query, documents=documents)\n'})})}),(0,r.jsx)(o.A,{value:"curl",label:"cURL",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/rerank\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X POST "https://compressa-api.mil-team.ru/v1/rerank" \\\n -H "accept: application/json" \\\n -H "Content-Type: application/json" \\\n -H \'Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa\' \\\n -d \'{\n "model": "Compressa-ReRank",\n "query": "\u041a\u0430\u043a\u0430\u044f \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0443 \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u043e\u0432 \u0410\u043c\u0435\u0440\u0438\u043a\u0438?",\n "documents": [\n "\u041a\u0430\u0440\u0441\u043e\u043d-\u0421\u0438\u0442\u0438 \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u0448\u0442\u0430\u0442\u0430 \u041d\u0435\u0432\u0430\u0434\u0430. \n \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0438 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f \u0421\u0428\u0410 2010 \u0433\u043e\u0434\u0430, \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435 \u041a\u0430\u0440\u0441\u043e\u043d-\u0421\u0438\u0442\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e 55 274 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430.",\n "\u0421\u043e\u0434\u0440\u0443\u0436\u0435\u0441\u0442\u0432\u043e \u0421\u0435\u0432\u0435\u0440\u043d\u044b\u0445 \u041c\u0430\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u2014 \u0433\u0440\u0443\u043f\u043f\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u0432 \u0422\u0438\u0445\u043e\u043c \u043e\u043a\u0435\u0430\u043d\u0435, \n \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0428\u0442\u0430\u0442\u0430\u043c\u0438. \n \u0421\u0442\u043e\u043b\u0438\u0446\u0430 \u2014 \u0421\u0430\u0439\u043f\u0430\u043d.",\n "\u0428\u0430\u0440\u043b\u043e\u0442\u0442\u0430-\u0410\u043c\u0430\u043b\u0438\u044f \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0438 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u0439 \u0433\u043e\u0440\u043e\u0434 \u0412\u0438\u0440\u0433\u0438\u043d\u0441\u043a\u0438\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u0421\u0428\u0410. \n \u0412 \u043d\u0435\u043c \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 20 000 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u0413\u043e\u0440\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u0435 \u0421\u0435\u043d\u0442-\u0422\u043e\u043c\u0430\u0441."\n ],\n "return_documents": false\n }\'\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsxs)(n.strong,{children:["\u041f\u043e\u043b\u044c\u0437\u0443 \u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 ",(0,r.jsx)(n.a,{href:"/guides/langchain_basic_rerank/",children:"\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0430\u0439\u0434"}),", \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u043c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 CompressaRerank."]})})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var r=t(4164);const a={tabItem:"tabItem_Ymn6"};var s=t(4848);function o(e){let{children:n,hidden:t,className:o}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(a.tabItem,o),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>y});var r=t(6540),a=t(4164),s=t(3104),o=t(6347),u=t(205),l=t(7485),c=t(1682),i=t(9466);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:a}}=e;return{value:n,label:t,attributes:r,default:a}}))}(t);return function(e){const n=(0,c.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function m(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function h(e){let{queryString:n=!1,groupId:t}=e;const a=(0,o.W6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(a.location.search);n.set(s,e),a.replace({...a.location,search:n.toString()})}),[s,a])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,s=p(e),[o,l]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!m({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:s}))),[c,d]=h({queryString:t,groupId:a}),[b,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,s]=(0,i.Dv)(t);return[a,(0,r.useCallback)((e=>{t&&s.set(e)}),[t,s])]}({groupId:a}),g=(()=>{const e=c??b;return m({value:e,tabValues:s})?e:null})();(0,u.A)((()=>{g&&l(g)}),[g]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);l(e),d(e),f(e)}),[d,f,s]),tabValues:s}}var f=t(2303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(4848);function _(e){let{className:n,block:t,selectedValue:r,selectValue:o,tabValues:u}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.a_)(),i=e=>{const n=e.currentTarget,t=l.indexOf(n),a=u[t].value;a!==r&&(c(n),o(a))},d=e=>{let n=null;switch(e.key){case"Enter":i(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:u.map((e=>{let{value:n,label:t,attributes:s}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>l.push(e),onKeyDown:d,onClick:i,...s,className:(0,a.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function k(e){let{lazy:n,children:t,selectedValue:a}=e;const s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=s.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:s.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function x(e){const n=b(e);return(0,v.jsxs)("div",{className:(0,a.A)("tabs-container",g.tabList),children:[(0,v.jsx)(_,{...n,...e}),(0,v.jsx)(k,{...n,...e})]})}function y(e){const n=(0,f.A)();return(0,v.jsx)(x,{...e,children:d(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>u});var r=t(6540);const a={},s=r.createContext(a);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function u(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2237.7417e5a1.js b/assets/js/2237.7417e5a1.js deleted file mode 100644 index 1eafa8c..0000000 --- a/assets/js/2237.7417e5a1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[2237],{3363:(e,t,s)=>{s.d(t,{A:()=>a});s(6540);var n=s(4164),o=s(1312),i=s(1107),r=s(4848);function a(e){let{className:t}=e;return(0,r.jsx)("main",{className:(0,n.A)("container margin-vert--xl",t),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(i.A,{as:"h1",className:"hero__title",children:(0,r.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},2237:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});s(6540);var n=s(1312),o=s(1003),i=s(781),r=s(3363),a=s(4848);function c(){const e=(0,n.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.be,{title:e}),(0,a.jsx)(i.A,{children:(0,a.jsx)(r.A,{})})]})}}}]); \ No newline at end of file diff --git a/assets/js/22c41bdb.3374e451.js b/assets/js/22c41bdb.3374e451.js new file mode 100644 index 0000000..993fd84 --- /dev/null +++ b/assets/js/22c41bdb.3374e451.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[261],{3017:(s,n,e)=>{e.r(n),e.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>a,frontMatter:()=>t,metadata:()=>d,toc:()=>o});var i=e(4848),r=e(8453);const t={sidebar_position:2},c="\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442",d={id:"docs/insightstream_module/file_search",title:"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442",description:"\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/file_search.md",sourceDirName:"docs/insightstream_module",slug:"/docs/insightstream_module/file_search",permalink:"/docs/insightstream_module/file_search",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/file_search.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)",permalink:"/docs/insightstream_module/file_upload"},next:{title:"REST API",permalink:"/docs/rest.mdx"}},l={},o=[{value:"\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430.",id:"\u043a\u043e\u0433\u0434\u0430-\u043c\u044b-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438-\u0438-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b-\u0438\u0437-\u0431\u0430\u0437\u044b-\u0437\u043d\u0430\u043d\u0438\u0439-\u043c\u044b-\u043c\u043e\u0436\u0435\u043c-\u0437\u0430\u0434\u0430\u0442\u044c-\u0432\u043e\u043f\u0440\u043e\u0441-\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443-\u0438-\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c-\u0442\u043e\u0447\u043d\u044b\u0439-\u043e\u0442\u0432\u0435\u0442-\u0441-\u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430",level:4},{value:"\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430",id:"\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430-\u0432\u043e\u043f\u0440\u043e\u0441\u0430-\u0434\u043b\u044f-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f-\u043e\u0442\u0432\u0435\u0442\u0430",level:3},{value:"\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443",id:"\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430-\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f-\u043a-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443",level:3}];function h(s){const n={code:"code",h1:"h1",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...s.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"\u0432\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442",children:"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442"}),"\n",(0,i.jsx)(n.h4,{id:"\u043a\u043e\u0433\u0434\u0430-\u043c\u044b-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438-\u0438-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b-\u0438\u0437-\u0431\u0430\u0437\u044b-\u0437\u043d\u0430\u043d\u0438\u0439-\u043c\u044b-\u043c\u043e\u0436\u0435\u043c-\u0437\u0430\u0434\u0430\u0442\u044c-\u0432\u043e\u043f\u0440\u043e\u0441-\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443-\u0438-\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c-\u0442\u043e\u0447\u043d\u044b\u0439-\u043e\u0442\u0432\u0435\u0442-\u0441-\u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430",children:"\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430."}),"\n",(0,i.jsxs)(n.p,{children:["\u041e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 URL \u0441\u0435\u0440\u0432\u0435\u0440\u0430 ",(0,i.jsx)(n.code,{children:"console.insightstream.ru:8000"}),"\n\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 URL \u0441\u0435\u0440\u0432\u0435\u0440\u0430 InsightStream RAG"]}),"\n",(0,i.jsxs)(n.p,{children:["\u041a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c ",(0,i.jsx)(n.code,{children:'-H "Authorization: Bearer \u0412\u0430\u0448_\u0442\u043e\u043a\u0435\u043d_InsightStream'}),". \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430 \u043d\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.\n",(0,i.jsx)(n.strong,{children:"\u0412\u0430\u0436\u043d\u043e!"})," \u0422\u043e\u043a\u0435\u043d InsightStream \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0432\u0430\u0448\u0438\u043c \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compress\u0430."]}),"\n",(0,i.jsx)(n.h3,{id:"\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430-\u0432\u043e\u043f\u0440\u043e\u0441\u0430-\u0434\u043b\u044f-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f-\u043e\u0442\u0432\u0435\u0442\u0430",children:"\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"GET /assistants/{assistant_id}/queries?q={\u0432\u043e\u043f\u0440\u043e\u0441}"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u043f\u043e\u0438\u0441\u043a \u0432 \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0438 \u0432\u0435\u0440\u043d\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"GET /assistants/1234/queries?q=\u041a\u0430\u043a\u0438\u0435 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0440\u043e\u0447\u043d\u043e\u0441\u0442\u0438?\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"assistant_id"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0418\u0418-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"q"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0412\u043e\u043f\u0440\u043e\u0441 \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041e\u0442\u0432\u0435\u0442\u044b:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"200 OK"}),": \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"400 Bad Request"}),": \u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"404 Not Found"}),": \u0418\u0418-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u0438\u043b\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"429 Too Many Requests"}),": \u041f\u0440\u0435\u0432\u044b\u0448\u0435\u043d \u043b\u0438\u043c\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430-\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f-\u043a-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443",children:"\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"POST /assistants/{assistant_id}/action"})}),"\n",(0,i.jsxs)(n.p,{children:["\u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430, ",(0,i.jsx)(n.code,{children:"like"})," \u0438\u043b\u0438 ",(0,i.jsx)(n.code,{children:"dislike"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'POST /assistants/1234/action\n{\n "action": "like"\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"assistant_id"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0418\u0418-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"action"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c (",(0,i.jsx)(n.code,{children:"like"})," \u0438\u043b\u0438 ",(0,i.jsx)(n.code,{children:"dislike"}),")"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041e\u0442\u0432\u0435\u0442\u044b:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"200 OK"}),": \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"400 Bad Request"}),": \u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"404 Not Found"}),": \u0418\u0418-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"429 Too Many Requests"}),": \u041f\u0440\u0435\u0432\u044b\u0448\u0435\u043d \u043b\u0438\u043c\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432."]}),"\n"]})]})}function a(s={}){const{wrapper:n}={...(0,r.R)(),...s.components};return n?(0,i.jsx)(n,{...s,children:(0,i.jsx)(h,{...s})}):h(s)}},8453:(s,n,e)=>{e.d(n,{R:()=>c,x:()=>d});var i=e(6540);const r={},t=i.createContext(r);function c(s){const n=i.useContext(t);return i.useMemo((function(){return"function"==typeof s?s(n):{...n,...s}}),[n,s])}function d(s){let n;return n=s.disableParentContext?"function"==typeof s.components?s.components(r):s.components||r:c(s.components),i.createElement(t.Provider,{value:n},s.children)}}}]); \ No newline at end of file diff --git a/assets/js/22c41bdb.c2fc5d1a.js b/assets/js/22c41bdb.c2fc5d1a.js deleted file mode 100644 index aa63077..0000000 --- a/assets/js/22c41bdb.c2fc5d1a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[8261],{3017:(s,n,e)=>{e.r(n),e.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>a,frontMatter:()=>t,metadata:()=>d,toc:()=>o});var i=e(4848),r=e(8453);const t={sidebar_position:2},c="\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442",d={id:"docs/insightstream_module/file_search",title:"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442",description:"\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/file_search.md",sourceDirName:"docs/insightstream_module",slug:"/docs/insightstream_module/file_search",permalink:"/docs/insightstream_module/file_search",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/file_search.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)",permalink:"/docs/insightstream_module/file_upload"},next:{title:"REST API",permalink:"/docs/rest.mdx"}},l={},o=[{value:"\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430.",id:"\u043a\u043e\u0433\u0434\u0430-\u043c\u044b-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438-\u0438-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b-\u0438\u0437-\u0431\u0430\u0437\u044b-\u0437\u043d\u0430\u043d\u0438\u0439-\u043c\u044b-\u043c\u043e\u0436\u0435\u043c-\u0437\u0430\u0434\u0430\u0442\u044c-\u0432\u043e\u043f\u0440\u043e\u0441-\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443-\u0438-\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c-\u0442\u043e\u0447\u043d\u044b\u0439-\u043e\u0442\u0432\u0435\u0442-\u0441-\u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430",level:4},{value:"\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430",id:"\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430-\u0432\u043e\u043f\u0440\u043e\u0441\u0430-\u0434\u043b\u044f-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f-\u043e\u0442\u0432\u0435\u0442\u0430",level:3},{value:"\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443",id:"\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430-\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f-\u043a-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443",level:3}];function h(s){const n={code:"code",h1:"h1",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...s.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"\u0432\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442",children:"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442"}),"\n",(0,i.jsx)(n.h4,{id:"\u043a\u043e\u0433\u0434\u0430-\u043c\u044b-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438-\u0438-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b-\u0438\u0437-\u0431\u0430\u0437\u044b-\u0437\u043d\u0430\u043d\u0438\u0439-\u043c\u044b-\u043c\u043e\u0436\u0435\u043c-\u0437\u0430\u0434\u0430\u0442\u044c-\u0432\u043e\u043f\u0440\u043e\u0441-\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443-\u0438-\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c-\u0442\u043e\u0447\u043d\u044b\u0439-\u043e\u0442\u0432\u0435\u0442-\u0441-\u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430",children:"\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430."}),"\n",(0,i.jsxs)(n.p,{children:["\u041e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 URL \u0441\u0435\u0440\u0432\u0435\u0440\u0430 ",(0,i.jsx)(n.code,{children:"console.insightstream.ru:8000"}),"\n\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 URL \u0441\u0435\u0440\u0432\u0435\u0440\u0430 InsightStream RAG"]}),"\n",(0,i.jsxs)(n.p,{children:["\u041a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c ",(0,i.jsx)(n.code,{children:'-H "Authorization: Bearer \u0412\u0430\u0448_\u0442\u043e\u043a\u0435\u043d_InsightStream'}),". \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430 \u043d\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.\n",(0,i.jsx)(n.strong,{children:"\u0412\u0430\u0436\u043d\u043e!"})," \u0422\u043e\u043a\u0435\u043d InsightStream \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0432\u0430\u0448\u0438\u043c \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compress\u0430."]}),"\n",(0,i.jsx)(n.h3,{id:"\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430-\u0432\u043e\u043f\u0440\u043e\u0441\u0430-\u0434\u043b\u044f-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f-\u043e\u0442\u0432\u0435\u0442\u0430",children:"\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"GET /assistants/{assistant_id}/queries?q={\u0432\u043e\u043f\u0440\u043e\u0441}"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u043f\u043e\u0438\u0441\u043a \u0432 \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0438 \u0432\u0435\u0440\u043d\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"GET /assistants/1234/queries?q=\u041a\u0430\u043a\u0438\u0435 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0440\u043e\u0447\u043d\u043e\u0441\u0442\u0438?\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"assistant_id"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0418\u0418-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"q"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0412\u043e\u043f\u0440\u043e\u0441 \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041e\u0442\u0432\u0435\u0442\u044b:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"200 OK"}),": \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"400 Bad Request"}),": \u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"404 Not Found"}),": \u0418\u0418-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u0438\u043b\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"429 Too Many Requests"}),": \u041f\u0440\u0435\u0432\u044b\u0448\u0435\u043d \u043b\u0438\u043c\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430-\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f-\u043a-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443",children:"\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"POST /assistants/{assistant_id}/action"})}),"\n",(0,i.jsxs)(n.p,{children:["\u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430, ",(0,i.jsx)(n.code,{children:"like"})," \u0438\u043b\u0438 ",(0,i.jsx)(n.code,{children:"dislike"}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'POST /assistants/1234/action\n{\n "action": "like"\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"assistant_id"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0418\u0418-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"action"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c (",(0,i.jsx)(n.code,{children:"like"})," \u0438\u043b\u0438 ",(0,i.jsx)(n.code,{children:"dislike"}),")"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u041e\u0442\u0432\u0435\u0442\u044b:"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"200 OK"}),": \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"400 Bad Request"}),": \u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"404 Not Found"}),": \u0418\u0418-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"429 Too Many Requests"}),": \u041f\u0440\u0435\u0432\u044b\u0448\u0435\u043d \u043b\u0438\u043c\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432."]}),"\n"]})]})}function a(s={}){const{wrapper:n}={...(0,r.R)(),...s.components};return n?(0,i.jsx)(n,{...s,children:(0,i.jsx)(h,{...s})}):h(s)}},8453:(s,n,e)=>{e.d(n,{R:()=>c,x:()=>d});var i=e(6540);const r={},t=i.createContext(r);function c(s){const n=i.useContext(t);return i.useMemo((function(){return"function"==typeof s?s(n):{...n,...s}}),[n,s])}function d(s){let n;return n=s.disableParentContext?"function"==typeof s.components?s.components(r):s.components||r:c(s.components),i.createElement(t.Provider,{value:n},s.children)}}}]); \ No newline at end of file diff --git a/assets/js/237.dc126e5a.js b/assets/js/237.dc126e5a.js new file mode 100644 index 0000000..7cfcc8f --- /dev/null +++ b/assets/js/237.dc126e5a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[237],{3363:(e,t,s)=>{s.d(t,{A:()=>a});s(6540);var n=s(4164),o=s(1312),i=s(1107),r=s(4848);function a(e){let{className:t}=e;return(0,r.jsx)("main",{className:(0,n.A)("container margin-vert--xl",t),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(i.A,{as:"h1",className:"hero__title",children:(0,r.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},2237:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});s(6540);var n=s(1312),o=s(1003),i=s(781),r=s(3363),a=s(4848);function c(){const e=(0,n.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.be,{title:e}),(0,a.jsx)(i.A,{children:(0,a.jsx)(r.A,{})})]})}}}]); \ No newline at end of file diff --git a/assets/js/9292.eda303c5.js b/assets/js/292.08e08ef3.js similarity index 96% rename from assets/js/9292.eda303c5.js rename to assets/js/292.08e08ef3.js index f1fed76..a87a1dc 100644 --- a/assets/js/9292.eda303c5.js +++ b/assets/js/292.08e08ef3.js @@ -1,5 +1,5 @@ -/*! For license information please see 9292.eda303c5.js.LICENSE.txt */ -(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[9292],{4206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(2785),i=r(7582),o=r(1498),s=r(2791),a="https://json-schema.org/draft/2020-12/schema";class l extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(s.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=r(8597);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=r(9288);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}})},5659:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let n=0;for(;n {"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(5659),i=r(352);var o=r(5659);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var s=r(352);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=$(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=$(this.rhs,e,t),this}get names(){return C(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class p extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class f extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=$(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class m extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const i=r[n];i.optimizeNames(e,t)||(T(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>P(e,t.names)),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends m{}class v extends g{}v.kind="else";class b extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b(I(e),t instanceof b?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=$(this.condition,e,t),this}get names(){const e=super.names;return C(e,this.condition),this.else&&P(e,this.else.names),e}}b.kind="if";class x extends g{}x.kind="for";class w extends x{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=$(this.iteration,e,t),this}get names(){return P(super.names,this.iteration.names)}}class O extends x{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=C(super.names,this.from);return C(e,this.to)}}class S extends x{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=$(this.iterable,e,t),this}get names(){return P(super.names,this.iterable.names)}}class k extends g{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}k.kind="func";class E extends m{render(e){return"return "+super.render(e)}}E.kind="return";class _ extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&P(e,this.catch.names),this.finally&&P(e,this.finally.names),e}}class A extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}A.kind="catch";class j extends g{render(e){return"finally"+super.render(e)}}j.kind="finally";function P(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function C(e,t){return t instanceof n._CodeOrName?P(e,t.names):e}function $(e,t,r){return e instanceof n.Name?o(e):(i=e)instanceof n._Code&&i._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=o(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var i;function o(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function T(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function I(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${M(e)}`}t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new l(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new b(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new b(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(b,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,n,o=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const s=this._scope.toName(e);return this._for(new O(o,s,t,r),(()=>n(s)))}forOf(e,t,r,o=i.varKinds.const){const s=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(s,n._`${e}[${t}]`),r(s)}))}return this._for(new S("of",o,s,t),(()=>r(s)))}forIn(e,t,r,o=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new S("in",o,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(x)}label(e){return this._leafNode(new p(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new E;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new _;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new A(e),t(e)}return r&&(this._currNode=n.finally=new j,this.code(r)),this._endBlockNode(A,j)}throw(e){return this._leafNode(new f(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,i){return this._blockNode(new k(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(k)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=I;const R=L(t.operators.AND);t.and=function(...e){return e.reduce(R)};const N=L(t.operators.OR);function L(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${M(t)} ${e} ${M(r)}`}function M(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(N)}},352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(5659);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=s;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const l=n._`\n`;t.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:i}=n,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[i];if(s){const e=s.get(o);if(e)return e}else s=this._values[i]=new Map;s.set(o,n);const a=this._scope[i]||(this._scope[i]=[]),l=a.length;return a[l]=t.ref,n.setValue(t,{property:i,itemIndex:l}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},a){let l=n.nil;for(const c in e){const u=e[c];if(!u)continue;const p=s[c]=s[c]||new Map;u.forEach((e=>{if(p.has(e))return;p.set(e,o.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;l=n._`${l}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new i(e);l=n._`${l}${s}${this.opts._n}`}p.set(e,o.Completed)}))}return l}}},695:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(9288),i=r(2124),o=r(6202);function s(e,t){const r=e.const("err",t);e.if(n._`${o.default.vErrors} === null`,(()=>e.assign(o.default.vErrors,n._`[${r}]`)),n._`${o.default.vErrors}.push(${r})`),e.code(n._`${o.default.errors}++`)}function a(e,t){const{gen:r,validateName:i,schemaEnv:o}=e;o.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,i,o){const{it:l}=e,{gen:u,compositeRule:p,allErrors:d}=l,f=c(e,r,i);(null!=o?o:p||d)?s(u,f):a(l,n._`[${f}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:i}=e,{gen:l,compositeRule:u,allErrors:p}=i;s(l,c(e,r,n)),u||p||a(i,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(n._`${o.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${o.default.vErrors}.length`,t)),(()=>e.assign(o.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:i,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",s,o.default.errors,(s=>{e.const(l,n._`${o.default.vErrors}[${s}]`),e.if(n._`${l}.instancePath === undefined`,(()=>e.assign(n._`${l}.instancePath`,(0,n.strConcat)(o.default.instancePath,a.errorPath)))),e.assign(n._`${l}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${l}.schema`,r),e.assign(n._`${l}.data`,i))}))};const l={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:i}=e.it;return!1===i?n._`{}`:function(e,t,r={}){const{gen:i,it:s}=e,a=[u(s,r),p(e,r)];return function(e,{params:t,message:r},i){const{keyword:s,data:a,schemaValue:c,it:u}=e,{opts:p,propertyName:d,topSchemaRef:f,schemaPath:h}=u;i.push([l.keyword,s],[l.params,"function"==typeof t?t(e):t||n._`{}`]),p.messages&&i.push([l.message,"function"==typeof r?r(e):r]);p.verbose&&i.push([l.schema,c],[l.parentSchema,n._`${f}${h}`],[o.default.data,a]);d&&i.push([l.propertyName,d])}(e,t,a),i.object(...a)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,r)]}function p({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let s=o?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,i.getErrorPath)(r,i.Type.Str)}`),[l.schemaPath,s]}},6066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(9288),i=r(4273),o=r(6202),s=r(9630),a=r(2124),l=r(8597);class c{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,s.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function u(e){const t=d.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:u}=this.opts,p=new n.CodeGen(this.scope,{es5:a,lines:c,ownProperties:u});let f;e.$async&&(f=p.scopeValue("Error",{ref:i.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const h=p.scopeName("validate");e.validateName=h;const m={gen:p,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:p.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),(0,l.validateFunctionCode)(m),p.optimize(this.opts.code.optimize);const t=p.toString();g=`const visitedNodesForRef = new WeakMap(); ${p.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,g)(this,this.scope.get());if(this.scope.value(h,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:h,validateCode:t,scopeValues:p._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(y){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),y}finally{this._compilations.delete(e)}}function p(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function d(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function f(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||h.call(this,e,t)}function h(e,t){const r=this.opts.uriResolver.parse(t),n=(0,s._getFullPath)(this.opts.uriResolver,r);let i=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return g.call(this,r,e);const o=(0,s.normalizeId)(n),a=this.refs[o]||this.schemas[o];if("string"==typeof a){const t=h.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return g.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),o===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,s.resolveUrl)(this.opts.uriResolver,i,n)),new c({schema:t,schemaId:r,root:e,baseId:i})}return g.call(this,r,a)}}t.SchemaEnv=c,t.compileSchema=u,t.resolveRef=function(e,t,r){var n;const i=(0,s.resolveUrl)(this.opts.uriResolver,t,r),o=e.refs[i];if(o)return o;let a=f.call(this,e,i);if(void 0===a){const r=null===(n=e.localRefs)||void 0===n?void 0:n[i],{schemaId:o}=this.opts;r&&(a=new c({schema:r,schemaId:o,root:e,baseId:t}))}if(void 0===a&&this.opts.loadSchemaSync){const n=this.opts.loadSchemaSync(t,r,i);!n||this.refs[i]||this.schemas[i]||(this.addSchema(n,i,void 0),a=f.call(this,e,i))}return void 0!==a?e.refs[i]=p.call(this,a):void 0},t.getCompilingSchema=d,t.resolveSchema=h;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const c of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(c)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(c)&&n&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,n))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=h.call(this,n,e)}const{schemaId:l}=this.opts;return o=o||new c({schema:r,schemaId:l,root:n,baseId:t}),o.schema!==o.root.schema?o:void 0}},6202:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9288),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),isAllOfVariant:new n.Name("isAllOfVariant"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=i},2830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9630);class i extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=i},9630:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(2124),i=r(2017),o=r(7106),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!l(e):!!t&&c(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(l))return!0;if("object"==typeof r&&l(r))return!0}return!1}function c(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=c(e))),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=f(t));const n=e.parse(t);return p(e,n)}function p(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=p;const d=/#\/?$/;function f(e){return e?e.replace(d,""):""}t.normalizeId=f,t.resolveUrl=function(e,t,r){return r=f(r),e.resolve(t,r)};const h=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=f(e[r]||t),a={"":s},l=u(n,s,!1),c={},p=new Set;return o(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const o=l+t;let s=a[i];function u(t){const r=this.opts.uriResolver.resolve;if(t=f(s?r(s,t):t),p.has(t))throw m(t);p.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?d(e,n.schema,t):t!==f(o)&&("#"===t[0]?(d(e,c[t],t),c[t]=e):this.refs[t]=o),t}function g(e){if("string"==typeof e){if(!h.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(s=u.call(this,e[r])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),a[t]=s})),c;function d(e,t,r){if(void 0!==t&&!i(e,t))throw m(r)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},9485:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},2124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(9288),i=r(5659);function o(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const i=n.RULES.keywords;for(const o in t)i[o]||h(e,`unknown keyword: "${o}"`)}function s(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(o,s,a,l)=>{const c=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(o,s,a):t(o,s,a),a):s instanceof n.Name?(t(o,a,s),s):r(s,a);return l!==n.Name||c instanceof n.Name?c:i(o,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,i,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(i)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),p(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=p;const d={};var f;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:d[t.code]||(d[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(f=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const i=t===f.Num;return r?i?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:i?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=h},9160:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},t.shouldUseGroup=r,t.shouldUseRule=n},8886:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(695),i=r(9288),o=r(6202),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:i}=e,o={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(o,s,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(i._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},6649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(9485),i=r(9160),o=r(695),s=r(9288),a=r(2124);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:o}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),c=t.length>0&&!(0===a.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(c){const i=d(t,n,o.strictNumbers,l.Wrong);r.if(i,(()=>{a.length?function(e,t,r){const{gen:n,data:i,opts:o}=e,a=n.let("dataType",s._`typeof ${i}`),l=n.let("coerced",s._`undefined`);"array"===o.coerceTypes&&n.if(s._`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,(()=>n.assign(i,s._`${i}[0]`).assign(a,s._`typeof ${i}`).if(d(t,i,o.strictNumbers),(()=>n.assign(l,i)))));n.if(s._`${l} !== undefined`);for(const s of r)(u.has(s)||"array"===s&&"array"===o.coerceTypes)&&c(s);function c(e){switch(e){case"string":return void n.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(l,s._`"" + ${i}`).elseIf(s._`${i} === null`).assign(l,s._`""`);case"number":return void n.elseIf(s._`${a} == "boolean" || ${i} === null +/*! For license information please see 292.08e08ef3.js.LICENSE.txt */ +(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[292],{4206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(2785),i=r(7582),o=r(1498),s=r(2791),a="https://json-schema.org/draft/2020-12/schema";class l extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(s.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=r(8597);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=r(9288);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}})},5659:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let n=0;for(;n {"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(5659),i=r(352);var o=r(5659);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var s=r(352);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=$(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=$(this.rhs,e,t),this}get names(){return C(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class p extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class f extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=$(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class m extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const i=r[n];i.optimizeNames(e,t)||(T(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>P(e,t.names)),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends m{}class v extends g{}v.kind="else";class b extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b(I(e),t instanceof b?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=$(this.condition,e,t),this}get names(){const e=super.names;return C(e,this.condition),this.else&&P(e,this.else.names),e}}b.kind="if";class x extends g{}x.kind="for";class w extends x{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=$(this.iteration,e,t),this}get names(){return P(super.names,this.iteration.names)}}class O extends x{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=C(super.names,this.from);return C(e,this.to)}}class S extends x{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=$(this.iterable,e,t),this}get names(){return P(super.names,this.iterable.names)}}class k extends g{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}k.kind="func";class E extends m{render(e){return"return "+super.render(e)}}E.kind="return";class _ extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&P(e,this.catch.names),this.finally&&P(e,this.finally.names),e}}class A extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}A.kind="catch";class j extends g{render(e){return"finally"+super.render(e)}}j.kind="finally";function P(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function C(e,t){return t instanceof n._CodeOrName?P(e,t.names):e}function $(e,t,r){return e instanceof n.Name?o(e):(i=e)instanceof n._Code&&i._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=o(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var i;function o(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function T(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function I(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${M(e)}`}t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new l(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new b(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new b(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(b,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,n,o=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const s=this._scope.toName(e);return this._for(new O(o,s,t,r),(()=>n(s)))}forOf(e,t,r,o=i.varKinds.const){const s=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(s,n._`${e}[${t}]`),r(s)}))}return this._for(new S("of",o,s,t),(()=>r(s)))}forIn(e,t,r,o=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new S("in",o,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(x)}label(e){return this._leafNode(new p(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new E;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new _;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new A(e),t(e)}return r&&(this._currNode=n.finally=new j,this.code(r)),this._endBlockNode(A,j)}throw(e){return this._leafNode(new f(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,i){return this._blockNode(new k(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(k)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=I;const R=L(t.operators.AND);t.and=function(...e){return e.reduce(R)};const N=L(t.operators.OR);function L(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${M(t)} ${e} ${M(r)}`}function M(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(N)}},352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(5659);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=s;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const l=n._`\n`;t.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:i}=n,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[i];if(s){const e=s.get(o);if(e)return e}else s=this._values[i]=new Map;s.set(o,n);const a=this._scope[i]||(this._scope[i]=[]),l=a.length;return a[l]=t.ref,n.setValue(t,{property:i,itemIndex:l}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},a){let l=n.nil;for(const c in e){const u=e[c];if(!u)continue;const p=s[c]=s[c]||new Map;u.forEach((e=>{if(p.has(e))return;p.set(e,o.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;l=n._`${l}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new i(e);l=n._`${l}${s}${this.opts._n}`}p.set(e,o.Completed)}))}return l}}},695:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(9288),i=r(2124),o=r(6202);function s(e,t){const r=e.const("err",t);e.if(n._`${o.default.vErrors} === null`,(()=>e.assign(o.default.vErrors,n._`[${r}]`)),n._`${o.default.vErrors}.push(${r})`),e.code(n._`${o.default.errors}++`)}function a(e,t){const{gen:r,validateName:i,schemaEnv:o}=e;o.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,i,o){const{it:l}=e,{gen:u,compositeRule:p,allErrors:d}=l,f=c(e,r,i);(null!=o?o:p||d)?s(u,f):a(l,n._`[${f}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:i}=e,{gen:l,compositeRule:u,allErrors:p}=i;s(l,c(e,r,n)),u||p||a(i,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(n._`${o.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${o.default.vErrors}.length`,t)),(()=>e.assign(o.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:i,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",s,o.default.errors,(s=>{e.const(l,n._`${o.default.vErrors}[${s}]`),e.if(n._`${l}.instancePath === undefined`,(()=>e.assign(n._`${l}.instancePath`,(0,n.strConcat)(o.default.instancePath,a.errorPath)))),e.assign(n._`${l}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${l}.schema`,r),e.assign(n._`${l}.data`,i))}))};const l={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:i}=e.it;return!1===i?n._`{}`:function(e,t,r={}){const{gen:i,it:s}=e,a=[u(s,r),p(e,r)];return function(e,{params:t,message:r},i){const{keyword:s,data:a,schemaValue:c,it:u}=e,{opts:p,propertyName:d,topSchemaRef:f,schemaPath:h}=u;i.push([l.keyword,s],[l.params,"function"==typeof t?t(e):t||n._`{}`]),p.messages&&i.push([l.message,"function"==typeof r?r(e):r]);p.verbose&&i.push([l.schema,c],[l.parentSchema,n._`${f}${h}`],[o.default.data,a]);d&&i.push([l.propertyName,d])}(e,t,a),i.object(...a)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,r)]}function p({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let s=o?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,i.getErrorPath)(r,i.Type.Str)}`),[l.schemaPath,s]}},6066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(9288),i=r(4273),o=r(6202),s=r(9630),a=r(2124),l=r(8597);class c{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,s.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function u(e){const t=d.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:u}=this.opts,p=new n.CodeGen(this.scope,{es5:a,lines:c,ownProperties:u});let f;e.$async&&(f=p.scopeValue("Error",{ref:i.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const h=p.scopeName("validate");e.validateName=h;const m={gen:p,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:p.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),(0,l.validateFunctionCode)(m),p.optimize(this.opts.code.optimize);const t=p.toString();g=`const visitedNodesForRef = new WeakMap(); ${p.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,g)(this,this.scope.get());if(this.scope.value(h,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:h,validateCode:t,scopeValues:p._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(y){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),y}finally{this._compilations.delete(e)}}function p(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function d(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function f(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||h.call(this,e,t)}function h(e,t){const r=this.opts.uriResolver.parse(t),n=(0,s._getFullPath)(this.opts.uriResolver,r);let i=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return g.call(this,r,e);const o=(0,s.normalizeId)(n),a=this.refs[o]||this.schemas[o];if("string"==typeof a){const t=h.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return g.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),o===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,s.resolveUrl)(this.opts.uriResolver,i,n)),new c({schema:t,schemaId:r,root:e,baseId:i})}return g.call(this,r,a)}}t.SchemaEnv=c,t.compileSchema=u,t.resolveRef=function(e,t,r){var n;const i=(0,s.resolveUrl)(this.opts.uriResolver,t,r),o=e.refs[i];if(o)return o;let a=f.call(this,e,i);if(void 0===a){const r=null===(n=e.localRefs)||void 0===n?void 0:n[i],{schemaId:o}=this.opts;r&&(a=new c({schema:r,schemaId:o,root:e,baseId:t}))}if(void 0===a&&this.opts.loadSchemaSync){const n=this.opts.loadSchemaSync(t,r,i);!n||this.refs[i]||this.schemas[i]||(this.addSchema(n,i,void 0),a=f.call(this,e,i))}return void 0!==a?e.refs[i]=p.call(this,a):void 0},t.getCompilingSchema=d,t.resolveSchema=h;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const c of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(c)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(c)&&n&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,n))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=h.call(this,n,e)}const{schemaId:l}=this.opts;return o=o||new c({schema:r,schemaId:l,root:n,baseId:t}),o.schema!==o.root.schema?o:void 0}},6202:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9288),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),isAllOfVariant:new n.Name("isAllOfVariant"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=i},2830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9630);class i extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=i},9630:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(2124),i=r(2017),o=r(7106),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!l(e):!!t&&c(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(l))return!0;if("object"==typeof r&&l(r))return!0}return!1}function c(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=c(e))),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=f(t));const n=e.parse(t);return p(e,n)}function p(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=p;const d=/#\/?$/;function f(e){return e?e.replace(d,""):""}t.normalizeId=f,t.resolveUrl=function(e,t,r){return r=f(r),e.resolve(t,r)};const h=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=f(e[r]||t),a={"":s},l=u(n,s,!1),c={},p=new Set;return o(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const o=l+t;let s=a[i];function u(t){const r=this.opts.uriResolver.resolve;if(t=f(s?r(s,t):t),p.has(t))throw m(t);p.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?d(e,n.schema,t):t!==f(o)&&("#"===t[0]?(d(e,c[t],t),c[t]=e):this.refs[t]=o),t}function g(e){if("string"==typeof e){if(!h.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(s=u.call(this,e[r])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),a[t]=s})),c;function d(e,t,r){if(void 0!==t&&!i(e,t))throw m(r)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},9485:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},2124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(9288),i=r(5659);function o(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const i=n.RULES.keywords;for(const o in t)i[o]||h(e,`unknown keyword: "${o}"`)}function s(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(o,s,a,l)=>{const c=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(o,s,a):t(o,s,a),a):s instanceof n.Name?(t(o,a,s),s):r(s,a);return l!==n.Name||c instanceof n.Name?c:i(o,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,i,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(i)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),p(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=p;const d={};var f;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:d[t.code]||(d[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(f=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const i=t===f.Num;return r?i?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:i?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=h},9160:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},t.shouldUseGroup=r,t.shouldUseRule=n},8886:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(695),i=r(9288),o=r(6202),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:i}=e,o={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(o,s,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(i._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},6649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(9485),i=r(9160),o=r(695),s=r(9288),a=r(2124);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:o}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),c=t.length>0&&!(0===a.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(c){const i=d(t,n,o.strictNumbers,l.Wrong);r.if(i,(()=>{a.length?function(e,t,r){const{gen:n,data:i,opts:o}=e,a=n.let("dataType",s._`typeof ${i}`),l=n.let("coerced",s._`undefined`);"array"===o.coerceTypes&&n.if(s._`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,(()=>n.assign(i,s._`${i}[0]`).assign(a,s._`typeof ${i}`).if(d(t,i,o.strictNumbers),(()=>n.assign(l,i)))));n.if(s._`${l} !== undefined`);for(const s of r)(u.has(s)||"array"===s&&"array"===o.coerceTypes)&&c(s);function c(e){switch(e){case"string":return void n.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(l,s._`"" + ${i}`).elseIf(s._`${i} === null`).assign(l,s._`""`);case"number":return void n.elseIf(s._`${a} == "boolean" || ${i} === null || (${a} == "string" && ${i} && ${i} == +${i})`).assign(l,s._`+${i}`);case"integer":return void n.elseIf(s._`${a} === "boolean" || ${i} === null || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(l,s._`+${i}`);case"boolean":return void n.elseIf(s._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(l,!1).elseIf(s._`${i} === "true" || ${i} === 1`).assign(l,!0);case"null":return n.elseIf(s._`${i} === "" || ${i} === 0 || ${i} === false`),void n.assign(l,null);case"array":n.elseIf(s._`${a} === "string" || ${a} === "number" || ${a} === "boolean" || ${i} === null`).assign(l,s._`[${i}]`)}}n.else(),h(e),n.endIf(),n.if(s._`${l} !== undefined`,(()=>{n.assign(i,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,l)}))}(e,t,a):h(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function p(e,t,r,n=l.Correct){const i=n===l.Correct?s.operators.EQ:s.operators.NEQ;let o;switch(e){case"null":return s._`${t} ${i} null`;case"array":o=s._`Array.isArray(${t})`;break;case"object":o=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return s._`typeof ${t} ${i} ${e}`}return n===l.Correct?o:(0,s.not)(o);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function d(e,t,r,n){if(1===e.length)return p(e[0],t,r,n);let i;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=s._`typeof ${t} != "object"`;i=o.null?e:s._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=s.nil;o.number&&delete o.integer;for(const a in o)i=(0,s.and)(i,p(a,t,r,n));return i}t.checkDataType=p,t.checkDataTypes=d;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,o.reportError)(t,f)}t.reportTypeError=h},511:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(9288),i=r(2124);function o(e,t,r){const{gen:o,compositeRule:s,data:a,opts:l}=e;if(void 0===r)return;const c=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,i.checkStrictMode)(e,`default is ignored for: ${c}`);let u=n._`${c} === undefined`;"empty"===l.useDefaults&&(u=n._`${u} || ${c} === null || ${c} === ""`),o.if(u,n._`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const i in r)o(e,i,r[i].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>o(e,r,t.default)))}},8597:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(8886),i=r(6649),o=r(9160),s=r(6649),a=r(511),l=r(5648),c=r(820),u=r(9288),p=r(6202),d=r(9630),f=r(2124),h=r(695);function m({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,u._`${p.default.data}, ${p.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${g(r,i)}`),function(e,t){e.if(p.default.valCxt,(()=>{e.var(p.default.instancePath,u._`${p.default.valCxt}.${p.default.instancePath}`),e.var(p.default.parentData,u._`${p.default.valCxt}.${p.default.parentData}`),e.var(p.default.parentDataProperty,u._`${p.default.valCxt}.${p.default.parentDataProperty}`),e.var(p.default.rootData,u._`${p.default.valCxt}.${p.default.rootData}`),e.var(p.default.isAllOfVariant,u._`${p.default.valCxt}.${p.default.isAllOfVariant}`),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`${p.default.valCxt}.${p.default.dynamicAnchors}`)}),(()=>{e.var(p.default.instancePath,u._`""`),e.var(p.default.parentData,u._`undefined`),e.var(p.default.parentDataProperty,u._`undefined`),e.var(p.default.rootData,p.default.data),e.var(p.default.isAllOfVariant,u._`0`),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`{}`)}))}(e,i),e.code(o)})):e.func(t,u._`${p.default.data}, ${function(e){return u._`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${e.dynamicRef?u._`, ${p.default.dynamicAnchors}={}`:u.nil}, ${p.default.isAllOfVariant} = 0}={}`}(i)}`,n.$async,(()=>e.code(g(r,i)).code(o)))}function g(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function y(e,t){b(e)&&(x(e),v(e))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&O(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,d.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=n.const("_errs",p.default.errors);w(e,o),n.var(t,u._`${o} === ${p.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}function v({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function x(e){(0,f.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return S(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);S(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function O({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const o=r.$comment;if(!0===i.$comment)e.code(u._`${p.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){const r=u.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(u._`${p.default.self}.opts.$comment(${o}, ${r}, ${i}.schema)`)}}function S(e,t,r,n){const{gen:i,schema:a,data:l,allErrors:c,opts:d,self:h}=e,{RULES:m}=h;function g(f){(0,o.shouldUseGroup)(a,f)&&(f.type?(i.if((0,s.checkDataType)(f.type,l,d.strictNumbers)),k(e,f),1===t.length&&t[0]===f.type&&r&&(i.else(),(0,s.reportTypeError)(e)),i.endIf()):k(e,f),c||i.if(u._`${p.default.errors} === ${n||0}`))}!a.$ref||!d.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(a,m)?(d.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{_(e.dataTypes,t)||A(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>_(t,e)))})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&A(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some((e=>E(t,e)))&&A(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes)}(e,t),i.block((()=>{for(const e of m.rules)g(e);g(m.post)}))):i.block((()=>P(e,"$ref",m.all.$ref.definition)))}function k(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;function s(t,r){return!("unevaluatedProperties"!==r.keyword||!t.properties&&!t.patternProperties||e.isAllOfVariant||!1!==e.opts.defaultUnevaluatedProperties)}i&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)((0,o.shouldUseRule)(n,r)||s(n,r))&&P(e,r.keyword,r.definition,t.type)}))}function E(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function _(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function A(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(x(e),v(e))?function(e){const{schema:t,opts:r,gen:n}=e;m(e,(()=>{r.$comment&&t.$comment&&O(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(p.default.vErrors,null),n.let(p.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if(u._`${p.default.errors} === 0`,(()=>t.return(p.default.data)),(()=>t.throw(u._`new ${i}(${p.default.vErrors})`))):(t.assign(u._`${n}.errors`,p.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r);n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${p.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class j{constructor(e,t,r){if((0,l.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",T(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",p.default.errors))}result(e,t,r){this.failResult((0,u.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:o}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(i.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,u.or)(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,s.checkDataTypes)(e,t,i.opts.strictNumbers,s.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t,r){const n=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(n,this.it,e),(0,c.extendSubschemaMode)(n,e);const i={...this.it,...n,items:void 0,props:void 0,isAllOfVariant:r};return y(i,t),i}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function P(e,t,r,n){const i=new j(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,l.funcKeywordCode)(i,r):"macro"in r?(0,l.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,l.funcKeywordCode)(i,r)}t.KeywordCxt=j;const C=/^\/(?:[^~]|~0|~1)*$/,$=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function T(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return p.default.rootData;if("/"===e[0]){if(!C.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=p.default.rootData}else{const s=$.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(i=s[2],"#"===i){if(a>=t)throw new Error(l("property/index",a));return n[t-a]}if(a>t)throw new Error(l("data",a));if(o=r[t-a],!i)return o}let s=o;const a=i.split("/");for(const c of a)c&&(o=u._`${o}${(0,u.getProperty)((0,f.unescapeJsonPointer)(c))}`,s=u._`${s} && ${o}`);return s;function l(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=T},5648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(9288),i=r(6202),o=r(4608),s=r(695);function a(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,(()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`)))}function l(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:i,schema:o,parentSchema:s,it:a}=e,c=t.macro.call(a.self,o,s,a),u=l(r,i,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const p=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:u,compositeRule:!0},p),e.pass(p,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:u,schema:p,parentSchema:d,$data:f,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const m=!f&&t.compile?t.compile.call(h.self,p,d,h):t.validate,g=l(c,u,m),y=c.let("valid");function v(r=(t.async?n._`await `:n.nil)){const s=h.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!f||!1===t.schema);c.assign(y,n._`${r}${(0,o.callValidateCode)(e,g,s,a)}`,t.modifying)}function b(e){var r;c.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:y),e)}e.block$data(y,(function(){if(!1===t.errors)v(),t.modifying&&a(e),b((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>v(n._`await `)),(t=>c.assign(y,!1).if(n._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${g}.errors`;return c.assign(e,null),v(n.nil),e}();t.modifying&&a(e),b((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,s.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:y)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const s=i.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema){if(!i.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}}},820:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(9288),i=r(2124);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:s,errSchemaPath:a,topSchemaRef:l}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===s||void 0===a||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:s,topSchemaRef:l,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:s,dataTypes:a,propertyName:l}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:l}=t;u(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,i.getErrorPath)(r,o,l.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}if(void 0!==s){u(s instanceof n.Name?s:c.let("data",s,!0)),void 0!==l&&(e.propertyName=l)}function u(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},2785:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(8597);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(9288);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const o=r(4273),s=r(2830),a=r(9485),l=r(6066),c=r(9288),u=r(9630),p=r(6649),d=r(2124),f=r(8884),h=r(5689),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes","defaultUnevaluatedProperties","defaultAdditionalProperties"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function x(e){var t,r,n,i,o,s,a,l,c,u,p,d,f,g,y,v,b,x,w,O,S,k,E,_,A;const j=e.strict,P=null===(t=e.code)||void 0===t?void 0:t.optimize,C=!0===P||void 0===P?1:P||0,$=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:m,T=null!==(i=e.uriResolver)&&void 0!==i?i:h.default;return{strictSchema:null===(s=null!==(o=e.strictSchema)&&void 0!==o?o:j)||void 0===s||s,strictNumbers:null===(l=null!==(a=e.strictNumbers)&&void 0!==a?a:j)||void 0===l||l,strictTypes:null!==(u=null!==(c=e.strictTypes)&&void 0!==c?c:j)&&void 0!==u?u:"log",strictTuples:null!==(d=null!==(p=e.strictTuples)&&void 0!==p?p:j)&&void 0!==d?d:"log",strictRequired:null!==(g=null!==(f=e.strictRequired)&&void 0!==f?f:j)&&void 0!==g&&g,code:e.code?{...e.code,optimize:C,regExp:$}:{optimize:C,regExp:$},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(x=e.messages)||void 0===x||x,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(O=e.schemaId)&&void 0!==O?O:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(k=e.validateSchema)||void 0===k||k,validateFormats:null===(E=e.validateFormats)||void 0===E||E,unicodeRegExp:null===(_=e.unicodeRegExp)||void 0===_||_,int32range:null===(A=e.int32range)||void 0===A||A,uriResolver:T}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...x(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:y,es5:t,lines:r}),this.logger=function(e){if(!1===e)return j;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),O.call(this,v,e,"NOT SUPPORTED"),O.call(this,b,e,"DEPRECATED","warn"),this._metaOpts=A.call(this),e.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&_.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),k.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=f;"id"===r&&(n={...f},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await l.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const r=await c.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=S.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new l.SchemaEnv({schema:{},schemaId:r});if(t=l.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=S.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(C.call(this,r,t),!t)return(0,d.eachItem)(r,(e=>$.call(this,e))),this;I.call(this,t);const n={...t,type:(0,p.getJSONTypes)(t.type),schemaType:(0,p.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(r,0===n.type.length?e=>$.call(this,e,n):e=>n.type.forEach((t=>$.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,o=i[e];n&&o&&(i[e]=N(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o;const{schemaId:s}=this.opts;if("object"==typeof e)o=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,u.normalizeId)(o||r);const c=u.getSchemaRefs.call(this,e,r);return a=new l.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function O(e,t,r,n="error"){for(const i in e){const o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function S(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function k(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function E(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function _(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function A(){const e={...this.opts};for(const t of g)delete e[t];return e}t.default=w,w.ValidationError=o.default,w.MissingRefError=s.default;const j={log(){},warn(){},error(){}};const P=/^[a-z_$][a-z0-9_$:-]*$/i;function C(e,t){const{RULES:r}=this;if((0,d.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!P.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function $(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let s=i?o.post:o.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,p.getJSONTypes)(t.type),schemaType:(0,p.getJSONTypes)(t.schemaType)}};t.before?T.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function T(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function I(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=N(t)),e.validateSchema=this.compile(t,!0))}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function N(e){return{anyOf:[e,R]}}},2791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7207),i=r(3243),o=r(8818),s=r(6211),a=r(3953),l=r(6573),c=r(5386),u=r(9509),p=["/properties"];t.default=function(e){return[n,i,o,s,a,t(this,l),c,t(this,u)].forEach((e=>this.addMetaSchema(e,void 0,!1))),this;function t(t,r){return e?t.$dataMetaSchema(r,p):r}}},8947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2017);n.code='require("ajv/dist/runtime/equal").default',t.default=n},9794:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,i=0;for(;i =55296&&r<=56319&&i {"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6579);n.code='require("ajv/dist/runtime/uri").default',t.default=n},4273:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},2276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(9288),i=r(2124),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?s(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:o,data:s,keyword:a,it:l}=e;l.items=!0;const c=r.const("len",n._`${s}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(l,o)){const o=r.var("valid",n._`${c} <= ${t.length}`);r.if((0,n.not)(o),(()=>function(o){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},o),l.allErrors||r.if((0,n.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=s,t.default=o},3003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4608),i=r(9288),o=r(6202),s=r(2124),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,parentSchema:r,data:a,errsCount:l,it:c}=e,{schema:u=c.opts.defaultAdditionalProperties}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:p,opts:d}=c;if(c.props=!0,"all"!==d.removeAdditional&&(0,s.alwaysValidSchema)(c,u))return;const f=(0,n.allSchemaProperties)(r.properties),h=(0,n.allSchemaProperties)(r.patternProperties);function m(e){t.code(i._`delete ${a}[${e}]`)}function g(r){if("all"===d.removeAdditional||d.removeAdditional&&!1===u)m(r);else{if(!1===u)return e.setParams({additionalProperty:r}),e.error(),void(p||t.break());if("object"==typeof u&&!(0,s.alwaysValidSchema)(c,u)){const n=t.name("valid");"failing"===d.removeAdditional?(y(r,n,!1),t.if((0,i.not)(n),(()=>{e.reset(),m(r)}))):(y(r,n),p||t.if((0,i.not)(n),(()=>t.break())))}}}function y(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",a,(o=>{f.length||h.length?t.if(function(o){let a;if(f.length>8){const e=(0,s.schemaRefOrVal)(c,r.properties,"properties");a=(0,n.isOwnProperty)(t,e,o)}else a=f.length?(0,i.or)(...f.map((e=>i._`${o} === ${e}`))):i.nil;return h.length&&(a=(0,i.or)(a,...h.map((t=>i._`${(0,n.usePattern)(e,t)}.test(${o})`)))),(0,i.not)(a)}(o),(()=>g(o))):g(o)})),e.ok(i._`${l} === ${o.default.errors}`)}};t.default=a},5049:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2124),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},o,!0);e.ok(o),e.mergeEvaluated(s)}))}};t.default=i},7856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(4608).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},3842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9288),i=r(2124),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:s,it:a}=e;let l,c;const{minContains:u,maxContains:p}=o;a.opts.next?(l=void 0===u?1:u,c=p):l=1;const d=t.const("len",n._`${s}.length`);if(e.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,r)){let t=n._`${d} >= ${l}`;return void 0!==c&&(t=n._`${t} && ${d} <= ${c}`),void e.pass(t)}a.items=!0;const f=t.name("valid");function h(){const e=t.name("_valid"),r=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${l}`,(()=>t.assign(f,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(f,!1).break())),1===l?t.assign(f,!0):t.if(n._`${e} >= ${l}`,(()=>t.assign(f,!0))))}(r)))))}function m(r,n){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===c&&1===l?m(f,(()=>t.if(f,(()=>t.break())))):0===l?(t.let(f,!0),void 0!==c&&t.if(n._`${s}.length > 0`,h)):(t.let(f,!1),h()),e.result(f,(()=>e.reset()))}};t.default=o},7630:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(9288),i=r(2124),o=r(4608);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e}, diff --git a/assets/js/9292.eda303c5.js.LICENSE.txt b/assets/js/292.08e08ef3.js.LICENSE.txt similarity index 100% rename from assets/js/9292.eda303c5.js.LICENSE.txt rename to assets/js/292.08e08ef3.js.LICENSE.txt diff --git a/assets/js/2b673715.68a942c9.js b/assets/js/2b673715.68a942c9.js new file mode 100644 index 0000000..2f415be --- /dev/null +++ b/assets/js/2b673715.68a942c9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[882],{9208:(n,e,s)=>{s.r(e),s.d(e,{assets:()=>l,contentTitle:()=>d,default:()=>a,frontMatter:()=>t,metadata:()=>o,toc:()=>c});var r=s(4848),i=s(8453);const t={sidebar_position:1},d="\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)",o={id:"docs/insightstream_module/file_upload",title:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)",description:"\u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0443\u043f\u0435\u043d\u0447\u0430\u0442\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438 \u0442.\u0434. \u042d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u044d\u0442\u0430\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/file_upload.md",sourceDirName:"docs/insightstream_module",slug:"/docs/insightstream_module/file_upload",permalink:"/docs/insightstream_module/file_upload",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/file_upload.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"InsightStream RAG",permalink:"/docs/insightstream_module/"},next:{title:"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442",permalink:"/docs/insightstream_module/file_search"}},l={},c=[{value:"\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430",id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430",level:3},{value:"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438",id:"\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430-\u0441\u0442\u0430\u0442\u0443\u0441\u0430-\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438",level:3}];function h(n){const e={code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{id:"\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430-\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432",children:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)"}),"\n",(0,r.jsx)(e.p,{children:"\u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0443\u043f\u0435\u043d\u0447\u0430\u0442\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438 \u0442.\u0434. \u042d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u044d\u0442\u0430\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439."}),"\n",(0,r.jsxs)(e.p,{children:["\u041e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 URL \u0441\u0435\u0440\u0432\u0435\u0440\u0430 ",(0,r.jsx)(e.code,{children:"console.insightstream.ru:8000"}),"\n\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 URL \u0441\u0435\u0440\u0432\u0435\u0440\u0430 InsightStream RAG"]}),"\n",(0,r.jsxs)(e.p,{children:["\u041a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c ",(0,r.jsx)(e.code,{children:'-H "Authorization: Bearer \u0412\u0430\u0448_\u0442\u043e\u043a\u0435\u043d_InsightStream'}),". \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430 \u043d\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.\n",(0,r.jsx)(e.strong,{children:"\u0412\u0430\u0436\u043d\u043e!"})," \u0422\u043e\u043a\u0435\u043d InsightStream \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0432\u0430\u0448\u0438\u043c \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compress\u0430."]}),"\n",(0,r.jsx)(e.h3,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430",children:"\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.code,{children:"PUT /bot/{bot_id}"})}),"\n",(0,r.jsx)(e.p,{children:"\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430) \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c id"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-bash",children:"PUT /bot/1234\n"})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"bot_id"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u043e\u0442\u0430"]}),"\n"]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"files"})," (array, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0421\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 (\u0444\u043e\u0440\u043c\u0430\u0442 ",(0,r.jsx)(e.strong,{children:"multipart/form-data"}),")"]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"user_story"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f \u0431\u043e\u0442\u0430"]}),"\n"]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041e\u0442\u0432\u0435\u0442\u044b:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"200 OK"}),": \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438."]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"422 Validation Error"}),": \u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438."]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430-\u0441\u0442\u0430\u0442\u0443\u0441\u0430-\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438",children:"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.code,{children:"GET /bot/{bot_id}"})}),"\n",(0,r.jsx)(e.p,{children:"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0431\u043e\u0442\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c."}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-bash",children:"GET /bot/1234\n"})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"bot_id"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u043e\u0442\u0430"]}),"\n"]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041e\u0442\u0432\u0435\u0442\u044b:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"200 OK"}),": \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0431\u043e\u0442\u0430."]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"422 Validation Error"}),": \u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438."]}),"\n"]})]})}function a(n={}){const{wrapper:e}={...(0,i.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(h,{...n})}):h(n)}},8453:(n,e,s)=>{s.d(e,{R:()=>d,x:()=>o});var r=s(6540);const i={},t=r.createContext(i);function d(n){const e=r.useContext(t);return r.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function o(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(i):n.components||i:d(n.components),r.createElement(t.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/2b673715.8b3ef111.js b/assets/js/2b673715.8b3ef111.js deleted file mode 100644 index b1537cd..0000000 --- a/assets/js/2b673715.8b3ef111.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[5882],{9208:(n,e,s)=>{s.r(e),s.d(e,{assets:()=>l,contentTitle:()=>d,default:()=>a,frontMatter:()=>t,metadata:()=>o,toc:()=>c});var r=s(4848),i=s(8453);const t={sidebar_position:1},d="\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)",o={id:"docs/insightstream_module/file_upload",title:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)",description:"\u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0443\u043f\u0435\u043d\u0447\u0430\u0442\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438 \u0442.\u0434. \u042d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u044d\u0442\u0430\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/file_upload.md",sourceDirName:"docs/insightstream_module",slug:"/docs/insightstream_module/file_upload",permalink:"/docs/insightstream_module/file_upload",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/file_upload.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"InsightStream RAG",permalink:"/docs/insightstream_module/"},next:{title:"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442",permalink:"/docs/insightstream_module/file_search"}},l={},c=[{value:"\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430",id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430",level:3},{value:"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438",id:"\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430-\u0441\u0442\u0430\u0442\u0443\u0441\u0430-\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438",level:3}];function h(n){const e={code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{id:"\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430-\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432",children:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)"}),"\n",(0,r.jsx)(e.p,{children:"\u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0443\u043f\u0435\u043d\u0447\u0430\u0442\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438 \u0442.\u0434. \u042d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u044d\u0442\u0430\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439."}),"\n",(0,r.jsxs)(e.p,{children:["\u041e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 URL \u0441\u0435\u0440\u0432\u0435\u0440\u0430 ",(0,r.jsx)(e.code,{children:"console.insightstream.ru:8000"}),"\n\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 URL \u0441\u0435\u0440\u0432\u0435\u0440\u0430 InsightStream RAG"]}),"\n",(0,r.jsxs)(e.p,{children:["\u041a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c ",(0,r.jsx)(e.code,{children:'-H "Authorization: Bearer \u0412\u0430\u0448_\u0442\u043e\u043a\u0435\u043d_InsightStream'}),". \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430 \u043d\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.\n",(0,r.jsx)(e.strong,{children:"\u0412\u0430\u0436\u043d\u043e!"})," \u0422\u043e\u043a\u0435\u043d InsightStream \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0432\u0430\u0448\u0438\u043c \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compress\u0430."]}),"\n",(0,r.jsx)(e.h3,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430",children:"\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.code,{children:"PUT /bot/{bot_id}"})}),"\n",(0,r.jsx)(e.p,{children:"\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430) \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c id"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-bash",children:"PUT /bot/1234\n"})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"bot_id"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u043e\u0442\u0430"]}),"\n"]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"files"})," (array, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0421\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 (\u0444\u043e\u0440\u043c\u0430\u0442 ",(0,r.jsx)(e.strong,{children:"multipart/form-data"}),")"]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"user_story"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f \u0431\u043e\u0442\u0430"]}),"\n"]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041e\u0442\u0432\u0435\u0442\u044b:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"200 OK"}),": \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438."]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"422 Validation Error"}),": \u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438."]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430-\u0441\u0442\u0430\u0442\u0443\u0441\u0430-\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438",children:"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.code,{children:"GET /bot/{bot_id}"})}),"\n",(0,r.jsx)(e.p,{children:"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0431\u043e\u0442\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c."}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-bash",children:"GET /bot/1234\n"})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"bot_id"})," (string, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439): \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u043e\u0442\u0430"]}),"\n"]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"\u041e\u0442\u0432\u0435\u0442\u044b:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"200 OK"}),": \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0431\u043e\u0442\u0430."]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"422 Validation Error"}),": \u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438."]}),"\n"]})]})}function a(n={}){const{wrapper:e}={...(0,i.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(h,{...n})}):h(n)}},8453:(n,e,s)=>{s.d(e,{R:()=>d,x:()=>o});var r=s(6540);const i={},t=r.createContext(i);function d(n){const e=r.useContext(t);return r.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function o(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(i):n.components||i:d(n.components),r.createElement(t.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/31018403.0bf1d113.js b/assets/js/31018403.0bf1d113.js deleted file mode 100644 index a969279..0000000 --- a/assets/js/31018403.0bf1d113.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[9581],{4198:(n,e,s)=>{s.r(e),s.d(e,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>o,toc:()=>d});var i=s(4848),r=s(8453);const t={slug:"/",sidebar_position:1,title:"About",sidebar_class_name:"docs_sidebar_index"},c="\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e Compressa!",o={id:"docs/index",title:"About",description:"Compressa \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 LLM + RAG \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0431\u0430\u0437\u0435 Langchain. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0435 API \u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0433\u043e AI \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/index.md",sourceDirName:"docs",slug:"/",permalink:"/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/index.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{slug:"/",sidebar_position:1,title:"About",sidebar_class_name:"docs_sidebar_index"},sidebar:"docsSidebar",next:{title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",permalink:"/docs/intro"}},a={},d=[{value:"\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439:",id:"\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435-\u043f\u0440\u0438\u043c\u0435\u0440\u044b-\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445-\u0440\u0435\u0448\u0435\u043d\u0438\u0439",level:2},{value:"\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438?",id:"\u043a\u0430\u043a-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c-\u043d\u0430\u0448\u0438-\u043c\u043e\u0434\u0435\u043b\u0438",level:2},{value:"\u041a\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443?",id:"\u043a\u0442\u043e-\u043c\u043e\u0436\u0435\u0442-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c-\u043d\u0430\u0448\u0443-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443",level:2},{value:"Quick Start",id:"quick-start",level:2}];function l(n){const e={a:"a",br:"br",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...n.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.h1,{id:"\u0434\u043e\u0431\u0440\u043e-\u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c-\u0432-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e-compressa",children:"\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e Compressa!"}),"\n",(0,i.jsx)(e.p,{children:"Compressa \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 LLM + RAG \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0431\u0430\u0437\u0435 Langchain. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0435 API \u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0433\u043e AI \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438."}),"\n",(0,i.jsx)(e.h2,{id:"\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435-\u043f\u0440\u0438\u043c\u0435\u0440\u044b-\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445-\u0440\u0435\u0448\u0435\u043d\u0438\u0439",children:"\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"QA-\u0431\u043e\u0442 \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u043d\u0430\u0431\u043e\u0440\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0442\u0434\u0435\u043b\u043e\u0432 \u0438 \u0437\u0430\u0434\u0430\u0447"}),"\n",(0,i.jsx)(e.li,{children:"\u0423\u043c\u043d\u044b\u0439 \u0438 \u0442\u043e\u0447\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0434\u043b\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u0438\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432"}),"\n",(0,i.jsx)(e.li,{children:"Langchain-\u0430\u0433\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0433\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438"}),"\n",(0,i.jsx)(e.li,{children:"\u0410\u043d\u0430\u043b\u0438\u0437 \u0438 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432"}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:"Compressa \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 LLM, Embedding \u0438 Rerank \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 Langchain \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u043e\u0442\u043d\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 AI \u0430\u0433\u0435\u043d\u0442\u043e\u0432."}),"\n",(0,i.jsx)(e.p,{children:"\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 on-prem \u0444\u043e\u0440\u043c\u0430\u0442\u0430, LLM \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043d\u0435\u0434\u043e\u0440\u043e\u0433\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0430 \u043f\u043e\u0434 \u0432\u0430\u0448\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432."}),"\n",(0,i.jsx)(e.h2,{id:"\u043a\u0430\u043a-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c-\u043d\u0430\u0448\u0438-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438?"}),"\n",(0,i.jsx)(e.p,{children:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432:"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:"Python SDK (Langchain)"}),": \u041c\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c Python SDK \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0430\u0448\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044f\u043c \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e Python-\u043a\u043e\u0434\u0430."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:"REST API"}),": \u041d\u0430\u0448 SDK \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 REST API, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u044f\u0437\u044b\u043a\u0435."]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:"Open AI"}),": \u041d\u0430\u0448\u0438 API \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 OpenAI, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438."]}),"\n"]}),"\n",(0,i.jsx)(e.h2,{id:"\u043a\u0442\u043e-\u043c\u043e\u0436\u0435\u0442-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c-\u043d\u0430\u0448\u0443-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443",children:"\u041a\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443?"}),"\n",(0,i.jsx)(e.p,{children:"\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 Langchain \u0438 \u0445\u043e\u0442\u044f\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u0442 Compressa. \u0415\u0441\u043b\u0438 \u0432\u044b \u0435\u0449\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441 \u044d\u0442\u0438\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c \u2014 Langchain \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u0433\u0430\u0439\u0434\u043e\u0432 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432."}),"\n",(0,i.jsxs)(e.p,{children:["\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0434\u0440\u0443\u0433\u043e\u0439 / \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u2014 \u043f\u0440\u043e\u0441\u0438\u043c \u0432\u0430\u0441 \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0430\u043c\u0438 \u0432 ",(0,i.jsx)(e.a,{href:"https://t.me/+-0smoj_KpEw3MGQy",children:"\u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438"}),"."]}),"\n",(0,i.jsx)(e.h2,{id:"quick-start",children:"Quick Start"}),"\n",(0,i.jsx)(e.p,{children:"\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0441 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 quickstart \u0433\u0430\u0439\u0434\u043e\u0432:"}),"\n",(0,i.jsxs)(e.p,{children:["\u2043 \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442 \u0441 ",(0,i.jsx)(e.a,{href:"/docs/Quickstart/langchain",children:"Python SDK (Langchain)"}),(0,i.jsx)(e.br,{}),"\n","\u2043 \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442 \u0441 ",(0,i.jsx)(e.a,{href:"/docs/Quickstart/REST_API",children:"REST API"}),(0,i.jsx)(e.br,{}),"\n","\u2043 \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 ",(0,i.jsx)(e.a,{href:"/docs/Quickstart/openai",children:"OpenAI"})]})]})}function h(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,i.jsx)(e,{...n,children:(0,i.jsx)(l,{...n})}):l(n)}},8453:(n,e,s)=>{s.d(e,{R:()=>c,x:()=>o});var i=s(6540);const r={},t=i.createContext(r);function c(n){const e=i.useContext(t);return i.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function o(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:c(n.components),i.createElement(t.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/3983e095.34d5bcb5.js b/assets/js/3983e095.34d5bcb5.js deleted file mode 100644 index 67ba6d0..0000000 --- a/assets/js/3983e095.34d5bcb5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[2649],{1151:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>l,metadata:()=>t,toc:()=>r});var i=s(4848),d=s(8453);const l={sidebar_position:5},a="Fine-tuning",t={id:"docs/basic_modules/Fine-tuning",title:"Fine-tuning",description:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Fine-tuning.md",sourceDirName:"docs/basic_modules",slug:"/docs/basic_modules/Fine-tuning",permalink:"/docs/basic_modules/Fine-tuning",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Fine-tuning.md",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"docsSidebar",previous:{title:"Rerank",permalink:"/docs/basic_modules/Rerank"},next:{title:"InsightStream RAG",permalink:"/docs/insightstream_module/"}},c={},r=[{value:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445",id:"\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u0434\u0430\u043d\u043d\u044b\u0445",level:2},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",level:2},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 UI",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-ui",level:3},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 REST API",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-rest-api",level:2},{value:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",id:"\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",level:3},{value:" GET /v1/datasets/
",id:"get-v1datasets",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430",level:4},{value:"POST /v1/datasets/upload/
",id:"post-v1datasetsupload",level:4},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",level:4},{value:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-1",level:4},{value:"GET /v1/datasets/{dataset_id}/
",id:"get-v1datasetsdataset_id",level:4},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-2",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-2",level:4},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",level:3},{value:"GET /v1/finetune/models/
",id:"get-v1finetunemodels",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-3",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-3",level:4},{value:"POST /v1/finetune/
",id:"post-v1finetune",level:4},{value:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-4",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-4",level:4},{value:"GET /v1/finetune/status
",id:"get-v1finetunestatus",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-5",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-5",level:4},{value:"POST /v1/finetune/interrupt/
",id:"post-v1finetuneinterrupt",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-6",level:4},{value:"\u0417\u0430\u043f\u0443\u0441\u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439-\u043c\u043e\u0434\u0435\u043b\u0438",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",hr:"hr",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"fine-tuning",children:"Fine-tuning"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u0412\u0430\u0436\u043d\u043e! \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 on-premise \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445."})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043f\u043e\u0434\u0431\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u043c\u043f\u0442\u043e\u0432."}),"\n",(0,i.jsx)(n.h2,{id:"\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u0434\u0430\u043d\u043d\u044b\u0445",children:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445"}),"\n",(0,i.jsx)(n.p,{children:"\u0414\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432"}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["\u041e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 ",(0,i.jsx)(n.a,{href:"https://jsonlines.org/",children:"JSON Lines"}),", \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442:"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Compressa allows to fine-tune models on chat data.\nTo start the process you should:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Prepare conversation examples"}),"\n",(0,i.jsxs)(n.li,{children:["Format them into ",(0,i.jsx)(n.a,{href:"https://jsonlines.org/",children:"JSON Lines"})," format with the next content on each line:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "messages": [\n {\n "role": "user",\n "content": ""\n },\n {\n "role": "bot",\n "content": " "\n },\n {\n "role": "user",\n "content": " "\n },\n {\n "role": "bot",\n "content": " "\n },\n ]\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"\u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u0438\u0430\u043b\u043e\u0433 \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 100 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432."}),"\n",(0,i.jsx)(n.h2,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 UI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Compressa Fine-tuning \u0438\u043b\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c REST API. \u041d\u0438\u0436\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u0430 \u044d\u0442\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430."}),"\n",(0,i.jsx)(n.h3,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-ui",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 UI"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"URL"}),": ",(0,i.jsx)(n.code,{children:"http://localhost:8080/pod-1/finetune/"})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Fine-Tune UI",src:s(9068).A+"",width:"2704",height:"1698"})}),"\n",(0,i.jsx)(n.p,{children:"\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 UI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"\u0412\u044b\u0431\u0440\u0430\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u043b\u0435\u0432\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.li,{children:"\u0412\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438"}),"\n",(0,i.jsxs)(n.li,{children:["\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c ",(0,i.jsx)(n.strong,{children:"jsonl"})," \u0444\u0430\u0439\u043b \u0432 \u0444\u043e\u0440\u043c\u0443"]}),"\n",(0,i.jsxs)(n.li,{children:["\u041d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 ",(0,i.jsx)(n.strong,{children:"Finetune"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0435 ",(0,i.jsx)(n.a,{href:"https://github.com/aimhubio/aim",children:"AIM"}),". \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0436\u043c\u0438\u0442\u0435 ",(0,i.jsx)(n.strong,{children:"Training Dashboard"})," \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Training Dashboard",src:s(6720).A+"",width:"2714",height:"1702"})}),"\n",(0,i.jsx)(n.p,{children:"\u0412 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435, \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Training Dashboard",src:s(1674).A+"",width:"2858",height:"1770"})}),"\n",(0,i.jsx)(n.h2,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-rest-api",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 REST API"}),"\n",(0,i.jsx)(n.h3,{id:"\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",children:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438"}),"\n",(0,i.jsx)(n.h4,{id:"get-v1datasets",children:(0,i.jsx)(n.code,{children:"GET /v1/datasets/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432."}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'[\n {\n "id": "01be6d68-f790-434b-aa6d-5bd492aef202",\n "name": "train.jsonl",\n "s3_path": "01be6d68-f790-434b-aa6d-5bd492aef202/metadata.json",\n "description": null\n },\n {\n "id": "077adb68-2b0e-481b-bd13-e8807adf625f",\n "name": "train.jsonl",\n "s3_path": "077adb68-2b0e-481b-bd13-e8807adf625f/metadata.json",\n "description": "My dataset 2"\n }\n]\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1datasetsupload",children:(0,i.jsx)(n.code,{children:"POST /v1/datasets/upload/"})}),"\n",(0,i.jsx)(n.p,{children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 (\u0442\u043e\u043b\u044c\u043a\u043e \u2018jsonl\u2019 \u0444\u043e\u0440\u043c\u0430\u0442)."}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"query"}),": ",(0,i.jsx)(n.code,{children:"description"})," - dataset description"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"multipart/form-data"}),": ",(0,i.jsx)(n.code,{children:"file"})]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/upload/?description=My%20Description' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: multipart/form-data' \\\n -F 'file=@train.jsonl'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-1",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "string",\n "name": "string",\n "s3_path": "string",\n "description": "string"\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"get-v1datasetsdataset_id",children:(0,i.jsx)(n.code,{children:"GET /v1/datasets/{dataset_id}/"})}),"\n",(0,i.jsxs)(n.p,{children:["\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u043e id ",(0,i.jsx)(n.code,{children:"dataset_id"})]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"path"}),": ",(0,i.jsx)(n.code,{children:"dataset_id"})]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-2",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/01be6d68-f790-434b-aa6d-5bd492aef202/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-2",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"file"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.h4,{id:"get-v1finetunemodels",children:(0,i.jsx)(n.code,{children:"GET /v1/finetune/models/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-3",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/models/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-3",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'[\n {\n "model_id": "TheBloke/mixtral-8x7b-v0.1-AWQ",\n "adapter": false,\n "base_model_id": null\n },\n {\n "model_id": "NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story",\n "adapter": false,\n "base_model_id": null\n }\n]\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1finetune",children:(0,i.jsx)(n.code,{children:"POST /v1/finetune/"})}),"\n",(0,i.jsx)(n.p,{children:"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435"}),"\n",(0,i.jsx)(n.h4,{id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "name": "string",\n "model_id": "string",\n "dataset_id": "string"\n}\n'})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"name"})," - name of training"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_id"})," - id of model to train"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dataset_id"})," - id of dataset to train on"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-4",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -X \'POST\' \\\n \'http://localhost:8080/pod-1/api/v1/finetune/\' \\\n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "name": "My Adapter Training",\n "model_id": "NousResearch/Llama-2-7b-chat-hf",\n "dataset_id": "01be6d68-f790-434b-aa6d-5bd492aef202"\n}\'\n'})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-4",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "CREATED",\n "started_at": "2024-03-21T10:40:40.928442"\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"get-v1finetunestatus",children:(0,i.jsx)(n.code,{children:"GET /v1/finetune/status"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-5",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/status/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-5",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "46c155b4-17fe-4226-9412-a77edfadc7e7",\n "name": "My Adapter Training",\n "model_id": "NousResearch/Llama-2-7b-chat-hf",\n "dataset_id": "01be6d68-f790-434b-aa6d-5bd492aef202",\n "job": {\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "RUNNING",\n "started_at": "2024-03-21T10:40:40.928442"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1finetuneinterrupt",children:(0,i.jsx)(n.code,{children:"POST /v1/finetune/interrupt/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/interrupt/' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-6",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "RUNNING",\n "started_at": "2024-03-21T10:40:40.928442"\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0417\u0430\u043f\u0443\u0441\u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435."}),"\n",(0,i.jsxs)(n.p,{children:["\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 ",(0,i.jsx)(n.a,{href:"/onprem/%D0%9F%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D0%B0%20Compressa/LLM_management/model_deployment",children:"\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},1674:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/aim-metrics-071e1b428c59dd1f300899a495f778c5.png"},9068:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/finetune-272560fe59b36eb751e0d5c92cacd5e7.png"},6720:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/training-dashboard-9d0e87da0b7d90d5c8404d052358932c.png"},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>t});var i=s(6540);const d={},l=i.createContext(d);function a(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:a(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3983e095.905f477b.js b/assets/js/3983e095.905f477b.js new file mode 100644 index 0000000..9c9f2a0 --- /dev/null +++ b/assets/js/3983e095.905f477b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[649],{1151:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>l,metadata:()=>t,toc:()=>r});var i=s(4848),d=s(8453);const l={sidebar_position:5},a="Fine-tuning",t={id:"docs/basic_modules/Fine-tuning",title:"Fine-tuning",description:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Fine-tuning.md",sourceDirName:"docs/basic_modules",slug:"/docs/basic_modules/Fine-tuning",permalink:"/docs/basic_modules/Fine-tuning",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Fine-tuning.md",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"docsSidebar",previous:{title:"Rerank",permalink:"/docs/basic_modules/Rerank"},next:{title:"InsightStream RAG",permalink:"/docs/insightstream_module/"}},c={},r=[{value:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445",id:"\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u0434\u0430\u043d\u043d\u044b\u0445",level:2},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",level:2},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 UI",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-ui",level:3},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 REST API",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-rest-api",level:2},{value:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",id:"\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",level:3},{value:" GET /v1/datasets/
",id:"get-v1datasets",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430",level:4},{value:"POST /v1/datasets/upload/
",id:"post-v1datasetsupload",level:4},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",level:4},{value:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-1",level:4},{value:"GET /v1/datasets/{dataset_id}/
",id:"get-v1datasetsdataset_id",level:4},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-2",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-2",level:4},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",level:3},{value:"GET /v1/finetune/models/
",id:"get-v1finetunemodels",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-3",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-3",level:4},{value:"POST /v1/finetune/
",id:"post-v1finetune",level:4},{value:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-4",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-4",level:4},{value:"GET /v1/finetune/status
",id:"get-v1finetunestatus",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-5",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-5",level:4},{value:"POST /v1/finetune/interrupt/
",id:"post-v1finetuneinterrupt",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-6",level:4},{value:"\u0417\u0430\u043f\u0443\u0441\u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439-\u043c\u043e\u0434\u0435\u043b\u0438",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",hr:"hr",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"fine-tuning",children:"Fine-tuning"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u0412\u0430\u0436\u043d\u043e! \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 on-premise \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445."})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043f\u043e\u0434\u0431\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u043c\u043f\u0442\u043e\u0432."}),"\n",(0,i.jsx)(n.h2,{id:"\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u0434\u0430\u043d\u043d\u044b\u0445",children:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445"}),"\n",(0,i.jsx)(n.p,{children:"\u0414\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432"}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["\u041e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 ",(0,i.jsx)(n.a,{href:"https://jsonlines.org/",children:"JSON Lines"}),", \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442:"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Compressa allows to fine-tune models on chat data.\nTo start the process you should:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Prepare conversation examples"}),"\n",(0,i.jsxs)(n.li,{children:["Format them into ",(0,i.jsx)(n.a,{href:"https://jsonlines.org/",children:"JSON Lines"})," format with the next content on each line:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "messages": [\n {\n "role": "user",\n "content": ""\n },\n {\n "role": "bot",\n "content": " "\n },\n {\n "role": "user",\n "content": " "\n },\n {\n "role": "bot",\n "content": " "\n },\n ]\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"\u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u0438\u0430\u043b\u043e\u0433 \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 100 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432."}),"\n",(0,i.jsx)(n.h2,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 UI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Compressa Fine-tuning \u0438\u043b\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c REST API. \u041d\u0438\u0436\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u0430 \u044d\u0442\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430."}),"\n",(0,i.jsx)(n.h3,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-ui",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 UI"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"URL"}),": ",(0,i.jsx)(n.code,{children:"http://localhost:8080/pod-1/finetune/"})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Fine-Tune UI",src:s(9068).A+"",width:"2704",height:"1698"})}),"\n",(0,i.jsx)(n.p,{children:"\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 UI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"\u0412\u044b\u0431\u0440\u0430\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u043b\u0435\u0432\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.li,{children:"\u0412\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438"}),"\n",(0,i.jsxs)(n.li,{children:["\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c ",(0,i.jsx)(n.strong,{children:"jsonl"})," \u0444\u0430\u0439\u043b \u0432 \u0444\u043e\u0440\u043c\u0443"]}),"\n",(0,i.jsxs)(n.li,{children:["\u041d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 ",(0,i.jsx)(n.strong,{children:"Finetune"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0435 ",(0,i.jsx)(n.a,{href:"https://github.com/aimhubio/aim",children:"AIM"}),". \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0436\u043c\u0438\u0442\u0435 ",(0,i.jsx)(n.strong,{children:"Training Dashboard"})," \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Training Dashboard",src:s(6720).A+"",width:"2714",height:"1702"})}),"\n",(0,i.jsx)(n.p,{children:"\u0412 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435, \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Training Dashboard",src:s(1674).A+"",width:"2858",height:"1770"})}),"\n",(0,i.jsx)(n.h2,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-rest-api",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 REST API"}),"\n",(0,i.jsx)(n.h3,{id:"\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",children:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438"}),"\n",(0,i.jsx)(n.h4,{id:"get-v1datasets",children:(0,i.jsx)(n.code,{children:"GET /v1/datasets/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432."}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'[\n {\n "id": "01be6d68-f790-434b-aa6d-5bd492aef202",\n "name": "train.jsonl",\n "s3_path": "01be6d68-f790-434b-aa6d-5bd492aef202/metadata.json",\n "description": null\n },\n {\n "id": "077adb68-2b0e-481b-bd13-e8807adf625f",\n "name": "train.jsonl",\n "s3_path": "077adb68-2b0e-481b-bd13-e8807adf625f/metadata.json",\n "description": "My dataset 2"\n }\n]\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1datasetsupload",children:(0,i.jsx)(n.code,{children:"POST /v1/datasets/upload/"})}),"\n",(0,i.jsx)(n.p,{children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 (\u0442\u043e\u043b\u044c\u043a\u043e \u2018jsonl\u2019 \u0444\u043e\u0440\u043c\u0430\u0442)."}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"query"}),": ",(0,i.jsx)(n.code,{children:"description"})," - dataset description"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"multipart/form-data"}),": ",(0,i.jsx)(n.code,{children:"file"})]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/upload/?description=My%20Description' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: multipart/form-data' \\\n -F 'file=@train.jsonl'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-1",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "string",\n "name": "string",\n "s3_path": "string",\n "description": "string"\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"get-v1datasetsdataset_id",children:(0,i.jsx)(n.code,{children:"GET /v1/datasets/{dataset_id}/"})}),"\n",(0,i.jsxs)(n.p,{children:["\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u043e id ",(0,i.jsx)(n.code,{children:"dataset_id"})]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"path"}),": ",(0,i.jsx)(n.code,{children:"dataset_id"})]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-2",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/01be6d68-f790-434b-aa6d-5bd492aef202/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-2",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"file"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.h4,{id:"get-v1finetunemodels",children:(0,i.jsx)(n.code,{children:"GET /v1/finetune/models/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-3",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/models/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-3",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'[\n {\n "model_id": "TheBloke/mixtral-8x7b-v0.1-AWQ",\n "adapter": false,\n "base_model_id": null\n },\n {\n "model_id": "NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story",\n "adapter": false,\n "base_model_id": null\n }\n]\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1finetune",children:(0,i.jsx)(n.code,{children:"POST /v1/finetune/"})}),"\n",(0,i.jsx)(n.p,{children:"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435"}),"\n",(0,i.jsx)(n.h4,{id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "name": "string",\n "model_id": "string",\n "dataset_id": "string"\n}\n'})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"name"})," - name of training"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_id"})," - id of model to train"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dataset_id"})," - id of dataset to train on"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-4",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -X \'POST\' \\\n \'http://localhost:8080/pod-1/api/v1/finetune/\' \\\n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "name": "My Adapter Training",\n "model_id": "NousResearch/Llama-2-7b-chat-hf",\n "dataset_id": "01be6d68-f790-434b-aa6d-5bd492aef202"\n}\'\n'})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-4",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "CREATED",\n "started_at": "2024-03-21T10:40:40.928442"\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"get-v1finetunestatus",children:(0,i.jsx)(n.code,{children:"GET /v1/finetune/status"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-5",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/status/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-5",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "46c155b4-17fe-4226-9412-a77edfadc7e7",\n "name": "My Adapter Training",\n "model_id": "NousResearch/Llama-2-7b-chat-hf",\n "dataset_id": "01be6d68-f790-434b-aa6d-5bd492aef202",\n "job": {\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "RUNNING",\n "started_at": "2024-03-21T10:40:40.928442"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1finetuneinterrupt",children:(0,i.jsx)(n.code,{children:"POST /v1/finetune/interrupt/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/interrupt/' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-6",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "RUNNING",\n "started_at": "2024-03-21T10:40:40.928442"\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0417\u0430\u043f\u0443\u0441\u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435."}),"\n",(0,i.jsxs)(n.p,{children:["\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 ",(0,i.jsx)(n.a,{href:"/onprem/%D0%9F%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D0%B0%20Compressa/LLM_management/model_deployment",children:"\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},1674:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/aim-metrics-071e1b428c59dd1f300899a495f778c5.png"},9068:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/finetune-272560fe59b36eb751e0d5c92cacd5e7.png"},6720:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/training-dashboard-9d0e87da0b7d90d5c8404d052358932c.png"},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>t});var i=s(6540);const d={},l=i.createContext(d);function a(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:a(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/44928db4.64df0b73.js b/assets/js/44928db4.64df0b73.js deleted file mode 100644 index a476bd0..0000000 --- a/assets/js/44928db4.64df0b73.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[448],{9621:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var s=t(4848),r=t(8453);const o={sidebar_position:3,title:"API Reference",sidebar_class_name:"docs_sidebar_index"},c=void 0,i={id:"docs/api-reference/index",title:"API Reference",description:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c Compressa, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f REST API \u0438\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 Langchain Compressa.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/api-reference/index.md",sourceDirName:"docs/api-reference",slug:"/docs/api-reference/",permalink:"/docs/api-reference/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/api-reference/index.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3,title:"API Reference",sidebar_class_name:"docs_sidebar_index"},sidebar:"docsSidebar",previous:{title:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442",permalink:"/docs/quick_start"},next:{title:"Python SDK (Langchain)",permalink:"/docs/api-reference/langchain"}},a={},d=[];function p(e){const n={p:"p",...(0,r.R)(),...e.components};return(0,s.jsx)(n.p,{children:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c Compressa, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f REST API \u0438\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 Langchain Compressa."})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>i});var s=t(6540);const r={},o=s.createContext(r);function c(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4c957044.5ff0ebac.js b/assets/js/4c957044.5ff0ebac.js new file mode 100644 index 0000000..4d618b5 --- /dev/null +++ b/assets/js/4c957044.5ff0ebac.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[999],{8713:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>p,frontMatter:()=>r,metadata:()=>t,toc:()=>l});var i=s(4848),a=s(8453);const r={sidebar_position:2},d="\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a",t={id:"guides/langchain_basic_semantic_search/index",title:"\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a",description:"\u042f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0442\u0435\u043a\u0441\u0442\u0430. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c, \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_basic_semantic_search/index.md",sourceDirName:"guides/langchain_basic_semantic_search",slug:"/guides/langchain_basic_semantic_search/",permalink:"/guides/langchain_basic_semantic_search/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_basic_semantic_search/index.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"guidesSidebar",previous:{title:"\u0411\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442",permalink:"/guides/langchain_rag/"},next:{title:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank",permalink:"/guides/langchain_basic_rerank/"}},c={},l=[{value:"1. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435",id:"1-\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435",level:2},{value:"2. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438",id:"2-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442-\u0441-\u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438",level:2},{value:"2. \u041f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 embeddings",id:"2-\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c-\u0434\u0430\u0442\u0430\u0441\u0435\u0442-\u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432-\u0432-embeddings",level:2},{value:"3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0438 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443 \u0441\u043e\u0441\u0435\u0434\u0443",id:"3-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c-\u043f\u043e\u0438\u0441\u043a-\u043f\u043e-\u0438\u043d\u0434\u0435\u043a\u0441\u0443-\u0438-\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443-\u0441\u043e\u0441\u0435\u0434\u0443",level:2},{value:"3.1. \u0418\u0449\u0435\u043c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430",id:"31-\u0438\u0449\u0435\u043c-\u043f\u043e\u0445\u043e\u0436\u0438\u0435-\u043f\u043e-\u0441\u043c\u044b\u0441\u043b\u0443-\u0432\u043e\u043f\u0440\u043e\u0441\u044b-\u0434\u043b\u044f-\u043e\u0434\u043d\u043e\u0433\u043e-\u043f\u0440\u0438\u043c\u0435\u0440\u0430-\u0438\u0437-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430",level:3},{value:"3.2. \u0418\u0449\u0435\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",id:"32-\u0438\u0449\u0435\u043c-\u0432\u043e\u043f\u0440\u043e\u0441\u044b-\u043f\u043e\u0445\u043e\u0436\u0438\u0435-\u043d\u0430-\u0437\u0430\u043f\u0440\u043e\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",level:3},{value:"4. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432",id:"4-\u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c-\u0444\u0430\u0439\u043b-\u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"\u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435-\u0432-embeddings-\u0438-\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439-\u043f\u043e\u0438\u0441\u043a",children:"\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a"}),"\n",(0,i.jsx)(n.p,{children:"\u042f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0442\u0435\u043a\u0441\u0442\u0430. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c, \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435."}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0432\u0435\u0431-\u043f\u043e\u0438\u0441\u043a\u0430. \u0421 \u043d\u0438\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e \u0432\u043d\u0443\u0440\u0435\u043d\u043d\u0438\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u043b\u0438 \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043b\u0443\u0447\u0448\u0435 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0430\u0448\u0435\u043c FAQ. \u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 - \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u0432 \u0431\u043b\u043e\u0433\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445."}),"\n",(0,i.jsx)(n.p,{children:"\u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0441\u0445\u0435\u043c\u044b:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://raw.githubusercontent.com/walyoung1/pictures/main/guides_semantic_pic1.jpg",alt:"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 1"})}),"\n",(0,i.jsx)(n.p,{children:"\u0418\u0442\u0430\u043a, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0433\u0430\u0439\u0434\u0430 \u043c\u044b \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u043c csv \u0444\u0430\u0439\u043b 1000 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c"}),"\n",(0,i.jsx)(n.li,{children:"\u041f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043c \u0442\u0435\u043a\u0441\u0442 \u0432 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 embeddings"}),"\n",(0,i.jsx)(n.li,{children:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0438 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u043c \u0441\u043e\u0441\u0435\u0434\u044f\u043c"}),"\n",(0,i.jsx)(n.li,{children:"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 embeddings"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u0412\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 .ipynb \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 ",(0,i.jsx)(n.a,{href:"https://github.com/compressa-ai/langchain_compressa/blob/main/docs/Basic_Semantic_Search.ipynb",children:"\u0437\u0434\u0435\u0441\u044c"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 Compressa \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f embeddings, Umap \u2013 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0434\u043e 2 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439;\n# Altair \u2013 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, Annoy \u2013 \u0434\u043b\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439; \n\n!pip install langchain-compressa\n!pip install umap-learn\n!pip install altair\n!pip install annoy\n\n# \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0443 \u0432\u0430\u0441 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0438\u0437 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432\n\n!pip install pandas\n!pip install numpy\n!pip install tqdm\n!pip install scikit-learn\n!pip install gdown\n"})}),"\n",(0,i.jsx)(n.h2,{id:"1-\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435",children:"1. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\n\nfrom langchain_compressa import CompressaEmbeddings\nimport os\nimport gdown\nimport numpy as np\nimport re\nimport pandas as pd\nfrom tqdm import tqdm\nimport altair as alt\nfrom sklearn.metrics.pairwise import cosine_similarity\nfrom annoy import AnnoyIndex\nimport umap.umap_ as umap\nimport warnings\nwarnings.filterwarnings('ignore')\npd.set_option('display.max_colwidth', None)\n"})}),"\n",(0,i.jsxs)(n.p,{children:["\u0414\u043b\u044f \u044f\u0447\u0435\u0439\u043a\u0438 \u043d\u0438\u0436\u0435 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f API \u043a\u043b\u044e\u0447 Compressa. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 ",(0,i.jsx)(n.a,{href:"https://compressa.ai/form",children:"\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:'os.environ["COMPRESSA_API_KEY"] = "\u0432\u0430\u0448_\u043a\u043b\u044e\u0447"\n'})}),"\n",(0,i.jsx)(n.h2,{id:"2-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442-\u0441-\u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438",children:"2. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438"}),"\n",(0,i.jsx)(n.p,{children:"\u041c\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 1000 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u0433\u0430\u0439\u0434\u0430."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"#\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 c google \u0434\u0438\u0441\u043a\u0430 \u0421ompressa\nfile_id = '1wRC8bKBY5W8lrXU9cTKCgAdoL0g72ANI'\nurl = f'https://drive.google.com/uc?id={file_id}'\ngdown.download(url, '1000_ru_questions.csv', quiet=False)\n\n# \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432 pandas dataframe\ndf = pd.read_csv(file_path)\n\n# \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u043e\u0441\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\ndf.head(10)\n"})}),"\n",(0,i.jsx)(n.h2,{id:"2-\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c-\u0434\u0430\u0442\u0430\u0441\u0435\u0442-\u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432-\u0432-embeddings",children:"2. \u041f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 embeddings"}),"\n",(0,i.jsx)(n.p,{children:"\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 - \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 embeddings."}),"\n",(0,i.jsx)(n.p,{children:"\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://raw.githubusercontent.com/walyoung1/pictures/main/guides_semantic_pic2.jpg",alt:"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 2"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:'# \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0448\u0438 embeddings\nembeddings = CompressaEmbeddings(api_key=os.getenv("COMPRESSA_API_KEY"), base_url="https://compressa-api.mil-team.ru/v1")\ntexts = list(df[\'question\'])\nembeds = embeddings.embed_documents(texts)\n'})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0438\u0445 embeddings (\u043d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 1000 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432)\nembeds = np.array(embeds)\nprint(embeds.shape) \n"})}),"\n",(0,i.jsx)(n.h2,{id:"3-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c-\u043f\u043e\u0438\u0441\u043a-\u043f\u043e-\u0438\u043d\u0434\u0435\u043a\u0441\u0443-\u0438-\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443-\u0441\u043e\u0441\u0435\u0434\u0443",children:"3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0438 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443 \u0441\u043e\u0441\u0435\u0434\u0443"}),"\n",(0,i.jsx)(n.p,{children:"\u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0441\u0445\u0435\u043c\u0430 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 :)"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.img,{src:"https://raw.githubusercontent.com/walyoung1/pictures/main/guides_semantic_pic3.jpg",alt:"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 3"}),"\n\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c ",(0,i.jsx)(n.a,{href:"https://github.com/spotify/annoy",children:"Annoy"})," \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 embeddings \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432. \u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f - ",(0,i.jsx)(n.a,{href:"https://github.com/facebookresearch/faiss",children:"Faiss"}),", ",(0,i.jsx)(n.a,{href:"https://github.com/google-research/google-research/tree/master/scann",children:"ScaNN"}),", ",(0,i.jsx)(n.a,{href:"https://github.com/lmcinnes/pynndescent",children:"PyNNDescent"}),")."]}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0430\u0448\u0438\u0445 embeddings\nsearch_index = AnnoyIndex(embeds.shape[1], 'angular')\n\n# \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\nfor i in range(len(embeds)):\n search_index.add_item(i, embeds[i])\n\nsearch_index.build(10) # 10 trees\nsearch_index.save('test.ann')\n"})}),"\n",(0,i.jsx)(n.h3,{id:"31-\u0438\u0449\u0435\u043c-\u043f\u043e\u0445\u043e\u0436\u0438\u0435-\u043f\u043e-\u0441\u043c\u044b\u0441\u043b\u0443-\u0432\u043e\u043f\u0440\u043e\u0441\u044b-\u0434\u043b\u044f-\u043e\u0434\u043d\u043e\u0433\u043e-\u043f\u0440\u0438\u043c\u0435\u0440\u0430-\u0438\u0437-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430",children:"3.1. \u0418\u0449\u0435\u043c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430"}),"\n",(0,i.jsx)(n.p,{children:"\u0415\u0441\u043b\u0438 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 (\u0431\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432), \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0438 embeddings, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0434\u0440\u0443\u0433\u0438\u0435, \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e\nexample_id = 109\n\n# \u0414\u043e\u0441\u0442\u0430\u0435\u043c \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439\nsimilar_item_ids = search_index.get_nns_by_item(example_id,10,\n include_distances=True)\n# \u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u043c \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043e \u043d\u0438\u0445\nresults = pd.DataFrame(data={'\u0432\u043e\u043f\u0440\u043e\u0441\u044b': df.iloc[similar_item_ids[0]]['question'], \n '\u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435': similar_item_ids[1]}).drop(example_id)\n\nprint(f\"\u0412\u043e\u043f\u0440\u043e\u0441:'{df.iloc[example_id]['question']}'\\n\u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:\")\nresults\n"})}),"\n",(0,i.jsx)(n.h3,{id:"32-\u0438\u0449\u0435\u043c-\u0432\u043e\u043f\u0440\u043e\u0441\u044b-\u043f\u043e\u0445\u043e\u0436\u0438\u0435-\u043d\u0430-\u0437\u0430\u043f\u0440\u043e\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",children:"3.2. \u0418\u0449\u0435\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f"}),"\n",(0,i.jsx)(n.p,{children:"\u041c\u044b \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0434\u043b\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 embedding \u0438 \u043d\u0430\u0439\u0442\u0438 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0432 \u043d\u0430\u0448\u0435\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"query = \"\u041a\u0430\u043a\u0430\u044f \u0441\u0430\u043c\u0430\u044f \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0433\u043e\u0440\u0430 \u0432 \u043c\u0438\u0440\u0435?\"\n\n# \u041f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 embedding\nquery_embed = embeddings.embed_query(query)\n\n# \u0414\u043e\u0441\u0442\u0430\u0435\u043c \u0431\u043b\u0438\u0437\u043a\u0438\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 Annoy\nsimilar_item_ids, distances = search_index.get_nns_by_vector(query_embed, 10, include_distances=True)\n\n# \u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b\nquery_results = pd.DataFrame(data={'questions': df.iloc[similar_item_ids]['question'], \n 'distance': distances})\n\nprint(f\"\u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: '{query}'\\n\u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:\")\nprint(query_results)\n"})}),"\n",(0,i.jsx)(n.h2,{id:"4-\u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c-\u0444\u0430\u0439\u043b-\u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432",children:"4. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432"}),"\n",(0,i.jsx)(n.p,{children:"\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043d\u0430 2D \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0432\u044f\u0437\u0438."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# UMAP \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c embeddings \u0441 4096 \u0434\u043e 2, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435\nreducer = umap.UMAP(n_neighbors=20) \numap_embeds = reducer.fit_transform(embeds)\n\n# \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Altair\ndf_explore = pd.DataFrame(data={'questions': df['question']})\ndf_explore['x'] = umap_embeds[:,0]\ndf_explore['y'] = umap_embeds[:,1]\n\n# \u0421\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a\nchart = alt.Chart(df_explore).mark_circle(size=60).encode(\n x=#'x',\n alt.X('x',\n scale=alt.Scale(zero=False)\n ),\n y=\n alt.Y('y',\n scale=alt.Scale(zero=False)\n ),\n tooltip=['questions']\n).properties(\n width=700,\n height=400\n)\nchart.interactive()\n"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0432\u043e\u0434\u0438\u0442\u0435 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c \u043f\u043e \u0442\u043e\u0447\u043a\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u0435\u043a\u0441\u0442. \u0412\u0438\u0434\u0438\u0442\u0435 \u043b\u0438 \u0432\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0447\u043a\u0430\u0445? \u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u0445\u043e\u0436\u0438\u0435 \u0442\u0435\u043c\u044b?"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u0435\u043c! \u041d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0448\u0435 \u0432\u0432\u043e\u0434\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043f\u043e\u0438\u0441\u043a\u0443 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c embeddings. \u041f\u043e \u043c\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432, \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0438\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f embeddings \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443)."}),"\n",(0,i.jsxs)(n.p,{children:["\u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 API! \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 - \u0432\u0441\u0442\u0443\u043f\u0430\u0439\u0442\u0435 \u0432 \u043d\u0430\u0448 ",(0,i.jsx)(n.a,{href:"https://t.me/+-0smoj_KpEw3MGQy",children:"\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442"}),"."]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>d,x:()=>t});var i=s(6540);const a={},r=i.createContext(a);function d(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:d(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4c957044.ca02e590.js b/assets/js/4c957044.ca02e590.js deleted file mode 100644 index c95fb35..0000000 --- a/assets/js/4c957044.ca02e590.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[5999],{8713:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>p,frontMatter:()=>r,metadata:()=>t,toc:()=>l});var i=s(4848),a=s(8453);const r={sidebar_position:2},d="\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a",t={id:"guides/langchain_basic_semantic_search/index",title:"\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a",description:"\u042f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0442\u0435\u043a\u0441\u0442\u0430. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c, \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_basic_semantic_search/index.md",sourceDirName:"guides/langchain_basic_semantic_search",slug:"/guides/langchain_basic_semantic_search/",permalink:"/guides/langchain_basic_semantic_search/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_basic_semantic_search/index.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"guidesSidebar",previous:{title:"\u0411\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442",permalink:"/guides/langchain_rag/"},next:{title:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank",permalink:"/guides/langchain_basic_rerank/"}},c={},l=[{value:"1. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435",id:"1-\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435",level:2},{value:"2. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438",id:"2-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442-\u0441-\u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438",level:2},{value:"2. \u041f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 embeddings",id:"2-\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c-\u0434\u0430\u0442\u0430\u0441\u0435\u0442-\u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432-\u0432-embeddings",level:2},{value:"3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0438 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443 \u0441\u043e\u0441\u0435\u0434\u0443",id:"3-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c-\u043f\u043e\u0438\u0441\u043a-\u043f\u043e-\u0438\u043d\u0434\u0435\u043a\u0441\u0443-\u0438-\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443-\u0441\u043e\u0441\u0435\u0434\u0443",level:2},{value:"3.1. \u0418\u0449\u0435\u043c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430",id:"31-\u0438\u0449\u0435\u043c-\u043f\u043e\u0445\u043e\u0436\u0438\u0435-\u043f\u043e-\u0441\u043c\u044b\u0441\u043b\u0443-\u0432\u043e\u043f\u0440\u043e\u0441\u044b-\u0434\u043b\u044f-\u043e\u0434\u043d\u043e\u0433\u043e-\u043f\u0440\u0438\u043c\u0435\u0440\u0430-\u0438\u0437-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430",level:3},{value:"3.2. \u0418\u0449\u0435\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",id:"32-\u0438\u0449\u0435\u043c-\u0432\u043e\u043f\u0440\u043e\u0441\u044b-\u043f\u043e\u0445\u043e\u0436\u0438\u0435-\u043d\u0430-\u0437\u0430\u043f\u0440\u043e\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",level:3},{value:"4. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432",id:"4-\u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c-\u0444\u0430\u0439\u043b-\u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"\u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435-\u0432-embeddings-\u0438-\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439-\u043f\u043e\u0438\u0441\u043a",children:"\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a"}),"\n",(0,i.jsx)(n.p,{children:"\u042f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0442\u0435\u043a\u0441\u0442\u0430. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c, \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435."}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0432\u0435\u0431-\u043f\u043e\u0438\u0441\u043a\u0430. \u0421 \u043d\u0438\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e \u0432\u043d\u0443\u0440\u0435\u043d\u043d\u0438\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u043b\u0438 \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043b\u0443\u0447\u0448\u0435 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0430\u0448\u0435\u043c FAQ. \u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 - \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u0432 \u0431\u043b\u043e\u0433\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445."}),"\n",(0,i.jsx)(n.p,{children:"\u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0441\u0445\u0435\u043c\u044b:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://raw.githubusercontent.com/walyoung1/pictures/main/guides_semantic_pic1.jpg",alt:"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 1"})}),"\n",(0,i.jsx)(n.p,{children:"\u0418\u0442\u0430\u043a, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0433\u0430\u0439\u0434\u0430 \u043c\u044b \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u043c csv \u0444\u0430\u0439\u043b 1000 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c"}),"\n",(0,i.jsx)(n.li,{children:"\u041f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043c \u0442\u0435\u043a\u0441\u0442 \u0432 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 embeddings"}),"\n",(0,i.jsx)(n.li,{children:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0438 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u043c \u0441\u043e\u0441\u0435\u0434\u044f\u043c"}),"\n",(0,i.jsx)(n.li,{children:"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 embeddings"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u0412\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 .ipynb \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 ",(0,i.jsx)(n.a,{href:"https://github.com/compressa-ai/langchain_compressa/blob/main/docs/Basic_Semantic_Search.ipynb",children:"\u0437\u0434\u0435\u0441\u044c"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 Compressa \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f embeddings, Umap \u2013 \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0434\u043e 2 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439;\n# Altair \u2013 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, Annoy \u2013 \u0434\u043b\u044f \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439; \n\n!pip install langchain-compressa\n!pip install umap-learn\n!pip install altair\n!pip install annoy\n\n# \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0443 \u0432\u0430\u0441 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0438\u0437 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432\n\n!pip install pandas\n!pip install numpy\n!pip install tqdm\n!pip install scikit-learn\n!pip install gdown\n"})}),"\n",(0,i.jsx)(n.h2,{id:"1-\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435",children:"1. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\n\nfrom langchain_compressa import CompressaEmbeddings\nimport os\nimport gdown\nimport numpy as np\nimport re\nimport pandas as pd\nfrom tqdm import tqdm\nimport altair as alt\nfrom sklearn.metrics.pairwise import cosine_similarity\nfrom annoy import AnnoyIndex\nimport umap.umap_ as umap\nimport warnings\nwarnings.filterwarnings('ignore')\npd.set_option('display.max_colwidth', None)\n"})}),"\n",(0,i.jsxs)(n.p,{children:["\u0414\u043b\u044f \u044f\u0447\u0435\u0439\u043a\u0438 \u043d\u0438\u0436\u0435 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f API \u043a\u043b\u044e\u0447 Compressa. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 ",(0,i.jsx)(n.a,{href:"https://compressa.ai/form",children:"\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:'os.environ["COMPRESSA_API_KEY"] = "\u0432\u0430\u0448_\u043a\u043b\u044e\u0447"\n'})}),"\n",(0,i.jsx)(n.h2,{id:"2-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442-\u0441-\u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438",children:"2. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438"}),"\n",(0,i.jsx)(n.p,{children:"\u041c\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 1000 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u0433\u0430\u0439\u0434\u0430."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"#\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 c google \u0434\u0438\u0441\u043a\u0430 \u0421ompressa\nfile_id = '1wRC8bKBY5W8lrXU9cTKCgAdoL0g72ANI'\nurl = f'https://drive.google.com/uc?id={file_id}'\ngdown.download(url, '1000_ru_questions.csv', quiet=False)\n\n# \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432 pandas dataframe\ndf = pd.read_csv(file_path)\n\n# \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u043e\u0441\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\ndf.head(10)\n"})}),"\n",(0,i.jsx)(n.h2,{id:"2-\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c-\u0434\u0430\u0442\u0430\u0441\u0435\u0442-\u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432-\u0432-embeddings",children:"2. \u041f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 embeddings"}),"\n",(0,i.jsx)(n.p,{children:"\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 - \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 embeddings."}),"\n",(0,i.jsx)(n.p,{children:"\u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{src:"https://raw.githubusercontent.com/walyoung1/pictures/main/guides_semantic_pic2.jpg",alt:"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 2"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:'# \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0448\u0438 embeddings\nembeddings = CompressaEmbeddings(api_key=os.getenv("COMPRESSA_API_KEY"), base_url="https://compressa-api.mil-team.ru/v1")\ntexts = list(df[\'question\'])\nembeds = embeddings.embed_documents(texts)\n'})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0438\u0445 embeddings (\u043d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 1000 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432)\nembeds = np.array(embeds)\nprint(embeds.shape) \n"})}),"\n",(0,i.jsx)(n.h2,{id:"3-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c-\u043f\u043e\u0438\u0441\u043a-\u043f\u043e-\u0438\u043d\u0434\u0435\u043a\u0441\u0443-\u0438-\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443-\u0441\u043e\u0441\u0435\u0434\u0443",children:"3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u0438 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443 \u0441\u043e\u0441\u0435\u0434\u0443"}),"\n",(0,i.jsx)(n.p,{children:"\u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0441\u0445\u0435\u043c\u0430 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 :)"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.img,{src:"https://raw.githubusercontent.com/walyoung1/pictures/main/guides_semantic_pic3.jpg",alt:"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 3"}),"\n\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c ",(0,i.jsx)(n.a,{href:"https://github.com/spotify/annoy",children:"Annoy"})," \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 embeddings \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430. \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432. \u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f - ",(0,i.jsx)(n.a,{href:"https://github.com/facebookresearch/faiss",children:"Faiss"}),", ",(0,i.jsx)(n.a,{href:"https://github.com/google-research/google-research/tree/master/scann",children:"ScaNN"}),", ",(0,i.jsx)(n.a,{href:"https://github.com/lmcinnes/pynndescent",children:"PyNNDescent"}),")."]}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0430\u0448\u0438\u0445 embeddings\nsearch_index = AnnoyIndex(embeds.shape[1], 'angular')\n\n# \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\nfor i in range(len(embeds)):\n search_index.add_item(i, embeds[i])\n\nsearch_index.build(10) # 10 trees\nsearch_index.save('test.ann')\n"})}),"\n",(0,i.jsx)(n.h3,{id:"31-\u0438\u0449\u0435\u043c-\u043f\u043e\u0445\u043e\u0436\u0438\u0435-\u043f\u043e-\u0441\u043c\u044b\u0441\u043b\u0443-\u0432\u043e\u043f\u0440\u043e\u0441\u044b-\u0434\u043b\u044f-\u043e\u0434\u043d\u043e\u0433\u043e-\u043f\u0440\u0438\u043c\u0435\u0440\u0430-\u0438\u0437-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430",children:"3.1. \u0418\u0449\u0435\u043c \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430"}),"\n",(0,i.jsx)(n.p,{children:"\u0415\u0441\u043b\u0438 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 (\u0431\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432), \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0438 embeddings, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0434\u0440\u0443\u0433\u0438\u0435, \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e\nexample_id = 109\n\n# \u0414\u043e\u0441\u0442\u0430\u0435\u043c \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439\nsimilar_item_ids = search_index.get_nns_by_item(example_id,10,\n include_distances=True)\n# \u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u043c \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043e \u043d\u0438\u0445\nresults = pd.DataFrame(data={'\u0432\u043e\u043f\u0440\u043e\u0441\u044b': df.iloc[similar_item_ids[0]]['question'], \n '\u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435': similar_item_ids[1]}).drop(example_id)\n\nprint(f\"\u0412\u043e\u043f\u0440\u043e\u0441:'{df.iloc[example_id]['question']}'\\n\u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:\")\nresults\n"})}),"\n",(0,i.jsx)(n.h3,{id:"32-\u0438\u0449\u0435\u043c-\u0432\u043e\u043f\u0440\u043e\u0441\u044b-\u043f\u043e\u0445\u043e\u0436\u0438\u0435-\u043d\u0430-\u0437\u0430\u043f\u0440\u043e\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",children:"3.2. \u0418\u0449\u0435\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f"}),"\n",(0,i.jsx)(n.p,{children:"\u041c\u044b \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0434\u043b\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 embedding \u0438 \u043d\u0430\u0439\u0442\u0438 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0432 \u043d\u0430\u0448\u0435\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"query = \"\u041a\u0430\u043a\u0430\u044f \u0441\u0430\u043c\u0430\u044f \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0433\u043e\u0440\u0430 \u0432 \u043c\u0438\u0440\u0435?\"\n\n# \u041f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 embedding\nquery_embed = embeddings.embed_query(query)\n\n# \u0414\u043e\u0441\u0442\u0430\u0435\u043c \u0431\u043b\u0438\u0437\u043a\u0438\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 Annoy\nsimilar_item_ids, distances = search_index.get_nns_by_vector(query_embed, 10, include_distances=True)\n\n# \u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b\nquery_results = pd.DataFrame(data={'questions': df.iloc[similar_item_ids]['question'], \n 'distance': distances})\n\nprint(f\"\u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: '{query}'\\n\u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:\")\nprint(query_results)\n"})}),"\n",(0,i.jsx)(n.h2,{id:"4-\u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c-\u0444\u0430\u0439\u043b-\u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432",children:"4. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432"}),"\n",(0,i.jsx)(n.p,{children:"\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043d\u0430 2D \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0432\u044f\u0437\u0438."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"# UMAP \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c embeddings \u0441 4096 \u0434\u043e 2, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435\nreducer = umap.UMAP(n_neighbors=20) \numap_embeds = reducer.fit_transform(embeds)\n\n# \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Altair\ndf_explore = pd.DataFrame(data={'questions': df['question']})\ndf_explore['x'] = umap_embeds[:,0]\ndf_explore['y'] = umap_embeds[:,1]\n\n# \u0421\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a\nchart = alt.Chart(df_explore).mark_circle(size=60).encode(\n x=#'x',\n alt.X('x',\n scale=alt.Scale(zero=False)\n ),\n y=\n alt.Y('y',\n scale=alt.Scale(zero=False)\n ),\n tooltip=['questions']\n).properties(\n width=700,\n height=400\n)\nchart.interactive()\n"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0432\u043e\u0434\u0438\u0442\u0435 \u043a\u0443\u0440\u0441\u043e\u0440\u043e\u043c \u043f\u043e \u0442\u043e\u0447\u043a\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u0435\u043a\u0441\u0442. \u0412\u0438\u0434\u0438\u0442\u0435 \u043b\u0438 \u0432\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0447\u043a\u0430\u0445? \u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u0445\u043e\u0436\u0438\u0435 \u0442\u0435\u043c\u044b?"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u0435\u043c! \u041d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0448\u0435 \u0432\u0432\u043e\u0434\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043f\u043e\u0438\u0441\u043a\u0443 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c embeddings. \u041f\u043e \u043c\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432, \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0438\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f embeddings \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443)."}),"\n",(0,i.jsxs)(n.p,{children:["\u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 API! \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 - \u0432\u0441\u0442\u0443\u043f\u0430\u0439\u0442\u0435 \u0432 \u043d\u0430\u0448 ",(0,i.jsx)(n.a,{href:"https://t.me/+-0smoj_KpEw3MGQy",children:"\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442"}),"."]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>d,x:()=>t});var i=s(6540);const a={},r=i.createContext(a);function d(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:d(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4edb40be.803f8a0e.js b/assets/js/4edb40be.803f8a0e.js deleted file mode 100644 index cd72606..0000000 --- a/assets/js/4edb40be.803f8a0e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[8543],{1019:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>i,contentTitle:()=>o,default:()=>m,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var r=n(4848),t=n(8453);const a={},o="\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise",c={id:"onprem/Compressa LLM/compressa_llm_management/mistral_7b",title:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise",description:"\u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0430\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u0432\u043e\u0434\u0430 Mistral-7B \u043d\u0430 \u043e\u0434\u043d\u043e\u043c GPU A100-40GB \u0441 Compressa LLM.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_management/mistral_7b.md",sourceDirName:"onprem/Compressa LLM/compressa_llm_management",slug:"/onprem/Compressa LLM/compressa_llm_management/mistral_7b",permalink:"/onprem/Compressa LLM/compressa_llm_management/mistral_7b",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_management/mistral_7b.md",tags:[],version:"current",frontMatter:{},sidebar:"onpremSidebar",previous:{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438",permalink:"/onprem/Compressa LLM/compressa_llm_management/"},next:{title:"Quickstart: Compressa Platform",permalink:"/onprem/platform"}},i={},l=[{value:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Compressa",id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-compressa",level:2},{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u043c\u043e\u0434\u0435\u043b\u0438",level:2},{value:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",level:2},{value:"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0434\u043e\u0441\u0442\u0443\u043f-\u043a-\u043c\u043e\u0434\u0435\u043b\u0438",level:2}];function p(e){const s={a:"a",admonition:"admonition",br:"br",code:"code",h1:"h1",h2:"h2",img:"img",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{id:"\u0431\u044b\u0441\u0442\u0440\u044b\u0439-\u0441\u0442\u0430\u0440\u0442-mistral-7b-on-premise",children:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise"}),"\n",(0,r.jsx)(s.p,{children:"\u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0430\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u0432\u043e\u0434\u0430 Mistral-7B \u043d\u0430 \u043e\u0434\u043d\u043e\u043c GPU A100-40GB \u0441 Compressa LLM."}),"\n",(0,r.jsx)(s.p,{children:"GPU A100-40GB \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c Mistral-7B \u0431\u0435\u0437 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438."}),"\n",(0,r.jsxs)(s.p,{children:["\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e Mistral-7B ",(0,r.jsx)(s.a,{href:"https://huggingface.co/openchat/openchat-3.5-0106",children:"openchat/openchat-3.5-0106"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-compressa",children:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Compressa"}),"\n",(0,r.jsxs)(s.p,{children:["\u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c Compressa \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 ",(0,r.jsx)(s.a,{href:"/onprem/LLM_On-Premises/setup/",children:"\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439"}),"."]}),"\n",(0,r.jsxs)(s.p,{children:["\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e Compressa \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 8080,\n\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c REST API \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ",(0,r.jsx)(s.a,{href:"http://localhost:8080/api",children:"http://localhost:8080/api"})," \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438."]}),"\n",(0,r.jsxs)(s.p,{children:["\u041f\u043e\u043b\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435 API \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 ",(0,r.jsx)(s.a,{href:"/onprem/LLM_On-Premises/services/rest-api",children:"\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438"}),"\n\u0438\u043b\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 Swagger \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ",(0,r.jsx)(s.code,{children:"http://localhost:8080/api/docs"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,r.jsx)(s.admonition,{type:"note",children:(0,r.jsxs)(s.p,{children:["\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0435 Compressa \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443, \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.\n\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 ",(0,r.jsx)(s.a,{href:"/onprem/LLM_On-Premises/setup/internet-access",children:"\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e"})," \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c."]})}),"\n",(0,r.jsxs)(s.p,{children:["\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ",(0,r.jsx)(s.code,{children:"curl"}),":"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/models/add/?model_id=openchat%2Fopenchat-3.5-0106' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,r.jsxs)(s.p,{children:["\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b Swagger, \u043d\u0430\u0436\u0430\u0432 ",(0,r.jsx)(s.strong,{children:"Try it out"}),":\n",(0,r.jsx)(s.img,{alt:"Add model",src:n(3606).A+"",width:"2324",height:"1022"})]}),"\n",(0,r.jsxs)(s.p,{children:["\u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442.",(0,r.jsx)(s.br,{}),"\n","\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043b\u043e\u0433 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ",(0,r.jsx)(s.a,{href:"/onprem/LLM_On-Premises/services/rest-api#get-v1models",children:"API"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,r.jsxs)(s.p,{children:["\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ",(0,r.jsx)(s.code,{children:"curl"}),":"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/deploy/' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model_id\": \"openchat/openchat-3.5-0106\"\n }'\n"})}),"\n",(0,r.jsxs)(s.p,{children:["\u0418\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b Swagger:\n",(0,r.jsx)(s.img,{alt:"Deploy model",src:n(9526).A+"",width:"2354",height:"1514"})]}),"\n",(0,r.jsx)(s.p,{children:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0439\u043c\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 \u043c\u0438\u043d\u0443\u0442\u044b."}),"\n",(0,r.jsx)(s.h2,{id:"\u0434\u043e\u0441\u0442\u0443\u043f-\u043a-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,r.jsxs)(s.p,{children:["\u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ",(0,r.jsx)(s.code,{children:"http://localhost:8080/chat"}),":"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"Chat",src:n(6336).A+"",width:"2880",height:"1690"})}),"\n",(0,r.jsxs)(s.p,{children:["\u0438 \u0447\u0435\u0440\u0435\u0437 API, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 OpenAI, \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ",(0,r.jsx)(s.code,{children:"http://localhost:8080/api/v1/completions"}),":"]})]})}function m(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},6336:(e,s,n)=>{n.d(s,{A:()=>r});const r=n.p+"assets/images/chat-8f8e70880036b752e391b980093048b7.png"},3606:(e,s,n)=>{n.d(s,{A:()=>r});const r=n.p+"assets/images/swagger-add-f34083339d3c7663d4a7599c5ee7915a.png"},9526:(e,s,n)=>{n.d(s,{A:()=>r});const r=n.p+"assets/images/swagger-deploy-e5ce0aca812fa2a46efe0e3c105cc24f.png"},8453:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>c});var r=n(6540);const t={},a=r.createContext(t);function o(e){const s=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4edb40be.c5d95a3f.js b/assets/js/4edb40be.c5d95a3f.js new file mode 100644 index 0000000..7e5ca5b --- /dev/null +++ b/assets/js/4edb40be.c5d95a3f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[543],{1019:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>i,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var r=n(4848),t=n(8453);const a={},o="\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise",c={id:"onprem/Compressa LLM/compressa_llm_management/mistral_7b",title:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise",description:"\u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0430\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u0432\u043e\u0434\u0430 Mistral-7B \u043d\u0430 \u043e\u0434\u043d\u043e\u043c GPU A100-40GB \u0441 Compressa LLM.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_management/mistral_7b.md",sourceDirName:"onprem/Compressa LLM/compressa_llm_management",slug:"/onprem/Compressa LLM/compressa_llm_management/mistral_7b",permalink:"/onprem/Compressa LLM/compressa_llm_management/mistral_7b",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_management/mistral_7b.md",tags:[],version:"current",frontMatter:{},sidebar:"onpremSidebar",previous:{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438",permalink:"/onprem/Compressa LLM/compressa_llm_management/"}},i={},l=[{value:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Compressa",id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-compressa",level:2},{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u043c\u043e\u0434\u0435\u043b\u0438",level:2},{value:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",level:2},{value:"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0434\u043e\u0441\u0442\u0443\u043f-\u043a-\u043c\u043e\u0434\u0435\u043b\u0438",level:2}];function p(e){const s={a:"a",admonition:"admonition",br:"br",code:"code",h1:"h1",h2:"h2",img:"img",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{id:"\u0431\u044b\u0441\u0442\u0440\u044b\u0439-\u0441\u0442\u0430\u0440\u0442-mistral-7b-on-premise",children:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise"}),"\n",(0,r.jsx)(s.p,{children:"\u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0430\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u0432\u043e\u0434\u0430 Mistral-7B \u043d\u0430 \u043e\u0434\u043d\u043e\u043c GPU A100-40GB \u0441 Compressa LLM."}),"\n",(0,r.jsx)(s.p,{children:"GPU A100-40GB \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c Mistral-7B \u0431\u0435\u0437 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0438."}),"\n",(0,r.jsxs)(s.p,{children:["\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e Mistral-7B ",(0,r.jsx)(s.a,{href:"https://huggingface.co/openchat/openchat-3.5-0106",children:"openchat/openchat-3.5-0106"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-compressa",children:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Compressa"}),"\n",(0,r.jsxs)(s.p,{children:["\u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c Compressa \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 ",(0,r.jsx)(s.a,{href:"/onprem/LLM_On-Premises/setup/index.mdx",children:"\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439"}),"."]}),"\n",(0,r.jsxs)(s.p,{children:["\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e Compressa \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 8080,\n\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c REST API \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ",(0,r.jsx)(s.a,{href:"http://localhost:8080/api",children:"http://localhost:8080/api"})," \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438."]}),"\n",(0,r.jsxs)(s.p,{children:["\u041f\u043e\u043b\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435 API \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 ",(0,r.jsx)(s.a,{href:"/onprem/LLM_On-Premises/services/rest-api.md",children:"\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438"}),"\n\u0438\u043b\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 Swagger \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ",(0,r.jsx)(s.code,{children:"http://localhost:8080/api/docs"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,r.jsx)(s.admonition,{type:"note",children:(0,r.jsxs)(s.p,{children:["\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0435 Compressa \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443, \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.\n\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 ",(0,r.jsx)(s.a,{href:"/onprem/LLM_On-Premises/setup/internet-access.md",children:"\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e"})," \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c."]})}),"\n",(0,r.jsxs)(s.p,{children:["\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ",(0,r.jsx)(s.code,{children:"curl"}),":"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/models/add/?model_id=openchat%2Fopenchat-3.5-0106' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,r.jsxs)(s.p,{children:["\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b Swagger, \u043d\u0430\u0436\u0430\u0432 ",(0,r.jsx)(s.strong,{children:"Try it out"}),":\n",(0,r.jsx)(s.img,{alt:"Add model",src:n(3606).A+"",width:"2324",height:"1022"})]}),"\n",(0,r.jsxs)(s.p,{children:["\u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442.",(0,r.jsx)(s.br,{}),"\n","\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043b\u043e\u0433 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ",(0,r.jsx)(s.a,{href:"/onprem/LLM_On-Premises/services/rest-api#get-v1models",children:"API"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,r.jsxs)(s.p,{children:["\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ",(0,r.jsx)(s.code,{children:"curl"}),":"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/deploy/' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model_id\": \"openchat/openchat-3.5-0106\"\n }'\n"})}),"\n",(0,r.jsxs)(s.p,{children:["\u0418\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b Swagger:\n",(0,r.jsx)(s.img,{alt:"Deploy model",src:n(9526).A+"",width:"2354",height:"1514"})]}),"\n",(0,r.jsx)(s.p,{children:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0439\u043c\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 \u043c\u0438\u043d\u0443\u0442\u044b."}),"\n",(0,r.jsx)(s.h2,{id:"\u0434\u043e\u0441\u0442\u0443\u043f-\u043a-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,r.jsxs)(s.p,{children:["\u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ",(0,r.jsx)(s.code,{children:"http://localhost:8080/chat"}),":"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.img,{alt:"Chat",src:n(6336).A+"",width:"2880",height:"1690"})}),"\n",(0,r.jsxs)(s.p,{children:["\u0438 \u0447\u0435\u0440\u0435\u0437 API, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 OpenAI, \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ",(0,r.jsx)(s.code,{children:"http://localhost:8080/api/v1/completions"}),":"]})]})}function d(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},6336:(e,s,n)=>{n.d(s,{A:()=>r});const r=n.p+"assets/images/chat-8f8e70880036b752e391b980093048b7.png"},3606:(e,s,n)=>{n.d(s,{A:()=>r});const r=n.p+"assets/images/swagger-add-f34083339d3c7663d4a7599c5ee7915a.png"},9526:(e,s,n)=>{n.d(s,{A:()=>r});const r=n.p+"assets/images/swagger-deploy-e5ce0aca812fa2a46efe0e3c105cc24f.png"},8453:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>c});var r=n(6540);const t={},a=r.createContext(t);function o(e){const s=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/51e244a6.3af6b8da.js b/assets/js/51e244a6.3af6b8da.js deleted file mode 100644 index 1c24219..0000000 --- a/assets/js/51e244a6.3af6b8da.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[9093],{2167:(e,t,s)=>{"use strict";s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>l,frontMatter:()=>i,metadata:()=>u,toc:()=>a});var n=s(4848),o=s(8453),r=s(5587);const i={title:"REST API",sidebar_position:5,hide_table_of_contents:!0},c=void 0,u={id:"docs/rest.mdx",title:"REST API",description:"",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/rest.mdx.md",sourceDirName:"docs",slug:"/docs/rest.mdx",permalink:"/docs/rest.mdx",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/rest.mdx.md",tags:[],version:"current",sidebarPosition:5,frontMatter:{title:"REST API",sidebar_position:5,hide_table_of_contents:!0},sidebar:"docsSidebar",previous:{title:"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442",permalink:"/docs/insightstream_module/file_search"},next:{title:"\u041f\u043e\u043c\u043e\u0449\u044c",permalink:"/docs/help"}},d={},a=[];function m(e){return(0,n.jsx)(r.A,{id:"api"})}function l(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(m,{...e})}):m()}},5587:(e,t,s)=>{"use strict";s.d(t,{A:()=>u});var n=s(6540),o=s(9292),r=s(6588);const i=function(e){const t=(0,r.kh)("docusaurus-plugin-redoc");return e?t?.[e]:Object.values(t??{})?.[0]};var c=s(4848);const u=e=>{let{id:t}=e;const s=i(t),r=(0,n.useMemo)((()=>({theme:{breakpoints:{medium:"130rem",large:"130rem"}}})),[]);return(0,c.jsx)(o.A,{...s,optionsOverrides:r})}},6903:()=>{},5915:()=>{},7889:()=>{},3880:()=>{},4834:()=>{},922:()=>{},1912:()=>{},8453:(e,t,s)=>{"use strict";s.d(t,{R:()=>i,x:()=>c});var n=s(6540);const o={},r=n.createContext(o);function i(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/51e244a6.8242411f.js b/assets/js/51e244a6.8242411f.js new file mode 100644 index 0000000..4246660 --- /dev/null +++ b/assets/js/51e244a6.8242411f.js @@ -0,0 +1 @@ +(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[93],{1686:(e,t,s)=>{"use strict";s.r(t),s.d(t,{assets:()=>p,contentTitle:()=>m,default:()=>b,frontMatter:()=>a,metadata:()=>l,toc:()=>f});var n=s(4848),o=s(8453),r=s(6540),i=s(9292),c=s(6588);const u=function(e){const t=(0,c.kh)("docusaurus-plugin-redoc");return e?t?.[e]:Object.values(t??{})?.[0]},d=e=>{let{id:t}=e;const s=u(t),o=(0,r.useMemo)((()=>({theme:{breakpoints:{medium:"130rem",large:"130rem"}}})),[]);return(0,n.jsx)(i.A,{...s,optionsOverrides:o})},a={title:"REST API",sidebar_position:5,hide_table_of_contents:!0},m=void 0,l={id:"docs/rest.mdx",title:"REST API",description:"",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/rest.mdx.md",sourceDirName:"docs",slug:"/docs/rest.mdx",permalink:"/docs/rest.mdx",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/rest.mdx.md",tags:[],version:"current",sidebarPosition:5,frontMatter:{title:"REST API",sidebar_position:5,hide_table_of_contents:!0},sidebar:"docsSidebar",previous:{title:"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442",permalink:"/docs/insightstream_module/file_search"},next:{title:"\u041f\u043e\u043c\u043e\u0449\u044c",permalink:"/docs/help"}},p={},f=[];function h(e){return(0,n.jsx)(d,{id:"api"})}function b(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h()}},6903:()=>{},5915:()=>{},7889:()=>{},3880:()=>{},4834:()=>{},922:()=>{},1912:()=>{},8453:(e,t,s)=>{"use strict";s.d(t,{R:()=>i,x:()=>c});var n=s(6540);const o={},r=n.createContext(o);function i(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/56b6add9.a84b7561.js b/assets/js/56b6add9.a84b7561.js deleted file mode 100644 index facbc9f..0000000 --- a/assets/js/56b6add9.a84b7561.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[6336],{5351:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var s=o(4848),t=o(8453);const r={sidebar_position:3},i="Inference",a={id:"onprem/LLM_On-Premises/inference/index",title:"Inference",description:"Once Compressa is set up, the first step to start using a model is to deploy it for inference.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/inference/index.md",sourceDirName:"onprem/LLM_On-Premises/inference",slug:"/onprem/LLM_On-Premises/inference/",permalink:"/onprem/LLM_On-Premises/inference/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/inference/index.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"onpremSidebar",previous:{title:"Management API",permalink:"/onprem/LLM_On-Premises/services/rest-api"},next:{title:"Quickstart: Mistral-7B On-Premises",permalink:"/onprem/LLM_On-Premises/mistral/"}},l={},d=[{value:"Add model to the platform",id:"add-model-to-the-platform",level:2},{value:"For example:",id:"for-example",level:4},{value:"For example:",id:"for-example-1",level:4},{value:"Deploy",id:"deploy",level:2},{value:"Chat UI",id:"chat-ui",level:2},{value:"REST API",id:"rest-api",level:2}];function c(e){const n={a:"a",br:"br",code:"code",h1:"h1",h2:"h2",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"inference",children:"Inference"}),"\n",(0,s.jsxs)(n.p,{children:["Once Compressa is set up, the first step to start using a model is to deploy it for inference.",(0,s.jsx)(n.br,{}),"\n","The next instruction provide an example how to:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Add model to Compressa Platform"}),"\n",(0,s.jsx)(n.li,{children:"Deploy model for inference"}),"\n",(0,s.jsx)(n.li,{children:"Use model via Compressa Chat"}),"\n",(0,s.jsx)(n.li,{children:"Use model via REST API"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"add-model-to-the-platform",children:"Add model to the platform"}),"\n",(0,s.jsxs)(n.p,{children:["To list all available models you can call:\n",(0,s.jsx)(n.code,{children:"GET /v1/models/"})]}),"\n",(0,s.jsx)(n.h4,{id:"for-example",children:"For example:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/v1/models/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,s.jsx)(n.p,{children:"The best models prepared by Compressa Team are already available in the tool."}),"\n",(0,s.jsxs)(n.p,{children:["If the model is not yet added you should call ",(0,s.jsx)(n.code,{children:"POST /v1/models/add/"})," with Hugging Face model's id as parameter."]}),"\n",(0,s.jsx)(n.h4,{id:"for-example-1",children:"For example:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/models/add/?model_id=openchat%2Fopenchat-3.5-0106' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,s.jsxs)(n.p,{children:["As a response, you'll get a ",(0,s.jsx)(n.code,{children:"job_id"})," which status you can track via ",(0,s.jsx)(n.code,{children:"GET /v1/jobs/{job_id}/status/"}),"\nendpoint.",(0,s.jsx)(n.br,{}),"\n","Full documentation for working with jobs can be found at Management API documentation ",(0,s.jsx)(n.a,{href:"/onprem/LLM_On-Premises/services/rest-api/",children:"page"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"deploy",children:"Deploy"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"URL"}),": ",(0,s.jsx)(n.code,{children:"http://localhost:8080/api/"}),(0,s.jsx)(n.br,{}),"\n","Existing model can be deployed by using the endpoint ",(0,s.jsx)(n.code,{children:"POST /v1/deploy/"}),(0,s.jsx)(n.br,{}),"\n","You can deploy together the base model and up to 20 adapters created from the same base model."]}),"\n",(0,s.jsxs)(n.p,{children:["For example you can deploy model openchat's Mistral ",(0,s.jsx)(n.code,{children:"openchat/openchat-3.5-0106"}),"\ntogether with the custom adapter ",(0,s.jsx)(n.code,{children:"openchat-ru-adapter"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/deploy/' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model_id\": \"model_id1\",\n \"adapter_ids\": [\n \"openchat/openchat-3.5-0106\",\n \"openchat-ru-adapter\"\n ]\n}'\n"})}),"\n",(0,s.jsx)(n.p,{children:"The model will be deployed and available for usage soon."}),"\n",(0,s.jsx)(n.h2,{id:"chat-ui",children:"Chat UI"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"URL"}),": ",(0,s.jsx)(n.code,{children:"http://localhost:8080/chat/"})]}),"\n",(0,s.jsxs)(n.p,{children:["The Compressa Chat interface allows interaction with the deployed model.\n",(0,s.jsx)(n.img,{alt:"Chat UI",src:o(2239).A+"",width:"2718",height:"1702"})]}),"\n",(0,s.jsx)(n.p,{children:"You can select the base model of one of deployed adapters in the left panel.\nThe conversation parameters can be configured from the same place."}),"\n",(0,s.jsx)(n.h2,{id:"rest-api",children:"REST API"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"URL"}),": ",(0,s.jsx)(n.code,{children:"http://localhost:5000"})]}),"\n",(0,s.jsxs)(n.p,{children:["Compressa provide REST API to directly interact with the deployed model.",(0,s.jsx)(n.br,{}),"\n","The API implements OpenAI\u2019s ",(0,s.jsx)(n.a,{href:"https://platform.openai.com/docs/api-reference/completions",children:"Completions"}),"\nand ",(0,s.jsx)(n.a,{href:"https://platform.openai.com/docs/guides/text-generation/chat-completions-api",children:"Chat Completion"})," API."]})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},2239:(e,n,o)=>{o.d(n,{A:()=>s});const s=o.p+"assets/images/chat-21fa7edecebba6af77cb23fef4d9e090.png"},8453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>a});var s=o(6540);const t={},r=s.createContext(t);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.a06f1d38.js b/assets/js/5e95c892.a06f1d38.js new file mode 100644 index 0000000..86c234f --- /dev/null +++ b/assets/js/5e95c892.a06f1d38.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[647],{7121:(s,e,r)=>{r.r(e),r.d(e,{default:()=>p});r(6540);var c=r(4164),a=r(1003),u=r(7559),o=r(2831),d=r(781),n=r(4848);function p(s){return(0,n.jsx)(a.e3,{className:(0,c.A)(u.G.wrapper.docsPages),children:(0,n.jsx)(d.A,{children:(0,o.v)(s.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.ef28d056.js b/assets/js/5e95c892.ef28d056.js deleted file mode 100644 index 756c8d3..0000000 --- a/assets/js/5e95c892.ef28d056.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[9647],{7121:(s,e,r)=>{r.r(e),r.d(e,{default:()=>p});r(6540);var c=r(4164),a=r(1003),u=r(7559),o=r(2831),d=r(781),n=r(4848);function p(s){return(0,n.jsx)(a.e3,{className:(0,c.A)(u.G.wrapper.docsPages),children:(0,n.jsx)(d.A,{children:(0,o.v)(s.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/653f7a39.6149867d.js b/assets/js/653f7a39.6149867d.js new file mode 100644 index 0000000..b20c740 --- /dev/null +++ b/assets/js/653f7a39.6149867d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[503],{9043:(n,e,s)=>{s.r(e),s.d(e,{assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var t=s(4848),r=s(8453);const o={sidebar_position:6},i="\u041f\u043e\u043c\u043e\u0449\u044c",c={id:"docs/help",title:"\u041f\u043e\u043c\u043e\u0449\u044c",description:"\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439 Compressa \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b ML \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 - \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/help.md",sourceDirName:"docs",slug:"/docs/help",permalink:"/docs/help",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/help.md",tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"docsSidebar",previous:{title:"REST API",permalink:"/docs/rest.mdx"}},d={},l=[];function p(n){const e={a:"a",h1:"h1",li:"li",p:"p",ul:"ul",...(0,r.R)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.h1,{id:"\u043f\u043e\u043c\u043e\u0449\u044c",children:"\u041f\u043e\u043c\u043e\u0449\u044c"}),"\n",(0,t.jsxs)(e.p,{children:["\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439 Compressa \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b ML \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 - \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 ",(0,t.jsx)(e.a,{href:"https://t.me/+-0smoj_KpEw3MGQy",children:"\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438"}),". \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432."]}),"\n",(0,t.jsx)(e.p,{children:"\u0412 \u0447\u0430\u0442\u0435 Compressa Community \u043c\u043e\u0436\u043d\u043e:"}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"\u0417\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b"}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043e\u0442 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432"}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0431\u0430\u0433\u0430\u043c\u0438 / \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438"}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0444\u0438\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438"}),"\n"]}),"\n"]})]})}function u(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(p,{...n})}):p(n)}},8453:(n,e,s)=>{s.d(e,{R:()=>i,x:()=>c});var t=s(6540);const r={},o=t.createContext(r);function i(n){const e=t.useContext(o);return t.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:i(n.components),t.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/653f7a39.f90a02f8.js b/assets/js/653f7a39.f90a02f8.js deleted file mode 100644 index 89e35a7..0000000 --- a/assets/js/653f7a39.f90a02f8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[4503],{9043:(n,e,s)=>{s.r(e),s.d(e,{assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var t=s(4848),r=s(8453);const o={sidebar_position:6},i="\u041f\u043e\u043c\u043e\u0449\u044c",c={id:"docs/help",title:"\u041f\u043e\u043c\u043e\u0449\u044c",description:"\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439 Compressa \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b ML \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 - \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/help.md",sourceDirName:"docs",slug:"/docs/help",permalink:"/docs/help",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/help.md",tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"docsSidebar",previous:{title:"REST API",permalink:"/docs/rest.mdx"}},d={},l=[];function p(n){const e={a:"a",h1:"h1",li:"li",p:"p",ul:"ul",...(0,r.R)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.h1,{id:"\u043f\u043e\u043c\u043e\u0449\u044c",children:"\u041f\u043e\u043c\u043e\u0449\u044c"}),"\n",(0,t.jsxs)(e.p,{children:["\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439 Compressa \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b ML \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 - \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 ",(0,t.jsx)(e.a,{href:"https://t.me/+-0smoj_KpEw3MGQy",children:"\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438"}),". \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432."]}),"\n",(0,t.jsx)(e.p,{children:"\u0412 \u0447\u0430\u0442\u0435 Compressa Community \u043c\u043e\u0436\u043d\u043e:"}),"\n",(0,t.jsxs)(e.ul,{children:["\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"\u0417\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b"}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043e\u0442 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432"}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0431\u0430\u0433\u0430\u043c\u0438 / \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438"}),"\n"]}),"\n",(0,t.jsxs)(e.li,{children:["\n",(0,t.jsx)(e.p,{children:"\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0444\u0438\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438"}),"\n"]}),"\n"]})]})}function u(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(p,{...n})}):p(n)}},8453:(n,e,s)=>{s.d(e,{R:()=>i,x:()=>c});var t=s(6540);const r={},o=t.createContext(r);function i(n){const e=t.useContext(o);return t.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:i(n.components),t.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/6629c45f.22b1d363.js b/assets/js/6629c45f.22b1d363.js deleted file mode 100644 index 62a943b..0000000 --- a/assets/js/6629c45f.22b1d363.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[5820],{7691:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docsSidebar":[{"type":"link","label":"About","href":"/","className":"docs_sidebar_index","docId":"docs/index","unlisted":false},{"type":"link","label":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa","href":"/docs/intro","docId":"docs/intro","unlisted":false},{"type":"category","label":"Quickstart","collapsible":false,"collapsed":false,"className":"docs_sidebar_index","items":[{"type":"link","label":"Python SDK (Langchain)","href":"/docs/Quickstart/langchain","className":"docs_sidebar_index","docId":"docs/Quickstart/langchain","unlisted":false},{"type":"link","label":"REST API","href":"/docs/Quickstart/REST_API","className":"docs_sidebar_index","docId":"docs/Quickstart/REST_API","unlisted":false},{"type":"link","label":"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI","href":"/docs/Quickstart/openai","className":"docs_sidebar_index","docId":"docs/Quickstart/openai","unlisted":false}],"href":"/docs/Quickstart/"},{"type":"link","label":"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442","href":"/docs/quick_start","docId":"docs/quick_start","unlisted":false},{"type":"category","label":"API Reference","collapsible":false,"collapsed":false,"className":"docs_sidebar_index","items":[{"type":"link","label":"Python SDK (Langchain)","href":"/docs/api-reference/langchain","className":"docs_sidebar_index","docId":"docs/api-reference/langchain","unlisted":false},{"type":"link","label":"REST API","href":"/docs/api-reference/rest","docId":"docs/api-reference/rest","unlisted":false}],"href":"/docs/api-reference/"},{"type":"category","label":"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"ETL","href":"/docs/basic_modules/ETL","docId":"docs/basic_modules/ETL","unlisted":false},{"type":"category","label":"LLM","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI","href":"/docs/basic_modules/LLM/OpenAI","docId":"docs/basic_modules/LLM/OpenAI","unlisted":false}],"href":"/docs/basic_modules/LLM/"},{"type":"link","label":"Embeddings","href":"/docs/basic_modules/Embeddings","docId":"docs/basic_modules/Embeddings","unlisted":false},{"type":"link","label":"Rerank","href":"/docs/basic_modules/Rerank","docId":"docs/basic_modules/Rerank","unlisted":false},{"type":"link","label":"Fine-tuning","href":"/docs/basic_modules/Fine-tuning","docId":"docs/basic_modules/Fine-tuning","unlisted":false}],"href":"/docs/basic_modules/"},{"type":"category","label":"InsightStream RAG","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)","href":"/docs/insightstream_module/file_upload","docId":"docs/insightstream_module/file_upload","unlisted":false},{"type":"link","label":"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442","href":"/docs/insightstream_module/file_search","docId":"docs/insightstream_module/file_search","unlisted":false}],"href":"/docs/insightstream_module/"},{"type":"link","label":"REST API","href":"/docs/rest.mdx","docId":"docs/rest.mdx","unlisted":false},{"type":"link","label":"\u041f\u043e\u043c\u043e\u0449\u044c","href":"/docs/help","docId":"docs/help","unlisted":false}],"guidesSidebar":[{"type":"link","label":"\u0411\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442","href":"/guides/langchain_rag/","docId":"guides/langchain_rag/index","unlisted":false},{"type":"link","label":"\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a","href":"/guides/langchain_basic_semantic_search/","docId":"guides/langchain_basic_semantic_search/index","unlisted":false},{"type":"link","label":"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank","href":"/guides/langchain_basic_rerank/","docId":"guides/langchain_basic_rerank/index","unlisted":false},{"type":"link","label":"\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG","href":"/guides/langchain_advanced_chunking/","docId":"guides/langchain_advanced_chunking/index","unlisted":false}],"onpremSidebar":[{"type":"category","label":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443","href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements","docId":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements","unlisted":false},{"type":"link","label":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b","href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation","docId":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation","unlisted":false},{"type":"link","label":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 InsightStream RAG","href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation","docId":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation","unlisted":false},{"type":"category","label":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 LLM (UI & API)","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"Management API","href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment","docId":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment","unlisted":false},{"type":"link","label":"Fine-tuning","href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning","docId":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning","unlisted":false}],"href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/"}],"href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/"},{"type":"category","label":"Compressa LLM","collapsible":false,"collapsed":false,"items":[{"type":"category","label":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443","href":"/onprem/Compressa LLM/compressa_llm_install/without_internet","docId":"onprem/Compressa LLM/compressa_llm_install/without_internet","unlisted":false}],"href":"/onprem/Compressa LLM/compressa_llm_install/"},{"type":"category","label":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise","href":"/onprem/Compressa LLM/compressa_llm_management/mistral_7b","docId":"onprem/Compressa LLM/compressa_llm_management/mistral_7b","unlisted":false}],"href":"/onprem/Compressa LLM/compressa_llm_management/"}],"href":"/onprem/Compressa LLM/"},{"type":"link","label":"Quickstart: Compressa Platform","href":"/onprem/platform","docId":"onprem/platform","unlisted":false},{"type":"category","label":"LLM_On-Premises","collapsible":false,"collapsed":false,"items":[{"type":"category","label":"Setup","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"No Internet","href":"/onprem/LLM_On-Premises/setup/internet-access","docId":"onprem/LLM_On-Premises/setup/internet-access","unlisted":false}],"href":"/onprem/LLM_On-Premises/setup/"},{"type":"category","label":"Services","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"Management API","href":"/onprem/LLM_On-Premises/services/rest-api","docId":"onprem/LLM_On-Premises/services/rest-api","unlisted":false}],"href":"/onprem/LLM_On-Premises/services/"},{"type":"link","label":"Inference","href":"/onprem/LLM_On-Premises/inference/","docId":"onprem/LLM_On-Premises/inference/index","unlisted":false},{"type":"link","label":"Quickstart: Mistral-7B On-Premises","href":"/onprem/LLM_On-Premises/mistral/","docId":"onprem/LLM_On-Premises/mistral/index","unlisted":false},{"type":"link","label":"Finetuning","href":"/onprem/LLM_On-Premises/finetuning/","docId":"onprem/LLM_On-Premises/finetuning/index","unlisted":false}]},{"type":"category","label":"RAG_On-Premises","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"Quickstart: InsightStream","href":"/onprem/RAG_On-Premises/insight-stream/","docId":"onprem/RAG_On-Premises/insight-stream/index","unlisted":false}]}]},"docs":{"docs/api-reference/index":{"id":"docs/api-reference/index","title":"API Reference","description":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c Compressa, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f REST API \u0438\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 Langchain Compressa.","sidebar":"docsSidebar"},"docs/api-reference/langchain":{"id":"docs/api-reference/langchain","title":"Python SDK (Langchain)","description":"* ### \u0421\u0443\u0431\u043c\u043e\u0434\u0443\u043b\u0438","sidebar":"docsSidebar"},"docs/api-reference/rest":{"id":"docs/api-reference/rest","title":"REST API","description":"","sidebar":"docsSidebar"},"docs/basic_modules/Embeddings":{"id":"docs/basic_modules/Embeddings","title":"Embeddings","description":"Embeddings \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a, \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0449\u0438\u0435 \u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c. \u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u0447:","sidebar":"docsSidebar"},"docs/basic_modules/ETL":{"id":"docs/basic_modules/ETL","title":"ETL","description":"\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043d\u0430\u0440\u0435\u0437\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 / RAG \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 LLM.","sidebar":"docsSidebar"},"docs/basic_modules/Fine-tuning":{"id":"docs/basic_modules/Fine-tuning","title":"Fine-tuning","description":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432.","sidebar":"docsSidebar"},"docs/basic_modules/index":{"id":"docs/basic_modules/index","title":"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438","description":"ETL","sidebar":"docsSidebar"},"docs/basic_modules/LLM/index":{"id":"docs/basic_modules/LLM/index","title":"LLM","description":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 open-source LLM \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041c\u044b \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u0438 \u043d\u0430 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u0445 \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u043b\u0438 \u043e\u043f\u044b\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.","sidebar":"docsSidebar"},"docs/basic_modules/LLM/OpenAI":{"id":"docs/basic_modules/LLM/OpenAI","title":"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI","description":"\u0412 Compressa \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 API-\u0441\u043b\u043e\u0439, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 Chat Completion API \u043e\u0442 OpenAI. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043e\u0442 OpenAI (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 Langchain) \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u0434 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Compressa.","sidebar":"docsSidebar"},"docs/basic_modules/Rerank":{"id":"docs/basic_modules/Rerank","title":"Rerank","description":"Rerank-\u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043e\u0442\u0440\u044b\u0432\u043a\u0438 / \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u041e\u043d\u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0438\u0441\u043a\u0430, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c.","sidebar":"docsSidebar"},"docs/help":{"id":"docs/help","title":"\u041f\u043e\u043c\u043e\u0449\u044c","description":"\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439 Compressa \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b ML \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 - \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.","sidebar":"docsSidebar"},"docs/index":{"id":"docs/index","title":"About","description":"Compressa \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 LLM + RAG \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0431\u0430\u0437\u0435 Langchain. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0435 API \u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0433\u043e AI \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438.","sidebar":"docsSidebar"},"docs/insightstream_module/file_search":{"id":"docs/insightstream_module/file_search","title":"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442","description":"\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430.","sidebar":"docsSidebar"},"docs/insightstream_module/file_upload":{"id":"docs/insightstream_module/file_upload","title":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)","description":"\u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0443\u043f\u0435\u043d\u0447\u0430\u0442\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438 \u0442.\u0434. \u042d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u044d\u0442\u0430\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439.","sidebar":"docsSidebar"},"docs/insightstream_module/index":{"id":"docs/insightstream_module/index","title":"InsightStream RAG","description":"InsightStream RAG \u2014 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0443\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa. \u042d\u0442\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 RAG-\u0434\u0432\u0438\u0436\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u201c\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u201d.","sidebar":"docsSidebar"},"docs/intro":{"id":"docs/intro","title":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa","description":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI.","sidebar":"docsSidebar"},"docs/quick_start":{"id":"docs/quick_start","title":"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442","description":"\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Compressa \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439:","sidebar":"docsSidebar"},"docs/Quickstart/index":{"id":"docs/Quickstart/index","title":"Quickstart","description":"\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430 \u0432\u044b\u0431\u043e\u0440:","sidebar":"docsSidebar"},"docs/Quickstart/langchain":{"id":"docs/Quickstart/langchain","title":"Python SDK (Langchain)","description":"\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b:","sidebar":"docsSidebar"},"docs/Quickstart/openai":{"id":"docs/Quickstart/openai","title":"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI","description":"API Compsessa \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c \u0441 OpenAI.","sidebar":"docsSidebar"},"docs/Quickstart/REST_API":{"id":"docs/Quickstart/REST_API","title":"REST API","description":"\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Compressa \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 curl.","sidebar":"docsSidebar"},"docs/rest.mdx":{"id":"docs/rest.mdx","title":"REST API","description":"","sidebar":"docsSidebar"},"guides/langchain_advanced_chunking/index":{"id":"guides/langchain_advanced_chunking/index","title":"\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG","description":"1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435","sidebar":"guidesSidebar"},"guides/langchain_basic_rerank/index":{"id":"guides/langchain_basic_rerank/index","title":"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank","description":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f, \u0441\u0442\u0440\u0435\u043c\u044f\u0441\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445\u044d\u0442\u0430\u043f\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.","sidebar":"guidesSidebar"},"guides/langchain_basic_semantic_search/index":{"id":"guides/langchain_basic_semantic_search/index","title":"\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a","description":"\u042f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0442\u0435\u043a\u0441\u0442\u0430. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c, \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.","sidebar":"guidesSidebar"},"guides/langchain_rag/index":{"id":"guides/langchain_rag/index","title":"\u0411\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442","description":"1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435","sidebar":"guidesSidebar"},"onprem/Compressa LLM/compressa_llm_install/index":{"id":"onprem/Compressa LLM/compressa_llm_install/index","title":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430","description":"Compressa LLM \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 Github package storage \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439.","sidebar":"onpremSidebar"},"onprem/Compressa LLM/compressa_llm_install/without_internet":{"id":"onprem/Compressa LLM/compressa_llm_install/without_internet","title":"\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443","description":"\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0435 Compressa \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u0435\u0442\u0438 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Compressa \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0430\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 GDrive \u0441 \u0430\u0440\u0445\u0438\u0432\u043e\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438.","sidebar":"onpremSidebar"},"onprem/Compressa LLM/compressa_llm_management/index":{"id":"onprem/Compressa LLM/compressa_llm_management/index","title":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438","description":"\u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0433\u0430\u0439\u0434\u043e\u043c \u043f\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043c\u043e\u0434\u0435\u043b\u0438 Mistral","sidebar":"onpremSidebar"},"onprem/Compressa LLM/compressa_llm_management/mistral_7b":{"id":"onprem/Compressa LLM/compressa_llm_management/mistral_7b","title":"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise","description":"\u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0430\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u0432\u043e\u0434\u0430 Mistral-7B \u043d\u0430 \u043e\u0434\u043d\u043e\u043c GPU A100-40GB \u0441 Compressa LLM.","sidebar":"onpremSidebar"},"onprem/Compressa LLM/index":{"id":"onprem/Compressa LLM/index","title":"Compressa LLM","description":"Compressa LLM - \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0430\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 LLM \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0432 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e.","sidebar":"onpremSidebar"},"onprem/LLM_On-Premises/finetuning/index":{"id":"onprem/LLM_On-Premises/finetuning/index","title":"Finetuning","description":"Compressa provides the feature of low-effort models fine-tuning via LoRA/QLoRA adapters.","sidebar":"onpremSidebar"},"onprem/LLM_On-Premises/inference/index":{"id":"onprem/LLM_On-Premises/inference/index","title":"Inference","description":"Once Compressa is set up, the first step to start using a model is to deploy it for inference.","sidebar":"onpremSidebar"},"onprem/LLM_On-Premises/mistral/index":{"id":"onprem/LLM_On-Premises/mistral/index","title":"Quickstart: Mistral-7B On-Premises","description":"This guide will show you how to deploy the Mistral-7B inference on a single A100-40GB GPU.","sidebar":"onpremSidebar"},"onprem/LLM_On-Premises/services/index":{"id":"onprem/LLM_On-Premises/services/index","title":"Services","description":"After the Compressa App is deployed, all components are accessible via the same URL (8080 by default).","sidebar":"onpremSidebar"},"onprem/LLM_On-Premises/services/rest-api":{"id":"onprem/LLM_On-Premises/services/rest-api","title":"Management API","description":"The Management API is a REST API that allows control over all features.","sidebar":"onpremSidebar"},"onprem/LLM_On-Premises/setup/index":{"id":"onprem/LLM_On-Premises/setup/index","title":"Setup","description":"Compressa App is distributed as docker containers which are available at Github","sidebar":"onpremSidebar"},"onprem/LLM_On-Premises/setup/internet-access":{"id":"onprem/LLM_On-Premises/setup/internet-access","title":"No Internet","description":"If you\'re deploying Compressa in private network without internet access,","sidebar":"onpremSidebar"},"onprem/platform":{"id":"onprem/platform","title":"Quickstart: Compressa Platform","description":"This guide shows how to deploy Compressa Platform for model inference.","sidebar":"onpremSidebar"},"onprem/RAG_On-Premises/insight-stream/index":{"id":"onprem/RAG_On-Premises/insight-stream/index","title":"Quickstart: InsightStream","description":"\u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0447\u0430\u0442-\u0431\u043e\u0442 InsightStream RAG \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Compressa \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index","title":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa","description":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI.","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation","title":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 InsightStream RAG","description":"\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u043c\u043e\u043d\u0442\u0435. \u0412\u0441\u043a\u043e\u0440\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e!","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning","title":"Fine-tuning","description":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432.","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/index":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/index","title":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 LLM (UI & API)","description":"\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa, \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0438 \u0442\u043e\u043c\u0443 \u0436\u0435 URL (8080 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e)","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment","title":"Management API","description":"Management API \u2014 \u044d\u0442\u043e REST API \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438.","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation","title":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b","description":"\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Docker","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements","title":"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443","description":"\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438","sidebar":"onpremSidebar"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/6629c45f.cf79cef2.js b/assets/js/6629c45f.cf79cef2.js new file mode 100644 index 0000000..8ccf873 --- /dev/null +++ b/assets/js/6629c45f.cf79cef2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[820],{7691:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docsSidebar":[{"type":"link","label":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa","href":"/docs/intro","docId":"docs/intro","unlisted":false},{"type":"link","label":"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442","href":"/docs/quick_start","docId":"docs/quick_start","unlisted":false},{"type":"category","label":"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"ETL","href":"/docs/basic_modules/ETL","docId":"docs/basic_modules/ETL","unlisted":false},{"type":"category","label":"LLM","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI","href":"/docs/basic_modules/LLM/OpenAI","docId":"docs/basic_modules/LLM/OpenAI","unlisted":false}],"href":"/docs/basic_modules/LLM/"},{"type":"link","label":"Embeddings","href":"/docs/basic_modules/Embeddings","docId":"docs/basic_modules/Embeddings","unlisted":false},{"type":"link","label":"Rerank","href":"/docs/basic_modules/Rerank","docId":"docs/basic_modules/Rerank","unlisted":false},{"type":"link","label":"Fine-tuning","href":"/docs/basic_modules/Fine-tuning","docId":"docs/basic_modules/Fine-tuning","unlisted":false}],"href":"/docs/basic_modules/"},{"type":"category","label":"InsightStream RAG","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)","href":"/docs/insightstream_module/file_upload","docId":"docs/insightstream_module/file_upload","unlisted":false},{"type":"link","label":"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442","href":"/docs/insightstream_module/file_search","docId":"docs/insightstream_module/file_search","unlisted":false}],"href":"/docs/insightstream_module/"},{"type":"link","label":"REST API","href":"/docs/rest.mdx","docId":"docs/rest.mdx","unlisted":false},{"type":"link","label":"\u041f\u043e\u043c\u043e\u0449\u044c","href":"/docs/help","docId":"docs/help","unlisted":false}],"guidesSidebar":[{"type":"link","label":"\u0411\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442","href":"/guides/langchain_rag/","docId":"guides/langchain_rag/index","unlisted":false},{"type":"link","label":"\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a","href":"/guides/langchain_basic_semantic_search/","docId":"guides/langchain_basic_semantic_search/index","unlisted":false},{"type":"link","label":"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank","href":"/guides/langchain_basic_rerank/","docId":"guides/langchain_basic_rerank/index","unlisted":false},{"type":"link","label":"\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG","href":"/guides/langchain_advanced_chunking/","docId":"guides/langchain_advanced_chunking/index","unlisted":false}],"onpremSidebar":[{"type":"category","label":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443","href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements","docId":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements","unlisted":false},{"type":"link","label":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b","href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation","docId":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation","unlisted":false},{"type":"link","label":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 InsightStream RAG","href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation","docId":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation","unlisted":false},{"type":"category","label":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 LLM (UI & API)","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"Management API","href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment","docId":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment","unlisted":false},{"type":"link","label":"Fine-tuning","href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning","docId":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning","unlisted":false}],"href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/"}],"href":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/"},{"type":"category","label":"Compressa LLM","collapsible":false,"collapsed":false,"items":[{"type":"category","label":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443","href":"/onprem/Compressa LLM/compressa_llm_install/without_internet","docId":"onprem/Compressa LLM/compressa_llm_install/without_internet","unlisted":false}],"href":"/onprem/Compressa LLM/compressa_llm_install/"},{"type":"category","label":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438","collapsible":false,"collapsed":false,"items":[{"type":"link","label":"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise","href":"/onprem/Compressa LLM/compressa_llm_management/mistral_7b","docId":"onprem/Compressa LLM/compressa_llm_management/mistral_7b","unlisted":false}],"href":"/onprem/Compressa LLM/compressa_llm_management/"}],"href":"/onprem/Compressa LLM/"}]},"docs":{"docs/basic_modules/Embeddings":{"id":"docs/basic_modules/Embeddings","title":"Embeddings","description":"Embeddings \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a, \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0449\u0438\u0435 \u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c. \u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u0447:","sidebar":"docsSidebar"},"docs/basic_modules/ETL":{"id":"docs/basic_modules/ETL","title":"ETL","description":"\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043d\u0430\u0440\u0435\u0437\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 / RAG \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 LLM.","sidebar":"docsSidebar"},"docs/basic_modules/Fine-tuning":{"id":"docs/basic_modules/Fine-tuning","title":"Fine-tuning","description":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432.","sidebar":"docsSidebar"},"docs/basic_modules/index":{"id":"docs/basic_modules/index","title":"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438","description":"ETL","sidebar":"docsSidebar"},"docs/basic_modules/LLM/index":{"id":"docs/basic_modules/LLM/index","title":"LLM","description":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 open-source LLM \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041c\u044b \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u0438 \u043d\u0430 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u0445 \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u043b\u0438 \u043e\u043f\u044b\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.","sidebar":"docsSidebar"},"docs/basic_modules/LLM/OpenAI":{"id":"docs/basic_modules/LLM/OpenAI","title":"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI","description":"\u0412 Compressa \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 API-\u0441\u043b\u043e\u0439, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 Chat Completion API \u043e\u0442 OpenAI. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043e\u0442 OpenAI (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 Langchain) \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u0434 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Compressa.","sidebar":"docsSidebar"},"docs/basic_modules/Rerank":{"id":"docs/basic_modules/Rerank","title":"Rerank","description":"Rerank-\u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043e\u0442\u0440\u044b\u0432\u043a\u0438 / \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u041e\u043d\u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0438\u0441\u043a\u0430, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c.","sidebar":"docsSidebar"},"docs/help":{"id":"docs/help","title":"\u041f\u043e\u043c\u043e\u0449\u044c","description":"\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439 Compressa \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b ML \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 - \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.","sidebar":"docsSidebar"},"docs/insightstream_module/file_search":{"id":"docs/insightstream_module/file_search","title":"\u0412\u043e\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442","description":"\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0437\u043d\u0430\u043d\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430.","sidebar":"docsSidebar"},"docs/insightstream_module/file_upload":{"id":"docs/insightstream_module/file_upload","title":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)","description":"\u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0443\u043f\u0435\u043d\u0447\u0430\u0442\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438 \u0442.\u0434. \u042d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u044d\u0442\u0430\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439.","sidebar":"docsSidebar"},"docs/insightstream_module/index":{"id":"docs/insightstream_module/index","title":"InsightStream RAG","description":"InsightStream RAG \u2014 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0443\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa. \u042d\u0442\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 RAG-\u0434\u0432\u0438\u0436\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u201c\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u201d.","sidebar":"docsSidebar"},"docs/intro":{"id":"docs/intro","title":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa","description":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI.","sidebar":"docsSidebar"},"docs/quick_start":{"id":"docs/quick_start","title":"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442","description":"\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Compressa \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439:","sidebar":"docsSidebar"},"docs/rest.mdx":{"id":"docs/rest.mdx","title":"REST API","description":"","sidebar":"docsSidebar"},"guides/langchain_advanced_chunking/index":{"id":"guides/langchain_advanced_chunking/index","title":"\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG","description":"1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435","sidebar":"guidesSidebar"},"guides/langchain_basic_rerank/index":{"id":"guides/langchain_basic_rerank/index","title":"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank","description":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f, \u0441\u0442\u0440\u0435\u043c\u044f\u0441\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445\u044d\u0442\u0430\u043f\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.","sidebar":"guidesSidebar"},"guides/langchain_basic_semantic_search/index":{"id":"guides/langchain_basic_semantic_search/index","title":"\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a","description":"\u042f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0442\u0435\u043a\u0441\u0442\u0430. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c, \u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.","sidebar":"guidesSidebar"},"guides/langchain_rag/index":{"id":"guides/langchain_rag/index","title":"\u0411\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442","description":"1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435","sidebar":"guidesSidebar"},"onprem/Compressa LLM/compressa_llm_install/index":{"id":"onprem/Compressa LLM/compressa_llm_install/index","title":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430","description":"Compressa LLM \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 Github package storage \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439.","sidebar":"onpremSidebar"},"onprem/Compressa LLM/compressa_llm_install/without_internet":{"id":"onprem/Compressa LLM/compressa_llm_install/without_internet","title":"\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443","description":"\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0435 Compressa \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u0435\u0442\u0438 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Compressa \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0430\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 GDrive \u0441 \u0430\u0440\u0445\u0438\u0432\u043e\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438.","sidebar":"onpremSidebar"},"onprem/Compressa LLM/compressa_llm_management/index":{"id":"onprem/Compressa LLM/compressa_llm_management/index","title":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438","description":"\u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0433\u0430\u0439\u0434\u043e\u043c \u043f\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043c\u043e\u0434\u0435\u043b\u0438 Mistral","sidebar":"onpremSidebar"},"onprem/Compressa LLM/compressa_llm_management/mistral_7b":{"id":"onprem/Compressa LLM/compressa_llm_management/mistral_7b","title":"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise","description":"\u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0430\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u0432\u043e\u0434\u0430 Mistral-7B \u043d\u0430 \u043e\u0434\u043d\u043e\u043c GPU A100-40GB \u0441 Compressa LLM.","sidebar":"onpremSidebar"},"onprem/Compressa LLM/index":{"id":"onprem/Compressa LLM/index","title":"Compressa LLM","description":"Compressa LLM - \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0430\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 LLM \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0432 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e.","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index","title":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa","description":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI.","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation","title":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 InsightStream RAG","description":"\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u043c\u043e\u043d\u0442\u0435. \u0412\u0441\u043a\u043e\u0440\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e!","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning","title":"Fine-tuning","description":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432.","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/index":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/index","title":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 LLM (UI & API)","description":"\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa, \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0438 \u0442\u043e\u043c\u0443 \u0436\u0435 URL (8080 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e)","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment","title":"Management API","description":"Management API \u2014 \u044d\u0442\u043e REST API \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438.","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation","title":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b","description":"\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Docker","sidebar":"onpremSidebar"},"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements":{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements","title":"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443","description":"\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438","sidebar":"onpremSidebar"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/76265e76.fb79c35b.js b/assets/js/76265e76.fb79c35b.js deleted file mode 100644 index af5dbaa..0000000 --- a/assets/js/76265e76.fb79c35b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[8677],{9138:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>p,frontMatter:()=>d,metadata:()=>l,toc:()=>c});var o=s(4848),r=s(8453);const d={sidebar_position:2},i="Quickstart: Compressa Platform",l={id:"onprem/platform",title:"Quickstart: Compressa Platform",description:"This guide shows how to deploy Compressa Platform for model inference.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/platform.md",sourceDirName:"onprem",slug:"/onprem/platform",permalink:"/onprem/platform",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/platform.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"onpremSidebar",previous:{title:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Mistral-7B On-Premise",permalink:"/onprem/Compressa LLM/compressa_llm_management/mistral_7b"},next:{title:"Setup",permalink:"/onprem/LLM_On-Premises/setup/"}},a={},c=[{value:"Requirements",id:"requirements",level:2},{value:"Setup",id:"setup",level:2},{value:"Setup storage",id:"setup-storage",level:2},{value:"Deploy Inference and Embedding Models",id:"deploy-inference-and-embedding-models",level:2},{value:"Add Compressa-Qwen2.5-14B model in Compressa:",id:"add-compressa-qwen25-14b-model-in-compressa",level:4},{value:"Add embedding model in Compressa:",id:"add-embedding-model-in-compressa",level:4},{value:"Deploy Compressa-LLM",id:"deploy-compressa-llm",level:4},{value:"Deploy embedding model",id:"deploy-embedding-model",level:4}];function t(e){const n={a:"a",br:"br",code:"code",h1:"h1",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"quickstart-compressa-platform",children:"Quickstart: Compressa Platform"}),"\n",(0,o.jsx)(n.p,{children:"This guide shows how to deploy Compressa Platform for model inference."}),"\n",(0,o.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,o.jsxs)(n.p,{children:["Deploying Compressa Platform requires a server with 2 GPUs.",(0,o.jsx)(n.br,{}),"\n","The requirements for GPU versions and server setup can be found on this ",(0,o.jsx)(n.a,{href:"/onprem/LLM_On-Premises/setup/#requirements",children:"page"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"setup",children:"Setup"}),"\n",(0,o.jsx)(n.p,{children:"First, clone the repository with the configuration:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"git clone -b gm/compressa-platform git@github.com:compressa-ai/compressa-deploy.git\ncd compressa-deploy\n"})}),"\n",(0,o.jsx)(n.p,{children:"The repository contains two main files that we\u2019ll configure:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:".env"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"docker-compose.yml"})}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Set up the IDs for GPUs in the ",(0,o.jsx)(n.code,{children:".env"})," file:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"DOCKER_GPU_IDS_1= \nDOCKER_GPU_IDS_2= \n"})}),"\n",(0,o.jsx)(n.p,{children:"With the default configuration, the services will be deploed at 8080."}),"\n",(0,o.jsxs)(n.p,{children:["If you need to modify these, update the port mappings in ",(0,o.jsx)(n.code,{children:"docker-compose.yml"})," for container ",(0,o.jsx)(n.code,{children:"compressa-api-nginx"})," accordingly."]}),"\n",(0,o.jsx)(n.h2,{id:"setup-storage",children:"Setup storage"}),"\n",(0,o.jsx)(n.p,{children:"By default, the containers use the following storage path:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"compressa"})," - ",(0,o.jsx)(n.code,{children:"./data/compressa"}),(0,o.jsx)(n.br,{}),"\n","This directory should have 777 permissions, which can be set via:","\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"chmod 777 -R ./data/compressa\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["You can change the storage path in ",(0,o.jsx)(n.code,{children:"docker-compose.yml"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"Then, you can run the solution with:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"docker compose up --build\n"})}),"\n",(0,o.jsx)(n.h2,{id:"deploy-inference-and-embedding-models",children:"Deploy Inference and Embedding Models"}),"\n",(0,o.jsxs)(n.p,{children:["When the services are running, we need to deploy LLM models to Compressa.\nThe solution uses the LLama3-8B model for chat and the SFR-Embedding-Mistral model for embeddings.",(0,o.jsx)(n.br,{}),"\n","Models can be deployed using the ",(0,o.jsx)(n.a,{href:"/onprem/LLM_On-Premises/services/rest-api/",children:"REST API"})," or using Swagger's UI."]}),"\n",(0,o.jsx)(n.p,{children:"The REST APIs are available at:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"SERVER_NAME:8080/pod-1/api/"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"SERVER_NAME:8080/pod-2/api/"})}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Swagger\u2019s UI is available at:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"SERVER_NAME:8080/pod-1/api/docs"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.code,{children:"SERVER_NAME:8080/pod-2/api/docs"})}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Here are the commands to deploy models using ",(0,o.jsx)(n.code,{children:"curl"}),":"]}),"\n",(0,o.jsx)(n.h4,{id:"add-compressa-qwen25-14b-model-in-compressa",children:"Add Compressa-Qwen2.5-14B model in Compressa:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/models/add/?model_id=compressa-ain%2FQwen2.5-14B' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,o.jsx)(n.h4,{id:"add-embedding-model-in-compressa",children:"Add embedding model in Compressa:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-2/api/v1/models/add/?model_id=Salesforce%2FSFR-Embedding-Mistral' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,o.jsx)(n.p,{children:"When downloading is finished, we can deploy the models:"}),"\n",(0,o.jsx)(n.h4,{id:"deploy-compressa-llm",children:"Deploy Compressa-LLM"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'curl -X \'POST\' "$SERVER_NAME/pod-1/api/v1/deploy/" \\\n -H \'accept: application/json\' \\\n -H \'Authorization: Bearer EMPTY\' \\\n -H \'Content-Type: application/json\' -d \'{\n "model_id": "compressa-ai/Qwen2.5-14B",\n "served_model_name": "Compressa-LLM",\n "dtype": "float16"\n}\'\n'})}),"\n",(0,o.jsx)(n.h4,{id:"deploy-embedding-model",children:"Deploy embedding model"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'curl -X \'POST\' "$SERVER_NAME/pod-2/api/v1/deploy/" \\\n -H \'accept: application/json\' \\\n -H \'Authorization: Bearer EMPTY\' \\\n -H \'Content-Type: application/json\' -d \'{\n "model_id": "Salesforce/SFR-Embedding-Mistral",\n "served_model_name": "Compressa-Embedding",\n "dtype": "float16"\n}\'\n'})}),"\n",(0,o.jsx)(n.p,{children:"When the models are deployed, the server is ready to use!"})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(t,{...e})}):t(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>l});var o=s(6540);const r={},d=o.createContext(r);function i(e){const n=o.useContext(d);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/877ebdfe.4733abbd.js b/assets/js/877ebdfe.4733abbd.js deleted file mode 100644 index 443412c..0000000 --- a/assets/js/877ebdfe.4733abbd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[9277],{2217:e=>{e.exports=JSON.parse('{"url":"redocusaurus/api.yaml","themeId":"theme-redoc","isSpecFile":true,"spec":{"openapi":"3.1.0","info":{"version":"1.0.0","title":"Compressa API"},"servers":[{"url":"https://compressa-api.mil-team.ru","description":"Compressa API Server"}],"tags":[{"name":"chat","description":"Compressa Chat API is OpenAI compatible API that allows you to create chat completions.\\n","x-displayName":"Chat API"},{"name":"embeddings","description":"Compressa Embeddings API is OpenAI compatible API that allows you to create embeddings.\\n","x-displayName":"Text Embeddings API"},{"name":"rerank","description":"Compressa Rerank API allows you to rerank documents based on a query.\\n","x-displayName":"Rerank API"},{"name":"layout","description":"Compressa Layout API allows you to partion documents.\\n","x-displayName":"Layout API"}],"paths":{"/v1/chat/completions":{"post":{"tags":["chat"],"summary":"Create Chat Completion","operationId":"create_chat_completion_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/chat/completions\\",\\n headers={\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"messages\\": [\\n {\\n \\"role\\": \\"system\\",\\n \\"content\\": \\"You are an expert in soccer\\"\\n },\\n {\\n \\"role\\": \\"user\\",\\n \\"content\\": \\"Who won the world series in 2020?\\"\\n }\\n ],\\n \\"max_tokens\\": 128,\\n \\"temperature\\": 0.5,\\n \\"stream\\": False\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X \'POST\' \\\\\\n \'https://compressa-api.mil-team.ru/v1/chat/completions\' \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \'accept: application/json\' \\\\\\n -H \'Content-Type: application/json\' \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"messages\\": [\\n {\\n \\"role\\": \\"system\\",\\n \\"content\\": \\"You are expert in soccer\\"\\n },\\n {\\n \\"role\\": \\"user\\",\\n \\"content\\": \\"Who won the world series in 2020?\\"\\n }\\n ],\\n \\"max_tokens\\": 128,\\n \\"temperature\\": 0.5,\\n \\"stream\\": false\\n}\'\\n"}]}},"/v1/completions":{"post":{"tags":["chat"],"summary":"Create Completion","operationId":"create_completion_v1_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/completions\\",\\n headers={\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"prompt\\": \\"Who won the world series in 2020?\\"\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X \'POST\' \\\\\\n \'https://compressa-api.mil-team.ru/v1/completions\' \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \'accept: application/json\' \\\\\\n -H \'Content-Type: application/json\' \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"prompt\\": \\"Who won the world series in 2020?\\"\\n }\'\\n"}]}},"/v1/embeddings":{"post":{"tags":["embeddings"],"summary":"Create Embedding","operationId":"create_embedding_v1_embeddings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/embeddings\\",\\n headers={\\n \\"accept\\": \\"application/json\\",\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-Embedding\\",\\n \\"input\\": \\"string\\"\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X \'POST\' \\\\\\n \'https://compressa-api.mil-team.ru/v1/embeddings\' \\\\\\n -H \'accept: application/json\' \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \'Content-Type: application/json\' \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-Embedding\\",\\n \\"input\\": \\"string\\"\\n }\'\\n"}]}},"/v1/models":{"get":{"tags":["chat"],"summary":"Show Available Models","operationId":"show_available_models_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.get(\\"http://example.com/v1/models\\")\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X GET \\"http://example.com/v1/models\\"\\n"}]}},"/v1/rerank":{"post":{"tags":["rerank"],"summary":" Rerank","description":"","operationId":"rerank","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReRankResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/rerank\\",\\n headers={\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-ReRank\\",\\n \\"query\\": \\"Query?\\",\\n \\"documents\\": [\\n \\"document 1\\",\\n \\"document 2\\",\\n \\"document 3\\"\\n ],\\n \\"return_documents\\": False\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X POST \\\\\\n \\"https://compressa-api.mil-team.ru/v1/rerank\\" \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \\"accept: application/json\\" \\\\\\n -H \\"Content-Type: application/json\\" \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-ReRank\\",\\n \\"query\\": \\"Query?\\",\\n \\"documents\\": [\\n \\"document 1\\",\\n \\"document 2\\",\\n \\"document 3\\"\\n ],\\n \\"return_documents\\": false\\n }\'\\n"}]}},"/v1/layout":{"post":{"tags":["layout"],"summary":"Summary","description":"Description","operationId":"partition_parameters","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_partition_parameters"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Element"},"title":"Response Partition Parameters","type":"array"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"partition","x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nurl = \\"https://compressa-api.mil-team.ru/v1/layout\\"\\nheaders = {\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n}\\n\\nfiles = {\\"files\\": open(\\"path/to/file.pdf\\", \\"rb\\")}\\ndata = {\\n \\"xml_keep_tags\\": \\"false\\",\\n \\"output_format\\": \\"application/json\\",\\n \\"coordinates\\": \\"true\\",\\n \\"strategy\\": \\"auto\\",\\n \\"languages\\": [\\"rus\\", \\"eng\\"]\\n}\\n\\nresponse = requests.post(\\n url,\\n headers=headers,\\n files=files,\\n data=data\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X POST \\"https://compressa-api.mil-team.ru/v1/layout\\" \\\\\\n -H \\"Authorization: Bearer TOKEN\\" \\\\\\n -H \\"accept: application/json\\" \\\\\\n -F \\"files=@path/to/file.pdf\\" \\\\\\n -F \\"xml_keep_tags=false\\" \\\\\\n -F \\"output_format=application/json\\" \\\\\\n -F \\"coordinates=true\\" \\\\\\n -F \\"strategy=auto\\" \\\\\\n -F \\"languages[]=rus\\" \\\\\\n -F \\"languages[]=eng\\"\\n"}]}}},"components":{"schemas":{"BaseModel":{"properties":{},"type":"object","title":"BaseModel"},"ChatCompletionAssistantMessageParam":{"properties":{"role":{"type":"string","enum":["assistant"],"const":"assistant","title":"Role"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"function_call":{"anyOf":[{"$ref":"#/components/schemas/FunctionCall"},{"type":"null"}]},"name":{"type":"string","title":"Name"},"tool_calls":{"items":{"$ref":"#/components/schemas/ChatCompletionMessageToolCallParam"},"type":"array","title":"Tool Calls"}},"type":"object","required":["role"],"title":"ChatCompletionAssistantMessageParam"},"ChatCompletionContentPartImageParam":{"properties":{"image_url":{"$ref":"#/components/schemas/ImageURL"},"type":{"type":"string","enum":["image_url"],"const":"image_url","title":"Type"}},"type":"object","required":["image_url","type"],"title":"ChatCompletionContentPartImageParam"},"ChatCompletionContentPartTextParam":{"properties":{"text":{"type":"string","title":"Text"},"type":{"type":"string","enum":["text"],"const":"text","title":"Type"}},"type":"object","required":["text","type"],"title":"ChatCompletionContentPartTextParam"},"ChatCompletionFunctionMessageParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"name":{"type":"string","title":"Name"},"role":{"type":"string","enum":["function"],"const":"function","title":"Role"}},"type":"object","required":["content","name","role"],"title":"ChatCompletionFunctionMessageParam"},"ChatCompletionMessageToolCallParam":{"properties":{"id":{"type":"string","title":"Id"},"function":{"$ref":"#/components/schemas/Function"},"type":{"type":"string","enum":["function"],"const":"function","title":"Type"}},"type":"object","required":["id","function","type"],"title":"ChatCompletionMessageToolCallParam"},"ChatCompletionNamedFunction":{"properties":{"name":{"type":"string","title":"Name"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ChatCompletionNamedFunction"},"ChatCompletionNamedToolChoiceParam":{"properties":{"function":{"$ref":"#/components/schemas/ChatCompletionNamedFunction"},"type":{"type":"string","enum":["function"],"const":"function","title":"Type","default":"function"}},"additionalProperties":false,"type":"object","required":["function"],"title":"ChatCompletionNamedToolChoiceParam"},"ChatCompletionRequest":{"properties":{"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionSystemMessageParam"},{"$ref":"#/components/schemas/ChatCompletionUserMessageParam"},{"$ref":"#/components/schemas/ChatCompletionAssistantMessageParam"},{"$ref":"#/components/schemas/ChatCompletionToolMessageParam"},{"$ref":"#/components/schemas/ChatCompletionFunctionMessageParam"},{"$ref":"#/components/schemas/CustomChatCompletionMessageParam"}]},"type":"array","title":"Messages"},"model":{"type":"string","title":"Model"},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","default":0},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias"},"logprobs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Logprobs","default":false},"top_logprobs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top Logprobs","default":0},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N","default":1},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","default":0},"response_format":{"anyOf":[{"$ref":"#/components/schemas/ResponseFormat"},{"type":"null"}]},"seed":{"anyOf":[{"type":"integer","maximum":9223372036854776000,"minimum":-9223372036854776000},{"type":"null"}],"title":"Seed"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","default":false},"stream_options":{"anyOf":[{"$ref":"#/components/schemas/StreamOptions"},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","default":0.7},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","default":1},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatCompletionToolsParam"},"type":"array"},{"type":"null"}],"title":"Tools"},"tool_choice":{"anyOf":[{"type":"string","enum":["none"],"const":"none"},{"$ref":"#/components/schemas/ChatCompletionNamedToolChoiceParam"},{"type":"null"}],"title":"Tool Choice","default":"none"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"best_of":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Of"},"use_beam_search":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Beam Search","default":false},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K","default":-1},"min_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min P","default":0},"repetition_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Repetition Penalty","default":1},"length_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Penalty","default":1},"early_stopping":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Early Stopping","default":false},"ignore_eos":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ignore Eos","default":false},"min_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Tokens","default":0},"stop_token_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Stop Token Ids"},"skip_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Special Tokens","default":true},"spaces_between_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Spaces Between Special Tokens","default":true},"echo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Echo","description":"If true, the new message will be prepended with the last message if they belong to the same role.","default":false},"add_generation_prompt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add Generation Prompt","description":"If true, the generation prompt will be added to the chat template. This is a parameter used by chat template in tokenizer config of the model.","default":true},"add_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add Special Tokens","description":"If true, special tokens (e.g. BOS) will be added to the prompt on top of what is added by the chat template. For most models, the chat template takes care of adding the special tokens so this should be set to False (as is the default).","default":false},"include_stop_str_in_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Stop Str In Output","description":"Whether to include the stop string in the output. This is only applied when the stop or stop_token_ids is set.","default":false},"guided_json":{"anyOf":[{"type":"string"},{"type":"object"},{"$ref":"#/components/schemas/BaseModel"},{"type":"null"}],"title":"Guided Json","description":"If specified, the output will follow the JSON schema."},"guided_regex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Regex","description":"If specified, the output will follow the regex pattern."},"guided_choice":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Guided Choice","description":"If specified, the output will be exactly one of the choices."},"guided_grammar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Grammar","description":"If specified, the output will follow the context free grammar."},"guided_decoding_backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Decoding Backend","description":"If specified, will override the default guided decoding backend of the server for this specific request. If set, must be either \'outlines\' / \'lm-format-enforcer\'"},"guided_whitespace_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Whitespace Pattern","description":"If specified, will override the default whitespace pattern for guided json decoding."},"enforced_str":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enforced Str"}},"additionalProperties":false,"type":"object","required":["messages","model"],"title":"ChatCompletionRequest"},"ChatCompletionSystemMessageParam":{"properties":{"content":{"type":"string","title":"Content"},"role":{"type":"string","enum":["system"],"const":"system","title":"Role"},"name":{"type":"string","title":"Name"}},"type":"object","required":["content","role"],"title":"ChatCompletionSystemMessageParam"},"ChatCompletionToolMessageParam":{"properties":{"content":{"type":"string","title":"Content"},"role":{"type":"string","enum":["tool"],"const":"tool","title":"Role"},"tool_call_id":{"type":"string","title":"Tool Call Id"}},"type":"object","required":["content","role","tool_call_id"],"title":"ChatCompletionToolMessageParam"},"ChatCompletionToolsParam":{"properties":{"type":{"type":"string","enum":["function"],"const":"function","title":"Type","default":"function"},"function":{"$ref":"#/components/schemas/FunctionDefinition"}},"additionalProperties":false,"type":"object","required":["function"],"title":"ChatCompletionToolsParam"},"ChatCompletionUserMessageParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},{"$ref":"#/components/schemas/ChatCompletionContentPartImageParam"},{"$ref":"#/components/schemas/CustomChatCompletionContentPartParam"}]},"type":"array"}],"title":"Content"},"role":{"type":"string","enum":["user"],"const":"user","title":"Role"},"name":{"type":"string","title":"Name"}},"type":"object","required":["content","role"],"title":"ChatCompletionUserMessageParam"},"CompletionRequest":{"properties":{"model":{"type":"string","title":"Model"},"prompt":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Prompt"},"best_of":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Of"},"echo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Echo","default":false},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","default":0},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias"},"logprobs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Logprobs"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens","default":16},"n":{"type":"integer","title":"N","default":1},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","default":0},"seed":{"anyOf":[{"type":"integer","maximum":9223372036854776000,"minimum":-9223372036854776000},{"type":"null"}],"title":"Seed"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","default":false},"stream_options":{"anyOf":[{"$ref":"#/components/schemas/StreamOptions"},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suffix"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","default":1},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","default":1},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"use_beam_search":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Beam Search","default":false},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K","default":-1},"min_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min P","default":0},"repetition_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Repetition Penalty","default":1},"length_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Penalty","default":1},"early_stopping":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Early Stopping","default":false},"stop_token_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Stop Token Ids"},"ignore_eos":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ignore Eos","default":false},"min_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Tokens","default":0},"skip_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Special Tokens","default":true},"spaces_between_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Spaces Between Special Tokens","default":true},"truncate_prompt_tokens":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Truncate Prompt Tokens"},"include_stop_str_in_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Stop Str In Output","description":"Whether to include the stop string in the output. This is only applied when the stop or stop_token_ids is set.","default":false},"response_format":{"anyOf":[{"$ref":"#/components/schemas/ResponseFormat"},{"type":"null"}],"description":"Similar to chat completion, this parameter specifies the format of output. Only {\'type\': \'json_object\'} or {\'type\': \'text\' } is supported."},"guided_json":{"anyOf":[{"type":"string"},{"type":"object"},{"$ref":"#/components/schemas/BaseModel"},{"type":"null"}],"title":"Guided Json","description":"If specified, the output will follow the JSON schema."},"guided_regex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Regex","description":"If specified, the output will follow the regex pattern."},"guided_choice":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Guided Choice","description":"If specified, the output will be exactly one of the choices."},"guided_grammar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Grammar","description":"If specified, the output will follow the context free grammar."},"guided_decoding_backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Decoding Backend","description":"If specified, will override the default guided decoding backend of the server for this specific request. If set, must be one of \'outlines\' / \'lm-format-enforcer\'"},"guided_whitespace_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Whitespace Pattern","description":"If specified, will override the default whitespace pattern for guided json decoding."}},"additionalProperties":false,"type":"object","required":["model","prompt"],"title":"CompletionRequest"},"CustomChatCompletionContentPartParam":{"properties":{"type":{"type":"string","title":"Type"}},"additionalProperties":true,"type":"object","required":["type"],"title":"CustomChatCompletionContentPartParam"},"CustomChatCompletionMessageParam":{"properties":{"role":{"type":"string","title":"Role"},"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},{"$ref":"#/components/schemas/ChatCompletionContentPartImageParam"},{"$ref":"#/components/schemas/CustomChatCompletionContentPartParam"}]},"type":"array"}],"title":"Content"},"name":{"type":"string","title":"Name"}},"type":"object","required":["role"],"title":"CustomChatCompletionMessageParam","description":"Enables custom roles in the Chat Completion API."},"DetokenizeRequest":{"properties":{"model":{"type":"string","title":"Model"},"tokens":{"items":{"type":"integer"},"type":"array","title":"Tokens"}},"additionalProperties":false,"type":"object","required":["model","tokens"],"title":"DetokenizeRequest"},"EmbeddingRequest":{"properties":{"model":{"type":"string","title":"Model"},"input":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Input"},"encoding_format":{"anyOf":[{"type":"string","pattern":"^(float|base64)$"},{"type":"null"}],"title":"Encoding Format","default":"float"},"dimensions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dimensions"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"additional_data":{"anyOf":[{},{"type":"null"}],"title":"Additional Data"}},"type":"object","required":["model","input"],"title":"EmbeddingRequest"},"Function":{"properties":{"arguments":{"type":"string","title":"Arguments"},"name":{"type":"string","title":"Name"}},"type":"object","required":["arguments","name"],"title":"Function"},"FunctionCall":{"properties":{"arguments":{"type":"string","title":"Arguments"},"name":{"type":"string","title":"Name"}},"type":"object","required":["arguments","name"],"title":"FunctionCall"},"FunctionDefinition":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parameters":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Parameters"}},"additionalProperties":false,"type":"object","required":["name"],"title":"FunctionDefinition"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageURL":{"properties":{"url":{"type":"string","title":"Url"},"detail":{"type":"string","enum":["auto","low","high"],"title":"Detail"}},"type":"object","required":["url"],"title":"ImageURL"},"ResponseFormat":{"properties":{"type":{"type":"string","enum":["text","json_object"],"title":"Type"}},"additionalProperties":false,"type":"object","required":["type"],"title":"ResponseFormat"},"StreamOptions":{"properties":{"include_usage":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Usage"}},"additionalProperties":false,"type":"object","required":["include_usage"],"title":"StreamOptions"},"TokenizeRequest":{"properties":{"model":{"type":"string","title":"Model"},"prompt":{"type":"string","title":"Prompt"},"add_special_tokens":{"type":"boolean","title":"Add Special Tokens","default":true}},"additionalProperties":false,"type":"object","required":["model","prompt"],"title":"TokenizeRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"RerankInput":{"title":"RerankInput","required":["documents","query"],"properties":{"query":{"title":"Query","maxLength":122880},"documents":{"title":"Documents","maxItems":2048,"minItems":1,"items":{"maxLength":122880}},"return_documents":{"title":"Return Documents","default":false},"model":{"title":"Model","default":"default/not-specified"}}},"ReRankResult":{"title":"ReRankResult","required":["model","results","usage"],"properties":{"object":{"title":"Object","enum":["rerank"],"default":"rerank"},"results":{"title":"Results","items":{"$ref":"#/components/schemas/_ReRankObject"}},"model":{"title":"Model"},"usage":{"$ref":"#/components/schemas/_Usage"},"id":{"title":"Id"},"created":{"title":"Created"}}},"_Usage":{"title":"_Usage","required":["prompt_tokens","total_tokens"],"properties":{"prompt_tokens":{"title":"Prompt Tokens"},"total_tokens":{"title":"Total Tokens"}}},"_ReRankObject":{"title":"_ReRankObject","required":["index","relevance_score"],"properties":{"relevance_score":{"title":"Relevance Score"},"index":{"title":"Index"},"document":{"title":"Document","anyOf":[{},{}]}}},"Body_partition_parameters":{"properties":{"files":{"type":"string","format":"binary","description":"The file to extract","required":"true","examples":[{"summary":"File to be partitioned","externalValue":"https://github.com/Unstructured-IO/unstructured/blob/98d3541909f64290b5efb65a226fc3ee8a7cc5ee/example-docs/layout-parser-paper.pdf"}]},"xml_keep_tags":{"type":"boolean","title":"Xml Keep Tags","description":"If True, will retain the XML tags in the output. Otherwise it will simply extract the text from within the tags. Only applies to partition_xml.","default":false},"languages":{"items":{"type":"string"},"type":"array","title":"OCR Languages","description":"The languages present in the document, for use in partitioning and/or OCR","default":[]},"ocr_languages":{"items":{"type":"string"},"type":"array","title":"OCR Languages","description":"The languages present in the document, for use in partitioning and/or OCR","default":[]},"skip_infer_table_types":{"items":{"type":"string"},"type":"array","title":"Skip Infer Table Types","description":"The document types that you want to skip table extraction with. Default: []","default":[]},"gz_uncompressed_content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uncompressed Content Type","description":"If file is gzipped, use this content type after unzipping"},"output_format":{"type":"string","enum":["application/json","text/csv"],"title":"Output Format","description":"The format of the response. Supported formats are application/json and text/csv. Default: application/json.","default":"application/json"},"coordinates":{"type":"boolean","title":"Coordinates","description":"If true, return coordinates for each element. Default: false","default":false},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content type","description":"A hint about the content type to use (such as text/markdown), when there are problems processing a specific file. This value is a MIME type in the format type/subtype."},"encoding":{"type":"string","title":"Encoding","description":"The encoding method used to decode the text input. Default: utf-8","default":"utf-8"},"hi_res_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hi Res Model Name","description":"The name of the inference model used when strategy is hi_res"},"include_page_breaks":{"type":"boolean","title":"Include Page Breaks","description":"If True, the output will include page breaks if the filetype supports it. Default: false","default":false},"pdf_infer_table_structure":{"type":"boolean","title":"Pdf Infer Table Structure","description":"Deprecated! Use skip_infer_table_types to opt out of table extraction for any file type. If False and strategy=hi_res, no Table Elements will be extracted from pdf files regardless of skip_infer_table_types contents.","default":true},"strategy":{"type":"string","enum":["fast","hi_res","auto","ocr_only"],"title":"Strategy","description":"The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: auto","default":"auto","examples":["auto","hi_res"]},"extract_image_block_types":{"items":{"type":"string"},"type":"array","title":"Image block types to extract","description":"The types of elements to extract, for use in extracting image blocks as base64 encoded data stored in metadata fields","default":[]},"unique_element_ids":{"type":"boolean","title":"unique_element_ids","description":"When `True`, assign UUIDs to element IDs, which guarantees their uniqueness \\n(useful when using them as primary keys in database). Otherwise a SHA-256 of element text is used. Default: False","default":false},"chunking_strategy":{"anyOf":[{"type":"string","enum":["by_title"],"const":"by_title"},{"type":"null"}],"title":"Chunking Strategy","description":"Use one of the supported strategies to chunk the returned elements. Currently supports: by_title","examples":["by_title"]},"combine_under_n_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Combine Under N Chars","description":"If chunking strategy is set, combine elements until a section reaches a length of n chars. Default: 500"},"max_characters":{"type":"integer","title":"Max Characters","description":"If chunking strategy is set, cut off new sections after reaching a length of n chars (hard max). Default: 1500","default":500},"multipage_sections":{"type":"boolean","title":"Multipage Sections","description":"If chunking strategy is set, determines if sections can span multiple sections. Default: true","default":true},"new_after_n_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"New after n chars","description":"If chunking strategy is set, cut off new sections after reaching a length of n chars (soft max). Default: 1500"},"overlap":{"type":"integer","title":"Overlap","description":"Specifies the length of a string (\\"tail\\") to be drawn from each chunk and prefixed to the\\nnext chunk as a context-preserving mechanism. By default, this only applies to split-chunks\\nwhere an oversized element is divided into multiple chunks by text-splitting. Default: 0","default":0},"overlap_all":{"type":"boolean","title":"Overlap all","description":"When `True`, apply overlap between \\"normal\\" chunks formed from whole\\nelements and not subject to text-splitting. Use this with caution as it entails a certain\\nlevel of \\"pollution\\" of otherwise clean semantic chunk boundaries. Default: False","default":false},"starting_page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"PDF Starting Page Number","description":"When PDF is split into pages before sending it into the API, providing this information will allow the page number to be assigned correctly."}},"type":"object","required":["files"],"title":"Body_partition_parameters"},"Element":{"properties":{"type":{"type":"string","title":"Type"},"element_id":{"type":"string","title":"Element Id"},"metadata":{"type":"object","title":"Metadata"},"text":{"type":"string","title":"Text"}},"type":"object","required":["type","element_id","metadata","text"],"title":"Element"}}}}}')}}]); \ No newline at end of file diff --git a/assets/js/877ebdfe.7f8bd0fc.js b/assets/js/877ebdfe.7f8bd0fc.js new file mode 100644 index 0000000..7e7f4d6 --- /dev/null +++ b/assets/js/877ebdfe.7f8bd0fc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[277],{2217:e=>{e.exports=JSON.parse('{"url":"redocusaurus/api.yaml","themeId":"theme-redoc","isSpecFile":true,"spec":{"openapi":"3.1.0","info":{"version":"1.0.0","title":"Compressa API"},"servers":[{"url":"https://compressa-api.mil-team.ru","description":"Compressa API Server"}],"tags":[{"name":"chat","description":"Compressa Chat API is OpenAI compatible API that allows you to create chat completions.\\n","x-displayName":"Chat API"},{"name":"embeddings","description":"Compressa Embeddings API is OpenAI compatible API that allows you to create embeddings.\\n","x-displayName":"Text Embeddings API"},{"name":"rerank","description":"Compressa Rerank API allows you to rerank documents based on a query.\\n","x-displayName":"Rerank API"},{"name":"layout","description":"Compressa Layout API allows you to partion documents.\\n","x-displayName":"Layout API"}],"paths":{"/v1/chat/completions":{"post":{"tags":["chat"],"summary":"Create Chat Completion","operationId":"create_chat_completion_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/chat/completions\\",\\n headers={\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"messages\\": [\\n {\\n \\"role\\": \\"system\\",\\n \\"content\\": \\"You are an expert in soccer\\"\\n },\\n {\\n \\"role\\": \\"user\\",\\n \\"content\\": \\"Who won the world series in 2020?\\"\\n }\\n ],\\n \\"max_tokens\\": 128,\\n \\"temperature\\": 0.5,\\n \\"stream\\": False\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X \'POST\' \\\\\\n \'https://compressa-api.mil-team.ru/v1/chat/completions\' \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \'accept: application/json\' \\\\\\n -H \'Content-Type: application/json\' \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"messages\\": [\\n {\\n \\"role\\": \\"system\\",\\n \\"content\\": \\"You are expert in soccer\\"\\n },\\n {\\n \\"role\\": \\"user\\",\\n \\"content\\": \\"Who won the world series in 2020?\\"\\n }\\n ],\\n \\"max_tokens\\": 128,\\n \\"temperature\\": 0.5,\\n \\"stream\\": false\\n}\'\\n"}]}},"/v1/completions":{"post":{"tags":["chat"],"summary":"Create Completion","operationId":"create_completion_v1_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/completions\\",\\n headers={\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"prompt\\": \\"Who won the world series in 2020?\\"\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X \'POST\' \\\\\\n \'https://compressa-api.mil-team.ru/v1/completions\' \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \'accept: application/json\' \\\\\\n -H \'Content-Type: application/json\' \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"prompt\\": \\"Who won the world series in 2020?\\"\\n }\'\\n"}]}},"/v1/embeddings":{"post":{"tags":["embeddings"],"summary":"Create Embedding","operationId":"create_embedding_v1_embeddings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/embeddings\\",\\n headers={\\n \\"accept\\": \\"application/json\\",\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-Embedding\\",\\n \\"input\\": \\"string\\"\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X \'POST\' \\\\\\n \'https://compressa-api.mil-team.ru/v1/embeddings\' \\\\\\n -H \'accept: application/json\' \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \'Content-Type: application/json\' \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-Embedding\\",\\n \\"input\\": \\"string\\"\\n }\'\\n"}]}},"/v1/models":{"get":{"tags":["chat"],"summary":"Show Available Models","operationId":"show_available_models_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.get(\\"http://example.com/v1/models\\")\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X GET \\"http://example.com/v1/models\\"\\n"}]}},"/v1/rerank":{"post":{"tags":["rerank"],"summary":" Rerank","description":"","operationId":"rerank","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReRankResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/rerank\\",\\n headers={\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-ReRank\\",\\n \\"query\\": \\"Query?\\",\\n \\"documents\\": [\\n \\"document 1\\",\\n \\"document 2\\",\\n \\"document 3\\"\\n ],\\n \\"return_documents\\": False\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X POST \\\\\\n \\"https://compressa-api.mil-team.ru/v1/rerank\\" \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \\"accept: application/json\\" \\\\\\n -H \\"Content-Type: application/json\\" \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-ReRank\\",\\n \\"query\\": \\"Query?\\",\\n \\"documents\\": [\\n \\"document 1\\",\\n \\"document 2\\",\\n \\"document 3\\"\\n ],\\n \\"return_documents\\": false\\n }\'\\n"}]}},"/v1/layout":{"post":{"tags":["layout"],"summary":"Summary","description":"Description","operationId":"partition_parameters","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_partition_parameters"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Element"},"title":"Response Partition Parameters","type":"array"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"partition","x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nurl = \\"https://compressa-api.mil-team.ru/v1/layout\\"\\nheaders = {\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n}\\n\\nfiles = {\\"files\\": open(\\"path/to/file.pdf\\", \\"rb\\")}\\ndata = {\\n \\"xml_keep_tags\\": \\"false\\",\\n \\"output_format\\": \\"application/json\\",\\n \\"coordinates\\": \\"true\\",\\n \\"strategy\\": \\"auto\\",\\n \\"languages\\": [\\"rus\\", \\"eng\\"]\\n}\\n\\nresponse = requests.post(\\n url,\\n headers=headers,\\n files=files,\\n data=data\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X POST \\"https://compressa-api.mil-team.ru/v1/layout\\" \\\\\\n -H \\"Authorization: Bearer TOKEN\\" \\\\\\n -H \\"accept: application/json\\" \\\\\\n -F \\"files=@path/to/file.pdf\\" \\\\\\n -F \\"xml_keep_tags=false\\" \\\\\\n -F \\"output_format=application/json\\" \\\\\\n -F \\"coordinates=true\\" \\\\\\n -F \\"strategy=auto\\" \\\\\\n -F \\"languages[]=rus\\" \\\\\\n -F \\"languages[]=eng\\"\\n"}]}}},"components":{"schemas":{"BaseModel":{"properties":{},"type":"object","title":"BaseModel"},"ChatCompletionAssistantMessageParam":{"properties":{"role":{"type":"string","enum":["assistant"],"const":"assistant","title":"Role"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"function_call":{"anyOf":[{"$ref":"#/components/schemas/FunctionCall"},{"type":"null"}]},"name":{"type":"string","title":"Name"},"tool_calls":{"items":{"$ref":"#/components/schemas/ChatCompletionMessageToolCallParam"},"type":"array","title":"Tool Calls"}},"type":"object","required":["role"],"title":"ChatCompletionAssistantMessageParam"},"ChatCompletionContentPartImageParam":{"properties":{"image_url":{"$ref":"#/components/schemas/ImageURL"},"type":{"type":"string","enum":["image_url"],"const":"image_url","title":"Type"}},"type":"object","required":["image_url","type"],"title":"ChatCompletionContentPartImageParam"},"ChatCompletionContentPartTextParam":{"properties":{"text":{"type":"string","title":"Text"},"type":{"type":"string","enum":["text"],"const":"text","title":"Type"}},"type":"object","required":["text","type"],"title":"ChatCompletionContentPartTextParam"},"ChatCompletionFunctionMessageParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"name":{"type":"string","title":"Name"},"role":{"type":"string","enum":["function"],"const":"function","title":"Role"}},"type":"object","required":["content","name","role"],"title":"ChatCompletionFunctionMessageParam"},"ChatCompletionMessageToolCallParam":{"properties":{"id":{"type":"string","title":"Id"},"function":{"$ref":"#/components/schemas/Function"},"type":{"type":"string","enum":["function"],"const":"function","title":"Type"}},"type":"object","required":["id","function","type"],"title":"ChatCompletionMessageToolCallParam"},"ChatCompletionNamedFunction":{"properties":{"name":{"type":"string","title":"Name"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ChatCompletionNamedFunction"},"ChatCompletionNamedToolChoiceParam":{"properties":{"function":{"$ref":"#/components/schemas/ChatCompletionNamedFunction"},"type":{"type":"string","enum":["function"],"const":"function","title":"Type","default":"function"}},"additionalProperties":false,"type":"object","required":["function"],"title":"ChatCompletionNamedToolChoiceParam"},"ChatCompletionRequest":{"properties":{"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionSystemMessageParam"},{"$ref":"#/components/schemas/ChatCompletionUserMessageParam"},{"$ref":"#/components/schemas/ChatCompletionAssistantMessageParam"},{"$ref":"#/components/schemas/ChatCompletionToolMessageParam"},{"$ref":"#/components/schemas/ChatCompletionFunctionMessageParam"},{"$ref":"#/components/schemas/CustomChatCompletionMessageParam"}]},"type":"array","title":"Messages"},"model":{"type":"string","title":"Model"},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","default":0},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias"},"logprobs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Logprobs","default":false},"top_logprobs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top Logprobs","default":0},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N","default":1},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","default":0},"response_format":{"anyOf":[{"$ref":"#/components/schemas/ResponseFormat"},{"type":"null"}]},"seed":{"anyOf":[{"type":"integer","maximum":9223372036854776000,"minimum":-9223372036854776000},{"type":"null"}],"title":"Seed"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","default":false},"stream_options":{"anyOf":[{"$ref":"#/components/schemas/StreamOptions"},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","default":0.7},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","default":1},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatCompletionToolsParam"},"type":"array"},{"type":"null"}],"title":"Tools"},"tool_choice":{"anyOf":[{"type":"string","enum":["none"],"const":"none"},{"$ref":"#/components/schemas/ChatCompletionNamedToolChoiceParam"},{"type":"null"}],"title":"Tool Choice","default":"none"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"best_of":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Of"},"use_beam_search":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Beam Search","default":false},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K","default":-1},"min_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min P","default":0},"repetition_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Repetition Penalty","default":1},"length_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Penalty","default":1},"early_stopping":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Early Stopping","default":false},"ignore_eos":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ignore Eos","default":false},"min_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Tokens","default":0},"stop_token_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Stop Token Ids"},"skip_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Special Tokens","default":true},"spaces_between_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Spaces Between Special Tokens","default":true},"echo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Echo","description":"If true, the new message will be prepended with the last message if they belong to the same role.","default":false},"add_generation_prompt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add Generation Prompt","description":"If true, the generation prompt will be added to the chat template. This is a parameter used by chat template in tokenizer config of the model.","default":true},"add_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add Special Tokens","description":"If true, special tokens (e.g. BOS) will be added to the prompt on top of what is added by the chat template. For most models, the chat template takes care of adding the special tokens so this should be set to False (as is the default).","default":false},"include_stop_str_in_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Stop Str In Output","description":"Whether to include the stop string in the output. This is only applied when the stop or stop_token_ids is set.","default":false},"guided_json":{"anyOf":[{"type":"string"},{"type":"object"},{"$ref":"#/components/schemas/BaseModel"},{"type":"null"}],"title":"Guided Json","description":"If specified, the output will follow the JSON schema."},"guided_regex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Regex","description":"If specified, the output will follow the regex pattern."},"guided_choice":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Guided Choice","description":"If specified, the output will be exactly one of the choices."},"guided_grammar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Grammar","description":"If specified, the output will follow the context free grammar."},"guided_decoding_backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Decoding Backend","description":"If specified, will override the default guided decoding backend of the server for this specific request. If set, must be either \'outlines\' / \'lm-format-enforcer\'"},"guided_whitespace_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Whitespace Pattern","description":"If specified, will override the default whitespace pattern for guided json decoding."},"enforced_str":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enforced Str"}},"additionalProperties":false,"type":"object","required":["messages","model"],"title":"ChatCompletionRequest"},"ChatCompletionSystemMessageParam":{"properties":{"content":{"type":"string","title":"Content"},"role":{"type":"string","enum":["system"],"const":"system","title":"Role"},"name":{"type":"string","title":"Name"}},"type":"object","required":["content","role"],"title":"ChatCompletionSystemMessageParam"},"ChatCompletionToolMessageParam":{"properties":{"content":{"type":"string","title":"Content"},"role":{"type":"string","enum":["tool"],"const":"tool","title":"Role"},"tool_call_id":{"type":"string","title":"Tool Call Id"}},"type":"object","required":["content","role","tool_call_id"],"title":"ChatCompletionToolMessageParam"},"ChatCompletionToolsParam":{"properties":{"type":{"type":"string","enum":["function"],"const":"function","title":"Type","default":"function"},"function":{"$ref":"#/components/schemas/FunctionDefinition"}},"additionalProperties":false,"type":"object","required":["function"],"title":"ChatCompletionToolsParam"},"ChatCompletionUserMessageParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},{"$ref":"#/components/schemas/ChatCompletionContentPartImageParam"},{"$ref":"#/components/schemas/CustomChatCompletionContentPartParam"}]},"type":"array"}],"title":"Content"},"role":{"type":"string","enum":["user"],"const":"user","title":"Role"},"name":{"type":"string","title":"Name"}},"type":"object","required":["content","role"],"title":"ChatCompletionUserMessageParam"},"CompletionRequest":{"properties":{"model":{"type":"string","title":"Model"},"prompt":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Prompt"},"best_of":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Of"},"echo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Echo","default":false},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","default":0},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias"},"logprobs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Logprobs"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens","default":16},"n":{"type":"integer","title":"N","default":1},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","default":0},"seed":{"anyOf":[{"type":"integer","maximum":9223372036854776000,"minimum":-9223372036854776000},{"type":"null"}],"title":"Seed"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","default":false},"stream_options":{"anyOf":[{"$ref":"#/components/schemas/StreamOptions"},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suffix"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","default":1},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","default":1},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"use_beam_search":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Beam Search","default":false},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K","default":-1},"min_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min P","default":0},"repetition_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Repetition Penalty","default":1},"length_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Penalty","default":1},"early_stopping":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Early Stopping","default":false},"stop_token_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Stop Token Ids"},"ignore_eos":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ignore Eos","default":false},"min_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Tokens","default":0},"skip_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Special Tokens","default":true},"spaces_between_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Spaces Between Special Tokens","default":true},"truncate_prompt_tokens":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Truncate Prompt Tokens"},"include_stop_str_in_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Stop Str In Output","description":"Whether to include the stop string in the output. This is only applied when the stop or stop_token_ids is set.","default":false},"response_format":{"anyOf":[{"$ref":"#/components/schemas/ResponseFormat"},{"type":"null"}],"description":"Similar to chat completion, this parameter specifies the format of output. Only {\'type\': \'json_object\'} or {\'type\': \'text\' } is supported."},"guided_json":{"anyOf":[{"type":"string"},{"type":"object"},{"$ref":"#/components/schemas/BaseModel"},{"type":"null"}],"title":"Guided Json","description":"If specified, the output will follow the JSON schema."},"guided_regex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Regex","description":"If specified, the output will follow the regex pattern."},"guided_choice":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Guided Choice","description":"If specified, the output will be exactly one of the choices."},"guided_grammar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Grammar","description":"If specified, the output will follow the context free grammar."},"guided_decoding_backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Decoding Backend","description":"If specified, will override the default guided decoding backend of the server for this specific request. If set, must be one of \'outlines\' / \'lm-format-enforcer\'"},"guided_whitespace_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Whitespace Pattern","description":"If specified, will override the default whitespace pattern for guided json decoding."}},"additionalProperties":false,"type":"object","required":["model","prompt"],"title":"CompletionRequest"},"CustomChatCompletionContentPartParam":{"properties":{"type":{"type":"string","title":"Type"}},"additionalProperties":true,"type":"object","required":["type"],"title":"CustomChatCompletionContentPartParam"},"CustomChatCompletionMessageParam":{"properties":{"role":{"type":"string","title":"Role"},"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},{"$ref":"#/components/schemas/ChatCompletionContentPartImageParam"},{"$ref":"#/components/schemas/CustomChatCompletionContentPartParam"}]},"type":"array"}],"title":"Content"},"name":{"type":"string","title":"Name"}},"type":"object","required":["role"],"title":"CustomChatCompletionMessageParam","description":"Enables custom roles in the Chat Completion API."},"DetokenizeRequest":{"properties":{"model":{"type":"string","title":"Model"},"tokens":{"items":{"type":"integer"},"type":"array","title":"Tokens"}},"additionalProperties":false,"type":"object","required":["model","tokens"],"title":"DetokenizeRequest"},"EmbeddingRequest":{"properties":{"model":{"type":"string","title":"Model"},"input":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Input"},"encoding_format":{"anyOf":[{"type":"string","pattern":"^(float|base64)$"},{"type":"null"}],"title":"Encoding Format","default":"float"},"dimensions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dimensions"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"additional_data":{"anyOf":[{},{"type":"null"}],"title":"Additional Data"}},"type":"object","required":["model","input"],"title":"EmbeddingRequest"},"Function":{"properties":{"arguments":{"type":"string","title":"Arguments"},"name":{"type":"string","title":"Name"}},"type":"object","required":["arguments","name"],"title":"Function"},"FunctionCall":{"properties":{"arguments":{"type":"string","title":"Arguments"},"name":{"type":"string","title":"Name"}},"type":"object","required":["arguments","name"],"title":"FunctionCall"},"FunctionDefinition":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parameters":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Parameters"}},"additionalProperties":false,"type":"object","required":["name"],"title":"FunctionDefinition"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageURL":{"properties":{"url":{"type":"string","title":"Url"},"detail":{"type":"string","enum":["auto","low","high"],"title":"Detail"}},"type":"object","required":["url"],"title":"ImageURL"},"ResponseFormat":{"properties":{"type":{"type":"string","enum":["text","json_object"],"title":"Type"}},"additionalProperties":false,"type":"object","required":["type"],"title":"ResponseFormat"},"StreamOptions":{"properties":{"include_usage":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Usage"}},"additionalProperties":false,"type":"object","required":["include_usage"],"title":"StreamOptions"},"TokenizeRequest":{"properties":{"model":{"type":"string","title":"Model"},"prompt":{"type":"string","title":"Prompt"},"add_special_tokens":{"type":"boolean","title":"Add Special Tokens","default":true}},"additionalProperties":false,"type":"object","required":["model","prompt"],"title":"TokenizeRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"RerankInput":{"title":"RerankInput","required":["documents","query"],"properties":{"query":{"title":"Query","maxLength":122880},"documents":{"title":"Documents","maxItems":2048,"minItems":1,"items":{"maxLength":122880}},"return_documents":{"title":"Return Documents","default":false},"model":{"title":"Model","default":"default/not-specified"}}},"ReRankResult":{"title":"ReRankResult","required":["model","results","usage"],"properties":{"object":{"title":"Object","enum":["rerank"],"default":"rerank"},"results":{"title":"Results","items":{"$ref":"#/components/schemas/_ReRankObject"}},"model":{"title":"Model"},"usage":{"$ref":"#/components/schemas/_Usage"},"id":{"title":"Id"},"created":{"title":"Created"}}},"_Usage":{"title":"_Usage","required":["prompt_tokens","total_tokens"],"properties":{"prompt_tokens":{"title":"Prompt Tokens"},"total_tokens":{"title":"Total Tokens"}}},"_ReRankObject":{"title":"_ReRankObject","required":["index","relevance_score"],"properties":{"relevance_score":{"title":"Relevance Score"},"index":{"title":"Index"},"document":{"title":"Document","anyOf":[{},{}]}}},"Body_partition_parameters":{"properties":{"files":{"type":"string","format":"binary","description":"The file to extract","required":"true","examples":[{"summary":"File to be partitioned","externalValue":"https://github.com/Unstructured-IO/unstructured/blob/98d3541909f64290b5efb65a226fc3ee8a7cc5ee/example-docs/layout-parser-paper.pdf"}]},"xml_keep_tags":{"type":"boolean","title":"Xml Keep Tags","description":"If True, will retain the XML tags in the output. Otherwise it will simply extract the text from within the tags. Only applies to partition_xml.","default":false},"languages":{"items":{"type":"string"},"type":"array","title":"OCR Languages","description":"The languages present in the document, for use in partitioning and/or OCR","default":[]},"ocr_languages":{"items":{"type":"string"},"type":"array","title":"OCR Languages","description":"The languages present in the document, for use in partitioning and/or OCR","default":[]},"skip_infer_table_types":{"items":{"type":"string"},"type":"array","title":"Skip Infer Table Types","description":"The document types that you want to skip table extraction with. Default: []","default":[]},"gz_uncompressed_content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uncompressed Content Type","description":"If file is gzipped, use this content type after unzipping"},"output_format":{"type":"string","enum":["application/json","text/csv"],"title":"Output Format","description":"The format of the response. Supported formats are application/json and text/csv. Default: application/json.","default":"application/json"},"coordinates":{"type":"boolean","title":"Coordinates","description":"If true, return coordinates for each element. Default: false","default":false},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content type","description":"A hint about the content type to use (such as text/markdown), when there are problems processing a specific file. This value is a MIME type in the format type/subtype."},"encoding":{"type":"string","title":"Encoding","description":"The encoding method used to decode the text input. Default: utf-8","default":"utf-8"},"hi_res_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hi Res Model Name","description":"The name of the inference model used when strategy is hi_res"},"include_page_breaks":{"type":"boolean","title":"Include Page Breaks","description":"If True, the output will include page breaks if the filetype supports it. Default: false","default":false},"pdf_infer_table_structure":{"type":"boolean","title":"Pdf Infer Table Structure","description":"Deprecated! Use skip_infer_table_types to opt out of table extraction for any file type. If False and strategy=hi_res, no Table Elements will be extracted from pdf files regardless of skip_infer_table_types contents.","default":true},"strategy":{"type":"string","enum":["fast","hi_res","auto","ocr_only"],"title":"Strategy","description":"The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: auto","default":"auto","examples":["auto","hi_res"]},"extract_image_block_types":{"items":{"type":"string"},"type":"array","title":"Image block types to extract","description":"The types of elements to extract, for use in extracting image blocks as base64 encoded data stored in metadata fields","default":[]},"unique_element_ids":{"type":"boolean","title":"unique_element_ids","description":"When `True`, assign UUIDs to element IDs, which guarantees their uniqueness \\n(useful when using them as primary keys in database). Otherwise a SHA-256 of element text is used. Default: False","default":false},"chunking_strategy":{"anyOf":[{"type":"string","enum":["by_title"],"const":"by_title"},{"type":"null"}],"title":"Chunking Strategy","description":"Use one of the supported strategies to chunk the returned elements. Currently supports: by_title","examples":["by_title"]},"combine_under_n_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Combine Under N Chars","description":"If chunking strategy is set, combine elements until a section reaches a length of n chars. Default: 500"},"max_characters":{"type":"integer","title":"Max Characters","description":"If chunking strategy is set, cut off new sections after reaching a length of n chars (hard max). Default: 1500","default":500},"multipage_sections":{"type":"boolean","title":"Multipage Sections","description":"If chunking strategy is set, determines if sections can span multiple sections. Default: true","default":true},"new_after_n_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"New after n chars","description":"If chunking strategy is set, cut off new sections after reaching a length of n chars (soft max). Default: 1500"},"overlap":{"type":"integer","title":"Overlap","description":"Specifies the length of a string (\\"tail\\") to be drawn from each chunk and prefixed to the\\nnext chunk as a context-preserving mechanism. By default, this only applies to split-chunks\\nwhere an oversized element is divided into multiple chunks by text-splitting. Default: 0","default":0},"overlap_all":{"type":"boolean","title":"Overlap all","description":"When `True`, apply overlap between \\"normal\\" chunks formed from whole\\nelements and not subject to text-splitting. Use this with caution as it entails a certain\\nlevel of \\"pollution\\" of otherwise clean semantic chunk boundaries. Default: False","default":false},"starting_page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"PDF Starting Page Number","description":"When PDF is split into pages before sending it into the API, providing this information will allow the page number to be assigned correctly."}},"type":"object","required":["files"],"title":"Body_partition_parameters"},"Element":{"properties":{"type":{"type":"string","title":"Type"},"element_id":{"type":"string","title":"Element Id"},"metadata":{"type":"object","title":"Metadata"},"text":{"type":"string","title":"Text"}},"type":"object","required":["type","element_id","metadata","text"],"title":"Element"}}}}}')}}]); \ No newline at end of file diff --git a/assets/js/8a61c40b.891edae0.js b/assets/js/8a61c40b.761e35db.js similarity index 52% rename from assets/js/8a61c40b.891edae0.js rename to assets/js/8a61c40b.761e35db.js index a85b97c..15bfc50 100644 --- a/assets/js/8a61c40b.891edae0.js +++ b/assets/js/8a61c40b.761e35db.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[4650],{3184:s=>{s.exports={}}}]); \ No newline at end of file +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[650],{3184:s=>{s.exports={}}}]); \ No newline at end of file diff --git a/assets/js/8c75ad99.407dc7be.js b/assets/js/8c75ad99.407dc7be.js deleted file mode 100644 index a420722..0000000 --- a/assets/js/8c75ad99.407dc7be.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[3185],{8251:(n,e,s)=>{s.r(e),s.d(e,{assets:()=>c,contentTitle:()=>t,default:()=>l,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var r=s(4848),a=s(8453);const i={sidebar_position:3},t="\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank",o={id:"guides/langchain_basic_rerank/index",title:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank",description:"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f, \u0441\u0442\u0440\u0435\u043c\u044f\u0441\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445\u044d\u0442\u0430\u043f\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_basic_rerank/index.md",sourceDirName:"guides/langchain_basic_rerank",slug:"/guides/langchain_basic_rerank/",permalink:"/guides/langchain_basic_rerank/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_basic_rerank/index.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"guidesSidebar",previous:{title:"\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a",permalink:"/guides/langchain_basic_semantic_search/"},next:{title:"\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG",permalink:"/guides/langchain_advanced_chunking/"}},c={},d=[{value:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Compressa Rerank",id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c-compressa-rerank",level:2},{value:"\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438 - End2end \u0434\u0435\u043c\u043e",id:"\u043f\u043e\u0438\u0441\u043a-\u043f\u043e-\u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438---end2end-\u0434\u0435\u043c\u043e",level:2}];function p(n){const e={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,a.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{id:"\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435-\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438-\u043f\u043e\u0438\u0441\u043a\u0430-\u0441-rerank",children:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank"}),"\n",(0,r.jsx)(e.p,{children:"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f, \u0441\u0442\u0440\u0435\u043c\u044f\u0441\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445\u044d\u0442\u0430\u043f\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f."}),"\n",(0,r.jsx)(e.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 Rerank \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430."}),"\n",(0,r.jsx)(e.p,{children:"\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:"}),"\n",(0,r.jsxs)(e.ol,{children:["\n",(0,r.jsx)(e.li,{children:"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u0435\u0440\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0442\u043e\u043f-100 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u0438\u0431\u043e \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439, \u043b\u0438\u0431\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a."}),"\n",(0,r.jsx)(e.li,{children:"\u0417\u0430\u0442\u0435\u043c \u044d\u0442\u0438 100 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 Compressa Rerank."}),"\n",(0,r.jsx)(e.li,{children:"\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438."}),"\n",(0,r.jsx)(e.li,{children:"\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043e\u0446\u0435\u043d\u043e\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b."}),"\n"]}),"\n",(0,r.jsx)(e.p,{children:"\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b."}),"\n",(0,r.jsx)(e.p,{children:"\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Compressa Rerank \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0438\u0441\u043a\u0430, \u0438 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0435\u0451 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445."}),"\n",(0,r.jsxs)(e.p,{children:["\u0412\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 .ipynb \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 ",(0,r.jsx)(e.a,{href:"https://github.com/compressa-ai/langchain_compressa/blob/main/docs/Basic_Rerank.ipynb",children:"\u0437\u0434\u0435\u0441\u044c"}),"."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"# \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\n!pip install langchain-compressa\n!pip install langchain\n\n\n# \u0418\u043c\u043f\u043e\u0440\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\nimport os\nimport requests\nimport numpy as np\nfrom time import time\nfrom typing import List\nfrom pprint import pprint\nfrom langchain_compressa import CompressaRerank\nfrom langchain.schema import Document\n"})}),"\n",(0,r.jsxs)(e.p,{children:["\u0414\u043b\u044f \u044f\u0447\u0435\u0439\u043a\u0438 \u043d\u0438\u0436\u0435 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f API \u043a\u043b\u044e\u0447 Compressa. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 ",(0,r.jsx)(e.a,{href:"https://compressa.ai/form",children:"\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"}),"."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'os.environ["COMPRESSA_API_KEY"] = "\u0432\u0430\u0448_\u043a\u043b\u044e\u0447"\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'# \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Compressa Rerank\nreranker = CompressaRerank(api_key=COMPRESSA_API_KEY, base_url="https://compressa-api.mil-team.ru/v1", top_n=3)\n\n# \u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 "\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432"\nquery = "\u041a\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u044b \'\u0427\u0435\u0440\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\'?"\ndocs = [\n "\u041a\u0430\u0437\u0438\u043c\u0438\u0440 \u041c\u0430\u043b\u0435\u0432\u0438\u0447 \u0441\u043e\u0437\u0434\u0430\u043b \'\u0427\u0435\u0440\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\' \u0432 1915 \u0433\u043e\u0434\u0443, \u0447\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c \u0432 \u043c\u0438\u0440\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0430.",\n "\u0418\u043b\u044c\u044f \u0420\u0435\u043f\u0438\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u0430\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \'\u0411\u0443\u0440\u043b\u0430\u043a\u0438 \u043d\u0430 \u0412\u043e\u043b\u0433\u0435\' \u0438 \'\u0418\u0432\u0430\u043d \u0413\u0440\u043e\u0437\u043d\u044b\u0439 \u0438 \u0441\u044b\u043d \u0435\u0433\u043e \u0418\u0432\u0430\u043d\'.",\n "\'\u0427\u0435\u0440\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\' \u041c\u0430\u043b\u0435\u0432\u0438\u0447\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0432\u043b\u0438\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0430 XX \u0432\u0435\u043a\u0430.",\n "\u0412\u0430\u0441\u0438\u043b\u0438\u0439 \u041a\u0430\u043d\u0434\u0438\u043d\u0441\u043a\u0438\u0439, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0438\u043a \u041c\u0430\u043b\u0435\u0432\u0438\u0447\u0430, \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 \u0436\u0430\u043d\u0440\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0430.",\n "\u041c\u0430\u043b\u0435\u0432\u0438\u0447 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0439 \'\u0427\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430\' \u043c\u0435\u0436\u0434\u0443 1915 \u0438 1930 \u0433\u043e\u0434\u0430\u043c\u0438.",\n "\u041a\u0430\u0440\u0442\u0438\u043d\u0430 \'\u0427\u0435\u0440\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\' \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0431\u044b\u043b\u0430 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0430 \u0444\u0443\u0442\u0443\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0432\u044b\u0441\u0442\u0430\u0432\u043a\u0435 \'0,10\' \u0432 \u041f\u0435\u0442\u0440\u043e\u0433\u0440\u0430\u0434\u0435.",\n "\u041f\u043e\u043c\u0438\u043c\u043e \'\u0427\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430\', \u041c\u0430\u043b\u0435\u0432\u0438\u0447 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043c\u0438 \u0432 \u0441\u0442\u0438\u043b\u0435 \u0441\u0443\u043f\u0440\u0435\u043c\u0430\u0442\u0438\u0437\u043c\u0430.",\n "\u041c\u0430\u0440\u043a \u0428\u0430\u0433\u0430\u043b, \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0445\u0443\u0434\u043e\u0436\u043d\u0438\u043a, \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 \u0441\u0442\u0438\u043b\u0435 \u043c\u043e\u0434\u0435\u0440\u043d\u0438\u0437\u043c\u0430 \u0438 \u0441\u044e\u0440\u0440\u0435\u0430\u043b\u0438\u0437\u043c\u0430.",\n "\u0412 \u0422\u0440\u0435\u0442\u044c\u044f\u043a\u043e\u0432\u0441\u043a\u043e\u0439 \u0433\u0430\u043b\u0435\u0440\u0435\u0435 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u0438\u0437 \u0432\u0435\u0440\u0441\u0438\u0439 \'\u0427\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430\' \u041c\u0430\u043b\u0435\u0432\u0438\u0447\u0430.",\n "\u041a\u0430\u0440\u0442\u0438\u043d\u0430 \'\u0427\u0435\u0440\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\' \u0432\u044b\u0437\u0432\u0430\u043b\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0439 \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0439 \u0432 \u043c\u0438\u0440\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0430."\n]\n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u0438\u043f\u0430 Langchain Document \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432\ndoc_objects = [\n Document(page_content=doc, metadata={"index": idx})\n for idx, doc in enumerate(docs)\n]\n'})}),"\n",(0,r.jsx)(e.h2,{id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c-compressa-rerank",children:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Compressa Rerank"}),"\n",(0,r.jsxs)(e.p,{children:["\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u044f\u0447\u0435\u0439\u043a\u0435 \u043c\u044b \u0432\u044b\u0437\u043e\u0432\u0435\u043c Compressa Rerank \u0434\u043b\u044f \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ",(0,r.jsx)(e.code,{children:"docs"})," \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 ",(0,r.jsx)(e.code,{children:"query"})]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'results = reranker.compress_documents(query=query, documents=doc_objects)\n\ntop_n = 3 # \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 top_n, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.\nsorted_results = sorted(results, key=lambda x: x.metadata[\'relevance_score\'], reverse=True)\nselected_results = sorted_results[:top_n]\n\nprint(query)\n\nfor idx, r in enumerate(selected_results):\n doc_index = r.metadata["index"]\n doc_text = r.page_content if doc_index < len(docs) else "\u0422\u0435\u043a\u0441\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d"\n print(f"\u0420\u0430\u043d\u0433 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430: {idx + 1}, \u0418\u043d\u0434\u0435\u043a\u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430: {doc_index}")\n print(f"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442: {doc_text}")\n print(f"\u041e\u0446\u0435\u043d\u043a\u0430 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438: {r.metadata[\'relevance_score\']:.2f}")\n print("\\n")\n'})}),"\n",(0,r.jsx)(e.h2,{id:"\u043f\u043e\u0438\u0441\u043a-\u043f\u043e-\u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438---end2end-\u0434\u0435\u043c\u043e",children:"\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438 - End2end \u0434\u0435\u043c\u043e"}),"\n",(0,r.jsx)(e.p,{children:'\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Rerank \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0441\u0442\u0430\u0442\u044c\u044f\u043c \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 Wikipedia. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043c\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0438 mrtydi-v1.1-russian \u0434\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 500\u043a \u043e\u0442\u0440\u044b\u0432\u043a\u043e\u0432 \u0438\u0437 \u0441\u0442\u0430\u0442\u0435\u0439, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432 "\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435" \u043e\u0442\u0432\u0435\u0442\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0438\u0436\u0435, \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.'}),"\n",(0,r.jsx)(e.p,{children:"\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a BM25 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u043f-100 \u043e\u0442\u0440\u044b\u0432\u043a\u043e\u0432, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0443, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u044d\u0442\u0438 100 \u043e\u0442\u0440\u044b\u0432\u043a\u043e\u0432 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 Compressa Rerank, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b."}),"\n",(0,r.jsx)(e.p,{children:"\u041c\u044b \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u0442\u043e\u043f-3 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e BM25 (\u043a\u0430\u043a \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Elasticsearch) \u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0442 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 Compressa Rerank."}),"\n",(0,r.jsx)(e.p,{children:"\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438."}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"!pip install -U rank_bm25\n!pip install gdown\n"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"import gdown\nimport json\nimport gzip\nimport os\nfrom rank_bm25 import BM25Okapi\nfrom sklearn.feature_extraction import _stop_words\nimport string\nfrom tqdm.autonotebook import tqdm\n"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"#\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 c google \u0434\u0438\u0441\u043a\u0430 \u0421ompressa, \u043e\u043d \u0443\u0436\u0435 \u043d\u0430\u0440\u0435\u0437\u0430\u043d \u043d\u0430 \u043e\u0442\u0440\u044b\u0432\u043a\u0438\nfile_id = '1u-3EQ4yoYys1wSSK_EifIPPRyh_6oaR6'\nurl = f'https://drive.google.com/uc?id={file_id}'\ngdown.download(url, 'mrtydi-russian-subset.jsonl', quiet=False)\n"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"with open('mrtydi-russian-subset.jsonl', 'r', encoding='utf-8') as f:\n passages = [json.loads(line) for line in tqdm(f)]\n\nprint(f\"\u0412\u0441\u0435\u0433\u043e \u043e\u0442\u0440\u044b\u0432\u043a\u043e\u0432 \u0432 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435: {len(passages)}\")\nprint(f\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0442\u0440\u044b\u0432\u043a\u0430:\")\nprint(f\"ID: {passages[0]['id']}\")\nprint(f\"\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435: {passages[0]['contents'][:300]}...\") # \u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 200 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f\n"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"# \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c (\u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c). \n# \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c BM25, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 rank_bm25.\n# \u041c\u044b \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043d\u0430\u0448 \u0442\u0435\u043a\u0441\u0442 \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u043e\u043f-\u0441\u043b\u043e\u0432\u0430 \u043f\u0440\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438\n\n# \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0441\u0442\u043e\u043f-\u0441\u043b\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0438\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439, \u043e\u043d \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430.\nRUSSIAN_STOP_WORDS = set([\n '\u0438', '\u0432', '\u0432\u043e', '\u043d\u0435', '\u0447\u0442\u043e', '\u043e\u043d', '\u043d\u0430', '\u044f', '\u0441', '\u0441\u043e', '\u043a\u0430\u043a', '\u0430', '\u0442\u043e', '\u0432\u0441\u0435', '\u043e\u043d\u0430', '\u0442\u0430\u043a',\n '\u0435\u0433\u043e', '\u043d\u043e', '\u0434\u0430', '\u0442\u044b', '\u043a', '\u0443', '\u0436\u0435', '\u0432\u044b', '\u0437\u0430', '\u0431\u044b', '\u043f\u043e', '\u0442\u043e\u043b\u044c\u043a\u043e', '\u0435\u0435', '\u043c\u043d\u0435', '\u0431\u044b\u043b\u043e',\n '\u0432\u043e\u0442', '\u043e\u0442', '\u043c\u0435\u043d\u044f', '\u0435\u0449\u0435', '\u043d\u0435\u0442', '\u043e', '\u0438\u0437', '\u0435\u043c\u0443', '\u0442\u0435\u043f\u0435\u0440\u044c', '\u043a\u043e\u0433\u0434\u0430', '\u0434\u0430\u0436\u0435', '\u043d\u0443', '\u0432\u0434\u0440\u0443\u0433',\n '\u043b\u0438', '\u0435\u0441\u043b\u0438', '\u0443\u0436\u0435', '\u0438\u043b\u0438', '\u043d\u0438', '\u0431\u044b\u0442\u044c', '\u0431\u044b\u043b', '\u043d\u0435\u0433\u043e', '\u0434\u043e', '\u0432\u0430\u0441', '\u043d\u0438\u0431\u0443\u0434\u044c', '\u043e\u043f\u044f\u0442\u044c', '\u0443\u0436',\n '\u0432\u0430\u043c', '\u0432\u0435\u0434\u044c', '\u0442\u0430\u043c', '\u043f\u043e\u0442\u043e\u043c', '\u0441\u0435\u0431\u044f', '\u043d\u0438\u0447\u0435\u0433\u043e', '\u0435\u0439', '\u043c\u043e\u0436\u0435\u0442', '\u043e\u043d\u0438', '\u0442\u0443\u0442', '\u0433\u0434\u0435', '\u0435\u0441\u0442\u044c',\n '\u043d\u0430\u0434\u043e', '\u043d\u0435\u0439', '\u0434\u043b\u044f', '\u043c\u044b', '\u0442\u0435\u0431\u044f', '\u0438\u0445', '\u0447\u0435\u043c', '\u0431\u044b\u043b\u0430', '\u0441\u0430\u043c', '\u0447\u0442\u043e\u0431', '\u0431\u0435\u0437', '\u0431\u0443\u0434\u0442\u043e', '\u0447\u0435\u0433\u043e',\n '\u0440\u0430\u0437', '\u0442\u043e\u0436\u0435', '\u0441\u0435\u0431\u0435', '\u043f\u043e\u0434', '\u0431\u0443\u0434\u0435\u0442', '\u0436', '\u0442\u043e\u0433\u0434\u0430', '\u043a\u0442\u043e', '\u044d\u0442\u043e\u0442', '\u0442\u043e\u0433\u043e', '\u043f\u043e\u0442\u043e\u043c\u0443', '\u044d\u0442\u043e\u0433\u043e',\n '\u043a\u0430\u043a\u043e\u0439', '\u0441\u043e\u0432\u0441\u0435\u043c', '\u043d\u0438\u043c', '\u0437\u0434\u0435\u0441\u044c', '\u044d\u0442\u043e\u043c', '\u043e\u0434\u0438\u043d', '\u043f\u043e\u0447\u0442\u0438', '\u043c\u043e\u0439', '\u0442\u0435\u043c', '\u0447\u0442\u043e\u0431\u044b', '\u043d\u0435\u0435', '\u0441\u0435\u0439\u0447\u0430\u0441',\n '\u0431\u044b\u043b\u0438', '\u043a\u0443\u0434\u0430', '\u0437\u0430\u0447\u0435\u043c', '\u0432\u0441\u0435\u0445', '\u043d\u0438\u043a\u043e\u0433\u0434\u0430', '\u043c\u043e\u0436\u043d\u043e', '\u043f\u0440\u0438', '\u043d\u0430\u043a\u043e\u043d\u0435\u0446', '\u0434\u0432\u0430', '\u043e\u0431', '\u0434\u0440\u0443\u0433\u043e\u0439',\n '\u0445\u043e\u0442\u044c', '\u043f\u043e\u0441\u043b\u0435', '\u043d\u0430\u0434', '\u0431\u043e\u043b\u044c\u0448\u0435', '\u0442\u043e\u0442', '\u0447\u0435\u0440\u0435\u0437', '\u044d\u0442\u0438', '\u043d\u0430\u0441', '\u043f\u0440\u043e', '\u0432\u0441\u0435\u0433\u043e', '\u043d\u0438\u0445', '\u043a\u0430\u043a\u0430\u044f',\n '\u043c\u043d\u043e\u0433\u043e', '\u0440\u0430\u0437\u0432\u0435', '\u0442\u0440\u0438', '\u044d\u0442\u0443', '\u043c\u043e\u044f', '\u0432\u043f\u0440\u043e\u0447\u0435\u043c', '\u0445\u043e\u0440\u043e\u0448\u043e', '\u0441\u0432\u043e\u044e', '\u044d\u0442\u043e\u0439', '\u043f\u0435\u0440\u0435\u0434', '\u0438\u043d\u043e\u0433\u0434\u0430',\n '\u043b\u0443\u0447\u0448\u0435', '\u0447\u0443\u0442\u044c', '\u0442\u043e\u043c', '\u043d\u0435\u043b\u044c\u0437\u044f', '\u0442\u0430\u043a\u043e\u0439', '\u0438\u043c', '\u0431\u043e\u043b\u0435\u0435', '\u0432\u0441\u0435\u0433\u0434\u0430', '\u043a\u043e\u043d\u0435\u0447\u043d\u043e', '\u0432\u0441\u044e', '\u043c\u0435\u0436\u0434\u0443'\n])\n\ndef bm25_tokenizer(text):\n tokenized_doc = []\n for token in text.lower().split():\n token = token.strip(string.punctuation)\n if len(token) > 0 and token not in RUSSIAN_STOP_WORDS:\n tokenized_doc.append(token)\n return tokenized_doc\n\ntokenized_corpus = []\nfor passage in tqdm(passages):\n tokenized_corpus.append(bm25_tokenizer(passage['contents']))\n\nbm25 = BM25Okapi(tokenized_corpus)\n"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'# \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0442\u0440\u044b\u0432\u043a\u0430\u0445 \u0438\u0437 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441. \n# \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Compressa Rerank\n\ndef search(query, top_k=3, num_candidates=100):\n print("\u041d\u0430\u0448 \u0432\u043e\u043f\u0440\u043e\u0441:", query)\n\n # \u041f\u043e\u0438\u0441\u043a BM25, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \n bm25_scores = bm25.get_scores(bm25_tokenizer(query))\n top_n = np.argpartition(bm25_scores, -num_candidates)[-num_candidates:]\n bm25_hits = [{\'corpus_id\': idx, \'score\': bm25_scores[idx]} for idx in top_n]\n bm25_hits = sorted(bm25_hits, key=lambda x: x[\'score\'], reverse=True)\n \n print(f"\u0422\u043e\u043f-3 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 BM25 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c")\n for hit in bm25_hits[0:top_k]:\n print("\\t{:.3f}\\t{}".format(hit[\'score\'], passages[hit[\'corpus_id\']][\'contents\'].replace("\\n", " ")))\n\n # \u041f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043c \u043e\u0442\u0440\u044b\u0432\u043a\u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\n docs = [\n Document(page_content=passages[hit[\'corpus_id\']][\'contents\'], metadata={"corpus_id": hit[\'corpus_id\']})\n for hit in bm25_hits\n ]\n \n # \u0420\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b\n reranked_results = reranker.compress_documents(query=query, documents=docs)\n sorted_results = sorted(reranked_results, key=lambda x: x.metadata["relevance_score"], reverse=True)\n\n print(f"\\n\u0422\u043e\u043f-3 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ({len(bm25_hits)} \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 BM25 \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u044b)")\n for hit in sorted_results[:top_k]:\n print("\\t{:.3f}\\t{}".format(hit.metadata[\'relevance_score\'], hit.page_content.replace("\\n", " ")))\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query = "\u0412 \u043a\u0430\u043a\u043e\u043c \u0433\u043e\u0434\u0443 \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Apple?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query = "\u0413\u0434\u0435 \u0431\u044b\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u043e\u0441\u0442\u0430\u043d\u043a\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0444\u043b\u043e\u0440\u0435\u0441\u0441\u043a\u043e\u0433\u043e \u0432 2003 \u0433\u043e\u0434\u0443?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query = "\u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0412\u043e\u0437\u0440\u043e\u0436\u0434\u0435\u043d\u0438\u0435?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query = "\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u044e\u0434\u0435\u0439 \u0436\u0438\u0432\u0435\u0442 \u0432 \u041c\u0435\u0445\u0438\u043a\u043e \u0432 2019 \u0433\u043e\u0434\u0443?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query="\u041a\u0430\u043a\u043e\u0439 \u044f\u0437\u044b\u043a \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u0434\u0440\u0435\u0432\u043d\u0438\u043c?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query="\u041a\u0430\u043a\u043e\u0439 \u043a\u043b\u0438\u043c\u0430\u0442 \u0432 \u0411\u0443\u0440\u044f\u0442\u0438\u0438?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query="\u041d\u0430 \u043a\u0430\u043a\u043e\u0439 \u0440\u0435\u043a\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0422\u043e\u043b\u044c\u044f\u0442\u0442\u0438?")\n'})})]})}function l(n={}){const{wrapper:e}={...(0,a.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(p,{...n})}):p(n)}},8453:(n,e,s)=>{s.d(e,{R:()=>t,x:()=>o});var r=s(6540);const a={},i=r.createContext(a);function t(n){const e=r.useContext(i);return r.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function o(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(a):n.components||a:t(n.components),r.createElement(i.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/8c75ad99.b5234350.js b/assets/js/8c75ad99.b5234350.js new file mode 100644 index 0000000..c13fd64 --- /dev/null +++ b/assets/js/8c75ad99.b5234350.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[185],{8251:(n,e,s)=>{s.r(e),s.d(e,{assets:()=>c,contentTitle:()=>t,default:()=>l,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var r=s(4848),a=s(8453);const i={sidebar_position:3},t="\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank",o={id:"guides/langchain_basic_rerank/index",title:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank",description:"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f, \u0441\u0442\u0440\u0435\u043c\u044f\u0441\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445\u044d\u0442\u0430\u043f\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_basic_rerank/index.md",sourceDirName:"guides/langchain_basic_rerank",slug:"/guides/langchain_basic_rerank/",permalink:"/guides/langchain_basic_rerank/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_basic_rerank/index.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"guidesSidebar",previous:{title:"\u041f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 embeddings \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a",permalink:"/guides/langchain_basic_semantic_search/"},next:{title:"\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG",permalink:"/guides/langchain_advanced_chunking/"}},c={},d=[{value:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Compressa Rerank",id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c-compressa-rerank",level:2},{value:"\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438 - End2end \u0434\u0435\u043c\u043e",id:"\u043f\u043e\u0438\u0441\u043a-\u043f\u043e-\u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438---end2end-\u0434\u0435\u043c\u043e",level:2}];function p(n){const e={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,a.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{id:"\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435-\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438-\u043f\u043e\u0438\u0441\u043a\u0430-\u0441-rerank",children:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank"}),"\n",(0,r.jsx)(e.p,{children:"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f, \u0441\u0442\u0440\u0435\u043c\u044f\u0441\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445\u044d\u0442\u0430\u043f\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f."}),"\n",(0,r.jsx)(e.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 Rerank \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430."}),"\n",(0,r.jsx)(e.p,{children:"\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:"}),"\n",(0,r.jsxs)(e.ol,{children:["\n",(0,r.jsx)(e.li,{children:"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u0435\u0440\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0442\u043e\u043f-100 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u0438\u0431\u043e \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439, \u043b\u0438\u0431\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a."}),"\n",(0,r.jsx)(e.li,{children:"\u0417\u0430\u0442\u0435\u043c \u044d\u0442\u0438 100 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 Compressa Rerank."}),"\n",(0,r.jsx)(e.li,{children:"\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438."}),"\n",(0,r.jsx)(e.li,{children:"\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043e\u0446\u0435\u043d\u043e\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b."}),"\n"]}),"\n",(0,r.jsx)(e.p,{children:"\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b."}),"\n",(0,r.jsx)(e.p,{children:"\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Compressa Rerank \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0438\u0441\u043a\u0430, \u0438 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0435\u0451 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445."}),"\n",(0,r.jsxs)(e.p,{children:["\u0412\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 .ipynb \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 ",(0,r.jsx)(e.a,{href:"https://github.com/compressa-ai/langchain_compressa/blob/main/docs/Basic_Rerank.ipynb",children:"\u0437\u0434\u0435\u0441\u044c"}),"."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"# \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\n!pip install langchain-compressa\n!pip install langchain\n\n\n# \u0418\u043c\u043f\u043e\u0440\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\nimport os\nimport requests\nimport numpy as np\nfrom time import time\nfrom typing import List\nfrom pprint import pprint\nfrom langchain_compressa import CompressaRerank\nfrom langchain.schema import Document\n"})}),"\n",(0,r.jsxs)(e.p,{children:["\u0414\u043b\u044f \u044f\u0447\u0435\u0439\u043a\u0438 \u043d\u0438\u0436\u0435 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f API \u043a\u043b\u044e\u0447 Compressa. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 ",(0,r.jsx)(e.a,{href:"https://compressa.ai/form",children:"\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"}),"."]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'os.environ["COMPRESSA_API_KEY"] = "\u0432\u0430\u0448_\u043a\u043b\u044e\u0447"\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'# \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Compressa Rerank\nreranker = CompressaRerank(api_key=COMPRESSA_API_KEY, base_url="https://compressa-api.mil-team.ru/v1", top_n=3)\n\n# \u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 "\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432"\nquery = "\u041a\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u044b \'\u0427\u0435\u0440\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\'?"\ndocs = [\n "\u041a\u0430\u0437\u0438\u043c\u0438\u0440 \u041c\u0430\u043b\u0435\u0432\u0438\u0447 \u0441\u043e\u0437\u0434\u0430\u043b \'\u0427\u0435\u0440\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\' \u0432 1915 \u0433\u043e\u0434\u0443, \u0447\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c \u0432 \u043c\u0438\u0440\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0430.",\n "\u0418\u043b\u044c\u044f \u0420\u0435\u043f\u0438\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u0430\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \'\u0411\u0443\u0440\u043b\u0430\u043a\u0438 \u043d\u0430 \u0412\u043e\u043b\u0433\u0435\' \u0438 \'\u0418\u0432\u0430\u043d \u0413\u0440\u043e\u0437\u043d\u044b\u0439 \u0438 \u0441\u044b\u043d \u0435\u0433\u043e \u0418\u0432\u0430\u043d\'.",\n "\'\u0427\u0435\u0440\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\' \u041c\u0430\u043b\u0435\u0432\u0438\u0447\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0432\u043b\u0438\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0430 XX \u0432\u0435\u043a\u0430.",\n "\u0412\u0430\u0441\u0438\u043b\u0438\u0439 \u041a\u0430\u043d\u0434\u0438\u043d\u0441\u043a\u0438\u0439, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0438\u043a \u041c\u0430\u043b\u0435\u0432\u0438\u0447\u0430, \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 \u0436\u0430\u043d\u0440\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0430.",\n "\u041c\u0430\u043b\u0435\u0432\u0438\u0447 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0439 \'\u0427\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430\' \u043c\u0435\u0436\u0434\u0443 1915 \u0438 1930 \u0433\u043e\u0434\u0430\u043c\u0438.",\n "\u041a\u0430\u0440\u0442\u0438\u043d\u0430 \'\u0427\u0435\u0440\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\' \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0431\u044b\u043b\u0430 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0430 \u0444\u0443\u0442\u0443\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0432\u044b\u0441\u0442\u0430\u0432\u043a\u0435 \'0,10\' \u0432 \u041f\u0435\u0442\u0440\u043e\u0433\u0440\u0430\u0434\u0435.",\n "\u041f\u043e\u043c\u0438\u043c\u043e \'\u0427\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430\', \u041c\u0430\u043b\u0435\u0432\u0438\u0447 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043c\u0438 \u0432 \u0441\u0442\u0438\u043b\u0435 \u0441\u0443\u043f\u0440\u0435\u043c\u0430\u0442\u0438\u0437\u043c\u0430.",\n "\u041c\u0430\u0440\u043a \u0428\u0430\u0433\u0430\u043b, \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0445\u0443\u0434\u043e\u0436\u043d\u0438\u043a, \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 \u0441\u0442\u0438\u043b\u0435 \u043c\u043e\u0434\u0435\u0440\u043d\u0438\u0437\u043c\u0430 \u0438 \u0441\u044e\u0440\u0440\u0435\u0430\u043b\u0438\u0437\u043c\u0430.",\n "\u0412 \u0422\u0440\u0435\u0442\u044c\u044f\u043a\u043e\u0432\u0441\u043a\u043e\u0439 \u0433\u0430\u043b\u0435\u0440\u0435\u0435 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u0438\u0437 \u0432\u0435\u0440\u0441\u0438\u0439 \'\u0427\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430\' \u041c\u0430\u043b\u0435\u0432\u0438\u0447\u0430.",\n "\u041a\u0430\u0440\u0442\u0438\u043d\u0430 \'\u0427\u0435\u0440\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\' \u0432\u044b\u0437\u0432\u0430\u043b\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0439 \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0439 \u0432 \u043c\u0438\u0440\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0430."\n]\n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u0438\u043f\u0430 Langchain Document \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432\ndoc_objects = [\n Document(page_content=doc, metadata={"index": idx})\n for idx, doc in enumerate(docs)\n]\n'})}),"\n",(0,r.jsx)(e.h2,{id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c-compressa-rerank",children:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Compressa Rerank"}),"\n",(0,r.jsxs)(e.p,{children:["\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u044f\u0447\u0435\u0439\u043a\u0435 \u043c\u044b \u0432\u044b\u0437\u043e\u0432\u0435\u043c Compressa Rerank \u0434\u043b\u044f \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ",(0,r.jsx)(e.code,{children:"docs"})," \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 ",(0,r.jsx)(e.code,{children:"query"})]}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'results = reranker.compress_documents(query=query, documents=doc_objects)\n\ntop_n = 3 # \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 top_n, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432.\nsorted_results = sorted(results, key=lambda x: x.metadata[\'relevance_score\'], reverse=True)\nselected_results = sorted_results[:top_n]\n\nprint(query)\n\nfor idx, r in enumerate(selected_results):\n doc_index = r.metadata["index"]\n doc_text = r.page_content if doc_index < len(docs) else "\u0422\u0435\u043a\u0441\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d"\n print(f"\u0420\u0430\u043d\u0433 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430: {idx + 1}, \u0418\u043d\u0434\u0435\u043a\u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430: {doc_index}")\n print(f"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442: {doc_text}")\n print(f"\u041e\u0446\u0435\u043d\u043a\u0430 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438: {r.metadata[\'relevance_score\']:.2f}")\n print("\\n")\n'})}),"\n",(0,r.jsx)(e.h2,{id:"\u043f\u043e\u0438\u0441\u043a-\u043f\u043e-\u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438---end2end-\u0434\u0435\u043c\u043e",children:"\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438 - End2end \u0434\u0435\u043c\u043e"}),"\n",(0,r.jsx)(e.p,{children:'\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Rerank \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0441\u0442\u0430\u0442\u044c\u044f\u043c \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 Wikipedia. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043c\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0438 mrtydi-v1.1-russian \u0434\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 500\u043a \u043e\u0442\u0440\u044b\u0432\u043a\u043e\u0432 \u0438\u0437 \u0441\u0442\u0430\u0442\u0435\u0439, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432 "\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435" \u043e\u0442\u0432\u0435\u0442\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0438\u0436\u0435, \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.'}),"\n",(0,r.jsx)(e.p,{children:"\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a BM25 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u043f-100 \u043e\u0442\u0440\u044b\u0432\u043a\u043e\u0432, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0443, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u044d\u0442\u0438 100 \u043e\u0442\u0440\u044b\u0432\u043a\u043e\u0432 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 Compressa Rerank, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b."}),"\n",(0,r.jsx)(e.p,{children:"\u041c\u044b \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u0442\u043e\u043f-3 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e BM25 (\u043a\u0430\u043a \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Elasticsearch) \u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0442 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 Compressa Rerank."}),"\n",(0,r.jsx)(e.p,{children:"\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438."}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"!pip install -U rank_bm25\n!pip install gdown\n"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"import gdown\nimport json\nimport gzip\nimport os\nfrom rank_bm25 import BM25Okapi\nfrom sklearn.feature_extraction import _stop_words\nimport string\nfrom tqdm.autonotebook import tqdm\n"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"#\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 c google \u0434\u0438\u0441\u043a\u0430 \u0421ompressa, \u043e\u043d \u0443\u0436\u0435 \u043d\u0430\u0440\u0435\u0437\u0430\u043d \u043d\u0430 \u043e\u0442\u0440\u044b\u0432\u043a\u0438\nfile_id = '1u-3EQ4yoYys1wSSK_EifIPPRyh_6oaR6'\nurl = f'https://drive.google.com/uc?id={file_id}'\ngdown.download(url, 'mrtydi-russian-subset.jsonl', quiet=False)\n"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"with open('mrtydi-russian-subset.jsonl', 'r', encoding='utf-8') as f:\n passages = [json.loads(line) for line in tqdm(f)]\n\nprint(f\"\u0412\u0441\u0435\u0433\u043e \u043e\u0442\u0440\u044b\u0432\u043a\u043e\u0432 \u0432 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435: {len(passages)}\")\nprint(f\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0442\u0440\u044b\u0432\u043a\u0430:\")\nprint(f\"ID: {passages[0]['id']}\")\nprint(f\"\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435: {passages[0]['contents'][:300]}...\") # \u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 200 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f\n"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"# \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c (\u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c). \n# \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c BM25, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 rank_bm25.\n# \u041c\u044b \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043d\u0430\u0448 \u0442\u0435\u043a\u0441\u0442 \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u043e\u043f-\u0441\u043b\u043e\u0432\u0430 \u043f\u0440\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438\n\n# \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0441\u0442\u043e\u043f-\u0441\u043b\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0438\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439, \u043e\u043d \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430.\nRUSSIAN_STOP_WORDS = set([\n '\u0438', '\u0432', '\u0432\u043e', '\u043d\u0435', '\u0447\u0442\u043e', '\u043e\u043d', '\u043d\u0430', '\u044f', '\u0441', '\u0441\u043e', '\u043a\u0430\u043a', '\u0430', '\u0442\u043e', '\u0432\u0441\u0435', '\u043e\u043d\u0430', '\u0442\u0430\u043a',\n '\u0435\u0433\u043e', '\u043d\u043e', '\u0434\u0430', '\u0442\u044b', '\u043a', '\u0443', '\u0436\u0435', '\u0432\u044b', '\u0437\u0430', '\u0431\u044b', '\u043f\u043e', '\u0442\u043e\u043b\u044c\u043a\u043e', '\u0435\u0435', '\u043c\u043d\u0435', '\u0431\u044b\u043b\u043e',\n '\u0432\u043e\u0442', '\u043e\u0442', '\u043c\u0435\u043d\u044f', '\u0435\u0449\u0435', '\u043d\u0435\u0442', '\u043e', '\u0438\u0437', '\u0435\u043c\u0443', '\u0442\u0435\u043f\u0435\u0440\u044c', '\u043a\u043e\u0433\u0434\u0430', '\u0434\u0430\u0436\u0435', '\u043d\u0443', '\u0432\u0434\u0440\u0443\u0433',\n '\u043b\u0438', '\u0435\u0441\u043b\u0438', '\u0443\u0436\u0435', '\u0438\u043b\u0438', '\u043d\u0438', '\u0431\u044b\u0442\u044c', '\u0431\u044b\u043b', '\u043d\u0435\u0433\u043e', '\u0434\u043e', '\u0432\u0430\u0441', '\u043d\u0438\u0431\u0443\u0434\u044c', '\u043e\u043f\u044f\u0442\u044c', '\u0443\u0436',\n '\u0432\u0430\u043c', '\u0432\u0435\u0434\u044c', '\u0442\u0430\u043c', '\u043f\u043e\u0442\u043e\u043c', '\u0441\u0435\u0431\u044f', '\u043d\u0438\u0447\u0435\u0433\u043e', '\u0435\u0439', '\u043c\u043e\u0436\u0435\u0442', '\u043e\u043d\u0438', '\u0442\u0443\u0442', '\u0433\u0434\u0435', '\u0435\u0441\u0442\u044c',\n '\u043d\u0430\u0434\u043e', '\u043d\u0435\u0439', '\u0434\u043b\u044f', '\u043c\u044b', '\u0442\u0435\u0431\u044f', '\u0438\u0445', '\u0447\u0435\u043c', '\u0431\u044b\u043b\u0430', '\u0441\u0430\u043c', '\u0447\u0442\u043e\u0431', '\u0431\u0435\u0437', '\u0431\u0443\u0434\u0442\u043e', '\u0447\u0435\u0433\u043e',\n '\u0440\u0430\u0437', '\u0442\u043e\u0436\u0435', '\u0441\u0435\u0431\u0435', '\u043f\u043e\u0434', '\u0431\u0443\u0434\u0435\u0442', '\u0436', '\u0442\u043e\u0433\u0434\u0430', '\u043a\u0442\u043e', '\u044d\u0442\u043e\u0442', '\u0442\u043e\u0433\u043e', '\u043f\u043e\u0442\u043e\u043c\u0443', '\u044d\u0442\u043e\u0433\u043e',\n '\u043a\u0430\u043a\u043e\u0439', '\u0441\u043e\u0432\u0441\u0435\u043c', '\u043d\u0438\u043c', '\u0437\u0434\u0435\u0441\u044c', '\u044d\u0442\u043e\u043c', '\u043e\u0434\u0438\u043d', '\u043f\u043e\u0447\u0442\u0438', '\u043c\u043e\u0439', '\u0442\u0435\u043c', '\u0447\u0442\u043e\u0431\u044b', '\u043d\u0435\u0435', '\u0441\u0435\u0439\u0447\u0430\u0441',\n '\u0431\u044b\u043b\u0438', '\u043a\u0443\u0434\u0430', '\u0437\u0430\u0447\u0435\u043c', '\u0432\u0441\u0435\u0445', '\u043d\u0438\u043a\u043e\u0433\u0434\u0430', '\u043c\u043e\u0436\u043d\u043e', '\u043f\u0440\u0438', '\u043d\u0430\u043a\u043e\u043d\u0435\u0446', '\u0434\u0432\u0430', '\u043e\u0431', '\u0434\u0440\u0443\u0433\u043e\u0439',\n '\u0445\u043e\u0442\u044c', '\u043f\u043e\u0441\u043b\u0435', '\u043d\u0430\u0434', '\u0431\u043e\u043b\u044c\u0448\u0435', '\u0442\u043e\u0442', '\u0447\u0435\u0440\u0435\u0437', '\u044d\u0442\u0438', '\u043d\u0430\u0441', '\u043f\u0440\u043e', '\u0432\u0441\u0435\u0433\u043e', '\u043d\u0438\u0445', '\u043a\u0430\u043a\u0430\u044f',\n '\u043c\u043d\u043e\u0433\u043e', '\u0440\u0430\u0437\u0432\u0435', '\u0442\u0440\u0438', '\u044d\u0442\u0443', '\u043c\u043e\u044f', '\u0432\u043f\u0440\u043e\u0447\u0435\u043c', '\u0445\u043e\u0440\u043e\u0448\u043e', '\u0441\u0432\u043e\u044e', '\u044d\u0442\u043e\u0439', '\u043f\u0435\u0440\u0435\u0434', '\u0438\u043d\u043e\u0433\u0434\u0430',\n '\u043b\u0443\u0447\u0448\u0435', '\u0447\u0443\u0442\u044c', '\u0442\u043e\u043c', '\u043d\u0435\u043b\u044c\u0437\u044f', '\u0442\u0430\u043a\u043e\u0439', '\u0438\u043c', '\u0431\u043e\u043b\u0435\u0435', '\u0432\u0441\u0435\u0433\u0434\u0430', '\u043a\u043e\u043d\u0435\u0447\u043d\u043e', '\u0432\u0441\u044e', '\u043c\u0435\u0436\u0434\u0443'\n])\n\ndef bm25_tokenizer(text):\n tokenized_doc = []\n for token in text.lower().split():\n token = token.strip(string.punctuation)\n if len(token) > 0 and token not in RUSSIAN_STOP_WORDS:\n tokenized_doc.append(token)\n return tokenized_doc\n\ntokenized_corpus = []\nfor passage in tqdm(passages):\n tokenized_corpus.append(bm25_tokenizer(passage['contents']))\n\nbm25 = BM25Okapi(tokenized_corpus)\n"})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'# \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0442\u0440\u044b\u0432\u043a\u0430\u0445 \u0438\u0437 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441. \n# \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Compressa Rerank\n\ndef search(query, top_k=3, num_candidates=100):\n print("\u041d\u0430\u0448 \u0432\u043e\u043f\u0440\u043e\u0441:", query)\n\n # \u041f\u043e\u0438\u0441\u043a BM25, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \n bm25_scores = bm25.get_scores(bm25_tokenizer(query))\n top_n = np.argpartition(bm25_scores, -num_candidates)[-num_candidates:]\n bm25_hits = [{\'corpus_id\': idx, \'score\': bm25_scores[idx]} for idx in top_n]\n bm25_hits = sorted(bm25_hits, key=lambda x: x[\'score\'], reverse=True)\n \n print(f"\u0422\u043e\u043f-3 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 BM25 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c")\n for hit in bm25_hits[0:top_k]:\n print("\\t{:.3f}\\t{}".format(hit[\'score\'], passages[hit[\'corpus_id\']][\'contents\'].replace("\\n", " ")))\n\n # \u041f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043c \u043e\u0442\u0440\u044b\u0432\u043a\u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\n docs = [\n Document(page_content=passages[hit[\'corpus_id\']][\'contents\'], metadata={"corpus_id": hit[\'corpus_id\']})\n for hit in bm25_hits\n ]\n \n # \u0420\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b\n reranked_results = reranker.compress_documents(query=query, documents=docs)\n sorted_results = sorted(reranked_results, key=lambda x: x.metadata["relevance_score"], reverse=True)\n\n print(f"\\n\u0422\u043e\u043f-3 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ({len(bm25_hits)} \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 BM25 \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u044b)")\n for hit in sorted_results[:top_k]:\n print("\\t{:.3f}\\t{}".format(hit.metadata[\'relevance_score\'], hit.page_content.replace("\\n", " ")))\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query = "\u0412 \u043a\u0430\u043a\u043e\u043c \u0433\u043e\u0434\u0443 \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Apple?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query = "\u0413\u0434\u0435 \u0431\u044b\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u043e\u0441\u0442\u0430\u043d\u043a\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0444\u043b\u043e\u0440\u0435\u0441\u0441\u043a\u043e\u0433\u043e \u0432 2003 \u0433\u043e\u0434\u0443?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query = "\u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0412\u043e\u0437\u0440\u043e\u0436\u0434\u0435\u043d\u0438\u0435?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query = "\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u044e\u0434\u0435\u0439 \u0436\u0438\u0432\u0435\u0442 \u0432 \u041c\u0435\u0445\u0438\u043a\u043e \u0432 2019 \u0433\u043e\u0434\u0443?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query="\u041a\u0430\u043a\u043e\u0439 \u044f\u0437\u044b\u043a \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u0434\u0440\u0435\u0432\u043d\u0438\u043c?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query="\u041a\u0430\u043a\u043e\u0439 \u043a\u043b\u0438\u043c\u0430\u0442 \u0432 \u0411\u0443\u0440\u044f\u0442\u0438\u0438?")\n'})}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:'search(query="\u041d\u0430 \u043a\u0430\u043a\u043e\u0439 \u0440\u0435\u043a\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0422\u043e\u043b\u044c\u044f\u0442\u0442\u0438?")\n'})})]})}function l(n={}){const{wrapper:e}={...(0,a.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(p,{...n})}):p(n)}},8453:(n,e,s)=>{s.d(e,{R:()=>t,x:()=>o});var r=s(6540);const a={},i=r.createContext(a);function t(n){const e=r.useContext(i);return r.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function o(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(a):n.components||a:t(n.components),r.createElement(i.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/9355aec3.42b55909.js b/assets/js/9355aec3.42b55909.js deleted file mode 100644 index ed0e051..0000000 --- a/assets/js/9355aec3.42b55909.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[881],{6193:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var r=n(4848),s=n(8453),o=n(5587);const i={title:"REST API",sidebar_position:2,hide_table_of_contents:!0},c=void 0,a={id:"docs/api-reference/rest",title:"REST API",description:"",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/api-reference/rest.mdx",sourceDirName:"docs/api-reference",slug:"/docs/api-reference/rest",permalink:"/docs/api-reference/rest",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/api-reference/rest.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"REST API",sidebar_position:2,hide_table_of_contents:!0},sidebar:"docsSidebar",previous:{title:"Python SDK (Langchain)",permalink:"/docs/api-reference/langchain"},next:{title:"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",permalink:"/docs/basic_modules/"}},u={},d=[];function p(e){return(0,r.jsx)(o.A,{id:"api"})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p()}},5587:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540),s=n(9292),o=n(6588);const i=function(e){const t=(0,o.kh)("docusaurus-plugin-redoc");return e?t?.[e]:Object.values(t??{})?.[0]};var c=n(4848);const a=e=>{let{id:t}=e;const n=i(t),o=(0,r.useMemo)((()=>({theme:{breakpoints:{medium:"130rem",large:"130rem"}}})),[]);return(0,c.jsx)(s.A,{...n,optionsOverrides:o})}},6903:()=>{},5915:()=>{},7889:()=>{},3880:()=>{},4834:()=>{},922:()=>{},1912:()=>{},8453:(e,t,n)=>{"use strict";n.d(t,{R:()=>i,x:()=>c});var r=n(6540);const s={},o=r.createContext(s);function i(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/96d51b76.bb85fea3.js b/assets/js/96d51b76.bb85fea3.js deleted file mode 100644 index 07df752..0000000 --- a/assets/js/96d51b76.bb85fea3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[3733],{5354:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>m,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var s=n(4848),i=n(8453);const o={sidebar_position:4},r="InsightStream RAG",c={id:"docs/insightstream_module/index",title:"InsightStream RAG",description:"InsightStream RAG \u2014 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0443\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa. \u042d\u0442\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 RAG-\u0434\u0432\u0438\u0436\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u201c\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u201d.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/index.md",sourceDirName:"docs/insightstream_module",slug:"/docs/insightstream_module/",permalink:"/docs/insightstream_module/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/index.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"docsSidebar",previous:{title:"Fine-tuning",permalink:"/docs/basic_modules/Fine-tuning"},next:{title:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)",permalink:"/docs/insightstream_module/file_upload"}},a={},d=[];function u(e){const t={h1:"h1",p:"p",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"insightstream-rag",children:"InsightStream RAG"}),"\n",(0,s.jsx)(t.p,{children:"InsightStream RAG \u2014 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0443\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa. \u042d\u0442\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 RAG-\u0434\u0432\u0438\u0436\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u201c\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u201d."}),"\n",(0,s.jsx)(t.p,{children:"\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c InsightSream \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 Assistants API \u043e\u0442 OpenAI \u2014 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u0434\u0430\u0435\u043c \u0435\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b."})]})}function m(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>c});var s=n(6540);const i={},o=s.createContext(i);function r(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/96d51b76.ccaab26c.js b/assets/js/96d51b76.ccaab26c.js new file mode 100644 index 0000000..e44998e --- /dev/null +++ b/assets/js/96d51b76.ccaab26c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[733],{5354:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>m,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var s=n(4848),i=n(8453);const o={sidebar_position:4},r="InsightStream RAG",c={id:"docs/insightstream_module/index",title:"InsightStream RAG",description:"InsightStream RAG \u2014 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0443\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa. \u042d\u0442\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 RAG-\u0434\u0432\u0438\u0436\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u201c\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u201d.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/index.md",sourceDirName:"docs/insightstream_module",slug:"/docs/insightstream_module/",permalink:"/docs/insightstream_module/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/index.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"docsSidebar",previous:{title:"Fine-tuning",permalink:"/docs/basic_modules/Fine-tuning"},next:{title:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 (\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)",permalink:"/docs/insightstream_module/file_upload"}},a={},d=[];function u(e){const t={h1:"h1",p:"p",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"insightstream-rag",children:"InsightStream RAG"}),"\n",(0,s.jsx)(t.p,{children:"InsightStream RAG \u2014 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0443\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa. \u042d\u0442\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 RAG-\u0434\u0432\u0438\u0436\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u201c\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u201d."}),"\n",(0,s.jsx)(t.p,{children:"\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c InsightSream \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 Assistants API \u043e\u0442 OpenAI \u2014 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u0434\u0430\u0435\u043c \u0435\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u044b."})]})}function m(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>c});var s=n(6540);const i={},o=s.createContext(i);function r(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9767abd6.015b8651.js b/assets/js/9767abd6.015b8651.js deleted file mode 100644 index e2a4e06..0000000 --- a/assets/js/9767abd6.015b8651.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[1301],{6067:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>m,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var a=t(4848),s=t(8453),r=t(1470),o=t(9365);const l={title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI"},c="\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 API Compressa",i={id:"docs/basic_modules/LLM/OpenAI",title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI",description:"\u0412 Compressa \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 API-\u0441\u043b\u043e\u0439, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 Chat Completion API \u043e\u0442 OpenAI. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043e\u0442 OpenAI (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 Langchain) \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u0434 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Compressa.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/LLM/OpenAI.md",sourceDirName:"docs/basic_modules/LLM",slug:"/docs/basic_modules/LLM/OpenAI",permalink:"/docs/basic_modules/LLM/OpenAI",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/LLM/OpenAI.md",tags:[],version:"current",frontMatter:{title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI"},sidebar:"docsSidebar",previous:{title:"LLM",permalink:"/docs/basic_modules/LLM/"},next:{title:"Embeddings",permalink:"/docs/basic_modules/Embeddings"}},u={},p=[{value:"\u0412\u043e\u0442 \u043a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 OpenAI \u043d\u0430 Compressa",id:"\u0432\u043e\u0442-\u043a\u0430\u043a-\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c-\u043c\u043e\u0434\u0435\u043b\u0438-openai-\u043d\u0430-compressa",level:2},{value:"\u0422\u0430\u043a\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u044e \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 OpenAI",id:"\u0442\u0430\u043a\u0436\u0435-\u0432\u044b-\u043c\u043e\u0436\u0435\u0442\u0435-\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c-\u043e\u043f\u0446\u0438\u044e-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430-\u0442\u043e\u043a\u0435\u043d\u043e\u0432-\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e-\u0432-\u043a\u043b\u0438\u0435\u043d\u0442\u0435-openai",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435-api-compressa",children:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 API Compressa"}),"\n",(0,a.jsx)(n.p,{children:"\u0412 Compressa \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 API-\u0441\u043b\u043e\u0439, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 Chat Completion API \u043e\u0442 OpenAI. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043e\u0442 OpenAI (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 Langchain) \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u0434 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Compressa."}),"\n",(0,a.jsxs)(n.p,{children:["\u041f\u043e\u043b\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 REST API, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0433\u043e \u0441 OpenAI, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 ",(0,a.jsx)(n.a,{href:"/docs/rest.mdx#tag/chat/operation/create_chat_completion_v1_chat_completions_post",children:"\u0437\u0434\u0435\u0441\u044c"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"\u0432\u043e\u0442-\u043a\u0430\u043a-\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c-\u043c\u043e\u0434\u0435\u043b\u0438-openai-\u043d\u0430-compressa",children:"\u0412\u043e\u0442 \u043a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 OpenAI \u043d\u0430 Compressa"}),"\n",(0,a.jsxs)(r.A,{children:[(0,a.jsx)(o.A,{value:"python",label:"Python (\u043a\u043b\u0438\u0435\u043d\u0442 OpenAI)",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'from openai import OpenAI\n\nclient = OpenAI(\n base_url="https://compressa-api.mil-team.ru/v1", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa" # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n)\n\nchat_completion = client.chat.completions.create(\n model="Compressa-LLM",\n messages=[\n {"role": "system", "content": "\u0422\u044b \u0443\u043c\u0435\u0435\u0448\u044c \u0441\u043e\u0447\u0438\u043d\u044f\u0442\u044c \u0441\u043c\u0435\u0448\u043d\u044b\u0435 \u0430\u043d\u043a\u0435\u0434\u043e\u0442\u044b."},\n {"role": "user", "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0438 \u0441\u043c\u0435\u0448\u043d\u043e\u0439 \u0430\u043d\u0435\u043a\u0434\u043e\u0442 \u043f\u0440\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430."},\n ],\n stream=False,\n)\nprint(chat_completion.choices[0].message.content)\n'})})}),(0,a.jsx)(o.A,{value:"python-langchain",label:"Python (OpenAI Langchain)",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'# pip install langchain-core - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n# pip install langchain - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n# pip install openai - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nfrom langchain_openai import ChatOpenAI\n\nllm = ChatOpenAI(\n base_url="https://compressa-api.mil-team.ru/v1", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n model="Compressa-LLM"\n)\n\nmessages = [\n (\n "system",\n "\u0422\u044b \u0443\u043c\u0435\u0435\u0448\u044c \u0441\u043e\u0447\u0438\u043d\u044f\u0442\u044c \u0441\u043c\u0435\u0448\u043d\u044b\u0435 \u0430\u043d\u043a\u0435\u0434\u043e\u0442\u044b.",\n ),\n ("human", "\u041d\u0430\u043f\u0438\u0448\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0438 \u0441\u043c\u0435\u0448\u043d\u043e\u0439 \u0430\u043d\u0435\u043a\u0434\u043e\u0442 \u043f\u0440\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430."),\n]\n\nai_msg = llm.invoke(messages)\nprint(f"\u041e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438: {ai_msg.content}")\n'})})})]}),"\n",(0,a.jsx)(n.h2,{id:"\u0442\u0430\u043a\u0436\u0435-\u0432\u044b-\u043c\u043e\u0436\u0435\u0442\u0435-\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c-\u043e\u043f\u0446\u0438\u044e-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430-\u0442\u043e\u043a\u0435\u043d\u043e\u0432-\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e-\u0432-\u043a\u043b\u0438\u0435\u043d\u0442\u0435-openai",children:"\u0422\u0430\u043a\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u044e \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 OpenAI"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'#pip install openai - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nfrom openai import OpenAI\n\nclient = OpenAI(\n base_url="https://compressa-api.mil-team.ru/v1", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa" #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n)\n\ncompletion = client.chat.completions.create(\n model="Compressa-LLM",\n messages=[\n {"role": "system", "content": "\u0422\u044b \u0443\u043c\u0435\u0435\u0448\u044c \u0441\u043e\u0447\u0438\u043d\u044f\u0442\u044c \u0441\u043c\u0435\u0448\u043d\u044b\u0435 \u0430\u043d\u043a\u0435\u0434\u043e\u0442\u044b."},\n {"role": "user", "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0438 \u0441\u043c\u0435\u0448\u043d\u043e\u0439 \u0430\u043d\u0435\u043a\u0434\u043e\u0442 \u043f\u0440\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430."}\n ],\n stream=True\n)\n\nfor chunk in completion:\n print(chunk.choices[0].delta)\n\n#ChoiceDelta(content=\'\u0411\', function_call=None, refusal=None, role=\'assistant\', tool_calls=None)\n#ChoiceDelta(content=\'\u044b\', function_call=None, refusal=None, role=\'assistant\', tool_calls=None)\n#ChoiceDelta(content=\'\u043b\', function_call=None, refusal=None, role=\'assistant\', tool_calls=None)\n#ChoiceDelta(content=\' \u0443\', function_call=None, refusal=None, role=\'assistant\', tool_calls=None)\n#...\n'})})]})}function m(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var a=t(4164);const s={tabItem:"tabItem_Ymn6"};var r=t(4848);function o(e){let{children:n,hidden:t,className:o}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.A)(s.tabItem,o),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>x});var a=t(6540),s=t(4164),r=t(3104),o=t(6347),l=t(205),c=t(7485),i=t(1682),u=t(9466);function p(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function d(e){const{values:n,children:t}=e;return(0,a.useMemo)((()=>{const e=n??function(e){return p(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:s}}=e;return{value:n,label:t,attributes:a,default:s}}))}(t);return function(e){const n=(0,i.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function m(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function h(e){let{queryString:n=!1,groupId:t}=e;const s=(0,o.W6)(),r=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,c.aZ)(r),(0,a.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(s.location.search);n.set(r,e),s.replace({...s.location,search:n.toString()})}),[r,s])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,r=d(e),[o,c]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!m({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:r}))),[i,p]=h({queryString:t,groupId:s}),[f,b]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,r]=(0,u.Dv)(t);return[s,(0,a.useCallback)((e=>{t&&r.set(e)}),[t,r])]}({groupId:s}),v=(()=>{const e=i??f;return m({value:e,tabValues:r})?e:null})();(0,l.A)((()=>{v&&c(v)}),[v]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);c(e),p(e),b(e)}),[p,b,r]),tabValues:r}}var b=t(2303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(4848);function I(e){let{className:n,block:t,selectedValue:a,selectValue:o,tabValues:l}=e;const c=[],{blockElementScrollPositionUntilNextRender:i}=(0,r.a_)(),u=e=>{const n=e.currentTarget,t=c.indexOf(n),s=l[t].value;s!==a&&(i(n),o(s))},p=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;n=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;n=c[t]??c[c.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:l.map((e=>{let{value:n,label:t,attributes:r}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:e=>c.push(e),onKeyDown:p,onClick:u,...r,className:(0,s.A)("tabs__item",v.tabItem,r?.className,{"tabs__item--active":a===n}),children:t??n},n)}))})}function _(e){let{lazy:n,children:t,selectedValue:s}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===s));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function A(e){const n=f(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",v.tabList),children:[(0,g.jsx)(I,{...n,...e}),(0,g.jsx)(_,{...n,...e})]})}function x(e){const n=(0,b.A)();return(0,g.jsx)(A,{...e,children:p(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>l});var a=t(6540);const s={},r=a.createContext(s);function o(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9767abd6.59108236.js b/assets/js/9767abd6.59108236.js new file mode 100644 index 0000000..4cc905e --- /dev/null +++ b/assets/js/9767abd6.59108236.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[301],{6067:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>m,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var a=t(4848),s=t(8453),r=t(1470),o=t(9365);const l={title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI"},c="\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 API Compressa",i={id:"docs/basic_modules/LLM/OpenAI",title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI",description:"\u0412 Compressa \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 API-\u0441\u043b\u043e\u0439, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 Chat Completion API \u043e\u0442 OpenAI. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043e\u0442 OpenAI (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 Langchain) \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u0434 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Compressa.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/LLM/OpenAI.md",sourceDirName:"docs/basic_modules/LLM",slug:"/docs/basic_modules/LLM/OpenAI",permalink:"/docs/basic_modules/LLM/OpenAI",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/LLM/OpenAI.md",tags:[],version:"current",frontMatter:{title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI"},sidebar:"docsSidebar",previous:{title:"LLM",permalink:"/docs/basic_modules/LLM/"},next:{title:"Embeddings",permalink:"/docs/basic_modules/Embeddings"}},u={},p=[{value:"\u0412\u043e\u0442 \u043a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 OpenAI \u043d\u0430 Compressa",id:"\u0432\u043e\u0442-\u043a\u0430\u043a-\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c-\u043c\u043e\u0434\u0435\u043b\u0438-openai-\u043d\u0430-compressa",level:2},{value:"\u0422\u0430\u043a\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u044e \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 OpenAI",id:"\u0442\u0430\u043a\u0436\u0435-\u0432\u044b-\u043c\u043e\u0436\u0435\u0442\u0435-\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c-\u043e\u043f\u0446\u0438\u044e-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430-\u0442\u043e\u043a\u0435\u043d\u043e\u0432-\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e-\u0432-\u043a\u043b\u0438\u0435\u043d\u0442\u0435-openai",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435-api-compressa",children:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 API Compressa"}),"\n",(0,a.jsx)(n.p,{children:"\u0412 Compressa \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 API-\u0441\u043b\u043e\u0439, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 Chat Completion API \u043e\u0442 OpenAI. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043e\u0442 OpenAI (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 Langchain) \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u0434 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Compressa."}),"\n",(0,a.jsxs)(n.p,{children:["\u041f\u043e\u043b\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 REST API, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0433\u043e \u0441 OpenAI, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 ",(0,a.jsx)(n.a,{href:"/docs/rest.mdx#tag/chat/operation/create_chat_completion_v1_chat_completions_post",children:"\u0437\u0434\u0435\u0441\u044c"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"\u0432\u043e\u0442-\u043a\u0430\u043a-\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c-\u043c\u043e\u0434\u0435\u043b\u0438-openai-\u043d\u0430-compressa",children:"\u0412\u043e\u0442 \u043a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 OpenAI \u043d\u0430 Compressa"}),"\n",(0,a.jsxs)(r.A,{children:[(0,a.jsx)(o.A,{value:"python",label:"Python (\u043a\u043b\u0438\u0435\u043d\u0442 OpenAI)",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'from openai import OpenAI\n\nclient = OpenAI(\n base_url="https://compressa-api.mil-team.ru/v1", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa" # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n)\n\nchat_completion = client.chat.completions.create(\n model="Compressa-LLM",\n messages=[\n {"role": "system", "content": "\u0422\u044b \u0443\u043c\u0435\u0435\u0448\u044c \u0441\u043e\u0447\u0438\u043d\u044f\u0442\u044c \u0441\u043c\u0435\u0448\u043d\u044b\u0435 \u0430\u043d\u043a\u0435\u0434\u043e\u0442\u044b."},\n {"role": "user", "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0438 \u0441\u043c\u0435\u0448\u043d\u043e\u0439 \u0430\u043d\u0435\u043a\u0434\u043e\u0442 \u043f\u0440\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430."},\n ],\n stream=False,\n)\nprint(chat_completion.choices[0].message.content)\n'})})}),(0,a.jsx)(o.A,{value:"python-langchain",label:"Python (OpenAI Langchain)",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'# pip install langchain-core - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n# pip install langchain - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n# pip install openai - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nfrom langchain_openai import ChatOpenAI\n\nllm = ChatOpenAI(\n base_url="https://compressa-api.mil-team.ru/v1", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n model="Compressa-LLM"\n)\n\nmessages = [\n (\n "system",\n "\u0422\u044b \u0443\u043c\u0435\u0435\u0448\u044c \u0441\u043e\u0447\u0438\u043d\u044f\u0442\u044c \u0441\u043c\u0435\u0448\u043d\u044b\u0435 \u0430\u043d\u043a\u0435\u0434\u043e\u0442\u044b.",\n ),\n ("human", "\u041d\u0430\u043f\u0438\u0448\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0438 \u0441\u043c\u0435\u0448\u043d\u043e\u0439 \u0430\u043d\u0435\u043a\u0434\u043e\u0442 \u043f\u0440\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430."),\n]\n\nai_msg = llm.invoke(messages)\nprint(f"\u041e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438: {ai_msg.content}")\n'})})})]}),"\n",(0,a.jsx)(n.h2,{id:"\u0442\u0430\u043a\u0436\u0435-\u0432\u044b-\u043c\u043e\u0436\u0435\u0442\u0435-\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c-\u043e\u043f\u0446\u0438\u044e-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430-\u0442\u043e\u043a\u0435\u043d\u043e\u0432-\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e-\u0432-\u043a\u043b\u0438\u0435\u043d\u0442\u0435-openai",children:"\u0422\u0430\u043a\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u044e \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 OpenAI"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'#pip install openai - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nfrom openai import OpenAI\n\nclient = OpenAI(\n base_url="https://compressa-api.mil-team.ru/v1", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa" #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n)\n\ncompletion = client.chat.completions.create(\n model="Compressa-LLM",\n messages=[\n {"role": "system", "content": "\u0422\u044b \u0443\u043c\u0435\u0435\u0448\u044c \u0441\u043e\u0447\u0438\u043d\u044f\u0442\u044c \u0441\u043c\u0435\u0448\u043d\u044b\u0435 \u0430\u043d\u043a\u0435\u0434\u043e\u0442\u044b."},\n {"role": "user", "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0438 \u0441\u043c\u0435\u0448\u043d\u043e\u0439 \u0430\u043d\u0435\u043a\u0434\u043e\u0442 \u043f\u0440\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430."}\n ],\n stream=True\n)\n\nfor chunk in completion:\n print(chunk.choices[0].delta)\n\n#ChoiceDelta(content=\'\u0411\', function_call=None, refusal=None, role=\'assistant\', tool_calls=None)\n#ChoiceDelta(content=\'\u044b\', function_call=None, refusal=None, role=\'assistant\', tool_calls=None)\n#ChoiceDelta(content=\'\u043b\', function_call=None, refusal=None, role=\'assistant\', tool_calls=None)\n#ChoiceDelta(content=\' \u0443\', function_call=None, refusal=None, role=\'assistant\', tool_calls=None)\n#...\n'})})]})}function m(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var a=t(4164);const s={tabItem:"tabItem_Ymn6"};var r=t(4848);function o(e){let{children:n,hidden:t,className:o}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.A)(s.tabItem,o),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>x});var a=t(6540),s=t(4164),r=t(3104),o=t(6347),l=t(205),c=t(7485),i=t(1682),u=t(9466);function p(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function d(e){const{values:n,children:t}=e;return(0,a.useMemo)((()=>{const e=n??function(e){return p(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:s}}=e;return{value:n,label:t,attributes:a,default:s}}))}(t);return function(e){const n=(0,i.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function m(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function h(e){let{queryString:n=!1,groupId:t}=e;const s=(0,o.W6)(),r=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,c.aZ)(r),(0,a.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(s.location.search);n.set(r,e),s.replace({...s.location,search:n.toString()})}),[r,s])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,r=d(e),[o,c]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!m({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:r}))),[i,p]=h({queryString:t,groupId:s}),[f,b]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,r]=(0,u.Dv)(t);return[s,(0,a.useCallback)((e=>{t&&r.set(e)}),[t,r])]}({groupId:s}),v=(()=>{const e=i??f;return m({value:e,tabValues:r})?e:null})();(0,l.A)((()=>{v&&c(v)}),[v]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);c(e),p(e),b(e)}),[p,b,r]),tabValues:r}}var b=t(2303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(4848);function I(e){let{className:n,block:t,selectedValue:a,selectValue:o,tabValues:l}=e;const c=[],{blockElementScrollPositionUntilNextRender:i}=(0,r.a_)(),u=e=>{const n=e.currentTarget,t=c.indexOf(n),s=l[t].value;s!==a&&(i(n),o(s))},p=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;n=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;n=c[t]??c[c.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:l.map((e=>{let{value:n,label:t,attributes:r}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:e=>c.push(e),onKeyDown:p,onClick:u,...r,className:(0,s.A)("tabs__item",v.tabItem,r?.className,{"tabs__item--active":a===n}),children:t??n},n)}))})}function _(e){let{lazy:n,children:t,selectedValue:s}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===s));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function A(e){const n=f(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",v.tabList),children:[(0,g.jsx)(I,{...n,...e}),(0,g.jsx)(_,{...n,...e})]})}function x(e){const n=(0,b.A)();return(0,g.jsx)(A,{...e,children:p(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>l});var a=t(6540);const s={},r=a.createContext(s);function o(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/977a142a.53745fed.js b/assets/js/977a142a.53745fed.js deleted file mode 100644 index afad6e3..0000000 --- a/assets/js/977a142a.53745fed.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[1795],{7552:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>t,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>a});var i=s(4848),d=s(8453);const r={sidebar_position:3},c="Quickstart: InsightStream",l={id:"onprem/RAG_On-Premises/insight-stream/index",title:"Quickstart: InsightStream",description:"\u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0447\u0430\u0442-\u0431\u043e\u0442 InsightStream RAG \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Compressa \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/RAG_On-Premises/insight-stream/index.md",sourceDirName:"onprem/RAG_On-Premises/insight-stream",slug:"/onprem/RAG_On-Premises/insight-stream/",permalink:"/onprem/RAG_On-Premises/insight-stream/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/RAG_On-Premises/insight-stream/index.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"onpremSidebar",previous:{title:"Finetuning",permalink:"/onprem/LLM_On-Premises/finetuning/"}},t={},a=[{value:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f",id:"\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f",level:2},{value:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430",id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430-\u0441\u0435\u0440\u0432\u0435\u0440\u0430",level:2},{value:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",level:2},{value:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Inference \u0438 Embedding \u043c\u043e\u0434\u0435\u043b\u0435\u0439",id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-inference-\u0438-embedding-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",level:2},{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 LLama3-8B \u0432 Compressa:",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-llama3-8b-\u0432-compressa",level:4},{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 embedding-\u043c\u043e\u0434\u0435\u043b\u0438 \u0432 Compressa:",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-embedding-\u043c\u043e\u0434\u0435\u043b\u0438-\u0432-compressa",level:4},{value:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 LLama3-8B",id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-llama3-8b",level:4},{value:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 embedding-\u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-embedding-\u043c\u043e\u0434\u0435\u043b\u0438",level:4},{value:"CLI",id:"cli",level:2},{value:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",id:"\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",level:3},{value:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",level:3},{value:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435",id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435",level:2},{value:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441",id:"\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-\u0432-\u0438\u043d\u0434\u0435\u043a\u0441",level:3},{value:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u043e\u0442\u0430 InsightStream",id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435-\u0431\u043e\u0442\u0430-insightstream",level:3},{value:"REST API",id:"rest-api",level:3},{value:"\u0417\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u0431\u043e\u0442\u0443:",id:"\u0437\u0430\u0434\u0430\u0442\u044c-\u0432\u043e\u043f\u0440\u043e\u0441-\u0431\u043e\u0442\u0443",level:4},{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430:",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c-\u0444\u0430\u0439\u043b-\u0441-\u0441\u0435\u0440\u0432\u0435\u0440\u0430",level:4},{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440:",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c-\u0444\u0430\u0439\u043b-\u043d\u0430-\u0441\u0435\u0440\u0432\u0435\u0440",level:4}];function o(e){const n={a:"a",br:"br",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"quickstart-insightstream",children:"Quickstart: InsightStream"}),"\n",(0,i.jsx)(n.p,{children:"\u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0447\u0430\u0442-\u0431\u043e\u0442 InsightStream RAG \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Compressa \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439."}),"\n",(0,i.jsx)(n.h2,{id:"\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f",children:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f"}),"\n",(0,i.jsxs)(n.p,{children:["\u0414\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f InsightStream \u0441 Compressa \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 2 GPU.",(0,i.jsx)(n.br,{}),"\n","\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a GPU \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u044d\u0442\u043e\u0439 ",(0,i.jsx)(n.a,{href:"/onprem/LLM_On-Premises/setup/#requirements",children:"\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430-\u0441\u0435\u0440\u0432\u0435\u0440\u0430",children:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430"}),"\n",(0,i.jsx)(n.p,{children:"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"git clone -b insight-stream git@github.com:compressa-ai/compressa-deploy.git\ncd compressa-deploy\n"})}),"\n",(0,i.jsx)(n.p,{children:"\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:".env"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"docker-compose.yml"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 id GPU, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 ",(0,i.jsx)(n.code,{children:".env"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"DOCKER_GPU_IDS_CHAT= \nDOCKER_GPU_IDS_EMB= \n"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0440\u0442\u044b:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"qdrant"})," - 6333"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"compressa"})," - 5500"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"insight-stream-bot"})," - 80"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0438 \u043f\u043e\u0440\u0442\u043e\u0432 \u0432 ",(0,i.jsx)(n.code,{children:"docker-compose.yml"})," \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 ",(0,i.jsx)(n.code,{children:"qdrant"}),", ",(0,i.jsx)(n.code,{children:"openai-api"}),", ",(0,i.jsx)(n.code,{children:"nginx"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f ",(0,i.jsx)(n.code,{children:"SERVER_NAME"})," \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c URL, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u0442 InsightStream.\n",(0,i.jsx)(n.em,{children:"\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, localhost:80, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u043f\u043e\u0440\u0442 80 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442 80 localhost."})]}),"\n",(0,i.jsx)(n.h2,{id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",children:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0443\u0442\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"qdrant"})," - ",(0,i.jsx)(n.code,{children:"./data/qdrant"})]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"compressa"})," - ",(0,i.jsx)(n.code,{children:"./data/compressa"}),(0,i.jsx)(n.br,{}),"\n","\u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043f\u0440\u0430\u0432\u0430 777, \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"chmod 777 -R ./data/compressa\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 - ",(0,i.jsx)(n.code,{children:"./data/documents"}),(0,i.jsx)(n.br,{}),"\n","\u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043f\u0440\u0430\u0432\u0430 755 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f ",(0,i.jsx)(n.code,{children:"systemd-network"})," \u0438 \u0433\u0440\u0443\u043f\u043f\u044b ",(0,i.jsx)(n.code,{children:"systemd-journal"}),",\n\u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"sudo chown systemd-network:systemd-journal ./data/documents && sudo chmod 755 ./data/documents\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0432 ",(0,i.jsx)(n.code,{children:"docker-compose.yml"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker compose up --build\n"})}),"\n",(0,i.jsx)(n.h2,{id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-inference-\u0438-embedding-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",children:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Inference \u0438 Embedding \u043c\u043e\u0434\u0435\u043b\u0435\u0439"}),"\n",(0,i.jsxs)(n.p,{children:["\u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 Compressa.\n\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c LLama3-8B \u0434\u043b\u044f \u0447\u0430\u0442\u0430 \u0438 \u043c\u043e\u0434\u0435\u043b\u044c SFR-Embedding-Mistral \u0434\u043b\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439.",(0,i.jsx)(n.br,{}),"\n","\u041c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f ",(0,i.jsx)(n.a,{href:"/onprem/LLM_On-Premises/services/rest-api/",children:"REST API"})," \u0438\u043b\u0438 UI Swagger'\u0430."]}),"\n",(0,i.jsx)(n.p,{children:"REST API \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0430\u043c:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"SERVER_NAME:5500/api/chat/"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"SERVER_NAME:5500/api/embeddings/"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Swagger UI \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0430\u043c:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"SERVER_NAME:5500/api/chat/docs"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"SERVER_NAME:5500/api/embeddings/docs"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u041c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u043c\u0430\u043d\u0434 ",(0,i.jsx)(n.code,{children:"curl"}),":"]}),"\n",(0,i.jsx)(n.h4,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-llama3-8b-\u0432-compressa",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 LLama3-8B \u0432 Compressa:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"curl -X 'POST' \\\n 'http://localhost:5500/api/chat/v1/models/add/?model_id=compressa-ai%2FLlama-3-8B-Instruct' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-embedding-\u043c\u043e\u0434\u0435\u043b\u0438-\u0432-compressa",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 embedding-\u043c\u043e\u0434\u0435\u043b\u0438 \u0432 Compressa:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"curl -X 'POST' \\\n 'http://localhost:5500/api/embeddings/v1/models/add/?model_id=Salesforce%2FSFR-Embedding-Mistral' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438:"}),"\n",(0,i.jsx)(n.h4,{id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-llama3-8b",children:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 LLama3-8B"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"curl -X 'POST' \\\n 'http://localhost:5500/api/chat/v1/deploy/' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model_id\": \"compressa-ai/Llama-3-8B-Instruct\",\n \"dtype\": \"float16\"\n}'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435-embedding-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 embedding-\u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"curl -X 'POST' \\\n 'http://localhost:5500/api/embeddings/v1/deploy/' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model_id\": \"Salesforce/SFR-Embedding-Mistral\",\n \"dtype\": \"float16\"\n}'\n"})}),"\n",(0,i.jsx)(n.p,{children:"When the models are deployed, the server is ready to use!"}),"\n",(0,i.jsx)(n.h2,{id:"cli",children:"CLI"}),"\n",(0,i.jsx)(n.p,{children:"CLI \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0431\u0430\u0437\u0443."}),"\n",(0,i.jsx)(n.h3,{id:"\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430"}),"\n",(0,i.jsxs)(n.p,{children:["CLI \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f (\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f ",(0,i.jsx)(n.code,{children:"python3.10+"}),"):"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"cd compressa-deploy/cli\npip install -r requirements.txt\n"})}),"\n",(0,i.jsx)(n.h3,{id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",children:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430"}),"\n",(0,i.jsxs)(n.p,{children:["CLI-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u043c\u0443 \u0447\u0430\u0442-\u0431\u043e\u0442\u0443, \u043c\u043e\u0434\u0435\u043b\u044f\u043c \u0438 qdrant.",(0,i.jsx)(n.br,{}),"\n","\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 URL \u043a \u043d\u0438\u043c \u0432 \u0444\u0430\u0439\u043b\u0435 ",(0,i.jsx)(n.code,{children:".env"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"SERVER_NAME= # in case of port 80\nQDRANT_URL= :6333\nOPENAI_BASE= :5500/v1 # Compressa \nQDRANT_KEY=your_secret_api_key_here\n"})}),"\n",(0,i.jsx)(n.h2,{id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435",children:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435"}),"\n",(0,i.jsx)(n.h3,{id:"\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-\u0432-\u0438\u043d\u0434\u0435\u043a\u0441",children:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441"}),"\n",(0,i.jsx)(n.p,{children:"\u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"python3 create_bot.py /path/to/document.pdf \npython3 create_bot.py /path/to/folder\n"})}),"\n",(0,i.jsxs)(n.p,{children:["\u0411\u043e\u0442 InsightStream \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u044b ",(0,i.jsx)(n.code,{children:".docx"})," \u0438 ",(0,i.jsx)(n.code,{children:".pdf"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["\u041a\u043e\u0433\u0434\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b, \u0431\u043e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ",(0,i.jsx)(n.code,{children:" /agent/ "}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435-\u0431\u043e\u0442\u0430-insightstream",children:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u043e\u0442\u0430 InsightStream"}),"\n",(0,i.jsxs)(n.p,{children:["\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0431\u043e\u0442\u0430 InsightStream \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 ",(0,i.jsx)(n.code,{children:" /agent/ "})," \u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u0432 \u0447\u0430\u0442\u0435:\n",(0,i.jsx)(n.img,{alt:"Chat UI",src:s(1160).A+"",width:"2402",height:"1820"})]}),"\n",(0,i.jsx)(n.p,{children:"\u0411\u043e\u0442 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0447\u0435\u0440\u0435\u0437 REST API."}),"\n",(0,i.jsx)(n.h3,{id:"rest-api",children:"REST API"}),"\n",(0,i.jsx)(n.h4,{id:"\u0437\u0430\u0434\u0430\u0442\u044c-\u0432\u043e\u043f\u0440\u043e\u0441-\u0431\u043e\u0442\u0443",children:"\u0417\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u0431\u043e\u0442\u0443:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'curl -X POST \\\n -H "Content-Type: application/json" \\\n -d \'{\n "question": " "\n }\' \\\n " /v.1.0/ "\n'})}),"\n",(0,i.jsx)(n.h4,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c-\u0444\u0430\u0439\u043b-\u0441-\u0441\u0435\u0440\u0432\u0435\u0440\u0430",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"curl /documents/ > \n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c-\u0444\u0430\u0439\u043b-\u043d\u0430-\u0441\u0435\u0440\u0432\u0435\u0440",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"curl -X PUT -T /path/to/file /documents/ \n"})})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},1160:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/insight-stream-bd48ccdd03b5a09ce6e440b9ca5bfd28.png"},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>l});var i=s(6540);const d={},r=i.createContext(d);function c(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:c(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a457e5e7.31031977.js b/assets/js/a457e5e7.31031977.js deleted file mode 100644 index 415999d..0000000 --- a/assets/js/a457e5e7.31031977.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[5542],{4694:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>t,frontMatter:()=>i,metadata:()=>o,toc:()=>a});var r=s(4848),d=s(8453);const i={sidebar_position:2},l="\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b",o={id:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation",title:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b",description:"\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Docker",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation.md",sourceDirName:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",slug:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"onpremSidebar",previous:{title:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements"},next:{title:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 InsightStream RAG",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation"}},c={},a=[{value:"\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Docker",id:"\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f-\u0432-docker",level:2},{value:"\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",id:"\u0431\u0430\u0437\u043e\u0432\u0430\u044f-\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",level:2},{value:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",level:2},{value:"\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0431\u043e\u0440\u043a\u0438",id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0441\u0431\u043e\u0440\u043a\u0438",level:2},{value:"\u0417\u0430\u043f\u0443\u0441\u043a LLM \u0438 Embeddings \u043c\u043e\u0434\u0435\u043b\u0435\u0439",id:"\u0437\u0430\u043f\u0443\u0441\u043a-llm-\u0438-embeddings-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",level:2},{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 LLM \u043c\u043e\u0434\u0435\u043b\u0438 Compressa-Qwen2.5-14B \u0432 Compressa:",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-llm-\u043c\u043e\u0434\u0435\u043b\u0438-compressa-qwen25-14b-\u0432-compressa",level:4},{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 Embeddings \u043c\u043e\u0434\u0435\u043b\u0438 SFR-Embedding-Mistral \u0432 Compressa:",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-embeddings-\u043c\u043e\u0434\u0435\u043b\u0438-sfr-embedding-mistral-\u0432-compressa",level:4},{value:"\u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438:",id:"\u043a\u043e\u0433\u0434\u0430-\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430-\u043c\u043e\u0436\u043d\u043e-\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c-\u043c\u043e\u0434\u0435\u043b\u0438",level:3},{value:"\u0417\u0430\u043f\u0443\u0441\u043a LLM \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0437\u0430\u043f\u0443\u0441\u043a-llm-\u043c\u043e\u0434\u0435\u043b\u0438",level:4},{value:"\u0417\u0430\u043f\u0443\u0441\u043a Embeddings \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0437\u0430\u043f\u0443\u0441\u043a-embeddings-\u043c\u043e\u0434\u0435\u043b\u0438",level:4}];function p(e){const n={a:"a",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b",children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b"}),"\n",(0,r.jsx)(n.h2,{id:"\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f-\u0432-docker",children:"\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Docker"}),"\n",(0,r.jsx)(n.p,{children:"\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430."}),"\n",(0,r.jsx)(n.p,{children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"export COMPRESSA_TOKEN= \n"})}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 Docker \u0441 \u0432\u0430\u0448\u0438\u043c \u0442\u043e\u043a\u0435\u043d\u043e\u043c:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"echo $COMPRESSA_TOKEN | docker login -u compressa --password-stdin\n"})}),"\n",(0,r.jsx)(n.h2,{id:"\u0431\u0430\u0437\u043e\u0432\u0430\u044f-\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",children:"\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430"}),"\n",(0,r.jsx)(n.p,{children:"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"git clone -b gm/compressa-platform git@github.com:compressa-ai/compressa-deploy.git\ncd compressa-deploy\n"})}),"\n",(0,r.jsx)(n.p,{children:"\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".env"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"docker-compose.yml"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b GPU \u0432 \u0444\u0430\u0439\u043b\u0435 ",(0,r.jsx)(n.code,{children:".env"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"DOCKER_GPU_IDS_1= \nDOCKER_GPU_IDS_2= \n"})}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442 8080."}),"\n",(0,r.jsxs)(n.p,{children:["\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 ",(0,r.jsx)(n.code,{children:"docker-compose.yml"})," \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 ",(0,r.jsx)(n.code,{children:"compressa-api-nginx"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",children:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430"}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"compressa"})," - ",(0,r.jsx)(n.code,{children:"./data/compressa"}),(0,r.jsx)(n.br,{}),"\n","\u0423 \u044d\u0442\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0430 777, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:","\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"chmod 777 -R ./data/compressa\n"})}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443 \u0432 \u0444\u0430\u0439\u043b\u0435 ",(0,r.jsx)(n.code,{children:"docker-compose.yml"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0441\u0431\u043e\u0440\u043a\u0438",children:"\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0431\u043e\u0440\u043a\u0438"}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u0440\u043e\u0439\u0434\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0448\u0430\u0433\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"docker compose up --build\n"})}),"\n",(0,r.jsx)(n.h2,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-llm-\u0438-embeddings-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",children:"\u0417\u0430\u043f\u0443\u0441\u043a LLM \u0438 Embeddings \u043c\u043e\u0434\u0435\u043b\u0435\u0439"}),"\n",(0,r.jsx)(n.p,{children:"\u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c LLM \u0438 Embeddings \u043c\u043e\u0434\u0435\u043b\u0438."}),"\n",(0,r.jsx)(n.p,{children:"\u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f InsightStream RAG \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 LLM \u043c\u043e\u0434\u0435\u043b\u044c Qwen 2.5-14B \u0438 Embeddings \u043c\u043e\u0434\u0435\u043b\u044c SFR-Embedding-Mistral"}),"\n",(0,r.jsx)(n.p,{children:"\u041c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e REST API \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 Swagger UI"}),"\n",(0,r.jsx)(n.p,{children:"REST API \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0430\u043c:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"SERVER_NAME:8080/pod-1/api/"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"SERVER_NAME:8080/pod-2/api/"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Swagger UI \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0430\u043c:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"SERVER_NAME:8080/pod-1/api/docs"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"SERVER_NAME:8080/pod-2/api/docs"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["\u0412\u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c ",(0,r.jsx)(n.code,{children:"curl"}),":"]}),"\n",(0,r.jsx)(n.h4,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-llm-\u043c\u043e\u0434\u0435\u043b\u0438-compressa-qwen25-14b-\u0432-compressa",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 LLM \u043c\u043e\u0434\u0435\u043b\u0438 Compressa-Qwen2.5-14B \u0432 Compressa:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/models/add/?model_id=compressa-ain%2FQwen2.5-14B' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,r.jsx)(n.h4,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-embeddings-\u043c\u043e\u0434\u0435\u043b\u0438-sfr-embedding-mistral-\u0432-compressa",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 Embeddings \u043c\u043e\u0434\u0435\u043b\u0438 SFR-Embedding-Mistral \u0432 Compressa:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-2/api/v1/models/add/?model_id=Salesforce%2FSFR-Embedding-Mistral' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,r.jsx)(n.h3,{id:"\u043a\u043e\u0433\u0434\u0430-\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430-\u043c\u043e\u0436\u043d\u043e-\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438:"}),"\n",(0,r.jsx)(n.h4,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-llm-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0417\u0430\u043f\u0443\u0441\u043a LLM \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'curl -X \'POST\' "$SERVER_NAME/pod-1/api/v1/deploy/" \\\n -H \'accept: application/json\' \\\n -H \'Authorization: Bearer EMPTY\' \\\n -H \'Content-Type: application/json\' -d \'{\n "model_id": "compressa-ai/Qwen2.5-14B",\n "served_model_name": "Compressa-LLM",\n "dtype": "float16"\n}\'\n'})}),"\n",(0,r.jsx)(n.h4,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-embeddings-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0417\u0430\u043f\u0443\u0441\u043a Embeddings \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'curl -X \'POST\' "$SERVER_NAME/pod-2/api/v1/deploy/" \\\n -H \'accept: application/json\' \\\n -H \'Authorization: Bearer EMPTY\' \\\n -H \'Content-Type: application/json\' -d \'{\n "model_id": "Salesforce/SFR-Embedding-Mistral",\n "served_model_name": "Compressa-Embedding",\n "dtype": "float16"\n}\'\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"\u0412\u0430\u0436\u043d\u043e!"})," \u041c\u043e\u0434\u0443\u043b\u0438 ETL \u0438 Rerank \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434."]}),"\n",(0,r.jsxs)(n.p,{children:["\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043e\u043d\u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u041a\u0430\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0447\u0435\u0440\u0435\u0437 REST API \u0438\u043b\u0438 Python \u043a\u043b\u0438\u0435\u043d\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c ",(0,r.jsx)(n.a,{href:"/docs/basic_modules/LLM/",children:"\u0437\u0434\u0435\u0441\u044c"}),"."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsxs)(n.strong,{children:["\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c InsightStream RAG, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c ",(0,r.jsx)(n.a,{href:"/onprem/%D0%9F%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D0%B0%20Compressa/Insightstream_installation",children:"\u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0448\u0430\u0433"})]})})]})}function t(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>o});var r=s(6540);const d={},i=r.createContext(d);function l(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:l(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a457e5e7.a60b35df.js b/assets/js/a457e5e7.a60b35df.js new file mode 100644 index 0000000..fd49376 --- /dev/null +++ b/assets/js/a457e5e7.a60b35df.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[542],{4694:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>t,frontMatter:()=>i,metadata:()=>o,toc:()=>a});var r=s(4848),d=s(8453);const i={sidebar_position:2},l="\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b",o={id:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation",title:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b",description:"\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Docker",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation.md",sourceDirName:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",slug:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"onpremSidebar",previous:{title:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements"},next:{title:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 InsightStream RAG",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation"}},c={},a=[{value:"\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Docker",id:"\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f-\u0432-docker",level:2},{value:"\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",id:"\u0431\u0430\u0437\u043e\u0432\u0430\u044f-\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",level:2},{value:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",level:2},{value:"\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0431\u043e\u0440\u043a\u0438",id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0441\u0431\u043e\u0440\u043a\u0438",level:2},{value:"\u0417\u0430\u043f\u0443\u0441\u043a LLM \u0438 Embeddings \u043c\u043e\u0434\u0435\u043b\u0435\u0439",id:"\u0437\u0430\u043f\u0443\u0441\u043a-llm-\u0438-embeddings-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",level:2},{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 LLM \u043c\u043e\u0434\u0435\u043b\u0438 Compressa-Qwen2.5-14B \u0432 Compressa:",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-llm-\u043c\u043e\u0434\u0435\u043b\u0438-compressa-qwen25-14b-\u0432-compressa",level:4},{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 Embeddings \u043c\u043e\u0434\u0435\u043b\u0438 SFR-Embedding-Mistral \u0432 Compressa:",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-embeddings-\u043c\u043e\u0434\u0435\u043b\u0438-sfr-embedding-mistral-\u0432-compressa",level:4},{value:"\u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438:",id:"\u043a\u043e\u0433\u0434\u0430-\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430-\u043c\u043e\u0436\u043d\u043e-\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c-\u043c\u043e\u0434\u0435\u043b\u0438",level:3},{value:"\u0417\u0430\u043f\u0443\u0441\u043a LLM \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0437\u0430\u043f\u0443\u0441\u043a-llm-\u043c\u043e\u0434\u0435\u043b\u0438",level:4},{value:"\u0417\u0430\u043f\u0443\u0441\u043a Embeddings \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0437\u0430\u043f\u0443\u0441\u043a-embeddings-\u043c\u043e\u0434\u0435\u043b\u0438",level:4}];function p(e){const n={a:"a",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b",children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b"}),"\n",(0,r.jsx)(n.h2,{id:"\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f-\u0432-docker",children:"\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Docker"}),"\n",(0,r.jsx)(n.p,{children:"\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430."}),"\n",(0,r.jsx)(n.p,{children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"export COMPRESSA_TOKEN= \n"})}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 Docker \u0441 \u0432\u0430\u0448\u0438\u043c \u0442\u043e\u043a\u0435\u043d\u043e\u043c:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"echo $COMPRESSA_TOKEN | docker login -u compressa --password-stdin\n"})}),"\n",(0,r.jsx)(n.h2,{id:"\u0431\u0430\u0437\u043e\u0432\u0430\u044f-\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",children:"\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430"}),"\n",(0,r.jsx)(n.p,{children:"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"git clone -b gm/compressa-platform git@github.com:compressa-ai/compressa-deploy.git\ncd compressa-deploy\n"})}),"\n",(0,r.jsx)(n.p,{children:"\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".env"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"docker-compose.yml"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b GPU \u0432 \u0444\u0430\u0439\u043b\u0435 ",(0,r.jsx)(n.code,{children:".env"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"DOCKER_GPU_IDS_1= \nDOCKER_GPU_IDS_2= \n"})}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442 8080."}),"\n",(0,r.jsxs)(n.p,{children:["\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 ",(0,r.jsx)(n.code,{children:"docker-compose.yml"})," \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 ",(0,r.jsx)(n.code,{children:"compressa-api-nginx"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",children:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430"}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"compressa"})," - ",(0,r.jsx)(n.code,{children:"./data/compressa"}),(0,r.jsx)(n.br,{}),"\n","\u0423 \u044d\u0442\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0430 777, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:","\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"chmod 777 -R ./data/compressa\n"})}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443 \u0432 \u0444\u0430\u0439\u043b\u0435 ",(0,r.jsx)(n.code,{children:"docker-compose.yml"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0441\u0431\u043e\u0440\u043a\u0438",children:"\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0431\u043e\u0440\u043a\u0438"}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u0440\u043e\u0439\u0434\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0448\u0430\u0433\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"docker compose up --build\n"})}),"\n",(0,r.jsx)(n.h2,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-llm-\u0438-embeddings-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",children:"\u0417\u0430\u043f\u0443\u0441\u043a LLM \u0438 Embeddings \u043c\u043e\u0434\u0435\u043b\u0435\u0439"}),"\n",(0,r.jsx)(n.p,{children:"\u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c LLM \u0438 Embeddings \u043c\u043e\u0434\u0435\u043b\u0438."}),"\n",(0,r.jsx)(n.p,{children:"\u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f InsightStream RAG \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 LLM \u043c\u043e\u0434\u0435\u043b\u044c Qwen 2.5-14B \u0438 Embeddings \u043c\u043e\u0434\u0435\u043b\u044c SFR-Embedding-Mistral"}),"\n",(0,r.jsx)(n.p,{children:"\u041c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e REST API \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 Swagger UI"}),"\n",(0,r.jsx)(n.p,{children:"REST API \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0430\u043c:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"SERVER_NAME:8080/pod-1/api/"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"SERVER_NAME:8080/pod-2/api/"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Swagger UI \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0430\u043c:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"SERVER_NAME:8080/pod-1/api/docs"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"SERVER_NAME:8080/pod-2/api/docs"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["\u0412\u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c ",(0,r.jsx)(n.code,{children:"curl"}),":"]}),"\n",(0,r.jsx)(n.h4,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-llm-\u043c\u043e\u0434\u0435\u043b\u0438-compressa-qwen25-14b-\u0432-compressa",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 LLM \u043c\u043e\u0434\u0435\u043b\u0438 Compressa-Qwen2.5-14B \u0432 Compressa:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/models/add/?model_id=compressa-ain%2FQwen2.5-14B' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,r.jsx)(n.h4,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-embeddings-\u043c\u043e\u0434\u0435\u043b\u0438-sfr-embedding-mistral-\u0432-compressa",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 Embeddings \u043c\u043e\u0434\u0435\u043b\u0438 SFR-Embedding-Mistral \u0432 Compressa:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-2/api/v1/models/add/?model_id=Salesforce%2FSFR-Embedding-Mistral' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,r.jsx)(n.h3,{id:"\u043a\u043e\u0433\u0434\u0430-\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430-\u043c\u043e\u0436\u043d\u043e-\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438:"}),"\n",(0,r.jsx)(n.h4,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-llm-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0417\u0430\u043f\u0443\u0441\u043a LLM \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'curl -X \'POST\' "$SERVER_NAME/pod-1/api/v1/deploy/" \\\n -H \'accept: application/json\' \\\n -H \'Authorization: Bearer EMPTY\' \\\n -H \'Content-Type: application/json\' -d \'{\n "model_id": "compressa-ai/Qwen2.5-14B",\n "served_model_name": "Compressa-LLM",\n "dtype": "float16"\n}\'\n'})}),"\n",(0,r.jsx)(n.h4,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-embeddings-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0417\u0430\u043f\u0443\u0441\u043a Embeddings \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'curl -X \'POST\' "$SERVER_NAME/pod-2/api/v1/deploy/" \\\n -H \'accept: application/json\' \\\n -H \'Authorization: Bearer EMPTY\' \\\n -H \'Content-Type: application/json\' -d \'{\n "model_id": "Salesforce/SFR-Embedding-Mistral",\n "served_model_name": "Compressa-Embedding",\n "dtype": "float16"\n}\'\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"\u0412\u0430\u0436\u043d\u043e!"})," \u041c\u043e\u0434\u0443\u043b\u0438 ETL \u0438 Rerank \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434."]}),"\n",(0,r.jsxs)(n.p,{children:["\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043e\u043d\u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u041a\u0430\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0447\u0435\u0440\u0435\u0437 REST API \u0438\u043b\u0438 Python \u043a\u043b\u0438\u0435\u043d\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c ",(0,r.jsx)(n.a,{href:"/docs/basic_modules/LLM/",children:"\u0437\u0434\u0435\u0441\u044c"}),"."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsxs)(n.strong,{children:["\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c InsightStream RAG, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c ",(0,r.jsx)(n.a,{href:"/onprem/%D0%9F%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D0%B0%20Compressa/Insightstream_installation",children:"\u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0448\u0430\u0433"})]})})]})}function t(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>o});var r=s(6540);const d={},i=r.createContext(d);function l(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:l(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.8594e9bb.js b/assets/js/a7bd4aaa.8594e9bb.js deleted file mode 100644 index 83c239f..0000000 --- a/assets/js/a7bd4aaa.8594e9bb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[7098],{4532:(n,s,e)=>{e.r(s),e.d(s,{default:()=>d});e(6540);var r=e(1003),o=e(2967),t=e(2252),c=e(2831),i=e(1463),a=e(4848);function u(n){const{version:s}=n;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{version:s.version,tag:(0,o.tU)(s.pluginId,s.version)}),(0,a.jsx)(r.be,{children:s.noIndex&&(0,a.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function l(n){const{version:s,route:e}=n;return(0,a.jsx)(r.e3,{className:s.className,children:(0,a.jsx)(t.n,{version:s,children:(0,c.v)(e.routes)})})}function d(n){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u,{...n}),(0,a.jsx)(l,{...n})]})}}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.bd23d1fc.js b/assets/js/a7bd4aaa.bd23d1fc.js new file mode 100644 index 0000000..df941bf --- /dev/null +++ b/assets/js/a7bd4aaa.bd23d1fc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[98],{4532:(n,s,e)=>{e.r(s),e.d(s,{default:()=>d});e(6540);var r=e(1003),o=e(2967),t=e(2252),c=e(2831),i=e(1463),a=e(4848);function u(n){const{version:s}=n;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{version:s.version,tag:(0,o.tU)(s.pluginId,s.version)}),(0,a.jsx)(r.be,{children:s.noIndex&&(0,a.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function l(n){const{version:s,route:e}=n;return(0,a.jsx)(r.e3,{className:s.className,children:(0,a.jsx)(t.n,{version:s,children:(0,c.v)(e.routes)})})}function d(n){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u,{...n}),(0,a.jsx)(l,{...n})]})}}}]); \ No newline at end of file diff --git a/assets/js/a7d3ee69.7a2cf3c7.js b/assets/js/a7d3ee69.7a2cf3c7.js deleted file mode 100644 index ded4760..0000000 --- a/assets/js/a7d3ee69.7a2cf3c7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[6301],{8867:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var t=r(4848),s=r(8453);const o={sidebar_position:2},i="No Internet",c={id:"onprem/LLM_On-Premises/setup/internet-access",title:"No Internet",description:"If you're deploying Compressa in private network without internet access,",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/setup/internet-access.md",sourceDirName:"onprem/LLM_On-Premises/setup",slug:"/onprem/LLM_On-Premises/setup/internet-access",permalink:"/onprem/LLM_On-Premises/setup/internet-access",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/setup/internet-access.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"onpremSidebar",previous:{title:"Setup",permalink:"/onprem/LLM_On-Premises/setup/"},next:{title:"Services",permalink:"/onprem/LLM_On-Premises/services/"}},a={},d=[{value:"Download resources",id:"download-resources",level:4},{value:"Unarchive resources",id:"unarchive-resources",level:4},{value:"Set environment variable",id:"set-environment-variable",level:4}];function l(e){const n={a:"a",code:"code",h1:"h1",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"no-internet",children:"No Internet"}),"\n",(0,t.jsx)(n.p,{children:"If you're deploying Compressa in private network without internet access,\nthe Compressa Team provided you with the GDrive link to archive with needed resources to run the model."}),"\n",(0,t.jsxs)(n.p,{children:["The archive can be downloaded with command line tools like ",(0,t.jsx)(n.a,{href:"https://github.com/wkentaro/gdown",children:"gdown"})," or directly from browser."]}),"\n",(0,t.jsx)(n.h4,{id:"download-resources",children:"Download resources"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"gdown --fuzzy https://drive.google.com/file/d/ /view?usp=sharing -O data.tar.gz\n"})}),"\n",(0,t.jsx)(n.h4,{id:"unarchive-resources",children:"Unarchive resources"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"tar -xvf data.tar.gz\nchmod 777 -R data\n"})}),"\n",(0,t.jsx)(n.h4,{id:"set-environment-variable",children:"Set environment variable"}),"\n",(0,t.jsxs)(n.p,{children:["Set the ",(0,t.jsx)(n.code,{children:"RESOURCE_PATH"})," environment variable to the ",(0,t.jsx)(n.code,{children:"data"})," folder from archive."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"export RESOURCES_PATH=./data\n"})}),"\n",(0,t.jsx)(n.p,{children:"Run Compressa as usual.\nThe model will be available from the first run without need to download."})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>c});var t=r(6540);const s={},o=t.createContext(s);function i(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a94703ab.6aa027d6.js b/assets/js/a94703ab.6aa027d6.js new file mode 100644 index 0000000..d7e3820 --- /dev/null +++ b/assets/js/a94703ab.6aa027d6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[48],{2559:(e,t,n)=>{n.r(t),n.d(t,{default:()=>be});var a=n(6540),o=n(4164),i=n(1003),s=n(7559),l=n(4142),r=n(4207),c=n(1312),d=n(3104),u=n(5062);const m={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};var b=n(4848);function h(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{startScroll:s,cancelScroll:l}=(0,d.gk)();return(0,d.Mq)(((e,n)=>{let{scrollY:a}=e;const s=n?.scrollY;s&&(i.current?i.current=!1:a>=s?(l(),o(!1)):a {e.location.hash&&(i.current=!0,o(!1))})),{shown:n,scrollToTop:()=>s(0)}}({threshold:300});return(0,b.jsx)("button",{"aria-label":(0,c.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.A)("clean-btn",s.G.common.backToTopButton,m.backToTopButton,e&&m.backToTopButtonShow),type:"button",onClick:t})}var p=n(3109),x=n(6347),j=n(4581),f=n(6342),v=n(3465);function _(e){return(0,b.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,b.jsxs)("g",{fill:"#7a7a7a",children:[(0,b.jsx)("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),(0,b.jsx)("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})]})})}const A={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function g(e){let{onClick:t}=e;return(0,b.jsx)("button",{type:"button",title:(0,c.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,c.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.A)("button button--secondary button--outline",A.collapseSidebarButton),onClick:t,children:(0,b.jsx)(_,{className:A.collapseSidebarButtonIcon})})}var k=n(5041),C=n(9532);const S=Symbol("EmptyContext"),T=a.createContext(S);function N(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),i=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return(0,b.jsx)(T.Provider,{value:i,children:t})}var I=n(1422),B=n(9169),y=n(8774),w=n(2303);function L(e){let{collapsed:t,categoryLabel:n,onClick:a}=e;return(0,b.jsx)("button",{"aria-label":t?(0,c.T)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,c.T)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:a})}function E(e){let{item:t,onItemClick:n,activePath:i,level:r,index:c,...d}=e;const{items:u,label:m,collapsible:h,className:p,href:x}=t,{docs:{sidebar:{autoCollapseCategories:j}}}=(0,f.p)(),v=function(e){const t=(0,w.A)();return(0,a.useMemo)((()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,l.Nr)(e):void 0),[e,t])}(t),_=(0,l.w8)(t,i),A=(0,B.ys)(x,i),{collapsed:g,setCollapsed:k}=(0,I.u)({initialState:()=>!!h&&(!_&&t.collapsed)}),{expandedItem:N,setExpandedItem:E}=function(){const e=(0,a.useContext)(T);if(e===S)throw new C.dV("DocSidebarItemsExpandedStateProvider");return e}(),M=function(e){void 0===e&&(e=!g),E(e?null:c),k(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const i=(0,C.ZC)(t);(0,a.useEffect)((()=>{t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:_,collapsed:g,updateCollapsed:M}),(0,a.useEffect)((()=>{h&&null!=N&&N!==c&&j&&k(!0)}),[h,N,c,k,j]),(0,b.jsxs)("li",{className:(0,o.A)(s.G.docs.docSidebarItemCategory,s.G.docs.docSidebarItemCategoryLevel(r),"menu__list-item",{"menu__list-item--collapsed":g},p),children:[(0,b.jsxs)("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":A}),children:[(0,b.jsx)(y.A,{className:(0,o.A)("menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":_}),onClick:h?e=>{n?.(t),x?M(!1):(e.preventDefault(),M())}:()=>{n?.(t)},"aria-current":A?"page":void 0,role:h&&!x?"button":void 0,"aria-expanded":h&&!x?!g:void 0,href:h?v??"#":v,...d,children:m}),x&&h&&(0,b.jsx)(L,{collapsed:g,categoryLabel:m,onClick:e=>{e.preventDefault(),M()}})]}),(0,b.jsx)(I.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:g,children:(0,b.jsx)(U,{items:u,tabIndex:g?-1:0,onItemClick:n,activePath:i,level:r+1})})]})}var M=n(6654),H=n(3186);const G={menuExternalLink:"menuExternalLink_NmtK"};function W(e){let{item:t,onItemClick:n,activePath:a,level:i,index:r,...c}=e;const{href:d,label:u,className:m,autoAddBaseUrl:h}=t,p=(0,l.w8)(t,a),x=(0,M.A)(d);return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,b.jsxs)(y.A,{className:(0,o.A)("menu__link",!x&&G.menuExternalLink,{"menu__link--active":p}),autoAddBaseUrl:h,"aria-current":p?"page":void 0,to:d,...x&&{onClick:n?()=>n(t):void 0},...c,children:[u,!x&&(0,b.jsx)(H.A,{})]})},u)}const P={menuHtmlItem:"menuHtmlItem_M9Kj"};function R(e){let{item:t,level:n,index:a}=e;const{value:i,defaultStyle:l,className:r}=t;return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(n),l&&[P.menuHtmlItem,"menu__list-item"],r),dangerouslySetInnerHTML:{__html:i}},a)}function D(e){let{item:t,...n}=e;switch(t.type){case"category":return(0,b.jsx)(E,{item:t,...n});case"html":return(0,b.jsx)(R,{item:t,...n});default:return(0,b.jsx)(W,{item:t,...n})}}function F(e){let{items:t,...n}=e;const a=(0,l.Y)(t,n.activePath);return(0,b.jsx)(N,{children:a.map(((e,t)=>(0,b.jsx)(D,{item:e,index:t,...n},t)))})}const U=(0,a.memo)(F),V={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function Y(e){let{path:t,sidebar:n,className:i}=e;const l=function(){const{isActive:e}=(0,k.Mj)(),[t,n]=(0,a.useState)(e);return(0,d.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return(0,b.jsx)("nav",{"aria-label":(0,c.T)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.A)("menu thin-scrollbar",V.menu,l&&V.menuWithAnnouncementBar,i),children:(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(U,{items:n,activePath:t,level:1})})})}const K="sidebar_njMd",z="sidebarWithHideableNavbar_wUlq",q="sidebarHidden_VK0M",O="sidebarLogo_isFc";function J(e){let{path:t,sidebar:n,onCollapse:a,isHidden:i}=e;const{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:l}}}=(0,f.p)();return(0,b.jsxs)("div",{className:(0,o.A)(K,s&&z,i&&q),children:[s&&(0,b.jsx)(v.A,{tabIndex:-1,className:O}),(0,b.jsx)(Y,{path:t,sidebar:n}),l&&(0,b.jsx)(g,{onClick:a})]})}const Q=a.memo(J);var X=n(5600),Z=n(2069);const $=e=>{let{sidebar:t,path:n}=e;const a=(0,Z.M)();return(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(U,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function ee(e){return(0,b.jsx)(X.GX,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,j.l)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,b.jsxs)(b.Fragment,{children:[n&&(0,b.jsx)(Q,{...e}),a&&(0,b.jsx)(te,{...e})]})}const ae={expandButton:"expandButton_TmdG",expandButtonIcon:"expandButtonIcon_i1dp"};function oe(e){let{toggleSidebar:t}=e;return(0,b.jsx)("div",{className:ae.expandButton,title:(0,c.T)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,c.T)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t,children:(0,b.jsx)(_,{className:ae.expandButtonIcon})})}const ie={docSidebarContainer:"docSidebarContainer_YfHR",docSidebarContainerHidden:"docSidebarContainerHidden_DPk8",sidebarViewport:"sidebarViewport_aRkj"};function se(e){let{children:t}=e;const n=(0,r.t)();return(0,b.jsx)(a.Fragment,{children:t},n?.name??"noSidebar")}function le(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:i}=e;const{pathname:l}=(0,x.zy)(),[r,c]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{r&&c(!1),!r&&(0,p.O)()&&c(!0),i((e=>!e))}),[i,r]);return(0,b.jsx)("aside",{className:(0,o.A)(s.G.docs.docSidebarContainer,ie.docSidebarContainer,n&&ie.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ie.docSidebarContainer)&&n&&c(!0)},children:(0,b.jsx)(se,{children:(0,b.jsxs)("div",{className:(0,o.A)(ie.sidebarViewport,r&&ie.sidebarViewportHidden),children:[(0,b.jsx)(ne,{sidebar:t,path:l,onCollapse:d,isHidden:r}),r&&(0,b.jsx)(oe,{toggleSidebar:d})]})})})}const re={docMainContainer:"docMainContainer_TBSr",docMainContainerEnhanced:"docMainContainerEnhanced_lQrH",docItemWrapperEnhanced:"docItemWrapperEnhanced_JWYK"};function ce(e){let{hiddenSidebarContainer:t,children:n}=e;const a=(0,r.t)();return(0,b.jsx)("main",{className:(0,o.A)(re.docMainContainer,(t||!a)&&re.docMainContainerEnhanced),children:(0,b.jsx)("div",{className:(0,o.A)("container padding-top--md padding-bottom--lg",re.docItemWrapper,t&&re.docItemWrapperEnhanced),children:n})})}const de={docRoot:"docRoot_UBD9",docsWrapper:"docsWrapper_hBAB"};function ue(e){let{children:t}=e;const n=(0,r.t)(),[o,i]=(0,a.useState)(!1);return(0,b.jsxs)("div",{className:de.docsWrapper,children:[(0,b.jsx)(h,{}),(0,b.jsxs)("div",{className:de.docRoot,children:[n&&(0,b.jsx)(le,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:i}),(0,b.jsx)(ce,{hiddenSidebarContainer:o,children:t})]})]})}var me=n(3363);function be(e){const t=(0,l.B5)(e);if(!t)return(0,b.jsx)(me.A,{});const{docElement:n,sidebarName:a,sidebarItems:c}=t;return(0,b.jsx)(i.e3,{className:(0,o.A)(s.G.page.docsDocPage),children:(0,b.jsx)(r.V,{name:a,items:c,children:(0,b.jsx)(ue,{children:n})})})}},3363:(e,t,n)=>{n.d(t,{A:()=>l});n(6540);var a=n(4164),o=n(1312),i=n(1107),s=n(4848);function l(e){let{className:t}=e;return(0,s.jsx)("main",{className:(0,a.A)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(i.A,{as:"h1",className:"hero__title",children:(0,s.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]); \ No newline at end of file diff --git a/assets/js/a94703ab.a1501fef.js b/assets/js/a94703ab.a1501fef.js deleted file mode 100644 index d4d557a..0000000 --- a/assets/js/a94703ab.a1501fef.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[9048],{2559:(e,t,n)=>{n.r(t),n.d(t,{default:()=>be});var a=n(6540),o=n(4164),i=n(1003),s=n(7559),l=n(4142),r=n(4207),c=n(1312),d=n(3104),u=n(5062);const m={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};var b=n(4848);function h(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{startScroll:s,cancelScroll:l}=(0,d.gk)();return(0,d.Mq)(((e,n)=>{let{scrollY:a}=e;const s=n?.scrollY;s&&(i.current?i.current=!1:a>=s?(l(),o(!1)):a {e.location.hash&&(i.current=!0,o(!1))})),{shown:n,scrollToTop:()=>s(0)}}({threshold:300});return(0,b.jsx)("button",{"aria-label":(0,c.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.A)("clean-btn",s.G.common.backToTopButton,m.backToTopButton,e&&m.backToTopButtonShow),type:"button",onClick:t})}var p=n(3109),x=n(6347),j=n(4581),f=n(6342),v=n(3465);function _(e){return(0,b.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,b.jsxs)("g",{fill:"#7a7a7a",children:[(0,b.jsx)("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),(0,b.jsx)("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})]})})}const A={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function g(e){let{onClick:t}=e;return(0,b.jsx)("button",{type:"button",title:(0,c.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,c.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.A)("button button--secondary button--outline",A.collapseSidebarButton),onClick:t,children:(0,b.jsx)(_,{className:A.collapseSidebarButtonIcon})})}var k=n(5041),C=n(9532);const S=Symbol("EmptyContext"),T=a.createContext(S);function N(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),i=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return(0,b.jsx)(T.Provider,{value:i,children:t})}var I=n(1422),B=n(9169),y=n(8774),w=n(2303);function L(e){let{collapsed:t,categoryLabel:n,onClick:a}=e;return(0,b.jsx)("button",{"aria-label":t?(0,c.T)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,c.T)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:a})}function E(e){let{item:t,onItemClick:n,activePath:i,level:r,index:c,...d}=e;const{items:u,label:m,collapsible:h,className:p,href:x}=t,{docs:{sidebar:{autoCollapseCategories:j}}}=(0,f.p)(),v=function(e){const t=(0,w.A)();return(0,a.useMemo)((()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,l.Nr)(e):void 0),[e,t])}(t),_=(0,l.w8)(t,i),A=(0,B.ys)(x,i),{collapsed:g,setCollapsed:k}=(0,I.u)({initialState:()=>!!h&&(!_&&t.collapsed)}),{expandedItem:N,setExpandedItem:E}=function(){const e=(0,a.useContext)(T);if(e===S)throw new C.dV("DocSidebarItemsExpandedStateProvider");return e}(),M=function(e){void 0===e&&(e=!g),E(e?null:c),k(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const i=(0,C.ZC)(t);(0,a.useEffect)((()=>{t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:_,collapsed:g,updateCollapsed:M}),(0,a.useEffect)((()=>{h&&null!=N&&N!==c&&j&&k(!0)}),[h,N,c,k,j]),(0,b.jsxs)("li",{className:(0,o.A)(s.G.docs.docSidebarItemCategory,s.G.docs.docSidebarItemCategoryLevel(r),"menu__list-item",{"menu__list-item--collapsed":g},p),children:[(0,b.jsxs)("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":A}),children:[(0,b.jsx)(y.A,{className:(0,o.A)("menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":_}),onClick:h?e=>{n?.(t),x?M(!1):(e.preventDefault(),M())}:()=>{n?.(t)},"aria-current":A?"page":void 0,role:h&&!x?"button":void 0,"aria-expanded":h&&!x?!g:void 0,href:h?v??"#":v,...d,children:m}),x&&h&&(0,b.jsx)(L,{collapsed:g,categoryLabel:m,onClick:e=>{e.preventDefault(),M()}})]}),(0,b.jsx)(I.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:g,children:(0,b.jsx)(U,{items:u,tabIndex:g?-1:0,onItemClick:n,activePath:i,level:r+1})})]})}var M=n(6654),H=n(3186);const G={menuExternalLink:"menuExternalLink_NmtK"};function W(e){let{item:t,onItemClick:n,activePath:a,level:i,index:r,...c}=e;const{href:d,label:u,className:m,autoAddBaseUrl:h}=t,p=(0,l.w8)(t,a),x=(0,M.A)(d);return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,b.jsxs)(y.A,{className:(0,o.A)("menu__link",!x&&G.menuExternalLink,{"menu__link--active":p}),autoAddBaseUrl:h,"aria-current":p?"page":void 0,to:d,...x&&{onClick:n?()=>n(t):void 0},...c,children:[u,!x&&(0,b.jsx)(H.A,{})]})},u)}const P={menuHtmlItem:"menuHtmlItem_M9Kj"};function R(e){let{item:t,level:n,index:a}=e;const{value:i,defaultStyle:l,className:r}=t;return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(n),l&&[P.menuHtmlItem,"menu__list-item"],r),dangerouslySetInnerHTML:{__html:i}},a)}function D(e){let{item:t,...n}=e;switch(t.type){case"category":return(0,b.jsx)(E,{item:t,...n});case"html":return(0,b.jsx)(R,{item:t,...n});default:return(0,b.jsx)(W,{item:t,...n})}}function F(e){let{items:t,...n}=e;const a=(0,l.Y)(t,n.activePath);return(0,b.jsx)(N,{children:a.map(((e,t)=>(0,b.jsx)(D,{item:e,index:t,...n},t)))})}const U=(0,a.memo)(F),V={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function Y(e){let{path:t,sidebar:n,className:i}=e;const l=function(){const{isActive:e}=(0,k.Mj)(),[t,n]=(0,a.useState)(e);return(0,d.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return(0,b.jsx)("nav",{"aria-label":(0,c.T)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.A)("menu thin-scrollbar",V.menu,l&&V.menuWithAnnouncementBar,i),children:(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(U,{items:n,activePath:t,level:1})})})}const K="sidebar_njMd",z="sidebarWithHideableNavbar_wUlq",q="sidebarHidden_VK0M",O="sidebarLogo_isFc";function J(e){let{path:t,sidebar:n,onCollapse:a,isHidden:i}=e;const{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:l}}}=(0,f.p)();return(0,b.jsxs)("div",{className:(0,o.A)(K,s&&z,i&&q),children:[s&&(0,b.jsx)(v.A,{tabIndex:-1,className:O}),(0,b.jsx)(Y,{path:t,sidebar:n}),l&&(0,b.jsx)(g,{onClick:a})]})}const Q=a.memo(J);var X=n(5600),Z=n(2069);const $=e=>{let{sidebar:t,path:n}=e;const a=(0,Z.M)();return(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(U,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function ee(e){return(0,b.jsx)(X.GX,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,j.l)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,b.jsxs)(b.Fragment,{children:[n&&(0,b.jsx)(Q,{...e}),a&&(0,b.jsx)(te,{...e})]})}const ae={expandButton:"expandButton_TmdG",expandButtonIcon:"expandButtonIcon_i1dp"};function oe(e){let{toggleSidebar:t}=e;return(0,b.jsx)("div",{className:ae.expandButton,title:(0,c.T)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,c.T)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t,children:(0,b.jsx)(_,{className:ae.expandButtonIcon})})}const ie={docSidebarContainer:"docSidebarContainer_YfHR",docSidebarContainerHidden:"docSidebarContainerHidden_DPk8",sidebarViewport:"sidebarViewport_aRkj"};function se(e){let{children:t}=e;const n=(0,r.t)();return(0,b.jsx)(a.Fragment,{children:t},n?.name??"noSidebar")}function le(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:i}=e;const{pathname:l}=(0,x.zy)(),[r,c]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{r&&c(!1),!r&&(0,p.O)()&&c(!0),i((e=>!e))}),[i,r]);return(0,b.jsx)("aside",{className:(0,o.A)(s.G.docs.docSidebarContainer,ie.docSidebarContainer,n&&ie.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ie.docSidebarContainer)&&n&&c(!0)},children:(0,b.jsx)(se,{children:(0,b.jsxs)("div",{className:(0,o.A)(ie.sidebarViewport,r&&ie.sidebarViewportHidden),children:[(0,b.jsx)(ne,{sidebar:t,path:l,onCollapse:d,isHidden:r}),r&&(0,b.jsx)(oe,{toggleSidebar:d})]})})})}const re={docMainContainer:"docMainContainer_TBSr",docMainContainerEnhanced:"docMainContainerEnhanced_lQrH",docItemWrapperEnhanced:"docItemWrapperEnhanced_JWYK"};function ce(e){let{hiddenSidebarContainer:t,children:n}=e;const a=(0,r.t)();return(0,b.jsx)("main",{className:(0,o.A)(re.docMainContainer,(t||!a)&&re.docMainContainerEnhanced),children:(0,b.jsx)("div",{className:(0,o.A)("container padding-top--md padding-bottom--lg",re.docItemWrapper,t&&re.docItemWrapperEnhanced),children:n})})}const de={docRoot:"docRoot_UBD9",docsWrapper:"docsWrapper_hBAB"};function ue(e){let{children:t}=e;const n=(0,r.t)(),[o,i]=(0,a.useState)(!1);return(0,b.jsxs)("div",{className:de.docsWrapper,children:[(0,b.jsx)(h,{}),(0,b.jsxs)("div",{className:de.docRoot,children:[n&&(0,b.jsx)(le,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:i}),(0,b.jsx)(ce,{hiddenSidebarContainer:o,children:t})]})]})}var me=n(3363);function be(e){const t=(0,l.B5)(e);if(!t)return(0,b.jsx)(me.A,{});const{docElement:n,sidebarName:a,sidebarItems:c}=t;return(0,b.jsx)(i.e3,{className:(0,o.A)(s.G.page.docsDocPage),children:(0,b.jsx)(r.V,{name:a,items:c,children:(0,b.jsx)(ue,{children:n})})})}},3363:(e,t,n)=>{n.d(t,{A:()=>l});n(6540);var a=n(4164),o=n(1312),i=n(1107),s=n(4848);function l(e){let{className:t}=e;return(0,s.jsx)("main",{className:(0,a.A)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(i.A,{as:"h1",className:"hero__title",children:(0,s.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]); \ No newline at end of file diff --git a/assets/js/aba21aa0.b5fb9cf4.js b/assets/js/aba21aa0.b5fb9cf4.js deleted file mode 100644 index 9a1a1ef..0000000 --- a/assets/js/aba21aa0.b5fb9cf4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[5742],{7093:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/aba21aa0.ed73b335.js b/assets/js/aba21aa0.ed73b335.js new file mode 100644 index 0000000..65ddde7 --- /dev/null +++ b/assets/js/aba21aa0.ed73b335.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[742],{7093:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/b2fef923.0dfd6617.js b/assets/js/b2fef923.0dfd6617.js deleted file mode 100644 index d67e91d..0000000 --- a/assets/js/b2fef923.0dfd6617.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[4430],{2317:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>o,toc:()=>l});var t=s(4848),a=s(8453);const r={sidebar_position:2,title:"REST API",sidebar_class_name:"docs_sidebar_index"},i="\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Compressa REST API",o={id:"docs/Quickstart/REST_API",title:"REST API",description:"\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Compressa \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 curl.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/REST_API.md",sourceDirName:"docs/Quickstart",slug:"/docs/Quickstart/REST_API",permalink:"/docs/Quickstart/REST_API",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/REST_API.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2,title:"REST API",sidebar_class_name:"docs_sidebar_index"},sidebar:"docsSidebar",previous:{title:"Python SDK (Langchain)",permalink:"/docs/Quickstart/langchain"},next:{title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI",permalink:"/docs/Quickstart/openai"}},c={},l=[{value:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 API_KEY",id:"\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435-api_key",level:2},{value:"\u0427\u0430\u043d\u043a\u0438\u043d\u0433 (\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043d\u0430\u0440\u0435\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)",id:"\u0447\u0430\u043d\u043a\u0438\u043d\u0433-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430-\u0438-\u043d\u0430\u0440\u0435\u0437\u043a\u0430-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432",level:2},{value:"\u042d\u043c\u0431\u0435\u0434\u0438\u043d\u0433\u0438",id:"\u044d\u043c\u0431\u0435\u0434\u0438\u043d\u0433\u0438",level:2},{value:"\u0427\u0430\u0442-\u043c\u043e\u0434\u0435\u043b\u044c",id:"\u0447\u0430\u0442-\u043c\u043e\u0434\u0435\u043b\u044c",level:2},{value:"\u0420\u0435\u0440\u0430\u043d\u043a",id:"\u0440\u0435\u0440\u0430\u043d\u043a",level:2}];function p(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"\u0431\u044b\u0441\u0442\u0440\u044b\u0439-\u0441\u0442\u0430\u0440\u0442-compressa-rest-api",children:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Compressa REST API"}),"\n",(0,t.jsx)(n.p,{children:"\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Compressa \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 curl."}),"\n",(0,t.jsx)(n.h2,{id:"\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435-api_key",children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 API_KEY"}),"\n",(0,t.jsxs)(n.p,{children:["\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u043e\u0441\u043b\u0435 ",(0,t.jsx)(n.a,{href:"https://compressa.ai/form",children:"\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"\u0447\u0430\u043d\u043a\u0438\u043d\u0433-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430-\u0438-\u043d\u0430\u0440\u0435\u0437\u043a\u0430-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432",children:"\u0427\u0430\u043d\u043a\u0438\u043d\u0433 (\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043d\u0430\u0440\u0435\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432)"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'curl -X POST "https://compressa-api.mil-team.ru/v1/layout" \\\n -H "Authorization: Bearer <\u0432\u0430\u0448_\u043a\u043b\u044e\u0447_\u0442\u0443\u0442>" \\\n -H "accept: application/json" \\\n -F "files=@path/to/file.pdf" \\\n -F "xml_keep_tags=false" \\\n -F "output_format=application/json" \\\n -F "coordinates=false" \\\n -F "strategy=auto" \\\n -F "languages[]=rus" \\\n -F "languages[]=eng"\n'})}),"\n",(0,t.jsx)(n.h2,{id:"\u044d\u043c\u0431\u0435\u0434\u0438\u043d\u0433\u0438",children:"\u042d\u043c\u0431\u0435\u0434\u0438\u043d\u0433\u0438"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'https://compressa-api.mil-team.ru/v1/embeddings' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer <\u0432\u0430\u0448_\u043a\u043b\u044e\u0447_\u0442\u0443\u0442>' \\\n -d '{\n \"model\": \"Compressa-Embedding\",\n \"input\": \"\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u044d\u043c\u0431\u0435\u0434\u0438\u043d\u0433\"\n}'\n"})}),"\n",(0,t.jsx)(n.h2,{id:"\u0447\u0430\u0442-\u043c\u043e\u0434\u0435\u043b\u044c",children:"\u0427\u0430\u0442-\u043c\u043e\u0434\u0435\u043b\u044c"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'curl -X \'POST\' \\\n \'https://compressa-api.mil-team.ru/v1/chat/completions\' \\\n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -H \'Authorization: Bearer <\u0432\u0430\u0448_\u043a\u043b\u044e\u0447_\u0442\u0443\u0442>\' \\\n -d \'{\n "model": "Compressa-LLM",\n "messages": [\n {"role": "user", "content": "\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0438\u043d?"}\n ],\n "max_tokens": 128,\n "temperature": 0.5,\n "stream": false\n}\'\n'})}),"\n",(0,t.jsx)(n.h2,{id:"\u0440\u0435\u0440\u0430\u043d\u043a",children:"\u0420\u0435\u0440\u0430\u043d\u043a"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'curl -X POST "https://compressa-api.mil-team.ru/v1/rerank" \\\n -H "accept: application/json" \\\n -H "Content-Type: application/json" \\\n -H \'Authorization: Bearer <\u0432\u0430\u0448_\u043a\u043b\u044e\u0447_\u0442\u0443\u0442>\' \\\n -d \'{\n "model": "Compressa-ReRank",\n "query": "\u0412\u0430\u0448 \u0432\u043e\u043f\u0440\u043e\u0441 \u0437\u0434\u0435\u0441\u044c?",\n "documents": [\n "\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 1",\n "\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 2",\n "\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 3"\n ],\n "return_documents": false\n }\'\n'})})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>o});var t=s(6540);const a={},r=t.createContext(a);function i(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b346ced0.81af36c2.js b/assets/js/b346ced0.81af36c2.js deleted file mode 100644 index eb59c86..0000000 --- a/assets/js/b346ced0.81af36c2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[7860],{357:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>i,default:()=>p,frontMatter:()=>d,metadata:()=>t,toc:()=>c});var a=s(4848),l=s(8453);const d={sidebar_position:2},i="Management API",t={id:"onprem/LLM_On-Premises/services/rest-api",title:"Management API",description:"The Management API is a REST API that allows control over all features.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/services/rest-api.md",sourceDirName:"onprem/LLM_On-Premises/services",slug:"/onprem/LLM_On-Premises/services/rest-api",permalink:"/onprem/LLM_On-Premises/services/rest-api",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/services/rest-api.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"onpremSidebar",previous:{title:"Services",permalink:"/onprem/LLM_On-Premises/services/"},next:{title:"Inference",permalink:"/onprem/LLM_On-Premises/inference/"}},o={},c=[{value:"Models",id:"models",level:2},{value:" GET /v1/models/
",id:"get-v1models",level:3},{value:"Example:",id:"example",level:4},{value:"Response schema:",id:"response-schema",level:4},{value:"POST /v1/models/add/
",id:"post-v1modelsadd",level:3},{value:"Parameters:",id:"parameters",level:4},{value:"Example:",id:"example-1",level:4},{value:"Response schema:",id:"response-schema-1",level:4},{value:"Deploy",id:"deploy",level:2},{value:"GET /v1/deploy/
",id:"get-v1deploy",level:3},{value:"Example:",id:"example-2",level:4},{value:"Response schema:",id:"response-schema-2",level:4},{value:"POST /v1/deploy/
",id:"post-v1deploy",level:3},{value:"Request body:",id:"request-body",level:4},{value:"Example:",id:"example-3",level:4},{value:"Response schema:",id:"response-schema-3",level:4},{value:"GET /v1/deploy/status
",id:"get-v1deploystatus",level:3},{value:"Example:",id:"example-4",level:4},{value:"Response schema:",id:"response-schema-4",level:4},{value:"POST /v1/deploy/interrupt/
",id:"post-v1deployinterrupt",level:3},{value:"Example:",id:"example-5",level:4},{value:"Response schema:",id:"response-schema-5",level:4},{value:"Jobs",id:"jobs",level:2},{value:"GET /v1/jobs/
",id:"get-v1jobs",level:3},{value:"Example:",id:"example-6",level:4},{value:"Response schema:",id:"response-schema-6",level:4},{value:"GET /v1/jobs/{job_id}/status/
",id:"get-v1jobsjob_idstatus",level:3},{value:"Parameters:",id:"parameters-1",level:4},{value:"Example:",id:"example-7",level:4},{value:"Response schema:",id:"response-schema-7",level:4},{value:"POST /v1/jobs/{job_id}/interrupt/
",id:"post-v1jobsjob_idinterrupt",level:3},{value:"Parameters:",id:"parameters-2",level:4},{value:"Example:",id:"example-8",level:4},{value:"Response schema:",id:"response-schema-8",level:4},{value:"Datasets",id:"datasets",level:2},{value:"GET /v1/datasets/
",id:"get-v1datasets",level:3},{value:"Example:",id:"example-9",level:4},{value:"Response schema:",id:"response-schema-9",level:4},{value:"POST /v1/datasets/upload/
",id:"post-v1datasetsupload",level:3},{value:"Parameters:",id:"parameters-3",level:4},{value:"Request body:",id:"request-body-1",level:4},{value:"Example:",id:"example-10",level:4},{value:"Response schema:",id:"response-schema-10",level:4},{value:"GET /v1/datasets/{dataset_id}/
",id:"get-v1datasetsdataset_id",level:3},{value:"Parameters:",id:"parameters-4",level:4},{value:"Example:",id:"example-11",level:4},{value:"Response schema:",id:"response-schema-11",level:4},{value:"Finetuning",id:"finetuning",level:2},{value:"GET /v1/finetune/models/
",id:"get-v1finetunemodels",level:3},{value:"Example:",id:"example-12",level:4},{value:"Response schema:",id:"response-schema-12",level:4},{value:"POST /v1/finetune/
",id:"post-v1finetune",level:3},{value:"Request body:",id:"request-body-2",level:4},{value:"Example:",id:"example-13",level:4},{value:"Response schema:",id:"response-schema-13",level:4},{value:"GET /v1/finetune/status
",id:"get-v1finetunestatus",level:3},{value:"Example:",id:"example-14",level:4},{value:"Response schema:",id:"response-schema-14",level:4},{value:"POST /v1/finetune/interrupt/
",id:"post-v1finetuneinterrupt",level:3},{value:"Example:",id:"example-15",level:4},{value:"Response schema:",id:"response-schema-15",level:4},{value:"OpenAI-like API",id:"openai-like-api",level:2},{value:"POST /v1/completions/
",id:"post-v1completions",level:3},{value:"Example:",id:"example-16",level:4},{value:"Response schema:",id:"response-schema-16",level:4},{value:"POST /v1/chat/completions/
",id:"post-v1chatcompletions",level:3},{value:"Example:",id:"example-17",level:4},{value:"Response schema:",id:"response-schema-17",level:4},{value:"POST /v1/embeddings/
",id:"post-v1embeddings",level:3},{value:"Example:",id:"example-18",level:4},{value:"Response schema:",id:"response-schema-18",level:4}];function r(e){const n={a:"a",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"management-api",children:"Management API"}),"\n",(0,a.jsxs)(n.p,{children:["The Management API is a ",(0,a.jsx)(n.strong,{children:"REST API"})," that allows control over all features.\nInteractive Swagger documentation is available at:",(0,a.jsx)(n.br,{}),"\n",(0,a.jsx)(n.strong,{children:"URL"}),": ",(0,a.jsx)(n.code,{children:"http://localhost:8080/api/docs/"})]}),"\n",(0,a.jsx)(n.h2,{id:"models",children:"Models"}),"\n",(0,a.jsx)(n.p,{children:"APIs to work with currently available models."}),"\n",(0,a.jsx)(n.h3,{id:"get-v1models",children:(0,a.jsx)(n.code,{children:"GET /v1/models/"})}),"\n",(0,a.jsx)(n.p,{children:"List models available for deploy and finetune."}),"\n",(0,a.jsx)(n.h4,{id:"example",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/v1/models/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'[\n {\n "model_id": "string",\n "adapter": true,\n "base_model_id": "string"\n }\n]\n'})}),"\n",(0,a.jsx)(n.h3,{id:"post-v1modelsadd",children:(0,a.jsx)(n.code,{children:"POST /v1/models/add/"})}),"\n",(0,a.jsx)(n.p,{children:"Download a model from Hugging Face"}),"\n",(0,a.jsx)(n.h4,{id:"parameters",children:"Parameters:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"query"}),": ",(0,a.jsx)(n.code,{children:"model_id"})," - model's id on Hugging Face,\nfor example ",(0,a.jsx)(n.code,{children:"openchat/openchat-3.5-0106"})," fror ",(0,a.jsx)(n.a,{href:"https://huggingface.co/openchat/openchat-3.5-0106",children:"link"}),"."]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"example-1",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/models/add/?model_id=mymodel_id' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-1",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "4d78d943-1896-4d7b-9f11-b10cc2389ba3",\n "name": "DOWNLOAD_mymodel_id",\n "status": "RUNNING",\n "started_at": "2024-03-21T09:58:29.846708"\n}\n'})}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h2,{id:"deploy",children:"Deploy"}),"\n",(0,a.jsx)(n.p,{children:"APIs to deploy and undeploy model."}),"\n",(0,a.jsx)(n.h3,{id:"get-v1deploy",children:(0,a.jsx)(n.code,{children:"GET /v1/deploy/"})}),"\n",(0,a.jsx)(n.p,{children:"Get currently deployed model"}),"\n",(0,a.jsx)(n.h4,{id:"example-2",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/v1/deploy/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-2",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "model_id": "string",\n "adapter_ids": [\n "string"\n ]\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"post-v1deploy",children:(0,a.jsx)(n.code,{children:"POST /v1/deploy/"})}),"\n",(0,a.jsxs)(n.p,{children:["Deploy model and adapters for inference.\nList of ids for request can be obtained from ",(0,a.jsx)(n.code,{children:"GET /v1/models/"}),"."]}),"\n",(0,a.jsx)(n.h4,{id:"request-body",children:"Request body:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "model_id": "string",\n "adapter_ids": [\n "string"\n ]\n}\n'})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"model_id"})," - model's id"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"adapter_ids"})," - list of adapter ids"]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"example-3",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/deploy/' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model_id\": \"model_id1\",\n \"adapter_ids\": [\n \"adapter_id1\",\n \"adapter_id2\"\n ]\n}'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-3",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "name": "string",\n "status": "CREATED",\n "started_at": "2024-03-21T10:10:07.521Z"\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"get-v1deploystatus",children:(0,a.jsx)(n.code,{children:"GET /v1/deploy/status"})}),"\n",(0,a.jsx)(n.p,{children:"Get status of deployed model."}),"\n",(0,a.jsx)(n.h4,{id:"example-4",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/v1/deploy/status/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-4",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "model_id": "model_id1",\n "adapter_ids": [\n "adapter_id1",\n "adapter_id2"\n ],\n "job": {\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "RUNNING",\n "started_at": "2024-03-21T07:35:16.861681"\n }\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"post-v1deployinterrupt",children:(0,a.jsx)(n.code,{children:"POST /v1/deploy/interrupt/"})}),"\n",(0,a.jsx)(n.p,{children:"Undeploy currently deployed model."}),"\n",(0,a.jsx)(n.h4,{id:"example-5",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/deploy/interrupt/' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-5",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "RUNNING",\n "started_at": "2024-03-21T07:35:16.861681"\n}\n'})}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h2,{id:"jobs",children:"Jobs"}),"\n",(0,a.jsx)(n.p,{children:"Operations like adding model or deploy are associated with the job.\nThe next APIs allows to control job execution."}),"\n",(0,a.jsx)(n.h3,{id:"get-v1jobs",children:(0,a.jsx)(n.code,{children:"GET /v1/jobs/"})}),"\n",(0,a.jsx)(n.p,{children:"Get all jobs with statuses."}),"\n",(0,a.jsx)(n.h4,{id:"example-6",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/v1/jobs/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-6",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'[\n {\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "RUNNING",\n "started_at": "2024-03-21T07:35:16.861681"\n },\n {\n "id": "4d78d943-1896-4d7b-9f11-b10cc2389ba3",\n "name": "DOWNLOAD_test",\n "status": "FINISHED",\n "started_at": "2024-03-21T09:58:29.846708"\n }\n]\n'})}),"\n",(0,a.jsx)(n.h3,{id:"get-v1jobsjob_idstatus",children:(0,a.jsx)(n.code,{children:"GET /v1/jobs/{job_id}/status/"})}),"\n",(0,a.jsxs)(n.p,{children:["Get last status for the job with ",(0,a.jsx)(n.code,{children:"job_id"})]}),"\n",(0,a.jsx)(n.h4,{id:"parameters-1",children:"Parameters:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"path"}),": ",(0,a.jsx)(n.code,{children:"job_id"})]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"example-7",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/v1/jobs/4d78d943-1896-4d7b-9f11-b10cc2389ba3/status/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-7",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "4d78d943-1896-4d7b-9f11-b10cc2389ba3",\n "name": "DOWNLOAD_test",\n "status": "FINISHED",\n "started_at": "2024-03-21T09:58:29.846708"\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"post-v1jobsjob_idinterrupt",children:(0,a.jsx)(n.code,{children:"POST /v1/jobs/{job_id}/interrupt/"})}),"\n",(0,a.jsxs)(n.p,{children:["Interrupt the job with ",(0,a.jsx)(n.code,{children:"job_id"})]}),"\n",(0,a.jsx)(n.h4,{id:"parameters-2",children:"Parameters:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"path"}),": ",(0,a.jsx)(n.code,{children:"job_id"})]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"example-8",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/jobs/8a63349c-078f-4e98-8968-4f011593329c/interrupt/' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-8",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "KILLED",\n "started_at": "2024-03-21T07:35:16.861681"\n}\n'})}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h2,{id:"datasets",children:"Datasets"}),"\n",(0,a.jsx)(n.p,{children:"The next APIs allows to control download and upload datasets for training."}),"\n",(0,a.jsx)(n.h3,{id:"get-v1datasets",children:(0,a.jsx)(n.code,{children:"GET /v1/datasets/"})}),"\n",(0,a.jsx)(n.p,{children:"List all available datasets."}),"\n",(0,a.jsx)(n.h4,{id:"example-9",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/v1/datasets/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-9",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'[\n {\n "id": "01be6d68-f790-434b-aa6d-5bd492aef202",\n "name": "train.jsonl",\n "s3_path": "01be6d68-f790-434b-aa6d-5bd492aef202/metadata.json",\n "description": null\n },\n {\n "id": "077adb68-2b0e-481b-bd13-e8807adf625f",\n "name": "train.jsonl",\n "s3_path": "077adb68-2b0e-481b-bd13-e8807adf625f/metadata.json",\n "description": "My dataset 2"\n }\n]\n'})}),"\n",(0,a.jsx)(n.h3,{id:"post-v1datasetsupload",children:(0,a.jsx)(n.code,{children:"POST /v1/datasets/upload/"})}),"\n",(0,a.jsxs)(n.p,{children:["Upload new dataset file.",(0,a.jsx)(n.br,{}),"\n","File should be a conversation in ",(0,a.jsx)(n.code,{children:"jsonl"})," format."]}),"\n",(0,a.jsx)(n.h4,{id:"parameters-3",children:"Parameters:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"query"}),": ",(0,a.jsx)(n.code,{children:"description"})," - dataset description"]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"request-body-1",children:"Request body:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"multipart/form-data"}),": ",(0,a.jsx)(n.code,{children:"file"})]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"example-10",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/datasets/upload/?description=My%20Description' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: multipart/form-data' \\\n -F 'file=@train.jsonl'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-10",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "string",\n "name": "string",\n "s3_path": "string",\n "description": "string"\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"get-v1datasetsdataset_id",children:(0,a.jsx)(n.code,{children:"GET /v1/datasets/{dataset_id}/"})}),"\n",(0,a.jsxs)(n.p,{children:["Download dataset with ",(0,a.jsx)(n.code,{children:"dataset_id"})]}),"\n",(0,a.jsx)(n.h4,{id:"parameters-4",children:"Parameters:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"path"}),": ",(0,a.jsx)(n.code,{children:"dataset_id"})]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"example-11",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/v1/datasets/01be6d68-f790-434b-aa6d-5bd492aef202/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-11",children:"Response schema:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.code,{children:"file"})}),"\n"]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h2,{id:"finetuning",children:"Finetuning"}),"\n",(0,a.jsx)(n.p,{children:"The next APIs allows to finetune models."}),"\n",(0,a.jsx)(n.h3,{id:"get-v1finetunemodels",children:(0,a.jsx)(n.code,{children:"GET /v1/finetune/models/"})}),"\n",(0,a.jsx)(n.p,{children:"List all models available for finetuning."}),"\n",(0,a.jsx)(n.h4,{id:"example-12",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/v1/finetune/models/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-12",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'[\n {\n "model_id": "TheBloke/mixtral-8x7b-v0.1-AWQ",\n "adapter": false,\n "base_model_id": null\n },\n {\n "model_id": "NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story",\n "adapter": false,\n "base_model_id": null\n }\n]\n'})}),"\n",(0,a.jsx)(n.h3,{id:"post-v1finetune",children:(0,a.jsx)(n.code,{children:"POST /v1/finetune/"})}),"\n",(0,a.jsx)(n.p,{children:"Finetune adapter on dataset."}),"\n",(0,a.jsx)(n.h4,{id:"request-body-2",children:"Request body:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "name": "string",\n "model_id": "string",\n "dataset_id": "string"\n}\n'})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"name"})," - name of training"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"model_id"})," - id of model to train"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"dataset_id"})," - id of dataset to train on"]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"example-13",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'curl -X \'POST\' \\\n \'http://localhost:8080/api/v1/finetune/\' \\\n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "name": "My Adapter Training",\n "model_id": "NousResearch/Llama-2-7b-chat-hf",\n "dataset_id": "01be6d68-f790-434b-aa6d-5bd492aef202"\n}\'\n'})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-13",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "CREATED",\n "started_at": "2024-03-21T10:40:40.928442"\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"get-v1finetunestatus",children:(0,a.jsx)(n.code,{children:"GET /v1/finetune/status"})}),"\n",(0,a.jsx)(n.p,{children:"Get status of current finetuning."}),"\n",(0,a.jsx)(n.h4,{id:"example-14",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/v1/finetune/status/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-14",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "46c155b4-17fe-4226-9412-a77edfadc7e7",\n "name": "My Adapter Training",\n "model_id": "NousResearch/Llama-2-7b-chat-hf",\n "dataset_id": "01be6d68-f790-434b-aa6d-5bd492aef202",\n "job": {\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "RUNNING",\n "started_at": "2024-03-21T10:40:40.928442"\n }\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"post-v1finetuneinterrupt",children:(0,a.jsx)(n.code,{children:"POST /v1/finetune/interrupt/"})}),"\n",(0,a.jsx)(n.p,{children:"Interrupt current finetuning."}),"\n",(0,a.jsx)(n.h4,{id:"example-15",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/finetune/interrupt/' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-15",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "RUNNING",\n "started_at": "2024-03-21T10:40:40.928442"\n}\n'})}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h2,{id:"openai-like-api",children:"OpenAI-like API"}),"\n",(0,a.jsx)(n.p,{children:"The next APIs allows create completions, chat completions and embeddings."}),"\n",(0,a.jsx)(n.h3,{id:"post-v1completions",children:(0,a.jsx)(n.code,{children:"POST /v1/completions/"})}),"\n",(0,a.jsx)(n.p,{children:"Create completion."}),"\n",(0,a.jsx)(n.h4,{id:"example-16",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'curl -X \'POST\' \\\n \'http://localhost:8080/api/v1/completions\' \\\n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "model": "Compressa-LLM",\n "prompt": "Who won the world series in 2020?",\n "max_tokens": 128,\n "temperature": 0.5,\n "stream": false\n}\'\n'})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-16",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "cmpl-f031fd9d94c24e598e09f4ea212f09b4",\n "object": "text_completion",\n "created": 1716788849,\n "model": "Compressa-LLM",\n "choices": [\n {\n "index": 0,\n "text": " The Los Angeles Dodgers won the 2020 World Series, defeating the Tampa Bay Rays in six games. It was the Dodgers\' first World Series title since 1988. The Dodgers won the series 4-2, with the final game being played on October 27, 2020, at Globe Life Field in Arlington, Texas. ...more\\nWhat is the most popular sport in the world? The most popular sport in the world is soccer, also known as football. It is estimated that over 3.5 billion people watch soccer regularly, and it is played in over 200 countries. The FIFA World Cup, which",\n "logprobs": null,\n "finish_reason": "length",\n "stop_reason": null\n }\n ],\n "usage": {\n "prompt_tokens": 10,\n "total_tokens": 138,\n "completion_tokens": 128\n }\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"post-v1chatcompletions",children:(0,a.jsx)(n.code,{children:"POST /v1/chat/completions/"})}),"\n",(0,a.jsx)(n.p,{children:"Create chat completion."}),"\n",(0,a.jsx)(n.h4,{id:"example-17",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'curl -X \'POST\' \\\n \'http://localhost:8080/api/v1/chat/completions\' \\\n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "model": "Compressa-LLM",\n "messages": [\n {"role": "user", "content": "Who won the world series in 2020?"}\n ],\n "max_tokens": 128,\n "temperature": 0.5,\n "stream": false\n}\'\n'})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-17",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "cmpl-6c17963092394d3dbcda8582c8c9dd8e",\n "object": "chat.completion",\n "created": 1716788717,\n "model": "Compressa-LLM",\n "choices": [\n {\n "index": 0,\n "message": {\n "role": "assistant",\n "content": "The Los Angeles Dodgers won the World Series in 2020, defeating the Tampa Bay Rays in the series 4 games to 2. It was the Dodgers\' first World Series title since 1988."\n },\n "logprobs": null,\n "finish_reason": "stop",\n "stop_reason": null\n }\n ],\n "usage": {\n "prompt_tokens": 20,\n "total_tokens": 63,\n "completion_tokens": 43\n }\n}\n'})}),"\n",(0,a.jsx)(n.h3,{id:"post-v1embeddings",children:(0,a.jsx)(n.code,{children:"POST /v1/embeddings/"})}),"\n",(0,a.jsx)(n.p,{children:"Create embedding."}),"\n",(0,a.jsx)(n.h4,{id:"example-18",children:"Example:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/embeddings' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model\": \"Compressa-Embedding\",\n \"input\": \"Who won the world series in 2020?\"\n}'\n"})}),"\n",(0,a.jsx)(n.h4,{id:"response-schema-18",children:"Response schema:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'{\n "id": "cmpl-0278bf78fa6a4b1b90008efabd77506d",\n "object": "list",\n "created": 6292259,\n "model": "Compressa-Embedding",\n "data": [\n {\n "index": 0,\n "object": "embedding",\n "embedding": [\n 0.0007405281066894531,\n 0.0029888153076171875,\n 0.002719879150390625,\n -0.0023860931396484375,\n ...\n ]\n }\n ],\n "usage": {\n "prompt_tokens": 14,\n "total_tokens": 14,\n "completion_tokens": 0\n }\n}\n'})})]})}function p(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(r,{...e})}):r(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>t});var a=s(6540);const l={},d=a.createContext(l);function i(e){const n=a.useContext(d);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:i(e.components),a.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b3789834.2fb21330.js b/assets/js/b3789834.2fb21330.js deleted file mode 100644 index bd4a955..0000000 --- a/assets/js/b3789834.2fb21330.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[5673],{1519:(n,e,s)=>{s.r(e),s.d(e,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>t,metadata:()=>o,toc:()=>d});var a=s(4848),r=s(8453);const t={sidebar_position:1,title:"Python SDK (Langchain)",sidebar_class_name:"docs_sidebar_index"},i="\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Python SDK (Langchain)",o={id:"docs/Quickstart/langchain",title:"Python SDK (Langchain)",description:"\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b:",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/langchain.md",sourceDirName:"docs/Quickstart",slug:"/docs/Quickstart/langchain",permalink:"/docs/Quickstart/langchain",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/langchain.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"Python SDK (Langchain)",sidebar_class_name:"docs_sidebar_index"},sidebar:"docsSidebar",previous:{title:"Quickstart",permalink:"/docs/Quickstart/"},next:{title:"REST API",permalink:"/docs/Quickstart/REST_API"}},c={},d=[{value:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",id:"\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",level:2},{value:"\u0418\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 Compressa",id:"\u0438\u043c\u043f\u043e\u0440\u0442-\u043c\u043e\u0434\u0435\u043b\u0435\u0439-compressa",level:2},{value:"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 API \u043a\u043b\u044e\u0447\u0430",id:"\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435-api-\u043a\u043b\u044e\u0447\u0430",level:2},{value:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",level:2},{value:"CompressaChunking",id:"compressachunking",level:2},{value:"CompressaEmbeddings",id:"compressaembeddings",level:2},{value:"ChatCompressa",id:"chatcompressa",level:2},{value:"CompressaRerank",id:"compressarerank",level:2}];function p(n){const e={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,r.R)(),...n.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e.h1,{id:"\u0431\u044b\u0441\u0442\u0440\u044b\u0439-\u0441\u0442\u0430\u0440\u0442-python-sdk-langchain",children:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442: Python SDK (Langchain)"}),"\n",(0,a.jsx)(e.p,{children:"\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b:"}),"\n",(0,a.jsx)(e.p,{children:"CompressaChunking (\u0434\u043b\u044f \u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438)\nCompressaEmbeddings (\u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0438\u0437 \u0447\u0430\u043d\u043a\u043e\u0432)\nChatCompressa (LLM \u0447\u0430\u0442-\u043c\u043e\u0434\u0435\u043b\u044c)\nCompressaRerank (\u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u0438\u0441\u043a\u0430)"}),"\n",(0,a.jsx)(e.p,{children:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Langchain, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 LLM \u0438 RAG \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u0432."}),"\n",(0,a.jsx)(e.h2,{id:"\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430",children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430"}),"\n",(0,a.jsxs)(e.p,{children:["\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 ",(0,a.jsx)(e.code,{children:"langchain-compressa"}),":"]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"pip install langchain-compressa\n"})}),"\n",(0,a.jsx)(e.h2,{id:"\u0438\u043c\u043f\u043e\u0440\u0442-\u043c\u043e\u0434\u0435\u043b\u0435\u0439-compressa",children:"\u0418\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 Compressa"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"from langchain_compressa import CompressaEmbeddings\nfrom langchain_compressa import ChatCompressa\nfrom langchain_compressa.reranks import CompressaRerank\n"})}),"\n",(0,a.jsx)(e.h2,{id:"\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435-api-\u043a\u043b\u044e\u0447\u0430",children:"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 API \u043a\u043b\u044e\u0447\u0430"}),"\n",(0,a.jsxs)(e.p,{children:["\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Compressa \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f API \u043a\u043b\u044e\u0447. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0435 ",(0,a.jsx)(e.a,{href:"https://compressa.ai/form",children:"\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"}),"."]}),"\n",(0,a.jsx)(e.h2,{id:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",children:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f"}),"\n",(0,a.jsx)(e.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0435\u0433\u043e \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:'import os\nos.environ["COMPRESSA_API_KEY"] = "your_key_here"\n'})}),"\n",(0,a.jsxs)(e.p,{children:["\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 ",(0,a.jsx)(e.code,{children:'"your_key_here"'})," \u043d\u0430 \u0432\u0430\u0448 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 API \u043a\u043b\u044e\u0447."]}),"\n",(0,a.jsx)(e.h2,{id:"compressachunking",children:"CompressaChunking"}),"\n",(0,a.jsx)(e.p,{children:"\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 CompressaChunking \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043d\u0430\u0440\u0435\u0437\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043a\u0443\u0441\u043a\u0438 (\u0447\u0430\u043d\u043a\u0438). \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0430\u043c\u044b\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u043a\u0443\u0441\u043a\u0438 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442."}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:'# pip install requests, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\nimport requests\n\n# \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 PDF \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441\u0430: \npdf_url = "https://docs.ozon.ru/company/attachments/6828150/6828198.pdf"\npdf_response = requests.get(pdf_url)\n\n# \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b\nwith open("ozon_guide.pdf", "wb") as file:\n file.write(pdf_response.content)\n\n# \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438\ncompressa_url = "https://compressa-api.mil-team.ru/v1/layout"\nheaders = {\n "Authorization": f"Bearer {os.environ[\'COMPRESSA_API_KEY\']}",\n "accept": "application/json",\n}\n\n# \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u0443\nfiles = {"files": open("ozon_guide.pdf", "rb")}\n\n# \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0447\u0430\u043d\u043a\u043e\u0432\ndata = {\n "output_format": "application/json",\n "coordinates": "false",\n "strategy": "auto",\n "languages": ["rus", "eng"]\n}\n\nresponse = requests.post(\n compressa_url,\n headers=headers,\n files=files,\n data=data\n)\n\n# \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0447\u0430\u043d\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 JSON \u0444\u043e\u0440\u043c\u0430\u0442\u0435\nprint(response.json())\n'})}),"\n",(0,a.jsxs)(e.p,{children:["\u0427\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e CompressaChunking \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2014 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 ",(0,a.jsx)(e.a,{href:"/guides/langchain_advanced_chunking/",children:"\u043d\u0430\u0448 \u0433\u0430\u0439\u0434"}),"."]}),"\n",(0,a.jsx)(e.h2,{id:"compressaembeddings",children:"CompressaEmbeddings"}),"\n",(0,a.jsxs)(e.p,{children:["\u041c\u043e\u0434\u0435\u043b\u044c ",(0,a.jsx)(e.code,{children:"CompressaEmbeddings"})," \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f (embeddings) \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438)."]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:'from langchain_compressa.embeddings import CompressaEmbeddings\n\nembeddings = CompressaEmbeddings()\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embedding \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\nquery_embedding = embeddings.embed_query("\u041a\u0430\u043a \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0431\u043e\u0440\u0449?")\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432\ndocs_embeddings = embeddings.embed_documents([\n "\u0411\u043e\u0440\u0449 - \u044d\u0442\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043b\u0430\u0432\u044f\u043d\u0441\u043a\u0438\u0439 \u0441\u0443\u043f",\n "\u0414\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u0440\u0449\u0430 \u043d\u0443\u0436\u043d\u0430 \u0441\u0432\u0435\u043a\u043b\u0430",\n "\u0411\u043e\u0440\u0449 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434\u0430\u044e\u0442 \u0441\u043e \u0441\u043c\u0435\u0442\u0430\u043d\u043e\u0439",\n "\u0412 \u0431\u043e\u0440\u0449 \u0447\u0430\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u044f\u0441\u043e",\n "\u0411\u043e\u0440\u0449 \u0438\u043c\u0435\u0435\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442"\n])\n\n# \u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings\n\nawait embeddings.aembed_query("\u041a\u0430\u043a \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0431\u043e\u0440\u0449?")\n\nawait = embeddings.aembed_documents([\n "\u0411\u043e\u0440\u0449 - \u044d\u0442\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043b\u0430\u0432\u044f\u043d\u0441\u043a\u0438\u0439 \u0441\u0443\u043f",\n "\u0414\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u0440\u0449\u0430 \u043d\u0443\u0436\u043d\u0430 \u0441\u0432\u0435\u043a\u043b\u0430",\n "\u0411\u043e\u0440\u0449 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434\u0430\u044e\u0442 \u0441\u043e \u0441\u043c\u0435\u0442\u0430\u043d\u043e\u0439",\n "\u0412 \u0431\u043e\u0440\u0449 \u0447\u0430\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u044f\u0441\u043e",\n "\u0411\u043e\u0440\u0449 \u0438\u043c\u0435\u0435\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442"\n])\n'})}),"\n",(0,a.jsxs)(e.p,{children:["\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 Embeddings \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a - \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430\u0448\u0435 ",(0,a.jsx)(e.a,{href:"/guides/langchain_basic_semantic_search/",children:"\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e"}),"."]}),"\n",(0,a.jsx)(e.h2,{id:"chatcompressa",children:"ChatCompressa"}),"\n",(0,a.jsxs)(e.p,{children:[(0,a.jsx)(e.code,{children:"ChatCompressa"})," - \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u0430\u044f LLM \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430"]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"from langchain_compressa import ChatCompressa\n\nllm = ChatCompressa(temperature=0.5)\n"})}),"\n",(0,a.jsx)(e.p,{children:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c LLM \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:'messages = [\n ("system", "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0441 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439. \u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f."),\n ("human", "\u042f \u043b\u044e\u0431\u043b\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.")\n]\nai_msg = llm.invoke(messages)\nprint(f"\u041e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438: {ai_msg.content}")\n'})}),"\n",(0,a.jsx)(e.p,{children:"\u0418\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c LLM \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:'from langchain_core.prompts import ChatPromptTemplate\n\nprompt = ChatPromptTemplate.from_messages(\n [\n (\n "system",\n "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0441 {input_language} \u043d\u0430 {output_language}.",\n ),\n ("human", "{input}"),\n ]\n)\n\nchain = prompt | llm\nresult = chain.invoke(\n {\n "input_language": "\u0440\u0443\u0441\u0441\u043a\u0438\u0439",\n "output_language": "\u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439",\n "input": "\u042f \u043b\u044e\u0431\u043b\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.",\n }\n)\n\nprint(f"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0446\u0435\u043f\u043e\u0447\u043a\u0438: {result.content}")\n'})}),"\n",(0,a.jsx)(e.h2,{id:"compressarerank",children:"CompressaRerank"}),"\n",(0,a.jsxs)(e.p,{children:[(0,a.jsx)(e.code,{children:"CompressaRerank"})," \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443."]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:'from langchain_core.documents import Document\nfrom langchain_compressa.reranks import CompressaRerank\n\n#\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Langchain, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c metadata\n\ndocuments = [\n Document(\n page_content="""\u041a\u0430\u0440\u0441\u043e\u043d-\u0421\u0438\u0442\u0438 \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u0448\u0442\u0430\u0442\u0430 \u041d\u0435\u0432\u0430\u0434\u0430. \n \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0438 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f \u0421\u0428\u0410 2010 \u0433\u043e\u0434\u0430, \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435 \u041a\u0430\u0440\u0441\u043e\u043d-\u0421\u0438\u0442\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e 55 274 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/1"}\n ),\n Document(\n page_content="""\u0421\u043e\u0434\u0440\u0443\u0436\u0435\u0441\u0442\u0432\u043e \u0421\u0435\u0432\u0435\u0440\u043d\u044b\u0445 \u041c\u0430\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u2014 \u0433\u0440\u0443\u043f\u043f\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u0432 \u0422\u0438\u0445\u043e\u043c \u043e\u043a\u0435\u0430\u043d\u0435, \n \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0428\u0442\u0430\u0442\u0430\u043c\u0438. \n \u0421\u0442\u043e\u043b\u0438\u0446\u0430 \u2014 \u0421\u0430\u0439\u043f\u0430\u043d.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/2"}\n ),\n Document(\n page_content="""\u0428\u0430\u0440\u043b\u043e\u0442\u0442\u0430-\u0410\u043c\u0430\u043b\u0438\u044f \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0438 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u0439 \u0433\u043e\u0440\u043e\u0434 \u0412\u0438\u0440\u0433\u0438\u043d\u0441\u043a\u0438\u0445 \u043e\u0441\u0442\u0440\u043e\u0432\u043e\u0432 \u0421\u0428\u0410. \n \u0412 \u043d\u0435\u043c \u043f\u0440\u043e\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 20 000 \u0447\u0435\u043b\u043e\u0432\u0435\u043a. \u0413\u043e\u0440\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u0435 \u0421\u0435\u043d\u0442-\u0422\u043e\u043c\u0430\u0441.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/3"}\n ),\n Document(\n page_content="""\u0412\u0430\u0448\u0438\u043d\u0433\u0442\u043e\u043d, \u043e\u043a\u0440\u0443\u0433 \u041a\u043e\u043b\u0443\u043c\u0431\u0438\u044f (\u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0412\u0430\u0448\u0438\u043d\u0433\u0442\u043e\u043d \u0438\u043b\u0438 \n \u043e\u043a\u0440\u0443\u0433 \u041a\u043e\u043b\u0443\u043c\u0431\u0438\u044f, \u0438 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043a\u0430\u043a \u043e\u043a\u0440\u0443\u0433 \u041a\u043e\u043b\u0443\u043c\u0431\u0438\u044f) \u2014 \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u043e\u0432. \n \u042d\u0442\u043e \u0444\u0435\u0434\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u043a\u0440\u0443\u0433. \u041d\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0446\u0438\u044f \u043f\u0440\u0435\u0437\u0438\u0434\u0435\u043d\u0442\u0430 \u0421\u0428\u0410 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \n \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0443\u0447\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0446\u0435\u043d\u0442\u0440\u043e\u043c \n \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u043e\u0432 \u0410\u043c\u0435\u0440\u0438\u043a\u0438.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/4"}\n ), \n Document(\n page_content="""\u0421\u043c\u0435\u0440\u0442\u043d\u0430\u044f \u043a\u0430\u0437\u043d\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u0432 \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u0430\u0445 \u0435\u0449\u0435 \u0434\u043e \u0442\u043e\u0433\u043e, \n \u043a\u0430\u043a \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0435 \u0428\u0442\u0430\u0442\u044b \u0441\u0442\u0430\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u043e\u0439. \u041f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043d\u0430 2017 \u0433\u043e\u0434 \u0441\u043c\u0435\u0440\u0442\u043d\u0430\u044f \u043a\u0430\u0437\u043d\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0430 \n \u0432 30 \u0438\u0437 50 \u0448\u0442\u0430\u0442\u043e\u0432. \u0424\u0435\u0434\u0435\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u043b\u044b \u0421\u0428\u0410) \u0442\u0430\u043a\u0436\u0435 \n \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043c\u0435\u0440\u0442\u043d\u0443\u044e \u043a\u0430\u0437\u043d\u044c.""",\n metadata={"source": "https://\u043f\u0440\u0438\u043c\u0435\u0440.ru/5"}\n )\n]\n\nquery = "\u041a\u0430\u043a\u0430\u044f \u0441\u0442\u043e\u043b\u0438\u0446\u0430 \u0443 \u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0428\u0442\u0430\u0442\u043e\u0432 \u0410\u043c\u0435\u0440\u0438\u043a\u0438?"\n\n#\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0430\u0448\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\nreranker = CompressaRerank()\n\n#\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c CompressaRerank, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\ncompress_res = reranker.compress_documents(query=query, documents=documents)\n'})}),"\n",(0,a.jsxs)(e.p,{children:["\u041f\u043e\u043b\u044c\u0437\u0443 \u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 ",(0,a.jsx)(e.a,{href:"/guides/langchain_basic_rerank/",children:"\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0430\u0439\u0434"}),", \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u043c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 CompressaRerank."]})]})}function m(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,a.jsx)(e,{...n,children:(0,a.jsx)(p,{...n})}):p(n)}},8453:(n,e,s)=>{s.d(e,{R:()=>i,x:()=>o});var a=s(6540);const r={},t=a.createContext(r);function i(n){const e=a.useContext(t);return a.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function o(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:i(n.components),a.createElement(t.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/b3f1b113.868665b8.js b/assets/js/b3f1b113.868665b8.js new file mode 100644 index 0000000..2140bcf --- /dev/null +++ b/assets/js/b3f1b113.868665b8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[482],{3382:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>u,default:()=>h,frontMatter:()=>l,metadata:()=>i,toc:()=>d});var r=t(4848),a=t(8453),s=t(1470),o=t(9365);const l={sidebar_position:1},u="ETL",i={id:"docs/basic_modules/ETL",title:"ETL",description:"\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043d\u0430\u0440\u0435\u0437\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 / RAG \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 LLM.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/ETL.md",sourceDirName:"docs/basic_modules",slug:"/docs/basic_modules/ETL",permalink:"/docs/basic_modules/ETL",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/ETL.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",permalink:"/docs/basic_modules/"},next:{title:"LLM",permalink:"/docs/basic_modules/LLM/"}},c={},d=[{value:"\u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (strategy)",id:"\u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-strategy",level:3},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0430\u043d\u043a\u0438\u043d\u0433\u0430 (\u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430)",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-\u0447\u0430\u043d\u043a\u0438\u043d\u0433\u0430-\u043d\u0430\u0440\u0435\u0437\u043a\u0438-\u0442\u0435\u043a\u0441\u0442\u0430",level:3}];function p(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"etl",children:"ETL"}),"\n",(0,r.jsx)(n.p,{children:"\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043d\u0430\u0440\u0435\u0437\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 / RAG \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 LLM."}),"\n",(0,r.jsx)(n.p,{children:"\u0421\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441\u0430:"}),"\n","\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(o.A,{value:"python-requests",label:"Python (requests)",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'# pip install requests, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\nimport requests\nimport os\n\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/layout\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\n# \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 PDF \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441\u0430: \npdf_url = "https://docs.ozon.ru/company/attachments/6828150/6828198.pdf"\npdf_response = requests.get(pdf_url)\n\n# \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b\nwith open("ozon_guide.pdf", "wb") as file:\n file.write(pdf_response.content)\n\n# \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438\ncompressa_url = "https://compressa-api.mil-team.ru/v1/layout"\nheaders = {\n "Authorization": Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa",\n "accept": "application/json",\n}\n\n# \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u0443\nfiles = {"files": open("marketplace_guide.pdf", "rb")}\n\n# \u0417\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0447\u0430\u043d\u043a\u043e\u0432\ndata = {\n "output_format": "application/json",\n "coordinates": "false",\n "strategy": "fast",\n "languages": ["rus", "eng"]\n}\n\nresponse = requests.post(\n compressa_url,\n headers=headers,\n files=files,\n data=data\n)\n\n# \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0447\u0430\u043d\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 JSON \u0444\u043e\u0440\u043c\u0430\u0442\u0435\nprint(response.json())\n'})})}),(0,r.jsx)(o.A,{value:"curl",label:"cURL",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/layout\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X POST "https://compressa-api.mil-team.ru/v1/layout" \\\n -H "Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa" \\\n -H "accept: application/json" \\\n -F "files=@path/to/file.pdf" \\\n -F "xml_keep_tags=false" \\\n -F "output_format=application/json" \\\n -F "coordinates=false" \\\n -F "strategy=auto" \\\n -F "languages[]=rus" \\\n -F "languages[]=eng"\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"\u041d\u0438\u0436\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043f\u043e\u043b\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 API \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0437\u0434\u0435\u0441\u044c."}),"\n",(0,r.jsx)(n.h3,{id:"\u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-strategy",children:"\u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (strategy)"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"fast"}),': \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f "rule-based" \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 NLP \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f "fast" \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043c\u0430\u043a\u0435\u0442\u044b, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f.']}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"hi_res"}),': \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f "model-based" \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043c\u0430\u043a\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 "hi_res" \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0430\u043a\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0445. \u041c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 \u0441\u043b\u0443\u0447\u0430\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.']}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"auto"}),': c\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f "auto" \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0435\u0433\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.']}),"\n",(0,r.jsx)(n.h3,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-\u0447\u0430\u043d\u043a\u0438\u043d\u0433\u0430-\u043d\u0430\u0440\u0435\u0437\u043a\u0438-\u0442\u0435\u043a\u0441\u0442\u0430",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0430\u043d\u043a\u0438\u043d\u0433\u0430 (\u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430)"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"max_characters (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 500)"})," \u2014 \u0436\u0451\u0441\u0442\u043a\u0438\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430. \u041d\u0438 \u043e\u0434\u0438\u043d \u0431\u043b\u043e\u043a \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d \u043d\u0430 \u0434\u0432\u0430 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0431\u043b\u043e\u043a\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"new_after_n_chars (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = max_characters)"}),' \u2014 "\u043c\u044f\u0433\u043a\u0438\u0439" \u043f\u0440\u0435\u0434\u0435\u043b \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u043b\u043e\u043a\u0430. \u0411\u043b\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0438\u0433 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0441\u044f \u0431\u0435\u0437 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0436\u0451\u0441\u0442\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 max_characters, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0430\u0442\u044c "\u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439" \u0440\u0430\u0437\u043c\u0435\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: "\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u0431\u043b\u043e\u043a\u0438 \u043e\u043a\u043e\u043b\u043e 1000 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u0437\u044f\u0442\u044c \u0431\u043b\u043e\u043a \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1500 (max_characters), \u0447\u0435\u043c \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u0442\u044c \u043a \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044e \u0442\u0435\u043a\u0441\u0442\u0430". \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u0430\u043a (..., max_characters=1500, new_after_n_chars=1000).']}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"overlap (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 0)"})," \u2014 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0441 \u043a\u043e\u043d\u0446\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u043c\u044f\u0433\u0447\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442 \u0440\u0430\u0437\u0440\u044b\u0432\u0430 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"overlap_all (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = False)"}),' \u2014 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 overlap \u043c\u0435\u0436\u0434\u0443 "\u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438" \u0431\u043b\u043e\u043a\u0430\u043c\u0438, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438\u0437 \u0446\u0435\u043b\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u0435\u0442 \u0447\u0451\u0442\u043a\u0443\u044e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0433\u0440\u0430\u043d\u0438\u0446\u0443, \u044d\u0442\u0430 \u043e\u043f\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0448\u0443\u043c\u0430 \u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438. \u041d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c, \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440.']}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsxs)(n.strong,{children:["\u0427\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e CompressaChunking \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2014 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 ",(0,r.jsx)(n.a,{href:"/guides/langchain_advanced_chunking/",children:"\u043d\u0430\u0448 \u0433\u0430\u0439\u0434"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var r=t(4164);const a={tabItem:"tabItem_Ymn6"};var s=t(4848);function o(e){let{children:n,hidden:t,className:o}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(a.tabItem,o),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>y});var r=t(6540),a=t(4164),s=t(3104),o=t(6347),l=t(205),u=t(7485),i=t(1682),c=t(9466);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Badchild <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:a}}=e;return{value:n,label:t,attributes:r,default:a}}))}(t);return function(e){const n=(0,i.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function h(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const a=(0,o.W6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,u.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(a.location.search);n.set(s,e),a.replace({...a.location,search:n.toString()})}),[s,a])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,s=p(e),[o,u]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!h({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:s}))),[i,d]=m({queryString:t,groupId:a}),[f,b]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,s]=(0,c.Dv)(t);return[a,(0,r.useCallback)((e=>{t&&s.set(e)}),[t,s])]}({groupId:a}),g=(()=>{const e=i??f;return h({value:e,tabValues:s})?e:null})();(0,l.A)((()=>{g&&u(g)}),[g]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!h({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);u(e),d(e),b(e)}),[d,b,s]),tabValues:s}}var b=t(2303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(4848);function x(e){let{className:n,block:t,selectedValue:r,selectValue:o,tabValues:l}=e;const u=[],{blockElementScrollPositionUntilNextRender:i}=(0,s.a_)(),c=e=>{const n=e.currentTarget,t=u.indexOf(n),a=l[t].value;a!==r&&(i(n),o(a))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=u.indexOf(e.currentTarget)+1;n=u[t]??u[0];break}case"ArrowLeft":{const t=u.indexOf(e.currentTarget)-1;n=u[t]??u[u.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:l.map((e=>{let{value:n,label:t,attributes:s}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>u.push(e),onKeyDown:d,onClick:c,...s,className:(0,a.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function _(e){let{lazy:n,children:t,selectedValue:a}=e;const s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=s.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:s.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function j(e){const n=f(e);return(0,v.jsxs)("div",{className:(0,a.A)("tabs-container",g.tabList),children:[(0,v.jsx)(x,{...n,...e}),(0,v.jsx)(_,{...n,...e})]})}function y(e){const n=(0,b.A)();return(0,v.jsx)(j,{...e,children:d(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>l});var r=t(6540);const a={},s=r.createContext(a);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b3f1b113.b79cd742.js b/assets/js/b3f1b113.b79cd742.js deleted file mode 100644 index 013a18d..0000000 --- a/assets/js/b3f1b113.b79cd742.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[2482],{3382:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>u,default:()=>h,frontMatter:()=>l,metadata:()=>i,toc:()=>d});var r=t(4848),a=t(8453),s=t(1470),o=t(9365);const l={sidebar_position:1},u="ETL",i={id:"docs/basic_modules/ETL",title:"ETL",description:"\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043d\u0430\u0440\u0435\u0437\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 / RAG \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 LLM.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/ETL.md",sourceDirName:"docs/basic_modules",slug:"/docs/basic_modules/ETL",permalink:"/docs/basic_modules/ETL",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/ETL.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",permalink:"/docs/basic_modules/"},next:{title:"LLM",permalink:"/docs/basic_modules/LLM/"}},c={},d=[{value:"\u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (strategy)",id:"\u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-strategy",level:3},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0430\u043d\u043a\u0438\u043d\u0433\u0430 (\u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430)",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-\u0447\u0430\u043d\u043a\u0438\u043d\u0433\u0430-\u043d\u0430\u0440\u0435\u0437\u043a\u0438-\u0442\u0435\u043a\u0441\u0442\u0430",level:3}];function p(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"etl",children:"ETL"}),"\n",(0,r.jsx)(n.p,{children:"\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043d\u0430\u0440\u0435\u0437\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 / RAG \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 LLM."}),"\n",(0,r.jsx)(n.p,{children:"\u0421\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441\u0430:"}),"\n","\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(o.A,{value:"python-requests",label:"Python (requests)",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'# pip install requests, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\nimport requests\nimport os\n\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/layout\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\n# \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 PDF \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441\u0430: \npdf_url = "https://docs.ozon.ru/company/attachments/6828150/6828198.pdf"\npdf_response = requests.get(pdf_url)\n\n# \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b\nwith open("ozon_guide.pdf", "wb") as file:\n file.write(pdf_response.content)\n\n# \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438\ncompressa_url = "https://compressa-api.mil-team.ru/v1/layout"\nheaders = {\n "Authorization": Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa",\n "accept": "application/json",\n}\n\n# \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u0443\nfiles = {"files": open("marketplace_guide.pdf", "rb")}\n\n# \u0417\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0447\u0430\u043d\u043a\u043e\u0432\ndata = {\n "output_format": "application/json",\n "coordinates": "false",\n "strategy": "fast",\n "languages": ["rus", "eng"]\n}\n\nresponse = requests.post(\n compressa_url,\n headers=headers,\n files=files,\n data=data\n)\n\n# \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0447\u0430\u043d\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 JSON \u0444\u043e\u0440\u043c\u0430\u0442\u0435\nprint(response.json())\n'})})}),(0,r.jsx)(o.A,{value:"curl",label:"cURL",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/layout\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X POST "https://compressa-api.mil-team.ru/v1/layout" \\\n -H "Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa" \\\n -H "accept: application/json" \\\n -F "files=@path/to/file.pdf" \\\n -F "xml_keep_tags=false" \\\n -F "output_format=application/json" \\\n -F "coordinates=false" \\\n -F "strategy=auto" \\\n -F "languages[]=rus" \\\n -F "languages[]=eng"\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"\u041d\u0438\u0436\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043f\u043e\u043b\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 API \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0437\u0434\u0435\u0441\u044c."}),"\n",(0,r.jsx)(n.h3,{id:"\u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-strategy",children:"\u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (strategy)"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"fast"}),': \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f "rule-based" \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 NLP \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f "fast" \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043c\u0430\u043a\u0435\u0442\u044b, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f.']}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"hi_res"}),': \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f "model-based" \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043c\u0430\u043a\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 "hi_res" \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0430\u043a\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0445. \u041c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 \u0441\u043b\u0443\u0447\u0430\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.']}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"auto"}),': c\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f "auto" \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0435\u0433\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.']}),"\n",(0,r.jsx)(n.h3,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-\u0447\u0430\u043d\u043a\u0438\u043d\u0433\u0430-\u043d\u0430\u0440\u0435\u0437\u043a\u0438-\u0442\u0435\u043a\u0441\u0442\u0430",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0430\u043d\u043a\u0438\u043d\u0433\u0430 (\u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430)"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"max_characters (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 500)"})," \u2014 \u0436\u0451\u0441\u0442\u043a\u0438\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430. \u041d\u0438 \u043e\u0434\u0438\u043d \u0431\u043b\u043e\u043a \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d \u043d\u0430 \u0434\u0432\u0430 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0431\u043b\u043e\u043a\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"new_after_n_chars (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = max_characters)"}),' \u2014 "\u043c\u044f\u0433\u043a\u0438\u0439" \u043f\u0440\u0435\u0434\u0435\u043b \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u043b\u043e\u043a\u0430. \u0411\u043b\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0438\u0433 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0441\u044f \u0431\u0435\u0437 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0436\u0451\u0441\u0442\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 max_characters, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0430\u0442\u044c "\u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439" \u0440\u0430\u0437\u043c\u0435\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: "\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u0431\u043b\u043e\u043a\u0438 \u043e\u043a\u043e\u043b\u043e 1000 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u0437\u044f\u0442\u044c \u0431\u043b\u043e\u043a \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1500 (max_characters), \u0447\u0435\u043c \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u0442\u044c \u043a \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044e \u0442\u0435\u043a\u0441\u0442\u0430". \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u0430\u043a (..., max_characters=1500, new_after_n_chars=1000).']}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"overlap (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = 0)"})," \u2014 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0441 \u043a\u043e\u043d\u0446\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u043c\u044f\u0433\u0447\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442 \u0440\u0430\u0437\u0440\u044b\u0432\u0430 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"overlap_all (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = False)"}),' \u2014 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 overlap \u043c\u0435\u0436\u0434\u0443 "\u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438" \u0431\u043b\u043e\u043a\u0430\u043c\u0438, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438\u0437 \u0446\u0435\u043b\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u0435\u0442 \u0447\u0451\u0442\u043a\u0443\u044e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0433\u0440\u0430\u043d\u0438\u0446\u0443, \u044d\u0442\u0430 \u043e\u043f\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0448\u0443\u043c\u0430 \u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438. \u041d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c, \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440.']}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsxs)(n.strong,{children:["\u0427\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e CompressaChunking \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2014 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 ",(0,r.jsx)(n.a,{href:"/guides/langchain_advanced_chunking/",children:"\u043d\u0430\u0448 \u0433\u0430\u0439\u0434"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var r=t(4164);const a={tabItem:"tabItem_Ymn6"};var s=t(4848);function o(e){let{children:n,hidden:t,className:o}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(a.tabItem,o),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>y});var r=t(6540),a=t(4164),s=t(3104),o=t(6347),l=t(205),u=t(7485),i=t(1682),c=t(9466);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:a}}=e;return{value:n,label:t,attributes:r,default:a}}))}(t);return function(e){const n=(0,i.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function h(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const a=(0,o.W6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,u.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(a.location.search);n.set(s,e),a.replace({...a.location,search:n.toString()})}),[s,a])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,s=p(e),[o,u]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!h({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:s}))),[i,d]=m({queryString:t,groupId:a}),[f,b]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,s]=(0,c.Dv)(t);return[a,(0,r.useCallback)((e=>{t&&s.set(e)}),[t,s])]}({groupId:a}),g=(()=>{const e=i??f;return h({value:e,tabValues:s})?e:null})();(0,l.A)((()=>{g&&u(g)}),[g]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!h({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);u(e),d(e),b(e)}),[d,b,s]),tabValues:s}}var b=t(2303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(4848);function x(e){let{className:n,block:t,selectedValue:r,selectValue:o,tabValues:l}=e;const u=[],{blockElementScrollPositionUntilNextRender:i}=(0,s.a_)(),c=e=>{const n=e.currentTarget,t=u.indexOf(n),a=l[t].value;a!==r&&(i(n),o(a))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=u.indexOf(e.currentTarget)+1;n=u[t]??u[0];break}case"ArrowLeft":{const t=u.indexOf(e.currentTarget)-1;n=u[t]??u[u.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:l.map((e=>{let{value:n,label:t,attributes:s}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>u.push(e),onKeyDown:d,onClick:c,...s,className:(0,a.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function _(e){let{lazy:n,children:t,selectedValue:a}=e;const s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=s.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:s.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function j(e){const n=f(e);return(0,v.jsxs)("div",{className:(0,a.A)("tabs-container",g.tabList),children:[(0,v.jsx)(x,{...n,...e}),(0,v.jsx)(_,{...n,...e})]})}function y(e){const n=(0,b.A)();return(0,v.jsx)(j,{...e,children:d(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>l});var r=t(6540);const a={},s=r.createContext(a);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b573c74d.090040ca.js b/assets/js/b573c74d.090040ca.js new file mode 100644 index 0000000..b913d91 --- /dev/null +++ b/assets/js/b573c74d.090040ca.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[156],{1496:(s,n,e)=>{e.r(n),e.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>o,toc:()=>d});var r=e(4848),i=e(8453);const t={sidebar_position:1,title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa"},c="\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa",o={id:"docs/intro",title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",description:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/intro.md",sourceDirName:"docs",slug:"/docs/intro",permalink:"/docs/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa"},sidebar:"docsSidebar",next:{title:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442",permalink:"/docs/quick_start"}},l={},d=[{value:"\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",id:"\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435-\u043c\u043e\u0434\u0443\u043b\u0438",level:2},{value:"\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 Compressa",id:"\u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430-compressa",level:2},{value:"\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438",id:"\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435-\u0448\u0430\u0433\u0438",level:2},{value:"\u041f\u043e\u043c\u043e\u0449\u044c",id:"\u043f\u043e\u043c\u043e\u0449\u044c",level:2}];function a(s){const n={a:"a",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...s.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b-compressa",children:"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa"}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI."}),"\n",(0,r.jsx)(n.p,{children:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c Compressa \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 API, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0430\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043f\u0438\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u2014 \u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0437\u0430\u044f\u0432\u043a\u0443 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435."}),"\n",(0,r.jsx)(n.h2,{id:"\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435-\u043c\u043e\u0434\u0443\u043b\u0438",children:"\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"ETL"}),": \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0447\u0430\u043d\u043a\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b LLM"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"LLM"}),": \u0411\u044b\u0441\u0442\u0440\u044b\u0435 \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Embeddings"}),": \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Rerank"}),": \u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Fine-tuning"}),": \u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f GPT-4 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.em,{children:"\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443"})}),"\n",(0,r.jsx)(n.h2,{id:"\u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430-compressa",children:"\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 Compressa"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\ud83d\udee0\ufe0f ",(0,r.jsx)(n.strong,{children:"\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430"}),": \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u0435\u0441\u044f\u0446\u044b \u0438 \u043d\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c\u043d\u044b\u0445 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udcbb ",(0,r.jsx)(n.strong,{children:"\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430"}),": \u0412\u0441\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438\u043b\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f Langchain. LLM \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 OpenAI-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 API"]}),"\n",(0,r.jsxs)(n.li,{children:["\u26a1 ",(0,r.jsx)(n.strong,{children:"\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f"}),": \u0412 20-70 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0441 1 GPU, \u0432 2-10 \u0440\u0430\u0437 \u0432\u044b\u0448\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f 1 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043a\u0440\u0430\u0442\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435-\u0448\u0430\u0433\u0438",children:"\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://compressa.ai/form",children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0435"})," API \u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438\u043b\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0438\u0442\u0435 Compressa \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Docker \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438"]}),"\n",(0,r.jsxs)(n.li,{children:["\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 ",(0,r.jsx)(n.a,{href:"/docs/quick_start",children:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442"})," \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430"]}),"\n",(0,r.jsxs)(n.li,{children:["\u0418\u0437\u0443\u0447\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0448\u0438\u0445 ",(0,r.jsx)(n.a,{href:"/guides/langchain_rag/",children:"\u0433\u0430\u0439\u0434\u043e\u0432"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"\u043f\u043e\u043c\u043e\u0449\u044c",children:"\u041f\u043e\u043c\u043e\u0449\u044c"}),"\n",(0,r.jsxs)(n.p,{children:["\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ML \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 \u2014 \u043f\u0440\u043e\u0441\u0438\u043c \u0432\u0430\u0441 \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0430\u043c\u0438 \u0432\xa0",(0,r.jsx)(n.a,{href:"https://t.me/+-0smoj_KpEw3MGQy",children:"\u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438"}),"."]})]})}function h(s={}){const{wrapper:n}={...(0,i.R)(),...s.components};return n?(0,r.jsx)(n,{...s,children:(0,r.jsx)(a,{...s})}):a(s)}},8453:(s,n,e)=>{e.d(n,{R:()=>c,x:()=>o});var r=e(6540);const i={},t=r.createContext(i);function c(s){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof s?s(n):{...n,...s}}),[n,s])}function o(s){let n;return n=s.disableParentContext?"function"==typeof s.components?s.components(i):s.components||i:c(s.components),r.createElement(t.Provider,{value:n},s.children)}}}]); \ No newline at end of file diff --git a/assets/js/b573c74d.cf4a31c0.js b/assets/js/b573c74d.cf4a31c0.js deleted file mode 100644 index 7a18898..0000000 --- a/assets/js/b573c74d.cf4a31c0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[6156],{1496:(s,n,e)=>{e.r(n),e.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>o,toc:()=>d});var r=e(4848),i=e(8453);const t={sidebar_position:1,title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa"},c="\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa",o={id:"docs/intro",title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",description:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/intro.md",sourceDirName:"docs",slug:"/docs/intro",permalink:"/docs/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa"},sidebar:"docsSidebar",previous:{title:"About",permalink:"/"},next:{title:"Quickstart",permalink:"/docs/Quickstart/"}},l={},d=[{value:"\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",id:"\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435-\u043c\u043e\u0434\u0443\u043b\u0438",level:2},{value:"\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 Compressa",id:"\u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430-compressa",level:2},{value:"\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438",id:"\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435-\u0448\u0430\u0433\u0438",level:2},{value:"\u041f\u043e\u043c\u043e\u0449\u044c",id:"\u043f\u043e\u043c\u043e\u0449\u044c",level:2}];function a(s){const n={a:"a",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...s.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b-compressa",children:"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa"}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI."}),"\n",(0,r.jsx)(n.p,{children:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c Compressa \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 API, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0430\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043f\u0438\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u2014 \u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0437\u0430\u044f\u0432\u043a\u0443 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435."}),"\n",(0,r.jsx)(n.h2,{id:"\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435-\u043c\u043e\u0434\u0443\u043b\u0438",children:"\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"ETL"}),": \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0447\u0430\u043d\u043a\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b LLM"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"LLM"}),": \u0411\u044b\u0441\u0442\u0440\u044b\u0435 \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Embeddings"}),": \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Rerank"}),": \u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Fine-tuning"}),": \u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f GPT-4 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.em,{children:"\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443"})}),"\n",(0,r.jsx)(n.h2,{id:"\u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430-compressa",children:"\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 Compressa"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\ud83d\udee0\ufe0f ",(0,r.jsx)(n.strong,{children:"\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430"}),": \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u0435\u0441\u044f\u0446\u044b \u0438 \u043d\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c\u043d\u044b\u0445 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udcbb ",(0,r.jsx)(n.strong,{children:"\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430"}),": \u0412\u0441\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438\u043b\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f Langchain. LLM \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 OpenAI-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 API"]}),"\n",(0,r.jsxs)(n.li,{children:["\u26a1 ",(0,r.jsx)(n.strong,{children:"\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f"}),": \u0412 20-70 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0441 1 GPU, \u0432 2-10 \u0440\u0430\u0437 \u0432\u044b\u0448\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f 1 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043a\u0440\u0430\u0442\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435-\u0448\u0430\u0433\u0438",children:"\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://compressa.ai/form",children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0435"})," API \u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438\u043b\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0438\u0442\u0435 Compressa \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Docker \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438"]}),"\n",(0,r.jsxs)(n.li,{children:["\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 ",(0,r.jsx)(n.a,{href:"/docs/quick_start",children:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442"})," \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430"]}),"\n",(0,r.jsxs)(n.li,{children:["\u0418\u0437\u0443\u0447\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0448\u0438\u0445 ",(0,r.jsx)(n.a,{href:"/guides/langchain_rag/",children:"\u0433\u0430\u0439\u0434\u043e\u0432"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"\u043f\u043e\u043c\u043e\u0449\u044c",children:"\u041f\u043e\u043c\u043e\u0449\u044c"}),"\n",(0,r.jsxs)(n.p,{children:["\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ML \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 \u2014 \u043f\u0440\u043e\u0441\u0438\u043c \u0432\u0430\u0441 \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0430\u043c\u0438 \u0432\xa0",(0,r.jsx)(n.a,{href:"https://t.me/+-0smoj_KpEw3MGQy",children:"\u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438"}),"."]})]})}function h(s={}){const{wrapper:n}={...(0,i.R)(),...s.components};return n?(0,r.jsx)(n,{...s,children:(0,r.jsx)(a,{...s})}):a(s)}},8453:(s,n,e)=>{e.d(n,{R:()=>c,x:()=>o});var r=e(6540);const i={},t=r.createContext(i);function c(s){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof s?s(n):{...n,...s}}),[n,s])}function o(s){let n;return n=s.disableParentContext?"function"==typeof s.components?s.components(i):s.components||i:c(s.components),r.createElement(t.Provider,{value:n},s.children)}}}]); \ No newline at end of file diff --git a/assets/js/b8669da8.4d6a7566.js b/assets/js/b8669da8.4d6a7566.js deleted file mode 100644 index 0830550..0000000 --- a/assets/js/b8669da8.4d6a7566.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[6729],{2923:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>l,toc:()=>a});var s=i(4848),t=i(8453);const r={sidebar_position:1},o="Setup",l={id:"onprem/LLM_On-Premises/setup/index",title:"Setup",description:"Compressa App is distributed as docker containers which are available at Github",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/setup/index.mdx",sourceDirName:"onprem/LLM_On-Premises/setup",slug:"/onprem/LLM_On-Premises/setup/",permalink:"/onprem/LLM_On-Premises/setup/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/setup/index.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"onpremSidebar",previous:{title:"Quickstart: Compressa Platform",permalink:"/onprem/platform"},next:{title:"No Internet",permalink:"/onprem/LLM_On-Premises/setup/internet-access"}},d={},a=[{value:"Requirements",id:"requirements",level:2},{value:"1. Linux Server with supported Nvidia GPU",id:"1-linux-server-with-supported-nvidia-gpu",level:4},{value:"2. Cuda Drivers Installed",id:"2-cuda-drivers-installed",level:4},{value:"3. Docker",id:"3-docker",level:4},{value:"4. Nvidia Container Toolkit",id:"4-nvidia-container-toolkit",level:4},{value:"Deployment",id:"deployment",level:2},{value:"1. The further process is simple:",id:"1-the-further-process-is-simple",level:4},{value:"2. Authenticate to docker with your token:",id:"2-authenticate-to-docker-with-your-token",level:4},{value:"3. Get docker-compose.yaml
file:",id:"3-get-docker-composeyaml-file",level:4},{value:"4. Get nginx config:",id:"4-get-nginx-config",level:4},{value:"5. Pull the latest Compressa:",id:"5-pull-the-latest-compressa",level:4},{value:"6. Set environment variable and run service:",id:"6-set-environment-variable-and-run-service",level:4}];function c(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",h1:"h1",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"setup",children:"Setup"}),"\n",(0,s.jsx)(n.p,{children:"Compressa App is distributed as docker containers which are available at Github\npackage storage and can be deployed in one command."}),"\n",(0,s.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,s.jsx)(n.h4,{id:"1-linux-server-with-supported-nvidia-gpu",children:"1. Linux Server with supported Nvidia GPU"}),"\n",(0,s.jsx)(n.p,{children:"Current release is tested on:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Nvidia A100"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia V100"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia T4"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 4090"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 4080"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 4070 / 4070Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 3080 / 3080Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 3070 / 3070Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 3060 / 3060Ti"}),"\n",(0,s.jsx)(n.li,{children:"Nvidia 2080Ti"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Server should have at least the same amount of RAM (we recommend 1.2 of GPU's RAM)."}),"\n",(0,s.jsx)(n.h4,{id:"2-cuda-drivers-installed",children:"2. Cuda Drivers Installed"}),"\n",(0,s.jsx)(n.p,{children:"The latest compatible drivers should be installed."}),"\n",(0,s.jsxs)(n.admonition,{type:"note",children:[(0,s.jsx)(n.p,{children:"Default version of CUDA driver can be installed via:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo apt update\nsudo apt install software-properties-common -y\nsudo apt install ubuntu-drivers-common -y\nsudo ubuntu-drivers autoinstall\nsudo apt install nvidia-cuda-toolkit\n"})})]}),"\n",(0,s.jsx)(n.h4,{id:"3-docker",children:"3. Docker"}),"\n",(0,s.jsxs)(n.p,{children:["Installation instruction for Ubuntu:",(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.a,{href:"https://docs.docker.com/engine/install/ubuntu/",children:"https://docs.docker.com/engine/install/ubuntu/"})]}),"\n",(0,s.jsxs)(n.p,{children:["It should be the version which supports ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/compose/migrate/",children:"Docker Compose V2"}),"."]}),"\n",(0,s.jsx)(n.h4,{id:"4-nvidia-container-toolkit",children:"4. Nvidia Container Toolkit"}),"\n",(0,s.jsxs)(n.p,{children:["Linux installation instruction:",(0,s.jsx)(n.br,{}),"\n",(0,s.jsx)(n.a,{href:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html",children:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html"})]}),"\n",(0,s.jsx)(n.h2,{id:"deployment",children:"Deployment"}),"\n",(0,s.jsx)(n.p,{children:"At the first step of integration, Compressa Team provides you with access token."}),"\n",(0,s.jsx)(n.h4,{id:"1-the-further-process-is-simple",children:"1. The further process is simple:"}),"\n",(0,s.jsx)(n.p,{children:"Set environment variable with token:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"export COMPRESSA_TOKEN=\n"})}),"\n",(0,s.jsx)(n.h4,{id:"2-authenticate-to-docker-with-your-token",children:"2. Authenticate to docker with your token:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"echo $COMPRESSA_TOKEN | docker login -u compressa --password-stdin\n"})}),"\n",(0,s.jsxs)(n.h4,{id:"3-get-docker-composeyaml-file",children:["3. Get ",(0,s.jsx)(n.code,{children:"docker-compose.yaml"})," file:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"wget https://raw.githubusercontent.com/compressa-ai/compressa-deploy/main/docker-compose.yaml\n"})}),"\n",(0,s.jsx)(n.h4,{id:"4-get-nginx-config",children:"4. Get nginx config:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"wget https://raw.githubusercontent.com/compressa-ai/compressa-deploy/main/nginx.conf\n"})}),"\n",(0,s.jsx)(n.h4,{id:"5-pull-the-latest-compressa",children:"5. Pull the latest Compressa:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"docker compose pull\n"})}),"\n",(0,s.jsx)(n.h4,{id:"6-set-environment-variable-and-run-service",children:"6. Set environment variable and run service:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"DOCKER_GPU_IDS"})," - list of GPU ids which will be visible for Compressa"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"RESOURCES_PATH"})," - path to directory to store models. It can be ",(0,s.jsx)(n.code,{children:"./data"})," for example.",(0,s.jsx)(n.br,{}),"\n","Please set read-write access for this directory using ",(0,s.jsx)(n.code,{children:"chmod -R 777 ./data"})]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["If you're deploying Compressa in private network without internet access, please use\nthe ",(0,s.jsx)(n.a,{href:"/onprem/LLM_On-Premises/setup/internet-access",children:"instruction"})," to download resources."]})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Deploy:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"export DOCKER_GPU_IDS=0\nexport RESOURCES_PATH=./data\ndocker compose up\n"})}),"\n",(0,s.jsx)(n.p,{children:"That's it! The service is available at the port 8080."})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>l});var s=i(6540);const t={},r=s.createContext(t);function o(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ba1f7e78.5cecf1f3.js b/assets/js/ba1f7e78.5cecf1f3.js deleted file mode 100644 index 3691972..0000000 --- a/assets/js/ba1f7e78.5cecf1f3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[3068],{7374:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var r=t(4848),s=t(8453),a=t(1470),l=t(9365);const o={sidebar_position:2},i="\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442",c={id:"docs/quick_start",title:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442",description:"\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Compressa \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439:",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/quick_start.md",sourceDirName:"docs",slug:"/docs/quick_start",permalink:"/docs/quick_start",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/quick_start.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI",permalink:"/docs/Quickstart/openai"},next:{title:"API Reference",permalink:"/docs/api-reference/"}},u={},d=[{value:"\u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441",id:"\u043f\u0435\u0440\u0432\u044b\u0439-\u0437\u0430\u043f\u0440\u043e\u0441",level:2},{value:"\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0448\u0430\u0433\u0438",id:"\u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435-\u0448\u0430\u0433\u0438",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"\u0431\u044b\u0441\u0442\u0440\u044b\u0439-\u0441\u0442\u0430\u0440\u0442",children:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442"}),"\n",(0,r.jsx)(n.p,{children:"\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Compressa \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438"}),": \u0412\u044b \u0443\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 API \u043a\u043b\u044e\u0447. \u0415\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435\u0442 \u2014 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 (\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443)[",(0,r.jsx)(n.a,{href:"https://compressa.ai/form",children:"https://compressa.ai/form"}),"]."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 on-prem \u0432\u0435\u0440\u0441\u0438\u0438"}),": \u0412\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0438 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 API \u043a\u043b\u044e\u0447\u0438. \u0415\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435\u0442 \u2014 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 ",(0,r.jsx)(n.a,{href:"/onprem/%D0%9F%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D0%B0%20Compressa/server_requirements",children:"\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b"})," (\u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044f)."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448\u0435 \u043e\u0431\u043b\u0430\u043a\u043e, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0430\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440."}),"\n",(0,r.jsx)(n.h2,{id:"\u043f\u0435\u0440\u0432\u044b\u0439-\u0437\u0430\u043f\u0440\u043e\u0441",children:"\u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441"}),"\n",(0,r.jsx)(n.p,{children:"\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0440\u043e\u0441\u0438\u043c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0443 \u043d\u0430\u0448\u0435\u0439 LLM \u043c\u043e\u0434\u0435\u043b\u0438:"}),"\n","\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(l.A,{value:"python",label:"Python (API Client)",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'#pip install openai - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nfrom openai import OpenAI\n\nclient = OpenAI(\n base_url="https://compressa-api.mil-team.ru/v1", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0432\u0430\u0448 API \u043a\u043b\u044e\u0447 Compressa" #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n)\n\nchat_completion = client.chat.completions.create(\n model="Compressa-LLM", \n messages=[\n {"role": "system", "content": "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442."},\n {"role": "user", "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u0445\u0430\u0439\u043a\u0443 \u043f\u0440\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442."},\n ],\n stream=False,\n)\nprint(chat_completion.choices[0].message.content)\n\n#\u0418\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0443\u043c,\n#\u041f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u043c \u043c\u0438\u0440\u0435,\n#\u0416\u0438\u0432\u0451\u0442 \u0432 \u043a\u043e\u0434\u0435.\n'})})}),(0,r.jsx)(l.A,{value:"curl",label:"cURL",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X \'POST\' \\\n \'https://compressa-api.mil-team.ru/v1/chat/completions\' \\ \n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -H \'Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa\' \\ \n -d \'{\n "model": "Compressa-LLM",\n "messages": [\n {"role": "system", "content": "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442."},\n {"role": "user", "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u0445\u0430\u0439\u043a\u0443 \u043f\u0440\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442."},\n ],\n "stream": false\n}\'\n'})})})]}),"\n",(0,r.jsx)(n.h2,{id:"\u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435-\u0448\u0430\u0433\u0438",children:"\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0448\u0430\u0433\u0438"}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/basic_modules/ETL",children:(0,r.jsx)(n.strong,{children:"ETL"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/basic_modules/LLM",children:(0,r.jsx)(n.strong,{children:"LLM"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/basic_modules/Embeddings",children:(0,r.jsx)(n.strong,{children:"Embeddings"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/basic_modules/Rerank",children:(0,r.jsx)(n.strong,{children:"Rerank"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/basic_modules/Fine-tuning",children:(0,r.jsx)(n.strong,{children:"Fine-tuning"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/insightstream_module/",children:(0,r.jsx)(n.strong,{children:"InsightStream RAG"})})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>l});t(6540);var r=t(4164);const s={tabItem:"tabItem_Ymn6"};var a=t(4848);function l(e){let{children:n,hidden:t,className:l}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,l),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>_});var r=t(6540),s=t(4164),a=t(3104),l=t(6347),o=t(205),i=t(7485),c=t(1682),u=t(9466);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:s}}=e;return{value:n,label:t,attributes:r,default:s}}))}(t);return function(e){const n=(0,c.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const s=(0,l.W6)(),a=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i.aZ)(a),(0,r.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(s.location.search);n.set(a,e),s.replace({...s.location,search:n.toString()})}),[a,s])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,a=h(e),[l,i]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:a}))),[c,d]=m({queryString:t,groupId:s}),[f,b]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,a]=(0,u.Dv)(t);return[s,(0,r.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:s}),x=(()=>{const e=c??f;return p({value:e,tabValues:a})?e:null})();(0,o.A)((()=>{x&&i(x)}),[x]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),b(e)}),[d,b,a]),tabValues:a}}var b=t(2303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(4848);function v(e){let{className:n,block:t,selectedValue:r,selectValue:l,tabValues:o}=e;const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.a_)(),u=e=>{const n=e.currentTarget,t=i.indexOf(n),s=o[t].value;s!==r&&(c(n),l(s))},d=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:o.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>i.push(e),onKeyDown:d,onClick:u,...a,className:(0,s.A)("tabs__item",x.tabItem,a?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function j(e){let{lazy:n,children:t,selectedValue:s}=e;const a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function y(e){const n=f(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",x.tabList),children:[(0,g.jsx)(v,{...n,...e}),(0,g.jsx)(j,{...n,...e})]})}function _(e){const n=(0,b.A)();return(0,g.jsx)(y,{...e,children:d(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>o});var r=t(6540);const s={},a=r.createContext(s);function l(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ba1f7e78.9841676e.js b/assets/js/ba1f7e78.9841676e.js new file mode 100644 index 0000000..b3200b4 --- /dev/null +++ b/assets/js/ba1f7e78.9841676e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[68],{7374:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var r=t(4848),s=t(8453),a=t(1470),l=t(9365);const o={sidebar_position:2},i="\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442",c={id:"docs/quick_start",title:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442",description:"\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Compressa \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439:",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/quick_start.md",sourceDirName:"docs",slug:"/docs/quick_start",permalink:"/docs/quick_start",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/quick_start.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",permalink:"/docs/intro"},next:{title:"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",permalink:"/docs/basic_modules/"}},u={},d=[{value:"\u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441",id:"\u043f\u0435\u0440\u0432\u044b\u0439-\u0437\u0430\u043f\u0440\u043e\u0441",level:2},{value:"\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0448\u0430\u0433\u0438",id:"\u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435-\u0448\u0430\u0433\u0438",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"\u0431\u044b\u0441\u0442\u0440\u044b\u0439-\u0441\u0442\u0430\u0440\u0442",children:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442"}),"\n",(0,r.jsx)(n.p,{children:"\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Compressa \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438"}),": \u0412\u044b \u0443\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 API \u043a\u043b\u044e\u0447. \u0415\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435\u0442 \u2014 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 (\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443)[",(0,r.jsx)(n.a,{href:"https://compressa.ai/form",children:"https://compressa.ai/form"}),"]."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 on-prem \u0432\u0435\u0440\u0441\u0438\u0438"}),": \u0412\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0438 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 API \u043a\u043b\u044e\u0447\u0438. \u0415\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435\u0442 \u2014 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 ",(0,r.jsx)(n.a,{href:"/onprem/%D0%9F%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D0%B0%20Compressa/server_requirements",children:"\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b"})," (\u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044f)."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448\u0435 \u043e\u0431\u043b\u0430\u043a\u043e, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0430\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0435\u0437\u0434\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440."}),"\n",(0,r.jsx)(n.h2,{id:"\u043f\u0435\u0440\u0432\u044b\u0439-\u0437\u0430\u043f\u0440\u043e\u0441",children:"\u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441"}),"\n",(0,r.jsx)(n.p,{children:"\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0440\u043e\u0441\u0438\u043c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0443 \u043d\u0430\u0448\u0435\u0439 LLM \u043c\u043e\u0434\u0435\u043b\u0438:"}),"\n","\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(l.A,{value:"python",label:"Python (API Client)",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'#pip install openai - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nfrom openai import OpenAI\n\nclient = OpenAI(\n base_url="https://compressa-api.mil-team.ru/v1", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0432\u0430\u0448 API \u043a\u043b\u044e\u0447 Compressa" #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n)\n\nchat_completion = client.chat.completions.create(\n model="Compressa-LLM", \n messages=[\n {"role": "system", "content": "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442."},\n {"role": "user", "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u0445\u0430\u0439\u043a\u0443 \u043f\u0440\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442."},\n ],\n stream=False,\n)\nprint(chat_completion.choices[0].message.content)\n\n#\u0418\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0443\u043c,\n#\u041f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u043c \u043c\u0438\u0440\u0435,\n#\u0416\u0438\u0432\u0451\u0442 \u0432 \u043a\u043e\u0434\u0435.\n'})})}),(0,r.jsx)(l.A,{value:"curl",label:"cURL",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X \'POST\' \\\n \'https://compressa-api.mil-team.ru/v1/chat/completions\' \\ \n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -H \'Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa\' \\ \n -d \'{\n "model": "Compressa-LLM",\n "messages": [\n {"role": "system", "content": "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442."},\n {"role": "user", "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u0445\u0430\u0439\u043a\u0443 \u043f\u0440\u043e \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442."},\n ],\n "stream": false\n}\'\n'})})})]}),"\n",(0,r.jsx)(n.h2,{id:"\u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435-\u0448\u0430\u0433\u0438",children:"\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0448\u0430\u0433\u0438"}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/basic_modules/ETL",children:(0,r.jsx)(n.strong,{children:"ETL"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/basic_modules/LLM",children:(0,r.jsx)(n.strong,{children:"LLM"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/basic_modules/Embeddings",children:(0,r.jsx)(n.strong,{children:"Embeddings"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/basic_modules/Rerank",children:(0,r.jsx)(n.strong,{children:"Rerank"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/basic_modules/Fine-tuning",children:(0,r.jsx)(n.strong,{children:"Fine-tuning"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/insightstream_module/",children:(0,r.jsx)(n.strong,{children:"InsightStream RAG"})})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>l});t(6540);var r=t(4164);const s={tabItem:"tabItem_Ymn6"};var a=t(4848);function l(e){let{children:n,hidden:t,className:l}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,l),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>_});var r=t(6540),s=t(4164),a=t(3104),l=t(6347),o=t(205),i=t(7485),c=t(1682),u=t(9466);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:s}}=e;return{value:n,label:t,attributes:r,default:s}}))}(t);return function(e){const n=(0,c.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const s=(0,l.W6)(),a=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i.aZ)(a),(0,r.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(s.location.search);n.set(a,e),s.replace({...s.location,search:n.toString()})}),[a,s])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,a=h(e),[l,i]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:a}))),[c,d]=m({queryString:t,groupId:s}),[f,b]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,a]=(0,u.Dv)(t);return[s,(0,r.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:s}),x=(()=>{const e=c??f;return p({value:e,tabValues:a})?e:null})();(0,o.A)((()=>{x&&i(x)}),[x]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),b(e)}),[d,b,a]),tabValues:a}}var b=t(2303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(4848);function v(e){let{className:n,block:t,selectedValue:r,selectValue:l,tabValues:o}=e;const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.a_)(),u=e=>{const n=e.currentTarget,t=i.indexOf(n),s=o[t].value;s!==r&&(c(n),l(s))},d=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:o.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>i.push(e),onKeyDown:d,onClick:u,...a,className:(0,s.A)("tabs__item",x.tabItem,a?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function j(e){let{lazy:n,children:t,selectedValue:s}=e;const a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function y(e){const n=f(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",x.tabList),children:[(0,g.jsx)(v,{...n,...e}),(0,g.jsx)(j,{...n,...e})]})}function _(e){const n=(0,b.A)();return(0,g.jsx)(y,{...e,children:d(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>o});var r=t(6540);const s={},a=r.createContext(s);function l(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c1c2681f.3f5cc443.js b/assets/js/c1c2681f.3f5cc443.js deleted file mode 100644 index ac19cd8..0000000 --- a/assets/js/c1c2681f.3f5cc443.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[4175],{1939:(e,n,d)=>{d.r(n),d.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>r});var l=d(4848),s=d(8453);const i={sidebar_position:1},c="Management API",o={id:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment",title:"Management API",description:"Management API \u2014 \u044d\u0442\u043e REST API \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment.md",sourceDirName:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management",slug:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"onpremSidebar",previous:{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 LLM (UI & API)",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/"},next:{title:"Fine-tuning",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning"}},a={},r=[{value:"\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439",id:"\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",level:2},{value:" GET /v1/models/
",id:"get-v1models",level:3},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430",level:4},{value:"POST /v1/models/add/
",id:"post-v1modelsadd",level:3},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-1",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-1",level:4},{value:"\u0417\u0430\u043f\u0443\u0441\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439",id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",level:2},{value:"GET /v1/deploy/
",id:"get-v1deploy",level:3},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-2",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-2",level:4},{value:"POST /v1/deploy/
",id:"post-v1deploy",level:3},{value:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-3",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-3",level:4},{value:"GET /v1/deploy/status
",id:"get-v1deploystatus",level:3},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-4",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-4",level:4},{value:"POST /v1/deploy/interrupt/
",id:"post-v1deployinterrupt",level:3},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-5",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-5",level:4},{value:"Jobs",id:"jobs",level:2},{value:"GET /v1/jobs/
",id:"get-v1jobs",level:3},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-6",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-6",level:4},{value:"GET /v1/jobs/{job_id}/status/
",id:"get-v1jobsjob_idstatus",level:3},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-7",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-7",level:4},{value:"POST /v1/jobs/{job_id}/interrupt/
",id:"post-v1jobsjob_idinterrupt",level:3},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-2",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-8",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-8",level:4}];function t(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{id:"management-api",children:"Management API"}),"\n",(0,l.jsxs)(n.p,{children:["Management API \u2014 \u044d\u0442\u043e ",(0,l.jsx)(n.strong,{children:"REST API"})," \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438."]}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"URL"}),": ",(0,l.jsx)(n.code,{children:"http://localhost:8080/pod-1/api/"})]}),"\n",(0,l.jsx)(n.p,{children:"\u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0432 Compressa"}),"\n",(0,l.jsx)(n.li,{children:"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430"}),"\n",(0,l.jsx)(n.li,{children:"\u041f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,l.jsx)(n.li,{children:"\u0418 \u0442. \u0434."}),"\n"]}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"\u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Swagger, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 REST API \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430"}),"\n",(0,l.jsx)(n.strong,{children:"URL"}),": ",(0,l.jsx)(n.code,{children:"http://localhost:8080/pod-1/api/docs/"})]}),"\n",(0,l.jsx)(n.h2,{id:"\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",children:"\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439"}),"\n",(0,l.jsx)(n.h3,{id:"get-v1models",children:(0,l.jsx)(n.code,{children:"GET /v1/models/"})}),"\n",(0,l.jsx)(n.p,{children:"\u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/models/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'[\n {\n "model_id": "string",\n "adapter": true,\n "base_model_id": "string"\n }\n]\n'})}),"\n",(0,l.jsx)(n.h3,{id:"post-v1modelsadd",children:(0,l.jsx)(n.code,{children:"POST /v1/models/add/"})}),"\n",(0,l.jsx)(n.p,{children:"\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 Hugging Face."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"query"}),": ",(0,l.jsx)(n.code,{children:"model_id"})," - \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 Hugging Face,\n\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 ",(0,l.jsx)(n.code,{children:"openchat/openchat-3.5-0106"})," \u0434\u043b\u044f ",(0,l.jsx)(n.a,{href:"https://huggingface.co/openchat/openchat-3.5-0106",children:"\u0441\u0441\u044b\u043b\u043a\u0438"}),"."]}),"\n"]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-1",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/models/add/?model_id=mymodel_id' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-1",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "id": "4d78d943-1896-4d7b-9f11-b10cc2389ba3",\n "name": "DOWNLOAD_mymodel_id",\n "status": "RUNNING",\n "started_at": "2024-03-21T09:58:29.846708"\n}\n'})}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h2,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",children:"\u0417\u0430\u043f\u0443\u0441\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439"}),"\n",(0,l.jsx)(n.h3,{id:"get-v1deploy",children:(0,l.jsx)(n.code,{children:"GET /v1/deploy/"})}),"\n",(0,l.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-2",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/pod-1/v1/deploy/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-2",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "model_id": "string",\n "adapter_ids": [\n "string"\n ]\n}\n'})}),"\n",(0,l.jsx)(n.h3,{id:"post-v1deploy",children:(0,l.jsx)(n.code,{children:"POST /v1/deploy/"})}),"\n",(0,l.jsxs)(n.p,{children:["\u0417\u0430\u043f\u0443\u0441\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430. \u0421\u043f\u0438\u0441\u043e\u043a id \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ",(0,l.jsx)(n.code,{children:"GET /v1/models/"}),"."]}),"\n",(0,l.jsx)(n.h4,{id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "model_id": "string",\n "adapter_ids": [\n "string"\n ]\n}\n'})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"model_id"})," - \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"adapter_ids"})," - \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432"]}),"\n"]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-3",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/deploy/' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model_id\": \"model_id1\",\n \"adapter_ids\": [\n \"adapter_id1\",\n \"adapter_id2\"\n ]\n}'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-3",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "name": "string",\n "status": "CREATED",\n "started_at": "2024-03-21T10:10:07.521Z"\n}\n'})}),"\n",(0,l.jsx)(n.h3,{id:"get-v1deploystatus",children:(0,l.jsx)(n.code,{children:"GET /v1/deploy/status"})}),"\n",(0,l.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-4",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/deploy/status/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-4",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "model_id": "model_id1",\n "adapter_ids": [\n "adapter_id1",\n "adapter_id2"\n ],\n "job": {\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "RUNNING",\n "started_at": "2024-03-21T07:35:16.861681"\n }\n}\n'})}),"\n",(0,l.jsx)(n.h3,{id:"post-v1deployinterrupt",children:(0,l.jsx)(n.code,{children:"POST /v1/deploy/interrupt/"})}),"\n",(0,l.jsx)(n.p,{children:"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-5",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/deploy/interrupt/' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-5",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "RUNNING",\n "started_at": "2024-03-21T07:35:16.861681"\n}\n'})}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h2,{id:"jobs",children:"Jobs"}),"\n",(0,l.jsx)(n.p,{children:"\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u043b\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 jobs.\n\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c jobs."}),"\n",(0,l.jsx)(n.h3,{id:"get-v1jobs",children:(0,l.jsx)(n.code,{children:"GET /v1/jobs/"})}),"\n",(0,l.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0435 jobs \u0441\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u043c\u0438."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-6",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/jobs/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-6",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'[\n {\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "RUNNING",\n "started_at": "2024-03-21T07:35:16.861681"\n },\n {\n "id": "4d78d943-1896-4d7b-9f11-b10cc2389ba3",\n "name": "DOWNLOAD_test",\n "status": "FINISHED",\n "started_at": "2024-03-21T09:58:29.846708"\n }\n]\n'})}),"\n",(0,l.jsx)(n.h3,{id:"get-v1jobsjob_idstatus",children:(0,l.jsx)(n.code,{children:"GET /v1/jobs/{job_id}/status/"})}),"\n",(0,l.jsxs)(n.p,{children:["\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 job \u0441 ",(0,l.jsx)(n.code,{children:"job_id"}),"."]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"path"}),": ",(0,l.jsx)(n.code,{children:"job_id"})]}),"\n"]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-7",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/jobs/4d78d943-1896-4d7b-9f11-b10cc2389ba3/status/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-7",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "id": "4d78d943-1896-4d7b-9f11-b10cc2389ba3",\n "name": "DOWNLOAD_test",\n "status": "FINISHED",\n "started_at": "2024-03-21T09:58:29.846708"\n}\n'})}),"\n",(0,l.jsx)(n.h3,{id:"post-v1jobsjob_idinterrupt",children:(0,l.jsx)(n.code,{children:"POST /v1/jobs/{job_id}/interrupt/"})}),"\n",(0,l.jsxs)(n.p,{children:["\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 job \u0441 ",(0,l.jsx)(n.code,{children:"job_id"}),"."]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-2",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"path"}),": ",(0,l.jsx)(n.code,{children:"job_id"})]}),"\n"]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-8",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/jobs/8a63349c-078f-4e98-8968-4f011593329c/interrupt/' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-8",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "KILLED",\n "started_at": "2024-03-21T07:35:16.861681"\n}\n\n\n\n\n'})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(t,{...e})}):t(e)}},8453:(e,n,d)=>{d.d(n,{R:()=>c,x:()=>o});var l=d(6540);const s={},i=l.createContext(s);function c(e){const n=l.useContext(i);return l.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),l.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c1c2681f.56a1b890.js b/assets/js/c1c2681f.56a1b890.js new file mode 100644 index 0000000..77865e0 --- /dev/null +++ b/assets/js/c1c2681f.56a1b890.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[175],{1939:(e,n,d)=>{d.r(n),d.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>r});var l=d(4848),s=d(8453);const i={sidebar_position:1},c="Management API",o={id:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment",title:"Management API",description:"Management API \u2014 \u044d\u0442\u043e REST API \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment.md",sourceDirName:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management",slug:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"onpremSidebar",previous:{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 LLM (UI & API)",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/"},next:{title:"Fine-tuning",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning"}},a={},r=[{value:"\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439",id:"\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",level:2},{value:"GET /v1/models/
",id:"get-v1models",level:3},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430",level:4},{value:"POST /v1/models/add/
",id:"post-v1modelsadd",level:3},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-1",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-1",level:4},{value:"\u0417\u0430\u043f\u0443\u0441\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439",id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",level:2},{value:"GET /v1/deploy/
",id:"get-v1deploy",level:3},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-2",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-2",level:4},{value:"POST /v1/deploy/
",id:"post-v1deploy",level:3},{value:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-3",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-3",level:4},{value:"GET /v1/deploy/status
",id:"get-v1deploystatus",level:3},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-4",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-4",level:4},{value:"POST /v1/deploy/interrupt/
",id:"post-v1deployinterrupt",level:3},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-5",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-5",level:4},{value:"Jobs",id:"jobs",level:2},{value:"GET /v1/jobs/
",id:"get-v1jobs",level:3},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-6",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-6",level:4},{value:"GET /v1/jobs/{job_id}/status/
",id:"get-v1jobsjob_idstatus",level:3},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-7",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-7",level:4},{value:"POST /v1/jobs/{job_id}/interrupt/
",id:"post-v1jobsjob_idinterrupt",level:3},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-2",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-8",level:4},{value:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-8",level:4}];function t(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{id:"management-api",children:"Management API"}),"\n",(0,l.jsxs)(n.p,{children:["Management API \u2014 \u044d\u0442\u043e ",(0,l.jsx)(n.strong,{children:"REST API"})," \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438."]}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"URL"}),": ",(0,l.jsx)(n.code,{children:"http://localhost:8080/pod-1/api/"})]}),"\n",(0,l.jsx)(n.p,{children:"\u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0432 Compressa"}),"\n",(0,l.jsx)(n.li,{children:"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430"}),"\n",(0,l.jsx)(n.li,{children:"\u041f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,l.jsx)(n.li,{children:"\u0418 \u0442. \u0434."}),"\n"]}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"\u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Swagger, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 REST API \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430"}),"\n",(0,l.jsx)(n.strong,{children:"URL"}),": ",(0,l.jsx)(n.code,{children:"http://localhost:8080/pod-1/api/docs/"})]}),"\n",(0,l.jsx)(n.h2,{id:"\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",children:"\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439"}),"\n",(0,l.jsx)(n.h3,{id:"get-v1models",children:(0,l.jsx)(n.code,{children:"GET /v1/models/"})}),"\n",(0,l.jsx)(n.p,{children:"\u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/models/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'[\n {\n "model_id": "string",\n "adapter": true,\n "base_model_id": "string"\n }\n]\n'})}),"\n",(0,l.jsx)(n.h3,{id:"post-v1modelsadd",children:(0,l.jsx)(n.code,{children:"POST /v1/models/add/"})}),"\n",(0,l.jsx)(n.p,{children:"\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 Hugging Face."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"query"}),": ",(0,l.jsx)(n.code,{children:"model_id"})," - \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 Hugging Face,\n\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 ",(0,l.jsx)(n.code,{children:"openchat/openchat-3.5-0106"})," \u0434\u043b\u044f ",(0,l.jsx)(n.a,{href:"https://huggingface.co/openchat/openchat-3.5-0106",children:"\u0441\u0441\u044b\u043b\u043a\u0438"}),"."]}),"\n"]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-1",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/models/add/?model_id=mymodel_id' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-1",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "id": "4d78d943-1896-4d7b-9f11-b10cc2389ba3",\n "name": "DOWNLOAD_mymodel_id",\n "status": "RUNNING",\n "started_at": "2024-03-21T09:58:29.846708"\n}\n'})}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h2,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u043c\u043e\u0434\u0435\u043b\u0435\u0439",children:"\u0417\u0430\u043f\u0443\u0441\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439"}),"\n",(0,l.jsx)(n.h3,{id:"get-v1deploy",children:(0,l.jsx)(n.code,{children:"GET /v1/deploy/"})}),"\n",(0,l.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-2",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/api/pod-1/v1/deploy/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-2",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "model_id": "string",\n "adapter_ids": [\n "string"\n ]\n}\n'})}),"\n",(0,l.jsx)(n.h3,{id:"post-v1deploy",children:(0,l.jsx)(n.code,{children:"POST /v1/deploy/"})}),"\n",(0,l.jsxs)(n.p,{children:["\u0417\u0430\u043f\u0443\u0441\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430. \u0421\u043f\u0438\u0441\u043e\u043a id \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ",(0,l.jsx)(n.code,{children:"GET /v1/models/"}),"."]}),"\n",(0,l.jsx)(n.h4,{id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "model_id": "string",\n "adapter_ids": [\n "string"\n ]\n}\n'})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"model_id"})," - \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"adapter_ids"})," - \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432"]}),"\n"]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-3",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/deploy/' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model_id\": \"model_id1\",\n \"adapter_ids\": [\n \"adapter_id1\",\n \"adapter_id2\"\n ]\n}'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-3",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "name": "string",\n "status": "CREATED",\n "started_at": "2024-03-21T10:10:07.521Z"\n}\n'})}),"\n",(0,l.jsx)(n.h3,{id:"get-v1deploystatus",children:(0,l.jsx)(n.code,{children:"GET /v1/deploy/status"})}),"\n",(0,l.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-4",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/deploy/status/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-4",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "model_id": "model_id1",\n "adapter_ids": [\n "adapter_id1",\n "adapter_id2"\n ],\n "job": {\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "RUNNING",\n "started_at": "2024-03-21T07:35:16.861681"\n }\n}\n'})}),"\n",(0,l.jsx)(n.h3,{id:"post-v1deployinterrupt",children:(0,l.jsx)(n.code,{children:"POST /v1/deploy/interrupt/"})}),"\n",(0,l.jsx)(n.p,{children:"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-5",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/deploy/interrupt/' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-5",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "RUNNING",\n "started_at": "2024-03-21T07:35:16.861681"\n}\n'})}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h2,{id:"jobs",children:"Jobs"}),"\n",(0,l.jsx)(n.p,{children:"\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u043b\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 jobs.\n\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c jobs."}),"\n",(0,l.jsx)(n.h3,{id:"get-v1jobs",children:(0,l.jsx)(n.code,{children:"GET /v1/jobs/"})}),"\n",(0,l.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0435 jobs \u0441\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u043c\u0438."}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-6",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/jobs/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-6",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'[\n {\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "RUNNING",\n "started_at": "2024-03-21T07:35:16.861681"\n },\n {\n "id": "4d78d943-1896-4d7b-9f11-b10cc2389ba3",\n "name": "DOWNLOAD_test",\n "status": "FINISHED",\n "started_at": "2024-03-21T09:58:29.846708"\n }\n]\n'})}),"\n",(0,l.jsx)(n.h3,{id:"get-v1jobsjob_idstatus",children:(0,l.jsx)(n.code,{children:"GET /v1/jobs/{job_id}/status/"})}),"\n",(0,l.jsxs)(n.p,{children:["\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 job \u0441 ",(0,l.jsx)(n.code,{children:"job_id"}),"."]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"path"}),": ",(0,l.jsx)(n.code,{children:"job_id"})]}),"\n"]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-7",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/jobs/4d78d943-1896-4d7b-9f11-b10cc2389ba3/status/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-7",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "id": "4d78d943-1896-4d7b-9f11-b10cc2389ba3",\n "name": "DOWNLOAD_test",\n "status": "FINISHED",\n "started_at": "2024-03-21T09:58:29.846708"\n}\n'})}),"\n",(0,l.jsx)(n.h3,{id:"post-v1jobsjob_idinterrupt",children:(0,l.jsx)(n.code,{children:"POST /v1/jobs/{job_id}/interrupt/"})}),"\n",(0,l.jsxs)(n.p,{children:["\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 job \u0441 ",(0,l.jsx)(n.code,{children:"job_id"}),"."]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-2",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"path"}),": ",(0,l.jsx)(n.code,{children:"job_id"})]}),"\n"]}),"\n",(0,l.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-8",children:"\u041f\u0440\u0438\u043c\u0435\u0440:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/jobs/8a63349c-078f-4e98-8968-4f011593329c/interrupt/' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,l.jsx)(n.h4,{id:"\u0441\u0445\u0435\u043c\u0430-\u043e\u0442\u0432\u0435\u0442\u0430-8",children:"\u0421\u0445\u0435\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'{\n "id": "8a63349c-078f-4e98-8968-4f011593329c",\n "name": "DEPLOY_model_id1_adapters_id1_id2",\n "status": "KILLED",\n "started_at": "2024-03-21T07:35:16.861681"\n}\n\n\n\n\n'})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(t,{...e})}):t(e)}},8453:(e,n,d)=>{d.d(n,{R:()=>c,x:()=>o});var l=d(6540);const s={},i=l.createContext(s);function c(e){const n=l.useContext(i);return l.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),l.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c4107403.674de86a.js b/assets/js/c4107403.674de86a.js deleted file mode 100644 index 272f8e2..0000000 --- a/assets/js/c4107403.674de86a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[1355],{687:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>d,toc:()=>u});var s=t(4848),a=t(8453),r=t(1470),i=t(9365);const o={sidebar_position:3},l="Embeddings",d={id:"docs/basic_modules/Embeddings",title:"Embeddings",description:"Embeddings \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a, \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0449\u0438\u0435 \u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c. \u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u0447:",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Embeddings.md",sourceDirName:"docs/basic_modules",slug:"/docs/basic_modules/Embeddings",permalink:"/docs/basic_modules/Embeddings",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Embeddings.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"docsSidebar",previous:{title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI",permalink:"/docs/basic_modules/LLM/OpenAI"},next:{title:"Rerank",permalink:"/docs/basic_modules/Rerank"}},c={},u=[{value:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432",id:"\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435-\u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432-\u0434\u043b\u044f-\u043e\u0434\u043d\u043e\u0433\u043e-\u0438-\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445-\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445-\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432",level:3},{value:"\u0422\u0430\u043a\u0436\u0435 \u0432 Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Compressa \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings",id:"\u0442\u0430\u043a\u0436\u0435-\u0432-python-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435-compressa-\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e-\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435-embeddings",level:3}];function m(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"embeddings",children:"Embeddings"}),"\n",(0,s.jsx)(n.p,{children:"Embeddings \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a, \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0449\u0438\u0435 \u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c. \u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u0447:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"\u041f\u043e\u0438\u0441\u043a (\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0443)"}),"\n",(0,s.jsx)(n.li,{children:"\u041a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f (\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043f\u043e \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438)"}),"\n",(0,s.jsx)(n.li,{children:"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438)"}),"\n",(0,s.jsx)(n.li,{children:"\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439 (\u043f\u043e\u0438\u0441\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445)"}),"\n",(0,s.jsx)(n.li,{children:"\u0418\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f (\u0430\u043d\u0430\u043b\u0438\u0437 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438)"}),"\n",(0,s.jsx)(n.li,{children:"\u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f (\u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0445 \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u0441 \u043c\u0435\u0442\u043a\u0430\u043c\u0438)"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"\u042d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 (\u0441\u043f\u0438\u0441\u043e\u043a) \u0447\u0438\u0441\u0435\u043b. \u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0438\u0445 \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438: \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438, \u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u2014 \u043d\u0430 \u043d\u0438\u0437\u043a\u0443\u044e."}),"\n",(0,s.jsx)(n.h3,{id:"\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435-\u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432-\u0434\u043b\u044f-\u043e\u0434\u043d\u043e\u0433\u043e-\u0438-\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445-\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445-\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432",children:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432"}),"\n","\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(i.A,{value:"python",label:"Python (Langchain)",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'#pip install langchain-compressa - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nfrom langchain_compressa import CompressaEmbeddings\n\nembeddings = CompressaEmbeddings(\n model="Compressa-Embedding",\n base_url="https://compressa-api.mil-team.ru/v1", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n model_kwargs={"encoding_format": \'float\'},\n tiktoken_enabled=False,\n tiktoken_model_name="Salesforce/SFR-Embedding-Mistral",\n)\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embedding \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\nquery_embedding = embeddings.embed_query("\u041a\u0430\u043a \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0431\u043e\u0440\u0449?")\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432\ndocs_embeddings = embeddings.embed_documents([\n "\u0411\u043e\u0440\u0449 - \u044d\u0442\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043b\u0430\u0432\u044f\u043d\u0441\u043a\u0438\u0439 \u0441\u0443\u043f",\n "\u0414\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u0440\u0449\u0430 \u043d\u0443\u0436\u043d\u0430 \u0441\u0432\u0435\u043a\u043b\u0430",\n "\u0411\u043e\u0440\u0449 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434\u0430\u044e\u0442 \u0441\u043e \u0441\u043c\u0435\u0442\u0430\u043d\u043e\u0439",\n "\u0412 \u0431\u043e\u0440\u0449 \u0447\u0430\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u044f\u0441\u043e",\n "\u0411\u043e\u0440\u0449 \u0438\u043c\u0435\u0435\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442"\n])\n'})})}),(0,s.jsx)(i.A,{value:"openai",label:"Python (OpenAI \u043a\u043b\u0438\u0435\u043d\u0442)",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'# from openai import OpenAI - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nclient = OpenAI(\n api_key = "\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n base_url = "https://compressa-api.mil-team.ru/v1" # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1\n)\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embedding \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\nembedding = client.embeddings.create(\n model="Compressa-Embedding",\n input="\u041a\u0430\u043a \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0431\u043e\u0440\u0449?",\n encoding_format="float",\n)\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432\ndocs = [\n "\u0411\u043e\u0440\u0449 - \u044d\u0442\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043b\u0430\u0432\u044f\u043d\u0441\u043a\u0438\u0439 \u0441\u0443\u043f",\n "\u0414\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u0440\u0449\u0430 \u043d\u0443\u0436\u043d\u0430 \u0441\u0432\u0435\u043a\u043b\u0430",\n "\u0411\u043e\u0440\u0449 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434\u0430\u044e\u0442 \u0441\u043e \u0441\u043c\u0435\u0442\u0430\u043d\u043e\u0439",\n "\u0412 \u0431\u043e\u0440\u0449 \u0447\u0430\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u044f\u0441\u043e",\n "\u0411\u043e\u0440\u0449 \u0438\u043c\u0435\u0435\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442"\n]\n\nembeddings = client.embeddings.create(\n model="Compressa-Embedding",\n input=docs,\n encoding_format="float",\n)\n'})})}),(0,s.jsx)(i.A,{value:"curl",label:"cURL",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/embeddings\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X 'POST' \\\n 'https://compressa-api.mil-team.ru/v1/embeddings' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa' \\\n -d '{\n \"model\": \"Compressa-Embedding\",\n \"input\": \"\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u044d\u043c\u0431\u0435\u0434\u0438\u043d\u0433\"\n}'\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"\u0442\u0430\u043a\u0436\u0435-\u0432-python-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435-compressa-\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e-\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435-embeddings",children:"\u0422\u0430\u043a\u0436\u0435 \u0432 Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Compressa \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'#pip install langchain-compressa - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nimport os\nfrom langchain_compressa import CompressaEmbeddings\n\nembeddings = CompressaEmbeddings(\n model="Compressa-Embedding",\n base_url="https://compressa-api.mil-team.ru/v1", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n model_kwargs={"encoding_format": \'float\'},\n tiktoken_enabled=False,\n tiktoken_model_name="Salesforce/SFR-Embedding-Mistral",\n)\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embedding \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\nawait embeddings.aembed_query("\u041a\u0430\u043a \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0431\u043e\u0440\u0449?")\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432\nawait embeddings.aembed_documents([\n "\u0411\u043e\u0440\u0449 - \u044d\u0442\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043b\u0430\u0432\u044f\u043d\u0441\u043a\u0438\u0439 \u0441\u0443\u043f",\n "\u0414\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u0440\u0449\u0430 \u043d\u0443\u0436\u043d\u0430 \u0441\u0432\u0435\u043a\u043b\u0430",\n "\u0411\u043e\u0440\u0449 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434\u0430\u044e\u0442 \u0441\u043e \u0441\u043c\u0435\u0442\u0430\u043d\u043e\u0439",\n "\u0412 \u0431\u043e\u0440\u0449 \u0447\u0430\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u044f\u0441\u043e",\n "\u0411\u043e\u0440\u0449 \u0438\u043c\u0435\u0435\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442"\n])\n'})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsxs)(n.strong,{children:["\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 Embeddings \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a - \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430\u0448\u0435 ",(0,s.jsx)(n.a,{href:"/guides/langchain_basic_semantic_search/",children:"\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e"}),"."]})})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);var s=t(4164);const a={tabItem:"tabItem_Ymn6"};var r=t(4848);function i(e){let{children:n,hidden:t,className:i}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.A)(a.tabItem,i),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>y});var s=t(6540),a=t(4164),r=t(3104),i=t(6347),o=t(205),l=t(7485),d=t(1682),c=t(9466);function u(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Badchild <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function m(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:a}}=e;return{value:n,label:t,attributes:s,default:a}}))}(t);return function(e){const n=(0,d.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function b(e){let{queryString:n=!1,groupId:t}=e;const a=(0,i.W6)(),r=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(r),(0,s.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(a.location.search);n.set(r,e),a.replace({...a.location,search:n.toString()})}),[r,a])]}function h(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,r=m(e),[i,l]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:r}))),[d,u]=b({queryString:t,groupId:a}),[h,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,r]=(0,c.Dv)(t);return[a,(0,s.useCallback)((e=>{t&&r.set(e)}),[t,r])]}({groupId:a}),f=(()=>{const e=d??h;return p({value:e,tabValues:r})?e:null})();(0,o.A)((()=>{f&&l(f)}),[f]);return{selectedValue:i,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),g(e)}),[u,g,r]),tabValues:r}}var g=t(2303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(4848);function _(e){let{className:n,block:t,selectedValue:s,selectValue:i,tabValues:o}=e;const l=[],{blockElementScrollPositionUntilNextRender:d}=(0,r.a_)(),c=e=>{const n=e.currentTarget,t=l.indexOf(n),a=o[t].value;a!==s&&(d(n),i(a))},u=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:o.map((e=>{let{value:n,label:t,attributes:r}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>l.push(e),onKeyDown:u,onClick:c,...r,className:(0,a.A)("tabs__item",f.tabItem,r?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function x(e){let{lazy:n,children:t,selectedValue:a}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===a));return e?(0,s.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function j(e){const n=h(e);return(0,v.jsxs)("div",{className:(0,a.A)("tabs-container",f.tabList),children:[(0,v.jsx)(_,{...n,...e}),(0,v.jsx)(x,{...n,...e})]})}function y(e){const n=(0,g.A)();return(0,v.jsx)(j,{...e,children:u(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(6540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c4107403.cb906ab0.js b/assets/js/c4107403.cb906ab0.js new file mode 100644 index 0000000..5c5c38f --- /dev/null +++ b/assets/js/c4107403.cb906ab0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[355],{687:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>d,toc:()=>u});var s=t(4848),a=t(8453),r=t(1470),i=t(9365);const o={sidebar_position:3},l="Embeddings",d={id:"docs/basic_modules/Embeddings",title:"Embeddings",description:"Embeddings \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a, \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0449\u0438\u0435 \u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c. \u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u0447:",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Embeddings.md",sourceDirName:"docs/basic_modules",slug:"/docs/basic_modules/Embeddings",permalink:"/docs/basic_modules/Embeddings",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Embeddings.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"docsSidebar",previous:{title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI",permalink:"/docs/basic_modules/LLM/OpenAI"},next:{title:"Rerank",permalink:"/docs/basic_modules/Rerank"}},c={},u=[{value:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432",id:"\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435-\u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432-\u0434\u043b\u044f-\u043e\u0434\u043d\u043e\u0433\u043e-\u0438-\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445-\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445-\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432",level:3},{value:"\u0422\u0430\u043a\u0436\u0435 \u0432 Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Compressa \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings",id:"\u0442\u0430\u043a\u0436\u0435-\u0432-python-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435-compressa-\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e-\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435-embeddings",level:3}];function m(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"embeddings",children:"Embeddings"}),"\n",(0,s.jsx)(n.p,{children:"Embeddings \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a, \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0449\u0438\u0435 \u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c. \u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u0447:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"\u041f\u043e\u0438\u0441\u043a (\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0443)"}),"\n",(0,s.jsx)(n.li,{children:"\u041a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f (\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043f\u043e \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438)"}),"\n",(0,s.jsx)(n.li,{children:"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438)"}),"\n",(0,s.jsx)(n.li,{children:"\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0439 (\u043f\u043e\u0438\u0441\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445)"}),"\n",(0,s.jsx)(n.li,{children:"\u0418\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f (\u0430\u043d\u0430\u043b\u0438\u0437 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438)"}),"\n",(0,s.jsx)(n.li,{children:"\u041a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f (\u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0445 \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438 \u0441 \u043c\u0435\u0442\u043a\u0430\u043c\u0438)"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"\u042d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 (\u0441\u043f\u0438\u0441\u043e\u043a) \u0447\u0438\u0441\u0435\u043b. \u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0438\u0445 \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438: \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u0438, \u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u2014 \u043d\u0430 \u043d\u0438\u0437\u043a\u0443\u044e."}),"\n",(0,s.jsx)(n.h3,{id:"\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435-\u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432-\u0434\u043b\u044f-\u043e\u0434\u043d\u043e\u0433\u043e-\u0438-\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445-\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445-\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432",children:"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432"}),"\n","\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(i.A,{value:"python",label:"Python (Langchain)",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'#pip install langchain-compressa - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nfrom langchain_compressa import CompressaEmbeddings\n\nembeddings = CompressaEmbeddings(\n model="Compressa-Embedding",\n base_url="https://compressa-api.mil-team.ru/v1", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n model_kwargs={"encoding_format": \'float\'},\n tiktoken_enabled=False,\n tiktoken_model_name="Salesforce/SFR-Embedding-Mistral",\n)\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embedding \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\nquery_embedding = embeddings.embed_query("\u041a\u0430\u043a \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0431\u043e\u0440\u0449?")\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432\ndocs_embeddings = embeddings.embed_documents([\n "\u0411\u043e\u0440\u0449 - \u044d\u0442\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043b\u0430\u0432\u044f\u043d\u0441\u043a\u0438\u0439 \u0441\u0443\u043f",\n "\u0414\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u0440\u0449\u0430 \u043d\u0443\u0436\u043d\u0430 \u0441\u0432\u0435\u043a\u043b\u0430",\n "\u0411\u043e\u0440\u0449 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434\u0430\u044e\u0442 \u0441\u043e \u0441\u043c\u0435\u0442\u0430\u043d\u043e\u0439",\n "\u0412 \u0431\u043e\u0440\u0449 \u0447\u0430\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u044f\u0441\u043e",\n "\u0411\u043e\u0440\u0449 \u0438\u043c\u0435\u0435\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442"\n])\n'})})}),(0,s.jsx)(i.A,{value:"openai",label:"Python (OpenAI \u043a\u043b\u0438\u0435\u043d\u0442)",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'# from openai import OpenAI - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nclient = OpenAI(\n api_key = "\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n base_url = "https://compressa-api.mil-team.ru/v1" # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1\n)\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embedding \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\nembedding = client.embeddings.create(\n model="Compressa-Embedding",\n input="\u041a\u0430\u043a \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0431\u043e\u0440\u0449?",\n encoding_format="float",\n)\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432\ndocs = [\n "\u0411\u043e\u0440\u0449 - \u044d\u0442\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043b\u0430\u0432\u044f\u043d\u0441\u043a\u0438\u0439 \u0441\u0443\u043f",\n "\u0414\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u0440\u0449\u0430 \u043d\u0443\u0436\u043d\u0430 \u0441\u0432\u0435\u043a\u043b\u0430",\n "\u0411\u043e\u0440\u0449 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434\u0430\u044e\u0442 \u0441\u043e \u0441\u043c\u0435\u0442\u0430\u043d\u043e\u0439",\n "\u0412 \u0431\u043e\u0440\u0449 \u0447\u0430\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u044f\u0441\u043e",\n "\u0411\u043e\u0440\u0449 \u0438\u043c\u0435\u0435\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442"\n]\n\nembeddings = client.embeddings.create(\n model="Compressa-Embedding",\n input=docs,\n encoding_format="float",\n)\n'})})}),(0,s.jsx)(i.A,{value:"curl",label:"cURL",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/embeddings\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X 'POST' \\\n 'https://compressa-api.mil-team.ru/v1/embeddings' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa' \\\n -d '{\n \"model\": \"Compressa-Embedding\",\n \"input\": \"\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u044d\u043c\u0431\u0435\u0434\u0438\u043d\u0433\"\n}'\n"})})})]}),"\n",(0,s.jsx)(n.h3,{id:"\u0442\u0430\u043a\u0436\u0435-\u0432-python-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435-compressa-\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e-\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435-embeddings",children:"\u0422\u0430\u043a\u0436\u0435 \u0432 Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 Compressa \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'#pip install langchain-compressa - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nimport os\nfrom langchain_compressa import CompressaEmbeddings\n\nembeddings = CompressaEmbeddings(\n model="Compressa-Embedding",\n base_url="https://compressa-api.mil-team.ru/v1", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", # \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n model_kwargs={"encoding_format": \'float\'},\n tiktoken_enabled=False,\n tiktoken_model_name="Salesforce/SFR-Embedding-Mistral",\n)\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embedding \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\nawait embeddings.aembed_query("\u041a\u0430\u043a \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0431\u043e\u0440\u0449?")\n\n# \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 embeddings \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432\nawait embeddings.aembed_documents([\n "\u0411\u043e\u0440\u0449 - \u044d\u0442\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043b\u0430\u0432\u044f\u043d\u0441\u043a\u0438\u0439 \u0441\u0443\u043f",\n "\u0414\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u043e\u0440\u0449\u0430 \u043d\u0443\u0436\u043d\u0430 \u0441\u0432\u0435\u043a\u043b\u0430",\n "\u0411\u043e\u0440\u0449 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434\u0430\u044e\u0442 \u0441\u043e \u0441\u043c\u0435\u0442\u0430\u043d\u043e\u0439",\n "\u0412 \u0431\u043e\u0440\u0449 \u0447\u0430\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u044f\u0441\u043e",\n "\u0411\u043e\u0440\u0449 \u0438\u043c\u0435\u0435\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0446\u0432\u0435\u0442"\n])\n'})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsxs)(n.strong,{children:["\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 Embeddings \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a - \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430\u0448\u0435 ",(0,s.jsx)(n.a,{href:"/guides/langchain_basic_semantic_search/",children:"\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e"}),"."]})})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);var s=t(4164);const a={tabItem:"tabItem_Ymn6"};var r=t(4848);function i(e){let{children:n,hidden:t,className:i}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.A)(a.tabItem,i),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>y});var s=t(6540),a=t(4164),r=t(3104),i=t(6347),o=t(205),l=t(7485),d=t(1682),c=t(9466);function u(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function m(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:a}}=e;return{value:n,label:t,attributes:s,default:a}}))}(t);return function(e){const n=(0,d.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function b(e){let{queryString:n=!1,groupId:t}=e;const a=(0,i.W6)(),r=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(r),(0,s.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(a.location.search);n.set(r,e),a.replace({...a.location,search:n.toString()})}),[r,a])]}function h(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,r=m(e),[i,l]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:r}))),[d,u]=b({queryString:t,groupId:a}),[h,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,r]=(0,c.Dv)(t);return[a,(0,s.useCallback)((e=>{t&&r.set(e)}),[t,r])]}({groupId:a}),f=(()=>{const e=d??h;return p({value:e,tabValues:r})?e:null})();(0,o.A)((()=>{f&&l(f)}),[f]);return{selectedValue:i,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),g(e)}),[u,g,r]),tabValues:r}}var g=t(2303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(4848);function _(e){let{className:n,block:t,selectedValue:s,selectValue:i,tabValues:o}=e;const l=[],{blockElementScrollPositionUntilNextRender:d}=(0,r.a_)(),c=e=>{const n=e.currentTarget,t=l.indexOf(n),a=o[t].value;a!==s&&(d(n),i(a))},u=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:o.map((e=>{let{value:n,label:t,attributes:r}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>l.push(e),onKeyDown:u,onClick:c,...r,className:(0,a.A)("tabs__item",f.tabItem,r?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function x(e){let{lazy:n,children:t,selectedValue:a}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===a));return e?(0,s.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function j(e){const n=h(e);return(0,v.jsxs)("div",{className:(0,a.A)("tabs-container",f.tabList),children:[(0,v.jsx)(_,{...n,...e}),(0,v.jsx)(x,{...n,...e})]})}function y(e){const n=(0,g.A)();return(0,v.jsx)(j,{...e,children:u(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(6540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d4390c4c.4e5e7a8b.js b/assets/js/d4390c4c.4e5e7a8b.js deleted file mode 100644 index f1ac1bf..0000000 --- a/assets/js/d4390c4c.4e5e7a8b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[2471],{7187:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var r=s(4848),t=s(8453);const o={},i="\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443",a={id:"onprem/Compressa LLM/compressa_llm_install/without_internet",title:"\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443",description:"\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0435 Compressa \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u0435\u0442\u0438 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Compressa \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0430\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 GDrive \u0441 \u0430\u0440\u0445\u0438\u0432\u043e\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_install/without_internet.md",sourceDirName:"onprem/Compressa LLM/compressa_llm_install",slug:"/onprem/Compressa LLM/compressa_llm_install/without_internet",permalink:"/onprem/Compressa LLM/compressa_llm_install/without_internet",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_install/without_internet.md",tags:[],version:"current",frontMatter:{},sidebar:"onpremSidebar",previous:{title:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",permalink:"/onprem/Compressa LLM/compressa_llm_install/"},next:{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438",permalink:"/onprem/Compressa LLM/compressa_llm_management/"}},c={},l=[{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",level:4},{value:"\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",id:"\u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",level:4},{value:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",id:"\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",level:4}];function p(e){const n={a:"a",code:"code",h1:"h1",h4:"h4",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"\u0431\u0435\u0437-\u0434\u043e\u0441\u0442\u0443\u043f\u0430-\u043a-\u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443",children:"\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443"}),"\n",(0,r.jsx)(n.p,{children:"\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0435 Compressa \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u0435\u0442\u0438 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Compressa \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0430\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 GDrive \u0441 \u0430\u0440\u0445\u0438\u0432\u043e\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438."}),"\n",(0,r.jsxs)(n.p,{children:["\u0410\u0440\u0445\u0438\u0432 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a ",(0,r.jsx)(n.a,{href:"https://github.com/wkentaro/gdown",children:"gdown"}),", \u0438\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430."]}),"\n",(0,r.jsx)(n.h4,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"gdown --fuzzy https://drive.google.com/file/d/ /view?usp=sharing -O data.tar.gz\n"})}),"\n",(0,r.jsx)(n.h4,{id:"\u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",children:"\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"tar -xvf data.tar.gz\nchmod 777 -R data\n"})}),"\n",(0,r.jsx)(n.h4,{id:"\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f"}),"\n",(0,r.jsxs)(n.p,{children:["\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f ",(0,r.jsx)(n.code,{children:"RESOURCES_PATH"})," \u043d\u0430 \u043f\u0430\u043f\u043a\u0443 ",(0,r.jsx)(n.code,{children:"data"})," \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"export RESOURCES_PATH=./data\n"})}),"\n",(0,r.jsx)(n.p,{children:"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Compressa \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e."}),"\n",(0,r.jsx)(n.p,{children:"\u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435."})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>a});var r=s(6540);const t={},o=r.createContext(t);function i(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d4390c4c.537a32e1.js b/assets/js/d4390c4c.537a32e1.js new file mode 100644 index 0000000..0a69268 --- /dev/null +++ b/assets/js/d4390c4c.537a32e1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[471],{7187:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var r=s(4848),t=s(8453);const o={},i="\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443",a={id:"onprem/Compressa LLM/compressa_llm_install/without_internet",title:"\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443",description:"\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0435 Compressa \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u0435\u0442\u0438 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Compressa \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0430\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 GDrive \u0441 \u0430\u0440\u0445\u0438\u0432\u043e\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_install/without_internet.md",sourceDirName:"onprem/Compressa LLM/compressa_llm_install",slug:"/onprem/Compressa LLM/compressa_llm_install/without_internet",permalink:"/onprem/Compressa LLM/compressa_llm_install/without_internet",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_install/without_internet.md",tags:[],version:"current",frontMatter:{},sidebar:"onpremSidebar",previous:{title:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430",permalink:"/onprem/Compressa LLM/compressa_llm_install/"},next:{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438",permalink:"/onprem/Compressa LLM/compressa_llm_management/"}},c={},l=[{value:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",level:4},{value:"\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",id:"\u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",level:4},{value:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",id:"\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",level:4}];function p(e){const n={a:"a",code:"code",h1:"h1",h4:"h4",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"\u0431\u0435\u0437-\u0434\u043e\u0441\u0442\u0443\u043f\u0430-\u043a-\u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443",children:"\u0411\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443"}),"\n",(0,r.jsx)(n.p,{children:"\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442\u0435 Compressa \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u0435\u0442\u0438 \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Compressa \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0430\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 GDrive \u0441 \u0430\u0440\u0445\u0438\u0432\u043e\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438."}),"\n",(0,r.jsxs)(n.p,{children:["\u0410\u0440\u0445\u0438\u0432 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a ",(0,r.jsx)(n.a,{href:"https://github.com/wkentaro/gdown",children:"gdown"}),", \u0438\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430."]}),"\n",(0,r.jsx)(n.h4,{id:"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"gdown --fuzzy https://drive.google.com/file/d/ /view?usp=sharing -O data.tar.gz\n"})}),"\n",(0,r.jsx)(n.h4,{id:"\u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432",children:"\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"tar -xvf data.tar.gz\nchmod 777 -R data\n"})}),"\n",(0,r.jsx)(n.h4,{id:"\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f"}),"\n",(0,r.jsxs)(n.p,{children:["\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f ",(0,r.jsx)(n.code,{children:"RESOURCES_PATH"})," \u043d\u0430 \u043f\u0430\u043f\u043a\u0443 ",(0,r.jsx)(n.code,{children:"data"})," \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"export RESOURCES_PATH=./data\n"})}),"\n",(0,r.jsx)(n.p,{children:"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Compressa \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e."}),"\n",(0,r.jsx)(n.p,{children:"\u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435."})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>a});var r=s(6540);const t={},o=r.createContext(t);function i(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/de3f9e93.c35b6b32.js b/assets/js/de3f9e93.c35b6b32.js deleted file mode 100644 index 2cce4dd..0000000 --- a/assets/js/de3f9e93.c35b6b32.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[5615],{4685:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>d,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var a=t(4848),s=t(8453),r=t(1470),o=t(9365);const l={sidebar_position:2},c="LLM",i={id:"docs/basic_modules/LLM/index",title:"LLM",description:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 open-source LLM \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041c\u044b \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u0438 \u043d\u0430 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u0445 \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u043b\u0438 \u043e\u043f\u044b\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/LLM/index.md",sourceDirName:"docs/basic_modules/LLM",slug:"/docs/basic_modules/LLM/",permalink:"/docs/basic_modules/LLM/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/LLM/index.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"ETL",permalink:"/docs/basic_modules/ETL"},next:{title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI",permalink:"/docs/basic_modules/LLM/OpenAI"}},u={},p=[{value:"\u0412\u044b\u0437\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0435\u0437 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430",id:"\u0432\u044b\u0437\u043e\u0432-\u043c\u043e\u0434\u0435\u043b\u0438-\u0431\u0435\u0437-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430",level:3},{value:"\u0412\u044b\u0437\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u043e\u0442\u0432\u0435\u0442\u0430",id:"\u0432\u044b\u0437\u043e\u0432-\u043c\u043e\u0434\u0435\u043b\u0438-\u0441-\u043e\u043f\u0446\u0438\u0435\u0439-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430-\u043e\u0442\u0432\u0435\u0442\u0430",level:3}];function m(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"llm",children:"LLM"}),"\n",(0,a.jsx)(n.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 open-source LLM \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041c\u044b \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u0438 \u043d\u0430 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u0445 \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u043b\u0438 \u043e\u043f\u044b\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439."}),"\n",(0,a.jsx)(n.p,{children:"\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u044b \u0434\u0430\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 API \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 open-source \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Qwen \u0438\u043b\u0438 Llama), \u043d\u043e \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435."}),"\n",(0,a.jsx)(n.p,{children:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 LLM \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448\u0443 Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f Langchain \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u044f\u043c\u043e\u0439 cURL \u0437\u0430\u043f\u0440\u043e\u0441."}),"\n",(0,a.jsxs)(n.p,{children:["\u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e, \u043d\u0430\u0448\u0438 API \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 OpenAI, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043d\u0430 ",(0,a.jsx)(n.a,{href:"/docs/basic_modules/LLM/OpenAI",children:"\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"\u0432\u044b\u0437\u043e\u0432-\u043c\u043e\u0434\u0435\u043b\u0438-\u0431\u0435\u0437-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430",children:"\u0412\u044b\u0437\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0435\u0437 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430"}),"\n",(0,a.jsxs)(r.A,{children:[(0,a.jsx)(o.A,{value:"python",label:"Python (Langchain)",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'#pip install langchain-compressa - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n#pip install langchain-core - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n#pip install langchain - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nfrom langchain_compressa import ChatCompressa\n\nllm = ChatCompressa(\n base_url="https://compressa-api.mil-team.ru/v1", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n temperature=0.7, \n max_tokens=150, \n stream="false"\n)\n\nmessages = [\n ("system", "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0441 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439. \u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f."),\n ("human", "\u042f \u043b\u044e\u0431\u043b\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.")\n]\n\nai_msg = llm.invoke(messages)\nprint(f"\u041e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438: {ai_msg.content}")\n\n# \u041e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438: I love programming.\n'})})}),(0,a.jsx)(o.A,{value:"curl",label:"cURL",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X \'POST\' \\\n \'https://compressa-api.mil-team.ru/v1/chat/completions\' \\ \n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -H \'Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa\' \\ \n -d \'{\n "model": "Compressa-LLM",\n "messages": [\n {"role": "system", "content": "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0441 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439. \u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f."},\n {"role": "user", "content": "\u042f \u043b\u044e\u0431\u043b\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435."}\n ],\n "max_tokens": 128,\n "temperature": 0.5,\n "stream": false\n}\'\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f LLM \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 Langchain (chains):"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'from langchain_compressa import ChatCompressa\nfrom langchain_core.prompts import ChatPromptTemplate\n\nllm = ChatCompressa(\n base_url="https://compressa-api.mil-team.ru/v1", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n temperature=0.7, \n max_tokens=150, \n stream="false"\n)\n\nprompt = ChatPromptTemplate.from_messages(\n [\n (\n "system",\n "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0441 {input_language} \u043d\u0430 {output_language}.",\n ),\n ("human", "{input}"),\n ]\n)\n\nchain = prompt | llm\nresult = chain.invoke(\n {\n "input_language": "\u0440\u0443\u0441\u0441\u043a\u0438\u0439",\n "output_language": "\u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439",\n "input": "\u042f \u043b\u044e\u0431\u043b\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.",\n }\n)\n\nprint(f"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0446\u0435\u043f\u043e\u0447\u043a\u0438: {result.content}")\n\n# \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0446\u0435\u043f\u043e\u0447\u043a\u0438: I love programming.\n'})}),"\n",(0,a.jsx)(n.h3,{id:"\u0432\u044b\u0437\u043e\u0432-\u043c\u043e\u0434\u0435\u043b\u0438-\u0441-\u043e\u043f\u0446\u0438\u0435\u0439-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430-\u043e\u0442\u0432\u0435\u0442\u0430",children:"\u0412\u044b\u0437\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u043e\u0442\u0432\u0435\u0442\u0430"}),"\n",(0,a.jsxs)(r.A,{children:[(0,a.jsx)(o.A,{value:"python-requests",label:"Python (requests)",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'import requests\n\nresponse = requests.post(\n url="https://compressa-api.mil-team.ru/v1/chat/completions", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n headers={\n "Authorization": "Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n "accept": "application/json",\n "Content-Type": "application/json"\n },\n json={\n "model": "Compressa-LLM",\n "messages": [\n {\n "role": "system",\n "content": "You are an expert in soccer"\n },\n {\n "role": "user",\n "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u0441\u043a\u0430\u0437\u043a\u0443 \u043d\u0430 \u043d\u043e\u0447\u044c \u043f\u0440\u043e \u0434\u043e\u0431\u0440\u044b\u0439 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442!"\n }\n ],\n "max_tokens": 512,\n "temperature": 0.7,\n "stream": True\n }\n)\n\nfor chunk in response.iter_content(chunk_size=None):\n if chunk:\n print(chunk.decode(\'utf-8\'))\n\n# \u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445:\n# data: {"id":"126","object":"chat.completion.chunk","created":1728680725,"model":"Compressa-LLM","choices":[{"index":0,"delta":{"role":"assistant","content":"\u0412"},"logprobs":null,"finish_reason":null}],"usage":null}\n# data: {"id":"126","object":"chat.completion.chunk","created":1728680725,"model":"Compressa-LLM","choices":[{"index":0,"delta":{"role":"assistant","content":" \u0434\u0430\u0432"},"logprobs":null,"finish_reason":null}],"usage":null}\n# ...\n'})})}),(0,a.jsx)(o.A,{value:"curl",label:"cURL",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X \'POST\' \\\n \'https://compressa-api.mil-team.ru/v1/chat/completions\' \\\n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -H \'Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa\' \\\n -d \'{\n "model": "Compressa-LLM",\n "messages": [\n {"role": "user", "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u0441\u043a\u0430\u0437\u043a\u0443 \u043d\u0430 \u043d\u043e\u0447\u044c \u043f\u0440\u043e \u0434\u043e\u0431\u0440\u044b\u0439 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442!"}\n ],\n "max_tokens": 512,\n "temperature": 0.7,\n "stream": True\n}\'\n'})})})]})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(m,{...e})}):m(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var a=t(4164);const s={tabItem:"tabItem_Ymn6"};var r=t(4848);function o(e){let{children:n,hidden:t,className:o}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.A)(s.tabItem,o),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>j});var a=t(6540),s=t(4164),r=t(3104),o=t(6347),l=t(205),c=t(7485),i=t(1682),u=t(9466);function p(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function m(e){const{values:n,children:t}=e;return(0,a.useMemo)((()=>{const e=n??function(e){return p(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:s}}=e;return{value:n,label:t,attributes:a,default:s}}))}(t);return function(e){const n=(0,i.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function d(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function h(e){let{queryString:n=!1,groupId:t}=e;const s=(0,o.W6)(),r=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,c.aZ)(r),(0,a.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(s.location.search);n.set(r,e),s.replace({...s.location,search:n.toString()})}),[r,s])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,r=m(e),[o,c]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!d({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:r}))),[i,p]=h({queryString:t,groupId:s}),[b,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,r]=(0,u.Dv)(t);return[s,(0,a.useCallback)((e=>{t&&r.set(e)}),[t,r])]}({groupId:s}),g=(()=>{const e=i??b;return d({value:e,tabValues:r})?e:null})();(0,l.A)((()=>{g&&c(g)}),[g]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);c(e),p(e),f(e)}),[p,f,r]),tabValues:r}}var f=t(2303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(4848);function _(e){let{className:n,block:t,selectedValue:a,selectValue:o,tabValues:l}=e;const c=[],{blockElementScrollPositionUntilNextRender:i}=(0,r.a_)(),u=e=>{const n=e.currentTarget,t=c.indexOf(n),s=l[t].value;s!==a&&(i(n),o(s))},p=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;n=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;n=c[t]??c[c.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:l.map((e=>{let{value:n,label:t,attributes:r}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:e=>c.push(e),onKeyDown:p,onClick:u,...r,className:(0,s.A)("tabs__item",g.tabItem,r?.className,{"tabs__item--active":a===n}),children:t??n},n)}))})}function x(e){let{lazy:n,children:t,selectedValue:s}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===s));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function L(e){const n=b(e);return(0,v.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,v.jsx)(_,{...n,...e}),(0,v.jsx)(x,{...n,...e})]})}function j(e){const n=(0,f.A)();return(0,v.jsx)(L,{...e,children:p(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>l});var a=t(6540);const s={},r=a.createContext(s);function o(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/de3f9e93.c5a73ba8.js b/assets/js/de3f9e93.c5a73ba8.js new file mode 100644 index 0000000..4d87cb0 --- /dev/null +++ b/assets/js/de3f9e93.c5a73ba8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[615],{4685:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>d,frontMatter:()=>l,metadata:()=>i,toc:()=>p});var a=t(4848),s=t(8453),r=t(1470),o=t(9365);const l={sidebar_position:2},c="LLM",i={id:"docs/basic_modules/LLM/index",title:"LLM",description:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 open-source LLM \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041c\u044b \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u0438 \u043d\u0430 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u0445 \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u043b\u0438 \u043e\u043f\u044b\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/LLM/index.md",sourceDirName:"docs/basic_modules/LLM",slug:"/docs/basic_modules/LLM/",permalink:"/docs/basic_modules/LLM/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/LLM/index.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"ETL",permalink:"/docs/basic_modules/ETL"},next:{title:"\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 OpenAI",permalink:"/docs/basic_modules/LLM/OpenAI"}},u={},p=[{value:"\u0412\u044b\u0437\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0435\u0437 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430",id:"\u0432\u044b\u0437\u043e\u0432-\u043c\u043e\u0434\u0435\u043b\u0438-\u0431\u0435\u0437-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430",level:3},{value:"\u0412\u044b\u0437\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u043e\u0442\u0432\u0435\u0442\u0430",id:"\u0432\u044b\u0437\u043e\u0432-\u043c\u043e\u0434\u0435\u043b\u0438-\u0441-\u043e\u043f\u0446\u0438\u0435\u0439-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430-\u043e\u0442\u0432\u0435\u0442\u0430",level:3}];function m(e){const n={a:"a",code:"code",h1:"h1",h3:"h3",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"llm",children:"LLM"}),"\n",(0,a.jsx)(n.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 open-source LLM \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041c\u044b \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b\u0438 \u043d\u0430 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u0445 \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u043b\u0438 \u043e\u043f\u044b\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439."}),"\n",(0,a.jsx)(n.p,{children:"\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u044b \u0434\u0430\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 API \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 open-source \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Qwen \u0438\u043b\u0438 Llama), \u043d\u043e \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435."}),"\n",(0,a.jsx)(n.p,{children:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 LLM \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0448\u0443 Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f Langchain \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u044f\u043c\u043e\u0439 cURL \u0437\u0430\u043f\u0440\u043e\u0441."}),"\n",(0,a.jsxs)(n.p,{children:["\u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e, \u043d\u0430\u0448\u0438 API \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 OpenAI, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043d\u0430 ",(0,a.jsx)(n.a,{href:"/docs/basic_modules/LLM/OpenAI",children:"\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"\u0432\u044b\u0437\u043e\u0432-\u043c\u043e\u0434\u0435\u043b\u0438-\u0431\u0435\u0437-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430",children:"\u0412\u044b\u0437\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0435\u0437 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430"}),"\n",(0,a.jsxs)(r.A,{children:[(0,a.jsx)(o.A,{value:"python",label:"Python (Langchain)",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'#pip install langchain-compressa - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n#pip install langchain-core - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n#pip install langchain - \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\n\nfrom langchain_compressa import ChatCompressa\n\nllm = ChatCompressa(\n base_url="https://compressa-api.mil-team.ru/v1", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n temperature=0.7, \n max_tokens=150, \n stream="false"\n)\n\nmessages = [\n ("system", "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0441 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439. \u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f."),\n ("human", "\u042f \u043b\u044e\u0431\u043b\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.")\n]\n\nai_msg = llm.invoke(messages)\nprint(f"\u041e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438: {ai_msg.content}")\n\n# \u041e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438: I love programming.\n'})})}),(0,a.jsx)(o.A,{value:"curl",label:"cURL",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X \'POST\' \\\n \'https://compressa-api.mil-team.ru/v1/chat/completions\' \\ \n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -H \'Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa\' \\ \n -d \'{\n "model": "Compressa-LLM",\n "messages": [\n {"role": "system", "content": "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0441 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439. \u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f."},\n {"role": "user", "content": "\u042f \u043b\u044e\u0431\u043b\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435."}\n ],\n "max_tokens": 128,\n "temperature": 0.5,\n "stream": false\n}\'\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f LLM \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 Langchain (chains):"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'from langchain_compressa import ChatCompressa\nfrom langchain_core.prompts import ChatPromptTemplate\n\nllm = ChatCompressa(\n base_url="https://compressa-api.mil-team.ru/v1", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n api_key="\u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n temperature=0.7, \n max_tokens=150, \n stream="false"\n)\n\nprompt = ChatPromptTemplate.from_messages(\n [\n (\n "system",\n "\u0422\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0441 {input_language} \u043d\u0430 {output_language}.",\n ),\n ("human", "{input}"),\n ]\n)\n\nchain = prompt | llm\nresult = chain.invoke(\n {\n "input_language": "\u0440\u0443\u0441\u0441\u043a\u0438\u0439",\n "output_language": "\u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439",\n "input": "\u042f \u043b\u044e\u0431\u043b\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.",\n }\n)\n\nprint(f"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0446\u0435\u043f\u043e\u0447\u043a\u0438: {result.content}")\n\n# \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0446\u0435\u043f\u043e\u0447\u043a\u0438: I love programming.\n'})}),"\n",(0,a.jsx)(n.h3,{id:"\u0432\u044b\u0437\u043e\u0432-\u043c\u043e\u0434\u0435\u043b\u0438-\u0441-\u043e\u043f\u0446\u0438\u0435\u0439-\u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430-\u043e\u0442\u0432\u0435\u0442\u0430",children:"\u0412\u044b\u0437\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430 \u043e\u0442\u0432\u0435\u0442\u0430"}),"\n",(0,a.jsxs)(r.A,{children:[(0,a.jsx)(o.A,{value:"python-requests",label:"Python (requests)",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'import requests\n\nresponse = requests.post(\n url="https://compressa-api.mil-team.ru/v1/chat/completions", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n headers={\n "Authorization": "Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa", #\u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n "accept": "application/json",\n "Content-Type": "application/json"\n },\n json={\n "model": "Compressa-LLM",\n "messages": [\n {\n "role": "system",\n "content": "You are an expert in soccer"\n },\n {\n "role": "user",\n "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u0441\u043a\u0430\u0437\u043a\u0443 \u043d\u0430 \u043d\u043e\u0447\u044c \u043f\u0440\u043e \u0434\u043e\u0431\u0440\u044b\u0439 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442!"\n }\n ],\n "max_tokens": 512,\n "temperature": 0.7,\n "stream": True\n }\n)\n\nfor chunk in response.iter_content(chunk_size=None):\n if chunk:\n print(chunk.decode(\'utf-8\'))\n\n# \u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445:\n# data: {"id":"126","object":"chat.completion.chunk","created":1728680725,"model":"Compressa-LLM","choices":[{"index":0,"delta":{"role":"assistant","content":"\u0412"},"logprobs":null,"finish_reason":null}],"usage":null}\n# data: {"id":"126","object":"chat.completion.chunk","created":1728680725,"model":"Compressa-LLM","choices":[{"index":0,"delta":{"role":"assistant","content":" \u0434\u0430\u0432"},"logprobs":null,"finish_reason":null}],"usage":null}\n# ...\n'})})}),(0,a.jsx)(o.A,{value:"curl",label:"cURL",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 url, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 http://localhost:8080/api/v1/chat/completions\n# \u043f\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439\n\ncurl -X \'POST\' \\\n \'https://compressa-api.mil-team.ru/v1/chat/completions\' \\\n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -H \'Authorization: Bearer \u0412\u0430\u0448_API_\u043a\u043b\u044e\u0447_Compressa\' \\\n -d \'{\n "model": "Compressa-LLM",\n "messages": [\n {"role": "user", "content": "\u041d\u0430\u043f\u0438\u0448\u0438 \u0441\u043a\u0430\u0437\u043a\u0443 \u043d\u0430 \u043d\u043e\u0447\u044c \u043f\u0440\u043e \u0434\u043e\u0431\u0440\u044b\u0439 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442!"}\n ],\n "max_tokens": 512,\n "temperature": 0.7,\n "stream": True\n}\'\n'})})})]})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(m,{...e})}):m(e)}},9365:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var a=t(4164);const s={tabItem:"tabItem_Ymn6"};var r=t(4848);function o(e){let{children:n,hidden:t,className:o}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,a.A)(s.tabItem,o),hidden:t,children:n})}},1470:(e,n,t)=>{t.d(n,{A:()=>j});var a=t(6540),s=t(4164),r=t(3104),o=t(6347),l=t(205),c=t(7485),i=t(1682),u=t(9466);function p(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function m(e){const{values:n,children:t}=e;return(0,a.useMemo)((()=>{const e=n??function(e){return p(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:s}}=e;return{value:n,label:t,attributes:a,default:s}}))}(t);return function(e){const n=(0,i.X)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function d(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function h(e){let{queryString:n=!1,groupId:t}=e;const s=(0,o.W6)(),r=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,c.aZ)(r),(0,a.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(s.location.search);n.set(r,e),s.replace({...s.location,search:n.toString()})}),[r,s])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,r=m(e),[o,c]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!d({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:r}))),[i,p]=h({queryString:t,groupId:s}),[b,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,r]=(0,u.Dv)(t);return[s,(0,a.useCallback)((e=>{t&&r.set(e)}),[t,r])]}({groupId:s}),g=(()=>{const e=i??b;return d({value:e,tabValues:r})?e:null})();(0,l.A)((()=>{g&&c(g)}),[g]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);c(e),p(e),f(e)}),[p,f,r]),tabValues:r}}var f=t(2303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(4848);function _(e){let{className:n,block:t,selectedValue:a,selectValue:o,tabValues:l}=e;const c=[],{blockElementScrollPositionUntilNextRender:i}=(0,r.a_)(),u=e=>{const n=e.currentTarget,t=c.indexOf(n),s=l[t].value;s!==a&&(i(n),o(s))},p=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;n=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;n=c[t]??c[c.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:l.map((e=>{let{value:n,label:t,attributes:r}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:e=>c.push(e),onKeyDown:p,onClick:u,...r,className:(0,s.A)("tabs__item",g.tabItem,r?.className,{"tabs__item--active":a===n}),children:t??n},n)}))})}function x(e){let{lazy:n,children:t,selectedValue:s}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===s));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function L(e){const n=b(e);return(0,v.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,v.jsx)(_,{...n,...e}),(0,v.jsx)(x,{...n,...e})]})}function j(e){const n=(0,f.A)();return(0,v.jsx)(L,{...e,children:p(e.children)},String(n))}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>l});var a=t(6540);const s={},r=a.createContext(s);function o(e){const n=a.useContext(r);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),a.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dee5e5ab.3ef1329e.js b/assets/js/dee5e5ab.3ef1329e.js new file mode 100644 index 0000000..10de3ba --- /dev/null +++ b/assets/js/dee5e5ab.3ef1329e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[383],{7066:(s,e,n)=>{n.r(e),n.d(e,{assets:()=>a,contentTitle:()=>r,default:()=>m,frontMatter:()=>o,metadata:()=>t,toc:()=>l});var c=n(4848),i=n(8453),d=n(8774);const o={sidebar_position:3},r="\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",t={id:"docs/basic_modules/index",title:"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",description:"ETL",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/index.md",sourceDirName:"docs/basic_modules",slug:"/docs/basic_modules/",permalink:"/docs/basic_modules/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/index.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"docsSidebar",previous:{title:"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442",permalink:"/docs/quick_start"},next:{title:"ETL",permalink:"/docs/basic_modules/ETL"}},a={},l=[];function u(s){const e={h1:"h1",...(0,i.R)(),...s.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(e.h1,{id:"\u0431\u0430\u0437\u043e\u0432\u044b\u0435-\u043c\u043e\u0434\u0443\u043b\u0438",children:"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438"}),"\n",(0,c.jsxs)("div",{className:"cardContainer",children:[(0,c.jsx)("div",{className:"card",children:(0,c.jsxs)(d.A,{to:"/docs/basic_modules/ETL",children:[(0,c.jsx)("h3",{children:"ETL"}),(0,c.jsx)("p",{children:"\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0447\u0430\u043d\u043a\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b LLM"})]})}),(0,c.jsx)("div",{className:"card",children:(0,c.jsxs)(d.A,{to:"/docs/basic_modules/LLM/",children:[(0,c.jsx)("h3",{children:"LLM"}),(0,c.jsx)("p",{children:"\u0411\u044b\u0441\u0442\u0440\u044b\u0435 \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439"})]})}),(0,c.jsx)("div",{className:"card",children:(0,c.jsxs)(d.A,{to:"/docs/basic_modules/Embeddings",children:[(0,c.jsx)("h3",{children:"Embeddings"}),(0,c.jsx)("p",{children:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f"})]})}),(0,c.jsx)("div",{className:"card",children:(0,c.jsxs)(d.A,{to:"/docs/basic_modules/Rerank",children:[(0,c.jsx)("h3",{children:"Rerank"}),(0,c.jsx)("p",{children:"\u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432"})]})}),(0,c.jsx)("div",{className:"card",children:(0,c.jsxs)(d.A,{to:"/docs/basic_modules/Fine-tuning",children:[(0,c.jsx)("h3",{children:"Fine-tuning"}),(0,c.jsx)("p",{children:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f GPT-4 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438"})]})})]})]})}function m(s={}){const{wrapper:e}={...(0,i.R)(),...s.components};return e?(0,c.jsx)(e,{...s,children:(0,c.jsx)(u,{...s})}):u(s)}},8453:(s,e,n)=>{n.d(e,{R:()=>o,x:()=>r});var c=n(6540);const i={},d=c.createContext(i);function o(s){const e=c.useContext(d);return c.useMemo((function(){return"function"==typeof s?s(e):{...e,...s}}),[e,s])}function r(s){let e;return e=s.disableParentContext?"function"==typeof s.components?s.components(i):s.components||i:o(s.components),c.createElement(d.Provider,{value:e},s.children)}}}]); \ No newline at end of file diff --git a/assets/js/dee5e5ab.b5bba045.js b/assets/js/dee5e5ab.b5bba045.js deleted file mode 100644 index 5798e1e..0000000 --- a/assets/js/dee5e5ab.b5bba045.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[1383],{7066:(s,e,n)=>{n.r(e),n.d(e,{assets:()=>a,contentTitle:()=>o,default:()=>m,frontMatter:()=>r,metadata:()=>t,toc:()=>l});var c=n(4848),i=n(8453),d=n(8774);const r={sidebar_position:3},o="\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",t={id:"docs/basic_modules/index",title:"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",description:"ETL",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/index.md",sourceDirName:"docs/basic_modules",slug:"/docs/basic_modules/",permalink:"/docs/basic_modules/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/index.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"docsSidebar",previous:{title:"REST API",permalink:"/docs/api-reference/rest"},next:{title:"ETL",permalink:"/docs/basic_modules/ETL"}},a={},l=[];function u(s){const e={h1:"h1",...(0,i.R)(),...s.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(e.h1,{id:"\u0431\u0430\u0437\u043e\u0432\u044b\u0435-\u043c\u043e\u0434\u0443\u043b\u0438",children:"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438"}),"\n",(0,c.jsxs)("div",{className:"cardContainer",children:[(0,c.jsx)("div",{className:"card",children:(0,c.jsxs)(d.A,{to:"/docs/basic_modules/ETL",children:[(0,c.jsx)("h3",{children:"ETL"}),(0,c.jsx)("p",{children:"\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0447\u0430\u043d\u043a\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b LLM"})]})}),(0,c.jsx)("div",{className:"card",children:(0,c.jsxs)(d.A,{to:"/docs/basic_modules/LLM/",children:[(0,c.jsx)("h3",{children:"LLM"}),(0,c.jsx)("p",{children:"\u0411\u044b\u0441\u0442\u0440\u044b\u0435 \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439"})]})}),(0,c.jsx)("div",{className:"card",children:(0,c.jsxs)(d.A,{to:"/docs/basic_modules/Embeddings",children:[(0,c.jsx)("h3",{children:"Embeddings"}),(0,c.jsx)("p",{children:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f"})]})}),(0,c.jsx)("div",{className:"card",children:(0,c.jsxs)(d.A,{to:"/docs/basic_modules/Rerank",children:[(0,c.jsx)("h3",{children:"Rerank"}),(0,c.jsx)("p",{children:"\u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432"})]})}),(0,c.jsx)("div",{className:"card",children:(0,c.jsxs)(d.A,{to:"/docs/basic_modules/Fine-tuning",children:[(0,c.jsx)("h3",{children:"Fine-tuning"}),(0,c.jsx)("p",{children:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f GPT-4 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438"})]})})]})]})}function m(s={}){const{wrapper:e}={...(0,i.R)(),...s.components};return e?(0,c.jsx)(e,{...s,children:(0,c.jsx)(u,{...s})}):u(s)}},8453:(s,e,n)=>{n.d(e,{R:()=>r,x:()=>o});var c=n(6540);const i={},d=c.createContext(i);function r(s){const e=c.useContext(d);return c.useMemo((function(){return"function"==typeof s?s(e):{...e,...s}}),[e,s])}function o(s){let e;return e=s.disableParentContext?"function"==typeof s.components?s.components(i):s.components||i:r(s.components),c.createElement(d.Provider,{value:e},s.children)}}}]); \ No newline at end of file diff --git a/assets/js/e90f86ee.a8b228e4.js b/assets/js/e90f86ee.a8b228e4.js deleted file mode 100644 index 42b2ccc..0000000 --- a/assets/js/e90f86ee.a8b228e4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[95],{3784:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>d});var i=s(4848),t=s(8453);const r={sidebar_position:2},a="Services",o={id:"onprem/LLM_On-Premises/services/index",title:"Services",description:"After the Compressa App is deployed, all components are accessible via the same URL (8080 by default).",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/services/index.md",sourceDirName:"onprem/LLM_On-Premises/services",slug:"/onprem/LLM_On-Premises/services/",permalink:"/onprem/LLM_On-Premises/services/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/services/index.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"onpremSidebar",previous:{title:"No Internet",permalink:"/onprem/LLM_On-Premises/setup/internet-access"},next:{title:"Management API",permalink:"/onprem/LLM_On-Premises/services/rest-api"}},c={},d=[{value:"Management API",id:"management-api",level:2},{value:"Swagger Documentation",id:"swagger-documentation",level:3},{value:"Chat UI",id:"chat-ui",level:2},{value:"Fine-Tuning UI",id:"fine-tuning-ui",level:2},{value:"Training Dashboard",id:"training-dashboard",level:2}];function l(e){const n={a:"a",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"services",children:"Services"}),"\n",(0,i.jsxs)(n.p,{children:["After the Compressa App is deployed, all components are accessible via the same URL (",(0,i.jsx)(n.code,{children:"8080"})," by default).",(0,i.jsx)(n.br,{}),"\n","For example, ",(0,i.jsx)(n.code,{children:"http://localhost:8080"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Compressa provides the following services:"}),"\n",(0,i.jsx)(n.h2,{id:"management-api",children:"Management API"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"URL"}),": ",(0,i.jsx)(n.code,{children:"http://localhost:8080/api/"})]}),"\n",(0,i.jsxs)(n.p,{children:["The Management API is a ",(0,i.jsx)(n.strong,{children:"REST API"})," that allows control over all features."]}),"\n",(0,i.jsx)(n.p,{children:"It enables you to:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Add a new model to Compressa"}),"\n",(0,i.jsx)(n.li,{children:"Deploy a model for inference"}),"\n",(0,i.jsx)(n.li,{children:"Fine-tune a model with custom data"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"...and many other functions."}),"\n",(0,i.jsxs)(n.p,{children:["A detailed description of the endpoints is available on the ",(0,i.jsx)(n.a,{href:"/onprem/LLM_On-Premises/services/rest-api",children:"REST API"})," page."]}),"\n",(0,i.jsx)(n.h3,{id:"swagger-documentation",children:"Swagger Documentation"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"URL"}),": ",(0,i.jsx)(n.code,{children:"http://localhost:8080/api/docs/"})]}),"\n",(0,i.jsx)(n.p,{children:"Swagger documentation provides a user-friendly interface to interact with the REST API,\nenabling live testing of API endpoints directly from the browser."}),"\n",(0,i.jsx)(n.h2,{id:"chat-ui",children:"Chat UI"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"URL"}),": ",(0,i.jsx)(n.code,{children:"http://localhost:8080/chat/"})]}),"\n",(0,i.jsxs)(n.p,{children:["The Compressa Chat interface allows interaction with the deployed model.\n",(0,i.jsx)(n.img,{alt:"Chat UI",src:s(2239).A+"",width:"2718",height:"1702"})]}),"\n",(0,i.jsx)(n.h2,{id:"fine-tuning-ui",children:"Fine-Tuning UI"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"URL"}),": ",(0,i.jsx)(n.code,{children:"http://localhost:8080/finetune/"})]}),"\n",(0,i.jsxs)(n.p,{children:["The Compressa Fine-Tune interface enables model fine-tuning to achieve the best quality for your use case.\n",(0,i.jsx)(n.img,{alt:"Fine-Tune UI",src:s(9068).A+"",width:"2704",height:"1698"})]}),"\n",(0,i.jsx)(n.h2,{id:"training-dashboard",children:"Training Dashboard"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"URL"}),": ",(0,i.jsx)(n.code,{children:"http://localhost:8080/aim-ui/"})]}),"\n",(0,i.jsxs)(n.p,{children:["A dashboard based on ",(0,i.jsx)(n.a,{href:"https://github.com/aimhubio/aim",children:"AIM"})," allows for tracking the training process.\n",(0,i.jsx)(n.img,{alt:"Training Dashboard",src:s(6720).A+"",width:"2714",height:"1702"})]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},2239:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/chat-21fa7edecebba6af77cb23fef4d9e090.png"},9068:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/finetune-272560fe59b36eb751e0d5c92cacd5e7.png"},6720:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/training-dashboard-9d0e87da0b7d90d5c8404d052358932c.png"},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>o});var i=s(6540);const t={},r=i.createContext(t);function a(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f0588ab5.9d6e3cba.js b/assets/js/f0588ab5.9d6e3cba.js deleted file mode 100644 index 8cc9284..0000000 --- a/assets/js/f0588ab5.9d6e3cba.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[3676],{1101:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>l,contentTitle:()=>t,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>o});var s=i(4848),r=i(8453);const a={sidebar_position:4},t="\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG",c={id:"guides/langchain_advanced_chunking/index",title:"\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG",description:"1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_advanced_chunking/index.md",sourceDirName:"guides/langchain_advanced_chunking",slug:"/guides/langchain_advanced_chunking/",permalink:"/guides/langchain_advanced_chunking/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_advanced_chunking/index.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"guidesSidebar",previous:{title:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank",permalink:"/guides/langchain_basic_rerank/"}},l={},o=[{value:"1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435",id:"1-\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435",level:2},{value:"\u041d\u0430\u0448 \u0433\u0430\u0439\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:",id:"\u043d\u0430\u0448-\u0433\u0430\u0439\u0434-\u0431\u0443\u0434\u0435\u0442-\u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c-\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435-\u0448\u0430\u0433\u0438",level:3},{value:"2. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",id:"2-\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",level:2},{value:"3. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043d\u0430\u0440\u0435\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (chunking) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c langchain",id:"3-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430-\u0438-\u043d\u0430\u0440\u0435\u0437\u043a\u0430-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-chunking-\u0441-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c-langchain",level:2},{value:"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c PDF-\u0444\u0430\u0439\u043b \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 chunking \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 langchain \u2014 RecursiveCharacterTextSplitter.",id:"\u0441\u043d\u0430\u0447\u0430\u043b\u0430-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c-pdf-\u0444\u0430\u0439\u043b-\u0438-\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c-\u0431\u0430\u0437\u043e\u0432\u044b\u0439-chunking-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c-\u0441-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c-\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430-langchain--recursivecharactertextsplitter",level:3},{value:"4. \u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e langchain RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430",id:"4-\u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435-\u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e-langchain-rag-\u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430",level:2},{value:"\u0412\u0430\u0436\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435!",id:"\u0432\u0430\u0436\u043d\u043e\u0435-\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435",level:3},{value:"4. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445",id:"4-\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430-\u043d\u0430-\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445-\u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445",level:2},{value:"\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438:",id:"\u0441\u0440\u0430\u0432\u043d\u0438\u043c-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b-\u0441-\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438-\u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438",level:3},{value:"5. \u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0447\u0430\u043d\u043a\u043e\u0432",id:"5-\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f-\u0447\u0430\u043d\u043a\u043e\u0432",level:2},{value:"6. \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432",id:"6-\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435-\u0438-\u043e\u0446\u0435\u043d\u043a\u0430-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432",level:2},{value:"\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438:",id:"\u0441\u0440\u0430\u0432\u043d\u0438\u043c-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b-\u0441-\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438-\u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438-1",level:3}];function h(n){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",...(0,r.R)(),...n.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h1,{id:"\u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439-chunking-\u0434\u043b\u044f-\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f-rag",children:"\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG"}),"\n",(0,s.jsx)(e.h2,{id:"1-\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435",children:"1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435"}),"\n",(0,s.jsx)(e.p,{children:"Chunking \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u0438\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0447\u0430\u043d\u043a\u0430\u043c\u0438. \u0412 RAG (Retrieval-Augmented Generation) \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430\u0445 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u043c \u044d\u0442\u0430\u043f\u043e\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u0430\u043d\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041c\u044b \u0438\u0449\u0435\u043c \u0441\u0430\u043c\u044b\u0435 \u0431\u043b\u0438\u0437\u043a\u0438\u0435 \u043a\u0443\u0441\u043a\u0438 (\u0447\u0430\u043d\u043a\u0438) \u043f\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438 \u043e\u0442\u0434\u0430\u0435\u043c \u0438\u0445 LLM \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0427\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u0440\u0435\u0437\u0430\u043d \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0447\u0430\u043d\u043a\u0438, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u0443\u044e \u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{src:"https://raw.githubusercontent.com/walyoung1/pictures/main/1_XQChr_WQNhwAa3wb_UVVwA.png",alt:"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 1"})}),"\n",(0,s.jsx)(e.p,{children:"\u0412 \u0447\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c? \u0424\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a PDF-\u043e\u0442\u0447\u0451\u0442\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443: \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0441\u043f\u0438\u0441\u043a\u0438 \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0431\u043b\u043e\u043a\u0438, \u0432 \u043d\u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0442\u043a\u0430 \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u043e\u0432. \u0415\u0441\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u044d\u0442\u043e \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u0430."}),"\n",(0,s.jsx)(e.p,{children:"\u0426\u0435\u043b\u044c \u044d\u0442\u043e\u0433\u043e \u0433\u0430\u0439\u0434\u0430 \u2014 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043d\u0430\u0440\u0435\u0437\u043a\u0443 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u0438\u0437 langchain \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u0443\u044e \u043d\u0430\u0440\u0435\u0437\u043a\u0443 CompressaChunking, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b."}),"\n",(0,s.jsx)(e.h3,{id:"\u043d\u0430\u0448-\u0433\u0430\u0439\u0434-\u0431\u0443\u0434\u0435\u0442-\u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c-\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435-\u0448\u0430\u0433\u0438",children:"\u041d\u0430\u0448 \u0433\u0430\u0439\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:"}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsx)(e.li,{children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u0439 PDF \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u0440\u0435\u0437\u043a\u0430 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e langchain"}),"\n",(0,s.jsxs)(e.li,{children:["\u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e langchain RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u0438\u0437 \u0433\u0430\u0439\u0434\u0430 ",(0,s.jsx)(e.a,{href:"https://docs.compressa.ai/guides/langchain_rag/",children:'"\u0411\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442"'})]}),"\n",(0,s.jsx)(e.li,{children:"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445"}),"\n",(0,s.jsx)(e.li,{children:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 chunking \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430"}),"\n",(0,s.jsx)(e.li,{children:"\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432"}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"2-\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",children:"2. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f"}),"\n",(0,s.jsx)(e.p,{children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:"#!pip install langchain-compressa\n#!pip install langchain_community\n#!pip install requests \n#!pip install beautifulsoup4\n#!pip install gdown\n\n#!pip install faiss-cpu - \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u043d\u0430 CPU\n#!pip install faiss-gpu - \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u043d\u0430 GPU \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 CUDA\n\nimport os\nimport requests\nimport gdown\nfrom bs4 import BeautifulSoup\nfrom langchain_compressa import CompressaEmbeddings, ChatCompressa\nfrom langchain_core.documents import Document\nfrom langchain.text_splitter import RecursiveCharacterTextSplitter\nfrom langchain_core.prompts import ChatPromptTemplate\nfrom langchain.chains import create_retrieval_chain\nfrom langchain_community.vectorstores import FAISS\nfrom langchain.chains.combine_documents import create_stuff_documents_chain\nfrom langchain.document_loaders import PyPDFLoader\n"})}),"\n",(0,s.jsxs)(e.p,{children:["\u0414\u043b\u044f \u044f\u0447\u0435\u0439\u043a\u0438 \u043d\u0438\u0436\u0435 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f API \u043a\u043b\u044e\u0447 Compressa. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 ",(0,s.jsx)(e.a,{href:"https://compressa.ai/form",children:"\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"}),"."]}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'os.environ["COMPRESSA_API_KEY"] = "\u0432\u0430\u0448_\u043a\u043b\u044e\u0447"\n'})}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'# \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 Macbook, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438\n# os.environ["TOKENIZERS_PARALLELISM"] = "false"\n# os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"\n'})}),"\n",(0,s.jsx)(e.h2,{id:"3-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430-\u0438-\u043d\u0430\u0440\u0435\u0437\u043a\u0430-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-chunking-\u0441-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c-langchain",children:"3. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043d\u0430\u0440\u0435\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (chunking) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c langchain"}),"\n",(0,s.jsx)(e.p,{children:"\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0439 PDF \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0437\u0430 \u0433\u043e\u0434, \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u041c\u0432\u0438\u0434\u0435\u043e-\u042d\u043b\u044c\u0434\u043e\u0440\u0430\u0434\u043e. \u0414\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0433\u0430\u0439\u0434\u0430, \u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b \u043e\u0431\u044a\u0435\u043c \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043e 6 \u0441\u043b\u0430\u0439\u0434\u043e\u0432. \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0441\u043b\u0430\u0439\u0434\u043e\u0432:"}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{src:"https://raw.githubusercontent.com/walyoung1/pictures/main/Screenshot%202024-09-10%20at%2019.41.19.png",alt:"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 2"})}),"\n",(0,s.jsx)(e.h3,{id:"\u0441\u043d\u0430\u0447\u0430\u043b\u0430-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c-pdf-\u0444\u0430\u0439\u043b-\u0438-\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c-\u0431\u0430\u0437\u043e\u0432\u044b\u0439-chunking-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c-\u0441-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c-\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430-langchain--recursivecharactertextsplitter",children:"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c PDF-\u0444\u0430\u0439\u043b \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 chunking \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 langchain \u2014 RecursiveCharacterTextSplitter."}),"\n",(0,s.jsx)(e.p,{children:"\u042d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044f \u0432\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430."}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:"#\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 PDF-\u0444\u0430\u0439\u043b c Google \u0434\u0438\u0441\u043a\u0430 \u0421ompressa\nfile_id = '14sA1-B90nwwTZr3A9V1J0NfNpTYYguMy'\nurl = f'https://drive.google.com/uc?id={file_id}'\ngdown.download(url, 'mvideo_report.pdf', quiet=False)\nloader = PyPDFLoader(\"mvideo_report.pdf\")\n\n# \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b PDF \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 Langchain\ndocuments = loader.load()\n\n# \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0430\u0440\u0435\u0437\u043a\u0438 (chunking)\ntext_splitter = RecursiveCharacterTextSplitter(\n chunk_size=1000, # \u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u0430\u043d\u043a\u0430\n chunk_overlap=20, # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043a \u0447\u0430\u043d\u043a\u0443\n add_start_index=True \n)\n\n# \u0420\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u043c PDF-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438\nchunks = text_splitter.split_documents(documents)\n\n# \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0430\u043d\u043a\u043e\u0432 (\u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c 20)\nprint(f\"\u0412\u0441\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0447\u0430\u043d\u043a\u043e\u0432: {len(chunks)}\")\n"})}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'# \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0447\u0430\u043d\u043a\u0438. \n# \u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u043a\u0430\u043a \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f "\u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u0430\u044f" \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u044b\u0432\u0430\u0435\u0442 \u043c\u044b\u0441\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0447\u0430\u043d\u043a\u0430\u043c\u0438.\nfor i, chunk in enumerate(chunks):\n print(f"\u0427\u0430\u043d\u043a {i+1}:\\n{chunk.page_content}\\n")\n'})}),"\n",(0,s.jsx)(e.h2,{id:"4-\u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435-\u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e-langchain-rag-\u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430",children:"4. \u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e langchain RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430"}),"\n",(0,s.jsxs)(e.p,{children:["\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043d\u0430 \u0431\u0430\u0437\u0435 langchain, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438 \u0432 \u0433\u0430\u0439\u0434\u0435 ",(0,s.jsx)(e.a,{href:"https://docs.compressa.ai/guides/langchain_rag/",children:'"\u0411\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442"'}),". \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e."]}),"\n",(0,s.jsx)(e.h3,{id:"\u0432\u0430\u0436\u043d\u043e\u0435-\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435",children:"\u0412\u0430\u0436\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435!"}),"\n",(0,s.jsx)(e.p,{children:"\u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u043e\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0447\u0430\u043d\u043a\u0438\u043d\u0433\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 LLM \u0442\u043e\u043b\u044c\u043a\u043e 1, \u0441\u0430\u043c\u044b\u0439 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0439 \u043a\u0443\u0441\u043e\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430."}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'embeddings = CompressaEmbeddings(api_key=os.getenv("COMPRESSA_API_KEY"), base_url="https://compressa-api.mil-team.ru/v1")\n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\nvectorstore = FAISS.from_documents(chunks, embeddings)\n\nprint("\u0412\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e")\n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0443\u0436\u043d\u044b\u0445 \u0447\u0430\u043d\u043a\u043e\u0432, \u0438\u0449\u0435\u043c 1 \u0441\u0430\u043c\u044b\u0439 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0439\nretriever = vectorstore.as_retriever(search_type="similarity", search_kwargs={"k": 1})\n\n# \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c LLM \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432\nllm = ChatCompressa(api_key=os.getenv("COMPRESSA_API_KEY"), base_url="https://compressa-api.mil-team.ru/v1")\n\nsystem_template = f"""\u0422\u044b \u0443\u043c\u043d\u044b\u0439 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \n\u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441. \u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430, \u043e\u0442\u0432\u0435\u0442\u044c \'\u041d\u0435 \u0437\u043d\u0430\u044e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\'. \n\u041e\u0442\u0432\u0435\u0447\u0430\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u043e, \u043d\u043e \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0430\u0442\u043a\u043e."""\n\nqa_prompt = ChatPromptTemplate.from_messages([\n ("system", system_template),\n ("human", """\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f:\n\n {context}\n \n \u0412\u043e\u043f\u0440\u043e\u0441: {input}\t\t\n """),\n])\n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0434\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b\ndocument_chain = create_stuff_documents_chain(llm, qa_prompt)\n\nrag_chain = create_retrieval_chain(retriever, document_chain)\n\ndef ask_question(question):\n response = rag_chain.invoke({"input": question})\n return response["answer"]\n'})}),"\n",(0,s.jsx)(e.h2,{id:"4-\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430-\u043d\u0430-\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445-\u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445",children:"4. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0441\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u043d\u0430\u0448 RAG-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442 \u043e\u0442\u0432\u0435\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0443:"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'questions = [\n "\u0427\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043c\u0430\u0435?",\n "\u041a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0431\u0440\u0435\u043d\u0434\u0430 Casarte?",\n "\u041d\u0430 \u0447\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u0441\u0442-\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f?",\n "\u041d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e % \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c EBITDA \u0433\u043e\u0434 \u043a \u0433\u043e\u0434\u0443 \u043f\u043e \u041c\u0424\u0421\u041e 17 ?",\n]\n\nprint("\\n\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430:")\nfor question in questions:\n print(f"\\n\u0412\u043e\u043f\u0440\u043e\u0441: {question}")\n print(f"\u041e\u0442\u0432\u0435\u0442 RAG: {ask_question(question)}")\n'})}),"\n",(0,s.jsx)(e.h3,{id:"\u0441\u0440\u0430\u0432\u043d\u0438\u043c-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b-\u0441-\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438-\u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438",children:"\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438:"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u0427\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043c\u0430\u0435?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043b\u0430 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u0442\u0445\u043e\u0434\u043e\u0432 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u0430 \u0437\u0430\u0432\u043e\u0434\u043e\u0432 \u043f\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0438 \xab\u041a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0438 \u042d\u043a\u043e\u043f\u043e\u043b\u0438\u0441\xbb."}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0431\u0440\u0435\u043d\u0434\u0430 Casarte?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0412 \u0434\u0435\u043a\u0430\u0431\u0440\u0435"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041d\u0430 \u0447\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u0441\u0442-\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0413\u0440\u0443\u043f\u043f\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432- \u043b\u0435\u043d\u0438\u0438 \u0448\u0438\u0440\u043e\u043a\u043e\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u2013 \u043f\u0440\u043e\u0434\u043b\u0451\u043d\u043d\u043e\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u0442\u043e\u0432\u0430\u0440\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043a"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e % \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c EBITDA \u0433\u043e\u0434 \u043a \u0433\u043e\u0434\u0443 \u043f\u043e \u041c\u0424\u0421\u041e 17 ?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: 48,8%"}),"\n",(0,s.jsx)("b",{children:" \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u0441\u0435 4 \u043e\u0442\u0432\u0435\u0442\u0430 \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 "}),"\n",(0,s.jsx)(e.h2,{id:"5-\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f-\u0447\u0430\u043d\u043a\u043e\u0432",children:"5. \u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0447\u0430\u043d\u043a\u043e\u0432"}),"\n",(0,s.jsx)(e.p,{children:"\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a API CompressaChunking. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0447\u0430\u043d\u043a\u043e\u0432 (1000 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432) \u0438 \u0443\u043a\u0430\u0436\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u043c API. \u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438."}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'# \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c URL \u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\nurl = "https://compressa-api.mil-team.ru/v1/layout"\nheaders = {\n "Authorization": f"Bearer {os.environ[\'COMPRESSA_API_KEY\']}",\n "accept": "application/json",\n}\n\n# \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448 PDF \u0444\u0430\u0439\u043b\nfiles = {"files": open("mvideo_report.pdf", "rb")} \n\n# \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c 2 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 langchain \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435\ndata = {\n "xml_keep_tags": "false", \n "output_format": "application/json", # \u0424\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u0432\u0435\u0442\u0430: JSON\n "coordinates": "false", # \u041d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432\n "strategy": "fast", # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0442.\u043a. \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430\n "chunking_strategy": "by_title", # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u0447\u0430\u043d\u043a\u043e\u0432\n "combine_under_n_chars": 800, # \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044f\u0435\u043c, \u0435\u0441\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 800 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432\n "max_characters": 1000, # \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 1000 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043d\u0430 \u0447\u0430\u043d\u043a\n "multipage_sections": "false", # \u041d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u0447\u0430\u043d\u043a\u0430\u043c \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\n "overlap": 20, # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043a \u0447\u0430\u043d\u043a\u0443\n "starting_page_number": 1, # \u041d\u0430\u0447\u0430\u0442\u044c \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b\n "languages": ["rus", "eng"] # \u042f\u0437\u044b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435\n}\n\n# \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a API\nresponse = requests.post(\n url,\n headers=headers,\n files=files,\n data=data\n)\n\n# \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0447\u0430\u043d\u043a\u0438\nresult = response.json()\nprint(str(result)[:1000])\n'})}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:"# \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u043e\u0442\u0432\u0435\u0442 API \u0432 \u0444\u043e\u0440\u043c\u0430\u0442, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0434\u043b\u044f Langchain\n\nchunks = []\nfor item in result:\n # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b Document \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u0430\u043d\u043a\u0430\n text = item['text'] # \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 JSON\n chunk = Document(page_content=text)\n chunks.append(chunk)\n\n# \u0412\u044b\u0432\u043e\u0434 \u0432\u0441\u0435\u0445 \u0447\u0430\u043d\u043a\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0440\u0435\u0437\u043a\u0438\nfor i, chunk in enumerate(chunks):\n print(f\"\u0427\u0430\u043d\u043a {i+1}:\\n{chunk.page_content}\\n\")\n"})}),"\n",(0,s.jsx)(e.h2,{id:"6-\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435-\u0438-\u043e\u0446\u0435\u043d\u043a\u0430-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432",children:"6. \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432"}),"\n",(0,s.jsx)(e.p,{children:"\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0447\u0430\u043d\u043a\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0430\u043b\u0438 \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0417\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u043e\u0432\u043e\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435:"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043d\u043e\u0432\u043e\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\nvectorstore2 = FAISS.from_documents(chunks, embeddings)\n\nprint("\u0412\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e")\n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0443\u0436\u043d\u044b\u0445 \u0447\u0430\u043d\u043a\u043e\u0432 \u0432 \u043d\u043e\u0432\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\nretriever2 = vectorstore2.as_retriever(search_type="similarity", search_kwargs={"k": 1})\n\nrag_chain2 = create_retrieval_chain(retriever2, document_chain)\n\ndef ask_question2(question):\n response = rag_chain2.invoke({"input": question})\n return response["answer"]\n'})}),"\n",(0,s.jsx)("b",{children:" \u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u0435\u0445 \u0436\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445: "}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'print("\\n\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430:")\nfor question in questions:\n print(f"\\n\u0412\u043e\u043f\u0440\u043e\u0441: {question}")\n print(f"\u041e\u0442\u0432\u0435\u0442 RAG: {ask_question2(question)}")\n'})}),"\n",(0,s.jsx)(e.h3,{id:"\u0441\u0440\u0430\u0432\u043d\u0438\u043c-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b-\u0441-\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438-\u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438-1",children:"\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438:"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u0427\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043c\u0430\u0435?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043b\u0430 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u0442\u0445\u043e\u0434\u043e\u0432 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u0430 \u0437\u0430\u0432\u043e\u0434\u043e\u0432 \u043f\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0438 \xab\u041a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0438 \u042d\u043a\u043e\u043f\u043e\u043b\u0438\u0441\xbb."}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0431\u0440\u0435\u043d\u0434\u0430 Casarte?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0412 \u0434\u0435\u043a\u0430\u0431\u0440\u0435"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041d\u0430 \u0447\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u0441\u0442-\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0413\u0440\u0443\u043f\u043f\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432- \u043b\u0435\u043d\u0438\u0438 \u0448\u0438\u0440\u043e\u043a\u043e\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u2013 \u043f\u0440\u043e\u0434\u043b\u0451\u043d\u043d\u043e\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u0442\u043e\u0432\u0430\u0440\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043a"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e % \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c EBITDA \u0433\u043e\u0434 \u043a \u0433\u043e\u0434\u0443 \u043f\u043e \u041c\u0424\u0421\u041e 17 ?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: 48,8%"}),"\n",(0,s.jsx)("b",{children:" \u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e\u0439 \u043d\u0430\u0440\u0435\u0437\u043a\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438, \u043c\u044b \u043d\u0435 \u0440\u0430\u0437\u0440\u044b\u0432\u0430\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u0443\u0441\u043a\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 LLM \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0443\u044e, \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u0441\u043c\u043e\u0433\u043b\u0430 \u0434\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441. "}),"\n",(0,s.jsxs)(e.p,{children:["\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438 CompressaRerank, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043e\u0442\u0440\u044b\u0432\u043a\u0438 \u043f\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 ",(0,s.jsx)(e.a,{href:"https://docs.compressa.ai/guides/langchain_basic_rerank/",children:"\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0430\u0439\u0434."})]}),"\n",(0,s.jsxs)(e.p,{children:["\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 Embeddings \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a - \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0435\u0448\u0435 \u043e\u0434\u043d\u043e \u043d\u0430\u0448\u0435 ",(0,s.jsx)(e.a,{href:"https://docs.compressa.ai/guides/langchain_basic_semantic_search/",children:"\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e."})]})]})}function d(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,s.jsx)(e,{...n,children:(0,s.jsx)(h,{...n})}):h(n)}},8453:(n,e,i)=>{i.d(e,{R:()=>t,x:()=>c});var s=i(6540);const r={},a=s.createContext(r);function t(n){const e=s.useContext(a);return s.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:t(n.components),s.createElement(a.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/f0588ab5.cb5670f0.js b/assets/js/f0588ab5.cb5670f0.js new file mode 100644 index 0000000..821f6af --- /dev/null +++ b/assets/js/f0588ab5.cb5670f0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[676],{1101:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>l,contentTitle:()=>t,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>o});var s=i(4848),r=i(8453);const a={sidebar_position:4},t="\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG",c={id:"guides/langchain_advanced_chunking/index",title:"\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG",description:"1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_advanced_chunking/index.md",sourceDirName:"guides/langchain_advanced_chunking",slug:"/guides/langchain_advanced_chunking/",permalink:"/guides/langchain_advanced_chunking/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_advanced_chunking/index.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"guidesSidebar",previous:{title:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 Rerank",permalink:"/guides/langchain_basic_rerank/"}},l={},o=[{value:"1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435",id:"1-\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435",level:2},{value:"\u041d\u0430\u0448 \u0433\u0430\u0439\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:",id:"\u043d\u0430\u0448-\u0433\u0430\u0439\u0434-\u0431\u0443\u0434\u0435\u0442-\u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c-\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435-\u0448\u0430\u0433\u0438",level:3},{value:"2. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",id:"2-\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",level:2},{value:"3. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043d\u0430\u0440\u0435\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (chunking) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c langchain",id:"3-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430-\u0438-\u043d\u0430\u0440\u0435\u0437\u043a\u0430-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-chunking-\u0441-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c-langchain",level:2},{value:"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c PDF-\u0444\u0430\u0439\u043b \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 chunking \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 langchain \u2014 RecursiveCharacterTextSplitter.",id:"\u0441\u043d\u0430\u0447\u0430\u043b\u0430-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c-pdf-\u0444\u0430\u0439\u043b-\u0438-\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c-\u0431\u0430\u0437\u043e\u0432\u044b\u0439-chunking-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c-\u0441-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c-\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430-langchain--recursivecharactertextsplitter",level:3},{value:"4. \u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e langchain RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430",id:"4-\u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435-\u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e-langchain-rag-\u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430",level:2},{value:"\u0412\u0430\u0436\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435!",id:"\u0432\u0430\u0436\u043d\u043e\u0435-\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435",level:3},{value:"4. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445",id:"4-\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430-\u043d\u0430-\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445-\u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445",level:2},{value:"\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438:",id:"\u0441\u0440\u0430\u0432\u043d\u0438\u043c-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b-\u0441-\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438-\u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438",level:3},{value:"5. \u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0447\u0430\u043d\u043a\u043e\u0432",id:"5-\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f-\u0447\u0430\u043d\u043a\u043e\u0432",level:2},{value:"6. \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432",id:"6-\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435-\u0438-\u043e\u0446\u0435\u043d\u043a\u0430-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432",level:2},{value:"\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438:",id:"\u0441\u0440\u0430\u0432\u043d\u0438\u043c-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b-\u0441-\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438-\u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438-1",level:3}];function h(n){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",...(0,r.R)(),...n.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h1,{id:"\u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439-chunking-\u0434\u043b\u044f-\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f-rag",children:"\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 chunking \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAG"}),"\n",(0,s.jsx)(e.h2,{id:"1-\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435",children:"1. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435"}),"\n",(0,s.jsx)(e.p,{children:"Chunking \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u0438\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0447\u0430\u043d\u043a\u0430\u043c\u0438. \u0412 RAG (Retrieval-Augmented Generation) \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430\u0445 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u043c \u044d\u0442\u0430\u043f\u043e\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u0430\u043d\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041c\u044b \u0438\u0449\u0435\u043c \u0441\u0430\u043c\u044b\u0435 \u0431\u043b\u0438\u0437\u043a\u0438\u0435 \u043a\u0443\u0441\u043a\u0438 (\u0447\u0430\u043d\u043a\u0438) \u043f\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438 \u043e\u0442\u0434\u0430\u0435\u043c \u0438\u0445 LLM \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0427\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u0440\u0435\u0437\u0430\u043d \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0447\u0430\u043d\u043a\u0438, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u0443\u044e \u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{src:"https://raw.githubusercontent.com/walyoung1/pictures/main/1_XQChr_WQNhwAa3wb_UVVwA.png",alt:"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 1"})}),"\n",(0,s.jsx)(e.p,{children:"\u0412 \u0447\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c? \u0424\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a PDF-\u043e\u0442\u0447\u0451\u0442\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443: \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0441\u043f\u0438\u0441\u043a\u0438 \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0431\u043b\u043e\u043a\u0438, \u0432 \u043d\u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0442\u043a\u0430 \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u043e\u0432. \u0415\u0441\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u044d\u0442\u043e \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u0430."}),"\n",(0,s.jsx)(e.p,{children:"\u0426\u0435\u043b\u044c \u044d\u0442\u043e\u0433\u043e \u0433\u0430\u0439\u0434\u0430 \u2014 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043d\u0430\u0440\u0435\u0437\u043a\u0443 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u0438\u0437 langchain \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u0443\u044e \u043d\u0430\u0440\u0435\u0437\u043a\u0443 CompressaChunking, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b."}),"\n",(0,s.jsx)(e.h3,{id:"\u043d\u0430\u0448-\u0433\u0430\u0439\u0434-\u0431\u0443\u0434\u0435\u0442-\u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c-\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435-\u0448\u0430\u0433\u0438",children:"\u041d\u0430\u0448 \u0433\u0430\u0439\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:"}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsx)(e.li,{children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u0439 PDF \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u0440\u0435\u0437\u043a\u0430 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e langchain"}),"\n",(0,s.jsxs)(e.li,{children:["\u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e langchain RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u0438\u0437 \u0433\u0430\u0439\u0434\u0430 ",(0,s.jsx)(e.a,{href:"https://docs.compressa.ai/guides/langchain_rag/",children:'"\u0411\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442"'})]}),"\n",(0,s.jsx)(e.li,{children:"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445"}),"\n",(0,s.jsx)(e.li,{children:"\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 chunking \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430"}),"\n",(0,s.jsx)(e.li,{children:"\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432"}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"2-\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f",children:"2. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f"}),"\n",(0,s.jsx)(e.p,{children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:"#!pip install langchain-compressa\n#!pip install langchain_community\n#!pip install requests \n#!pip install beautifulsoup4\n#!pip install gdown\n\n#!pip install faiss-cpu - \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u043d\u0430 CPU\n#!pip install faiss-gpu - \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u043d\u0430 GPU \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 CUDA\n\nimport os\nimport requests\nimport gdown\nfrom bs4 import BeautifulSoup\nfrom langchain_compressa import CompressaEmbeddings, ChatCompressa\nfrom langchain_core.documents import Document\nfrom langchain.text_splitter import RecursiveCharacterTextSplitter\nfrom langchain_core.prompts import ChatPromptTemplate\nfrom langchain.chains import create_retrieval_chain\nfrom langchain_community.vectorstores import FAISS\nfrom langchain.chains.combine_documents import create_stuff_documents_chain\nfrom langchain.document_loaders import PyPDFLoader\n"})}),"\n",(0,s.jsxs)(e.p,{children:["\u0414\u043b\u044f \u044f\u0447\u0435\u0439\u043a\u0438 \u043d\u0438\u0436\u0435 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f API \u043a\u043b\u044e\u0447 Compressa. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 ",(0,s.jsx)(e.a,{href:"https://compressa.ai/form",children:"\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438"}),"."]}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'os.environ["COMPRESSA_API_KEY"] = "\u0432\u0430\u0448_\u043a\u043b\u044e\u0447"\n'})}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'# \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 Macbook, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438\n# os.environ["TOKENIZERS_PARALLELISM"] = "false"\n# os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"\n'})}),"\n",(0,s.jsx)(e.h2,{id:"3-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430-\u0438-\u043d\u0430\u0440\u0435\u0437\u043a\u0430-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430-chunking-\u0441-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c-langchain",children:"3. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043d\u0430\u0440\u0435\u0437\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (chunking) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c langchain"}),"\n",(0,s.jsx)(e.p,{children:"\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0439 PDF \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0437\u0430 \u0433\u043e\u0434, \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u041c\u0432\u0438\u0434\u0435\u043e-\u042d\u043b\u044c\u0434\u043e\u0440\u0430\u0434\u043e. \u0414\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0433\u0430\u0439\u0434\u0430, \u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b \u043e\u0431\u044a\u0435\u043c \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043e 6 \u0441\u043b\u0430\u0439\u0434\u043e\u0432. \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0441\u043b\u0430\u0439\u0434\u043e\u0432:"}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{src:"https://raw.githubusercontent.com/walyoung1/pictures/main/Screenshot%202024-09-10%20at%2019.41.19.png",alt:"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 2"})}),"\n",(0,s.jsx)(e.h3,{id:"\u0441\u043d\u0430\u0447\u0430\u043b\u0430-\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c-pdf-\u0444\u0430\u0439\u043b-\u0438-\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c-\u0431\u0430\u0437\u043e\u0432\u044b\u0439-chunking-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c-\u0441-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c-\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430-langchain--recursivecharactertextsplitter",children:"\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c PDF-\u0444\u0430\u0439\u043b \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 chunking \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 langchain \u2014 RecursiveCharacterTextSplitter."}),"\n",(0,s.jsx)(e.p,{children:"\u042d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044f \u0432\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430."}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:"#\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 PDF-\u0444\u0430\u0439\u043b c Google \u0434\u0438\u0441\u043a\u0430 \u0421ompressa\nfile_id = '14sA1-B90nwwTZr3A9V1J0NfNpTYYguMy'\nurl = f'https://drive.google.com/uc?id={file_id}'\ngdown.download(url, 'mvideo_report.pdf', quiet=False)\nloader = PyPDFLoader(\"mvideo_report.pdf\")\n\n# \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b PDF \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 Langchain\ndocuments = loader.load()\n\n# \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0430\u0440\u0435\u0437\u043a\u0438 (chunking)\ntext_splitter = RecursiveCharacterTextSplitter(\n chunk_size=1000, # \u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u0430\u043d\u043a\u0430\n chunk_overlap=20, # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043a \u0447\u0430\u043d\u043a\u0443\n add_start_index=True \n)\n\n# \u0420\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u043c PDF-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438\nchunks = text_splitter.split_documents(documents)\n\n# \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0430\u043d\u043a\u043e\u0432 (\u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c 20)\nprint(f\"\u0412\u0441\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0447\u0430\u043d\u043a\u043e\u0432: {len(chunks)}\")\n"})}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'# \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0447\u0430\u043d\u043a\u0438. \n# \u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u043a\u0430\u043a \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f "\u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u0430\u044f" \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u044b\u0432\u0430\u0435\u0442 \u043c\u044b\u0441\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u0447\u0430\u043d\u043a\u0430\u043c\u0438.\nfor i, chunk in enumerate(chunks):\n print(f"\u0427\u0430\u043d\u043a {i+1}:\\n{chunk.page_content}\\n")\n'})}),"\n",(0,s.jsx)(e.h2,{id:"4-\u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435-\u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e-langchain-rag-\u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430",children:"4. \u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e langchain RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430"}),"\n",(0,s.jsxs)(e.p,{children:["\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043d\u0430 \u0431\u0430\u0437\u0435 langchain, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438 \u0432 \u0433\u0430\u0439\u0434\u0435 ",(0,s.jsx)(e.a,{href:"https://docs.compressa.ai/guides/langchain_rag/",children:'"\u0411\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442"'}),". \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e."]}),"\n",(0,s.jsx)(e.h3,{id:"\u0432\u0430\u0436\u043d\u043e\u0435-\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435",children:"\u0412\u0430\u0436\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435!"}),"\n",(0,s.jsx)(e.p,{children:"\u0414\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u043e\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0447\u0430\u043d\u043a\u0438\u043d\u0433\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 LLM \u0442\u043e\u043b\u044c\u043a\u043e 1, \u0441\u0430\u043c\u044b\u0439 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0439 \u043a\u0443\u0441\u043e\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430."}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'embeddings = CompressaEmbeddings(api_key=os.getenv("COMPRESSA_API_KEY"), base_url="https://compressa-api.mil-team.ru/v1")\n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\nvectorstore = FAISS.from_documents(chunks, embeddings)\n\nprint("\u0412\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e")\n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0443\u0436\u043d\u044b\u0445 \u0447\u0430\u043d\u043a\u043e\u0432, \u0438\u0449\u0435\u043c 1 \u0441\u0430\u043c\u044b\u0439 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0439\nretriever = vectorstore.as_retriever(search_type="similarity", search_kwargs={"k": 1})\n\n# \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c LLM \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432\nllm = ChatCompressa(api_key=os.getenv("COMPRESSA_API_KEY"), base_url="https://compressa-api.mil-team.ru/v1")\n\nsystem_template = f"""\u0422\u044b \u0443\u043c\u043d\u044b\u0439 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \n\u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441. \u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430, \u043e\u0442\u0432\u0435\u0442\u044c \'\u041d\u0435 \u0437\u043d\u0430\u044e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\'. \n\u041e\u0442\u0432\u0435\u0447\u0430\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u043e, \u043d\u043e \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0430\u0442\u043a\u043e."""\n\nqa_prompt = ChatPromptTemplate.from_messages([\n ("system", system_template),\n ("human", """\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f:\n\n {context}\n \n \u0412\u043e\u043f\u0440\u043e\u0441: {input}\t\t\n """),\n])\n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0434\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b\ndocument_chain = create_stuff_documents_chain(llm, qa_prompt)\n\nrag_chain = create_retrieval_chain(retriever, document_chain)\n\ndef ask_question(question):\n response = rag_chain.invoke({"input": question})\n return response["answer"]\n'})}),"\n",(0,s.jsx)(e.h2,{id:"4-\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430-\u043d\u0430-\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445-\u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445",children:"4. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0441\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u043d\u0430\u0448 RAG-\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442 \u043e\u0442\u0432\u0435\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0443:"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'questions = [\n "\u0427\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043c\u0430\u0435?",\n "\u041a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0431\u0440\u0435\u043d\u0434\u0430 Casarte?",\n "\u041d\u0430 \u0447\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u0441\u0442-\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f?",\n "\u041d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e % \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c EBITDA \u0433\u043e\u0434 \u043a \u0433\u043e\u0434\u0443 \u043f\u043e \u041c\u0424\u0421\u041e 17 ?",\n]\n\nprint("\\n\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430:")\nfor question in questions:\n print(f"\\n\u0412\u043e\u043f\u0440\u043e\u0441: {question}")\n print(f"\u041e\u0442\u0432\u0435\u0442 RAG: {ask_question(question)}")\n'})}),"\n",(0,s.jsx)(e.h3,{id:"\u0441\u0440\u0430\u0432\u043d\u0438\u043c-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b-\u0441-\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438-\u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438",children:"\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438:"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u0427\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043c\u0430\u0435?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043b\u0430 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u0442\u0445\u043e\u0434\u043e\u0432 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u0430 \u0437\u0430\u0432\u043e\u0434\u043e\u0432 \u043f\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0438 \xab\u041a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0438 \u042d\u043a\u043e\u043f\u043e\u043b\u0438\u0441\xbb."}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0431\u0440\u0435\u043d\u0434\u0430 Casarte?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0412 \u0434\u0435\u043a\u0430\u0431\u0440\u0435"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041d\u0430 \u0447\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u0441\u0442-\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0413\u0440\u0443\u043f\u043f\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432- \u043b\u0435\u043d\u0438\u0438 \u0448\u0438\u0440\u043e\u043a\u043e\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u2013 \u043f\u0440\u043e\u0434\u043b\u0451\u043d\u043d\u043e\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u0442\u043e\u0432\u0430\u0440\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043a"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e % \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c EBITDA \u0433\u043e\u0434 \u043a \u0433\u043e\u0434\u0443 \u043f\u043e \u041c\u0424\u0421\u041e 17 ?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: 48,8%"}),"\n",(0,s.jsx)("b",{children:" \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u0441\u0435 4 \u043e\u0442\u0432\u0435\u0442\u0430 \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 "}),"\n",(0,s.jsx)(e.h2,{id:"5-\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430-\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f-\u0447\u0430\u043d\u043a\u043e\u0432",children:"5. \u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0447\u0430\u043d\u043a\u043e\u0432"}),"\n",(0,s.jsx)(e.p,{children:"\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a API CompressaChunking. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0447\u0430\u043d\u043a\u043e\u0432 (1000 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432) \u0438 \u0443\u043a\u0430\u0436\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u043c API. \u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438."}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'# \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c URL \u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\nurl = "https://compressa-api.mil-team.ru/v1/layout"\nheaders = {\n "Authorization": f"Bearer {os.environ[\'COMPRESSA_API_KEY\']}",\n "accept": "application/json",\n}\n\n# \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448 PDF \u0444\u0430\u0439\u043b\nfiles = {"files": open("mvideo_report.pdf", "rb")} \n\n# \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c 2 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 langchain \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435\ndata = {\n "xml_keep_tags": "false", \n "output_format": "application/json", # \u0424\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u0432\u0435\u0442\u0430: JSON\n "coordinates": "false", # \u041d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432\n "strategy": "fast", # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0442.\u043a. \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430\n "chunking_strategy": "by_title", # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u0447\u0430\u043d\u043a\u043e\u0432\n "combine_under_n_chars": 800, # \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044f\u0435\u043c, \u0435\u0441\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 800 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432\n "max_characters": 1000, # \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 1000 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043d\u0430 \u0447\u0430\u043d\u043a\n "multipage_sections": "false", # \u041d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u0447\u0430\u043d\u043a\u0430\u043c \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\n "overlap": 20, # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043a \u0447\u0430\u043d\u043a\u0443\n "starting_page_number": 1, # \u041d\u0430\u0447\u0430\u0442\u044c \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b\n "languages": ["rus", "eng"] # \u042f\u0437\u044b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435\n}\n\n# \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a API\nresponse = requests.post(\n url,\n headers=headers,\n files=files,\n data=data\n)\n\n# \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0447\u0430\u043d\u043a\u0438\nresult = response.json()\nprint(str(result)[:1000])\n'})}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:"# \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u043e\u0442\u0432\u0435\u0442 API \u0432 \u0444\u043e\u0440\u043c\u0430\u0442, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0434\u043b\u044f Langchain\n\nchunks = []\nfor item in result:\n # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b Document \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0447\u0430\u043d\u043a\u0430\n text = item['text'] # \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u0438\u0437 JSON\n chunk = Document(page_content=text)\n chunks.append(chunk)\n\n# \u0412\u044b\u0432\u043e\u0434 \u0432\u0441\u0435\u0445 \u0447\u0430\u043d\u043a\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0440\u0435\u0437\u043a\u0438\nfor i, chunk in enumerate(chunks):\n print(f\"\u0427\u0430\u043d\u043a {i+1}:\\n{chunk.page_content}\\n\")\n"})}),"\n",(0,s.jsx)(e.h2,{id:"6-\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435-\u0438-\u043e\u0446\u0435\u043d\u043a\u0430-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432",children:"6. \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432"}),"\n",(0,s.jsx)(e.p,{children:"\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0447\u0430\u043d\u043a\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0430\u043b\u0438 \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0417\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u043e\u0432\u043e\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435:"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043d\u043e\u0432\u043e\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\nvectorstore2 = FAISS.from_documents(chunks, embeddings)\n\nprint("\u0412\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e")\n\n# \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0443\u0436\u043d\u044b\u0445 \u0447\u0430\u043d\u043a\u043e\u0432 \u0432 \u043d\u043e\u0432\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\nretriever2 = vectorstore2.as_retriever(search_type="similarity", search_kwargs={"k": 1})\n\nrag_chain2 = create_retrieval_chain(retriever2, document_chain)\n\ndef ask_question2(question):\n response = rag_chain2.invoke({"input": question})\n return response["answer"]\n'})}),"\n",(0,s.jsx)("b",{children:" \u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u0435\u0445 \u0436\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445: "}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:'print("\\n\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 RAG \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430:")\nfor question in questions:\n print(f"\\n\u0412\u043e\u043f\u0440\u043e\u0441: {question}")\n print(f"\u041e\u0442\u0432\u0435\u0442 RAG: {ask_question2(question)}")\n'})}),"\n",(0,s.jsx)(e.h3,{id:"\u0441\u0440\u0430\u0432\u043d\u0438\u043c-\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b-\u0441-\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438-\u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438-1",children:"\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438:"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u0427\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043c\u0430\u0435?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0413\u0440\u0443\u043f\u043f\u0430 \u0441\u0442\u0430\u043b\u0430 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u0442\u0445\u043e\u0434\u043e\u0432 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u0430 \u0437\u0430\u0432\u043e\u0434\u043e\u0432 \u043f\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0438 \xab\u041a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0438 \u042d\u043a\u043e\u043f\u043e\u043b\u0438\u0441\xbb."}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0431\u0440\u0435\u043d\u0434\u0430 Casarte?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0412 \u0434\u0435\u043a\u0430\u0431\u0440\u0435"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041d\u0430 \u0447\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u0441\u0442-\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439\u043d\u043e\u0433\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: \u0413\u0440\u0443\u043f\u043f\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432- \u043b\u0435\u043d\u0438\u0438 \u0448\u0438\u0440\u043e\u043a\u043e\u0433\u043e \u0441\u043f\u0435\u043a\u0442\u0440\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u2013 \u043f\u0440\u043e\u0434\u043b\u0451\u043d\u043d\u043e\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u0442\u043e\u0432\u0430\u0440\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u043a"}),"\n",(0,s.jsx)(e.p,{children:"\u0412\u043e\u043f\u0440\u043e\u0441: \u041d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e % \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c EBITDA \u0433\u043e\u0434 \u043a \u0433\u043e\u0434\u0443 \u043f\u043e \u041c\u0424\u0421\u041e 17 ?"}),"\n",(0,s.jsx)(e.p,{children:"\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442: 48,8%"}),"\n",(0,s.jsx)("b",{children:" \u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e\u0439 \u043d\u0430\u0440\u0435\u0437\u043a\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0447\u0430\u043d\u043a\u0438, \u043c\u044b \u043d\u0435 \u0440\u0430\u0437\u0440\u044b\u0432\u0430\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u0443\u0441\u043a\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 LLM \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0443\u044e, \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u0441\u043c\u043e\u0433\u043b\u0430 \u0434\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441. "}),"\n",(0,s.jsxs)(e.p,{children:["\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438 CompressaRerank, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043e\u0442\u0440\u044b\u0432\u043a\u0438 \u043f\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 ",(0,s.jsx)(e.a,{href:"https://docs.compressa.ai/guides/langchain_basic_rerank/",children:"\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0430\u0439\u0434."})]}),"\n",(0,s.jsxs)(e.p,{children:["\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 Embeddings \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a - \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0435\u0448\u0435 \u043e\u0434\u043d\u043e \u043d\u0430\u0448\u0435 ",(0,s.jsx)(e.a,{href:"https://docs.compressa.ai/guides/langchain_basic_semantic_search/",children:"\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e."})]})]})}function d(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,s.jsx)(e,{...n,children:(0,s.jsx)(h,{...n})}):h(n)}},8453:(n,e,i)=>{i.d(e,{R:()=>t,x:()=>c});var s=i(6540);const r={},a=s.createContext(r);function t(n){const e=s.useContext(a);return s.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(r):n.components||r:t(n.components),s.createElement(a.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/f0ad3fbb.556ab8a6.js b/assets/js/f0ad3fbb.556ab8a6.js new file mode 100644 index 0000000..e5f78fe --- /dev/null +++ b/assets/js/f0ad3fbb.556ab8a6.js @@ -0,0 +1 @@ +(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[969],{3452:(e,s,c)=>{"use strict";c.r(s),c.d(s,{default:()=>r});c(6540);var o=c(781),t=c(9292),n=c(4848);const r=function(e){let{layoutProps:s,specProps:c}=e;const r=c.spec?.info?.title||"API Docs",p=c.spec?.info?.description||"Open API Reference Docs for the API";return(0,n.jsx)(o.A,{title:r,description:p,...s,children:(0,n.jsx)(t.A,{...c})})}},6903:()=>{},5915:()=>{},7889:()=>{},3880:()=>{},4834:()=>{},922:()=>{},1912:()=>{}}]); \ No newline at end of file diff --git a/assets/js/f0ad3fbb.a0676777.js b/assets/js/f0ad3fbb.a0676777.js deleted file mode 100644 index 2abbeef..0000000 --- a/assets/js/f0ad3fbb.a0676777.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[2969],{3452:(e,s,c)=>{"use strict";c.r(s),c.d(s,{default:()=>r});c(6540);var o=c(781),t=c(9292),n=c(4848);const r=function(e){let{layoutProps:s,specProps:c}=e;const r=c.spec?.info?.title||"API Docs",p=c.spec?.info?.description||"Open API Reference Docs for the API";return(0,n.jsx)(o.A,{title:r,description:p,...s,children:(0,n.jsx)(t.A,{...c})})}},6903:()=>{},5915:()=>{},7889:()=>{},3880:()=>{},4834:()=>{},922:()=>{},1912:()=>{}}]); \ No newline at end of file diff --git a/assets/js/f5a7f0b4.11e25ec0.js b/assets/js/f5a7f0b4.11e25ec0.js new file mode 100644 index 0000000..db1c0d6 --- /dev/null +++ b/assets/js/f5a7f0b4.11e25ec0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[584],{8450:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var t=r(4848),s=r(8453);const i={sidebar_position:1},o="\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443",a={id:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements",title:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443",description:"\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements.md",sourceDirName:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",slug:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"onpremSidebar",previous:{title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/"},next:{title:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation"}},c={},l=[{value:"\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438",id:"\u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438",level:2},{value:"\u0414\u0440\u0430\u0439\u0432\u0435\u0440\u0430 CUDA",id:"\u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430-cuda",level:2},{value:"Docker",id:"docker",level:2},{value:"Nvidia Container Toolkit",id:"nvidia-container-toolkit",level:2}];function d(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f-\u043a-\u0441\u0435\u0440\u0432\u0435\u0440\u0443",children:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443"}),"\n",(0,t.jsx)(n.h2,{id:"\u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438",children:"\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c InsightStream RAG \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Linux-\u0441\u0435\u0440\u0432\u0435\u0440"}),"\n",(0,t.jsx)(n.li,{children:"2 GPU (\u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b) A100 40GB"}),"\n",(0,t.jsx)(n.li,{children:"8 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 CPU"}),"\n",(0,t.jsx)(n.li,{children:"160 GB RAM"}),"\n",(0,t.jsx)(n.li,{children:"1 TB \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c / \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 InsightStream RAG \u0438\u043b\u0438 \u0432\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043d\u0438\u0436\u0435\u043d\u044b."}),"\n",(0,t.jsx)(n.p,{children:"\u0414\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435. \u041f\u0440\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438."}),"\n",(0,t.jsx)(n.h2,{id:"\u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430-cuda",children:"\u0414\u0440\u0430\u0439\u0432\u0435\u0440\u0430 CUDA"}),"\n",(0,t.jsx)(n.p,{children:"\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430."}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsx)(n.p,{children:"\u0412\u0435\u0440\u0441\u0438\u044e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 CUDA \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo apt update\nsudo apt install software-properties-common -y\nsudo apt install ubuntu-drivers-common -y\nsudo ubuntu-drivers autoinstall\nsudo apt install nvidia-cuda-toolkit\n"})})]}),"\n",(0,t.jsx)(n.h2,{id:"docker",children:"Docker"}),"\n",(0,t.jsxs)(n.p,{children:["\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0434\u043b\u044f Ubuntu:",(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.a,{href:"https://docs.docker.com/engine/install/ubuntu/",children:"https://docs.docker.com/engine/install/ubuntu/"})]}),"\n",(0,t.jsxs)(n.p,{children:["\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/migrate/",children:"Docker Compose V2"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"nvidia-container-toolkit",children:"Nvidia Container Toolkit"}),"\n",(0,t.jsxs)(n.p,{children:["\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0434\u043b\u044f Linux:",(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.a,{href:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html",children:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html"})]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>a});var t=r(6540);const s={},i=t.createContext(s);function o(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f5a7f0b4.8c95cd58.js b/assets/js/f5a7f0b4.8c95cd58.js deleted file mode 100644 index bace212..0000000 --- a/assets/js/f5a7f0b4.8c95cd58.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[7584],{8450:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var t=r(4848),s=r(8453);const i={sidebar_position:1},o="\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443",a={id:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements",title:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443",description:"\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements.md",sourceDirName:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",slug:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"onpremSidebar",previous:{title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/"},next:{title:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation"}},c={},l=[{value:"\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438",id:"\u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438",level:2},{value:"\u0414\u0440\u0430\u0439\u0432\u0435\u0440\u0430 CUDA",id:"\u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430-cuda",level:2},{value:"Docker",id:"docker",level:2},{value:"Nvidia Container Toolkit",id:"nvidia-container-toolkit",level:2}];function d(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f-\u043a-\u0441\u0435\u0440\u0432\u0435\u0440\u0443",children:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443"}),"\n",(0,t.jsx)(n.h2,{id:"\u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438",children:"\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Compressa \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c InsightStream RAG \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Linux-\u0441\u0435\u0440\u0432\u0435\u0440"}),"\n",(0,t.jsx)(n.li,{children:"2 GPU (\u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b) A100 40GB"}),"\n",(0,t.jsx)(n.li,{children:"8 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 CPU"}),"\n",(0,t.jsx)(n.li,{children:"160 GB RAM"}),"\n",(0,t.jsx)(n.li,{children:"1 TB \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c / \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 InsightStream RAG \u0438\u043b\u0438 \u0432\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043d\u0438\u0436\u0435\u043d\u044b."}),"\n",(0,t.jsx)(n.p,{children:"\u0414\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435. \u041f\u0440\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438."}),"\n",(0,t.jsx)(n.h2,{id:"\u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430-cuda",children:"\u0414\u0440\u0430\u0439\u0432\u0435\u0440\u0430 CUDA"}),"\n",(0,t.jsx)(n.p,{children:"\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430."}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsx)(n.p,{children:"\u0412\u0435\u0440\u0441\u0438\u044e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 CUDA \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"sudo apt update\nsudo apt install software-properties-common -y\nsudo apt install ubuntu-drivers-common -y\nsudo ubuntu-drivers autoinstall\nsudo apt install nvidia-cuda-toolkit\n"})})]}),"\n",(0,t.jsx)(n.h2,{id:"docker",children:"Docker"}),"\n",(0,t.jsxs)(n.p,{children:["\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0434\u043b\u044f Ubuntu:",(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.a,{href:"https://docs.docker.com/engine/install/ubuntu/",children:"https://docs.docker.com/engine/install/ubuntu/"})]}),"\n",(0,t.jsxs)(n.p,{children:["\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/migrate/",children:"Docker Compose V2"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"nvidia-container-toolkit",children:"Nvidia Container Toolkit"}),"\n",(0,t.jsxs)(n.p,{children:["\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0434\u043b\u044f Linux:",(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.a,{href:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html",children:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html"})]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>a});var t=r(6540);const s={},i=t.createContext(s);function o(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f8d89ccd.125726d9.js b/assets/js/f8d89ccd.125726d9.js new file mode 100644 index 0000000..515cc90 --- /dev/null +++ b/assets/js/f8d89ccd.125726d9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[956],{8256:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>r,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>c});var i=s(4848),d=s(8453);const a={sidebar_position:2},l="Fine-tuning",t={id:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning",title:"Fine-tuning",description:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning.md",sourceDirName:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management",slug:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"onpremSidebar",previous:{title:"Management API",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment"},next:{title:"Compressa LLM",permalink:"/onprem/Compressa LLM/"}},r={},c=[{value:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445",id:"\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u0434\u0430\u043d\u043d\u044b\u0445",level:2},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",level:2},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 UI",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-ui",level:3},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 REST API",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-rest-api",level:2},{value:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",id:"\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",level:3},{value:" GET /v1/datasets/
",id:"get-v1datasets",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430",level:4},{value:"POST /v1/datasets/upload/
",id:"post-v1datasetsupload",level:4},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",level:4},{value:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-1",level:4},{value:"GET /v1/datasets/{dataset_id}/
",id:"get-v1datasetsdataset_id",level:4},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-2",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-2",level:4},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",level:3},{value:"GET /v1/finetune/models/
",id:"get-v1finetunemodels",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-3",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-3",level:4},{value:"POST /v1/finetune/
",id:"post-v1finetune",level:4},{value:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-4",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-4",level:4},{value:"GET /v1/finetune/status
",id:"get-v1finetunestatus",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-5",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-5",level:4},{value:"POST /v1/finetune/interrupt/
",id:"post-v1finetuneinterrupt",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-6",level:4},{value:"\u0417\u0430\u043f\u0443\u0441\u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439-\u043c\u043e\u0434\u0435\u043b\u0438",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",hr:"hr",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"fine-tuning",children:"Fine-tuning"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u0412\u0430\u0436\u043d\u043e! \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 on-premise \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445."})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043f\u0440\u043e\u043c\u043f\u0442\u0438\u043d\u0433\u043e\u043c."}),"\n",(0,i.jsx)(n.h2,{id:"\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u0434\u0430\u043d\u043d\u044b\u0445",children:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445"}),"\n",(0,i.jsx)(n.p,{children:"\u0414\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432"}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["\u041e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 ",(0,i.jsx)(n.a,{href:"https://jsonlines.org/",children:"JSON Lines"}),", \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442:"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Compressa allows to fine-tune models on chat data.\nTo start the process you should:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Prepare conversation examples"}),"\n",(0,i.jsxs)(n.li,{children:["Format them into ",(0,i.jsx)(n.a,{href:"https://jsonlines.org/",children:"JSON Lines"})," format with the next content on each line:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "messages": [\n {\n "role": "user",\n "content": ""\n },\n {\n "role": "bot",\n "content": " "\n },\n {\n "role": "user",\n "content": " "\n },\n {\n "role": "bot",\n "content": " "\n },\n ]\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"\u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u0438\u0430\u043b\u043e\u0433 \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 100 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432."}),"\n",(0,i.jsx)(n.h2,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 UI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Compressa Fine-tuning \u0438\u043b\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c REST API. \u041d\u0438\u0436\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u0430 \u044d\u0442\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430."}),"\n",(0,i.jsx)(n.h3,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-ui",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 UI"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"URL"}),": ",(0,i.jsx)(n.code,{children:"http://localhost:8080/pod-1/finetune/"})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Fine-Tune UI",src:s(9068).A+"",width:"2704",height:"1698"})}),"\n",(0,i.jsx)(n.p,{children:"\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 UI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"\u0412\u044b\u0431\u0440\u0430\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u043b\u0435\u0432\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.li,{children:"\u0412\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438"}),"\n",(0,i.jsxs)(n.li,{children:["\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c ",(0,i.jsx)(n.strong,{children:"jsonl"})," \u0444\u0430\u0439\u043b \u0432 \u0444\u043e\u0440\u043c\u0443"]}),"\n",(0,i.jsxs)(n.li,{children:["\u041d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 ",(0,i.jsx)(n.strong,{children:"Finetune"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0435 ",(0,i.jsx)(n.a,{href:"https://github.com/aimhubio/aim",children:"AIM"}),". \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0436\u043c\u0438\u0442\u0435 ",(0,i.jsx)(n.strong,{children:"Training Dashboard"})," \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Training Dashboard",src:s(6720).A+"",width:"2714",height:"1702"})}),"\n",(0,i.jsx)(n.p,{children:"\u0412 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435, \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Training Dashboard",src:s(1674).A+"",width:"2858",height:"1770"})}),"\n",(0,i.jsx)(n.h2,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-rest-api",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 REST API"}),"\n",(0,i.jsx)(n.h3,{id:"\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",children:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438"}),"\n",(0,i.jsx)(n.h4,{id:"get-v1datasets",children:(0,i.jsx)(n.code,{children:"GET /v1/datasets/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432."}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'[\n {\n "id": "01be6d68-f790-434b-aa6d-5bd492aef202",\n "name": "train.jsonl",\n "s3_path": "01be6d68-f790-434b-aa6d-5bd492aef202/metadata.json",\n "description": null\n },\n {\n "id": "077adb68-2b0e-481b-bd13-e8807adf625f",\n "name": "train.jsonl",\n "s3_path": "077adb68-2b0e-481b-bd13-e8807adf625f/metadata.json",\n "description": "My dataset 2"\n }\n]\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1datasetsupload",children:(0,i.jsx)(n.code,{children:"POST /v1/datasets/upload/"})}),"\n",(0,i.jsx)(n.p,{children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 (\u0442\u043e\u043b\u044c\u043a\u043e \u2018jsonl\u2019 \u0444\u043e\u0440\u043c\u0430\u0442)."}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"query"}),": ",(0,i.jsx)(n.code,{children:"description"})," - dataset description"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"multipart/form-data"}),": ",(0,i.jsx)(n.code,{children:"file"})]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/upload/?description=My%20Description' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: multipart/form-data' \\\n -F 'file=@train.jsonl'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-1",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "string",\n "name": "string",\n "s3_path": "string",\n "description": "string"\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"get-v1datasetsdataset_id",children:(0,i.jsx)(n.code,{children:"GET /v1/datasets/{dataset_id}/"})}),"\n",(0,i.jsxs)(n.p,{children:["\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u043e id ",(0,i.jsx)(n.code,{children:"dataset_id"})]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"path"}),": ",(0,i.jsx)(n.code,{children:"dataset_id"})]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-2",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/01be6d68-f790-434b-aa6d-5bd492aef202/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-2",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"file"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.h4,{id:"get-v1finetunemodels",children:(0,i.jsx)(n.code,{children:"GET /v1/finetune/models/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-3",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/models/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-3",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'[\n {\n "model_id": "TheBloke/mixtral-8x7b-v0.1-AWQ",\n "adapter": false,\n "base_model_id": null\n },\n {\n "model_id": "NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story",\n "adapter": false,\n "base_model_id": null\n }\n]\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1finetune",children:(0,i.jsx)(n.code,{children:"POST /v1/finetune/"})}),"\n",(0,i.jsx)(n.p,{children:"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435"}),"\n",(0,i.jsx)(n.h4,{id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "name": "string",\n "model_id": "string",\n "dataset_id": "string"\n}\n'})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"name"})," - name of training"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_id"})," - id of model to train"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dataset_id"})," - id of dataset to train on"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-4",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -X \'POST\' \\\n \'http://localhost:8080/pod-1/api/v1/finetune/\' \\\n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "name": "My Adapter Training",\n "model_id": "NousResearch/Llama-2-7b-chat-hf",\n "dataset_id": "01be6d68-f790-434b-aa6d-5bd492aef202"\n}\'\n'})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-4",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "CREATED",\n "started_at": "2024-03-21T10:40:40.928442"\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"get-v1finetunestatus",children:(0,i.jsx)(n.code,{children:"GET /v1/finetune/status"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-5",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/status/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-5",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "46c155b4-17fe-4226-9412-a77edfadc7e7",\n "name": "My Adapter Training",\n "model_id": "NousResearch/Llama-2-7b-chat-hf",\n "dataset_id": "01be6d68-f790-434b-aa6d-5bd492aef202",\n "job": {\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "RUNNING",\n "started_at": "2024-03-21T10:40:40.928442"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1finetuneinterrupt",children:(0,i.jsx)(n.code,{children:"POST /v1/finetune/interrupt/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/interrupt/' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-6",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "RUNNING",\n "started_at": "2024-03-21T10:40:40.928442"\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0417\u0430\u043f\u0443\u0441\u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435."}),"\n",(0,i.jsxs)(n.p,{children:["\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 ",(0,i.jsx)(n.a,{href:"/onprem/%D0%9F%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D0%B0%20Compressa/LLM_management/model_deployment",children:"\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},1674:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/aim-metrics-071e1b428c59dd1f300899a495f778c5.png"},9068:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/finetune-272560fe59b36eb751e0d5c92cacd5e7.png"},6720:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/training-dashboard-9d0e87da0b7d90d5c8404d052358932c.png"},8453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>t});var i=s(6540);const d={},a=i.createContext(d);function l(e){const n=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:l(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f8d89ccd.d0943947.js b/assets/js/f8d89ccd.d0943947.js deleted file mode 100644 index d196fce..0000000 --- a/assets/js/f8d89ccd.d0943947.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[8956],{8256:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>r,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>c});var i=s(4848),d=s(8453);const a={sidebar_position:2},l="Fine-tuning",t={id:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning",title:"Fine-tuning",description:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning.md",sourceDirName:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management",slug:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"onpremSidebar",previous:{title:"Management API",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment"},next:{title:"Compressa LLM",permalink:"/onprem/Compressa LLM/"}},r={},c=[{value:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445",id:"\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u0434\u0430\u043d\u043d\u044b\u0445",level:2},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",level:2},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 UI",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-ui",level:3},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 REST API",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-rest-api",level:2},{value:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",id:"\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",level:3},{value:" GET /v1/datasets/
",id:"get-v1datasets",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430",level:4},{value:"POST /v1/datasets/upload/
",id:"post-v1datasetsupload",level:4},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",level:4},{value:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-1",level:4},{value:"GET /v1/datasets/{dataset_id}/
",id:"get-v1datasetsdataset_id",level:4},{value:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:",id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-2",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-2",level:4},{value:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",level:3},{value:"GET /v1/finetune/models/
",id:"get-v1finetunemodels",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-3",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-3",level:4},{value:"POST /v1/finetune/
",id:"post-v1finetune",level:4},{value:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-4",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-4",level:4},{value:"GET /v1/finetune/status
",id:"get-v1finetunestatus",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-5",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-5",level:4},{value:"POST /v1/finetune/interrupt/
",id:"post-v1finetuneinterrupt",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441",level:4},{value:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:",id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-6",level:4},{value:"\u0417\u0430\u043f\u0443\u0441\u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438",id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439-\u043c\u043e\u0434\u0435\u043b\u0438",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",hr:"hr",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"fine-tuning",children:"Fine-tuning"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LoRA/QLoRA \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u043e\u0432. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0435, \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442/\u0441\u0442\u0438\u043b\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"\u0412\u0430\u0436\u043d\u043e! \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 on-premise \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445."})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0441 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043f\u0440\u043e\u043c\u043f\u0442\u0438\u043d\u0433\u043e\u043c."}),"\n",(0,i.jsx)(n.h2,{id:"\u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430-\u0434\u0430\u043d\u043d\u044b\u0445",children:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445"}),"\n",(0,i.jsx)(n.p,{children:"\u0414\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432"}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["\u041e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 ",(0,i.jsx)(n.a,{href:"https://jsonlines.org/",children:"JSON Lines"}),", \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442:"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Compressa allows to fine-tune models on chat data.\nTo start the process you should:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Prepare conversation examples"}),"\n",(0,i.jsxs)(n.li,{children:["Format them into ",(0,i.jsx)(n.a,{href:"https://jsonlines.org/",children:"JSON Lines"})," format with the next content on each line:"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "messages": [\n {\n "role": "user",\n "content": ""\n },\n {\n "role": "bot",\n "content": " "\n },\n {\n "role": "user",\n "content": " "\n },\n {\n "role": "bot",\n "content": " "\n },\n ]\n}\n'})}),"\n",(0,i.jsx)(n.p,{children:"\u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u0438\u0430\u043b\u043e\u0433 \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 100 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432."}),"\n",(0,i.jsx)(n.h2,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 UI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Compressa Fine-tuning \u0438\u043b\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c REST API. \u041d\u0438\u0436\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u0430 \u044d\u0442\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430."}),"\n",(0,i.jsx)(n.h3,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-ui",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 UI"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"URL"}),": ",(0,i.jsx)(n.code,{children:"http://localhost:8080/pod-1/finetune/"})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Fine-Tune UI",src:s(9068).A+"",width:"2704",height:"1698"})}),"\n",(0,i.jsx)(n.p,{children:"\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u043e\u0431\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 UI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"\u0412\u044b\u0431\u0440\u0430\u0442\u044c LLM \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u043b\u0435\u0432\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.li,{children:"\u0412\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438"}),"\n",(0,i.jsxs)(n.li,{children:["\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c ",(0,i.jsx)(n.strong,{children:"jsonl"})," \u0444\u0430\u0439\u043b \u0432 \u0444\u043e\u0440\u043c\u0443"]}),"\n",(0,i.jsxs)(n.li,{children:["\u041d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 ",(0,i.jsx)(n.strong,{children:"Finetune"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0435 ",(0,i.jsx)(n.a,{href:"https://github.com/aimhubio/aim",children:"AIM"}),". \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0436\u043c\u0438\u0442\u0435 ",(0,i.jsx)(n.strong,{children:"Training Dashboard"})," \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Training Dashboard",src:s(6720).A+"",width:"2714",height:"1702"})}),"\n",(0,i.jsx)(n.p,{children:"\u0412 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435, \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Training Dashboard",src:s(1674).A+"",width:"2858",height:"1770"})}),"\n",(0,i.jsx)(n.h2,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u0447\u0435\u0440\u0435\u0437-rest-api",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 REST API"}),"\n",(0,i.jsx)(n.h3,{id:"\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435-\u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438",children:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438"}),"\n",(0,i.jsx)(n.h4,{id:"get-v1datasets",children:(0,i.jsx)(n.code,{children:"GET /v1/datasets/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432."}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'[\n {\n "id": "01be6d68-f790-434b-aa6d-5bd492aef202",\n "name": "train.jsonl",\n "s3_path": "01be6d68-f790-434b-aa6d-5bd492aef202/metadata.json",\n "description": null\n },\n {\n "id": "077adb68-2b0e-481b-bd13-e8807adf625f",\n "name": "train.jsonl",\n "s3_path": "077adb68-2b0e-481b-bd13-e8807adf625f/metadata.json",\n "description": "My dataset 2"\n }\n]\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1datasetsupload",children:(0,i.jsx)(n.code,{children:"POST /v1/datasets/upload/"})}),"\n",(0,i.jsx)(n.p,{children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 (\u0442\u043e\u043b\u044c\u043a\u043e \u2018jsonl\u2019 \u0444\u043e\u0440\u043c\u0430\u0442)."}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"query"}),": ",(0,i.jsx)(n.code,{children:"description"})," - dataset description"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430",children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"multipart/form-data"}),": ",(0,i.jsx)(n.code,{children:"file"})]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/upload/?description=My%20Description' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: multipart/form-data' \\\n -F 'file=@train.jsonl'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-1",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "string",\n "name": "string",\n "s3_path": "string",\n "description": "string"\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"get-v1datasetsdataset_id",children:(0,i.jsx)(n.code,{children:"GET /v1/datasets/{dataset_id}/"})}),"\n",(0,i.jsxs)(n.p,{children:["\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u043e id ",(0,i.jsx)(n.code,{children:"dataset_id"})]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b-1",children:"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"path"}),": ",(0,i.jsx)(n.code,{children:"dataset_id"})]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-2",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/datasets/01be6d68-f790-434b-aa6d-5bd492aef202/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-2",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"file"})}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.h4,{id:"get-v1finetunemodels",children:(0,i.jsx)(n.code,{children:"GET /v1/finetune/models/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-3",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/models/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-3",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'[\n {\n "model_id": "TheBloke/mixtral-8x7b-v0.1-AWQ",\n "adapter": false,\n "base_model_id": null\n },\n {\n "model_id": "NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story",\n "adapter": false,\n "base_model_id": null\n }\n]\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1finetune",children:(0,i.jsx)(n.code,{children:"POST /v1/finetune/"})}),"\n",(0,i.jsx)(n.p,{children:"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435"}),"\n",(0,i.jsx)(n.h4,{id:"\u0442\u0435\u043b\u043e-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-1",children:"\u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "name": "string",\n "model_id": "string",\n "dataset_id": "string"\n}\n'})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"name"})," - name of training"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_id"})," - id of model to train"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"dataset_id"})," - id of dataset to train on"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-4",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -X \'POST\' \\\n \'http://localhost:8080/pod-1/api/v1/finetune/\' \\\n -H \'accept: application/json\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "name": "My Adapter Training",\n "model_id": "NousResearch/Llama-2-7b-chat-hf",\n "dataset_id": "01be6d68-f790-434b-aa6d-5bd492aef202"\n}\'\n'})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-4",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "CREATED",\n "started_at": "2024-03-21T10:40:40.928442"\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"get-v1finetunestatus",children:(0,i.jsx)(n.code,{children:"GET /v1/finetune/status"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441\u0430-5",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/status/' \\\n -H 'accept: application/json'\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-5",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "46c155b4-17fe-4226-9412-a77edfadc7e7",\n "name": "My Adapter Training",\n "model_id": "NousResearch/Llama-2-7b-chat-hf",\n "dataset_id": "01be6d68-f790-434b-aa6d-5bd492aef202",\n "job": {\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "RUNNING",\n "started_at": "2024-03-21T10:40:40.928442"\n }\n}\n'})}),"\n",(0,i.jsx)(n.h4,{id:"post-v1finetuneinterrupt",children:(0,i.jsx)(n.code,{children:"POST /v1/finetune/interrupt/"})}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u0437\u0430\u043f\u0440\u043e\u0441",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/pod-1/api/v1/finetune/interrupt/' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,i.jsx)(n.h4,{id:"\u043f\u0440\u0438\u043c\u0435\u0440-\u043e\u0442\u0432\u0435\u0442\u0430-6",children:"\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'{\n "id": "74280be7-4723-475d-89ae-346e9017990e",\n "name": "FT_NousResearch/Llama-2-7b-chat-hf_01be6d68-f790-434b-aa6d-5bd492aef202",\n "status": "RUNNING",\n "started_at": "2024-03-21T10:40:40.928442"\n}\n'})}),"\n",(0,i.jsx)(n.h2,{id:"\u0437\u0430\u043f\u0443\u0441\u043a-\u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439-\u043c\u043e\u0434\u0435\u043b\u0438",children:"\u0417\u0430\u043f\u0443\u0441\u043a \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438"}),"\n",(0,i.jsx)(n.p,{children:"\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435."}),"\n",(0,i.jsxs)(n.p,{children:["\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 ",(0,i.jsx)(n.a,{href:"/onprem/%D0%9F%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D0%B0%20Compressa/LLM_management/model_deployment",children:"\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},1674:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/aim-metrics-071e1b428c59dd1f300899a495f778c5.png"},9068:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/finetune-272560fe59b36eb751e0d5c92cacd5e7.png"},6720:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/training-dashboard-9d0e87da0b7d90d5c8404d052358932c.png"},8453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>t});var i=s(6540);const d={},a=i.createContext(d);function l(e){const n=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:l(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f9590654.b2a58a88.js b/assets/js/f9590654.b2a58a88.js deleted file mode 100644 index 89b5c7f..0000000 --- a/assets/js/f9590654.b2a58a88.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[8755],{6874:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>t,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var r=s(4848),i=s(8453);const o={sidebar_position:1},t="\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",c={id:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index",title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",description:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index.md",sourceDirName:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",slug:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"onpremSidebar",next:{title:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements"}},l={},d=[{value:"\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",id:"\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435-\u043c\u043e\u0434\u0443\u043b\u0438",level:2},{value:"\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 Compressa",id:"\u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430-compressa",level:2},{value:"\u041f\u043e\u043c\u043e\u0449\u044c",id:"\u043f\u043e\u043c\u043e\u0449\u044c",level:2}];function a(e){const n={a:"a",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430-compressa",children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa"}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI."}),"\n",(0,r.jsx)(n.h2,{id:"\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435-\u043c\u043e\u0434\u0443\u043b\u0438",children:"\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"ETL"}),": \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0447\u0430\u043d\u043a\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b LLM"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"LLM"}),": \u0411\u044b\u0441\u0442\u0440\u044b\u0435 \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Embeddings"}),": \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Rerank"}),": \u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Fine-tuning"}),": \u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f GPT-4 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.em,{children:"\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443"})}),"\n",(0,r.jsx)(n.h2,{id:"\u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430-compressa",children:"\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 Compressa"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\ud83d\udee0\ufe0f ",(0,r.jsx)(n.strong,{children:"\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430"}),": \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u0435\u0441\u044f\u0446\u044b \u0438 \u043d\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c\u043d\u044b\u0445 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udcbb ",(0,r.jsx)(n.strong,{children:"\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430"}),": \u0412\u0441\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438\u043b\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f Langchain. LLM \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 OpenAI-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 API"]}),"\n",(0,r.jsxs)(n.li,{children:["\u26a1 ",(0,r.jsx)(n.strong,{children:"\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f"}),": \u0412 20-70 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0441 1 GPU, \u0432 2-10 \u0440\u0430\u0437 \u0432\u044b\u0448\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f 1 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043a\u0440\u0430\u0442\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"\u043f\u043e\u043c\u043e\u0449\u044c",children:"\u041f\u043e\u043c\u043e\u0449\u044c"}),"\n",(0,r.jsxs)(n.p,{children:["\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ML \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 \u2014 \u043f\u0440\u043e\u0441\u0438\u043c \u0432\u0430\u0441 \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0430\u043c\u0438 \u0432\xa0",(0,r.jsx)(n.a,{href:"https://t.me/+-0smoj_KpEw3MGQy",children:"\u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438"}),"."]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>c});var r=s(6540);const i={},o=r.createContext(i);function t(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f9590654.edf23a67.js b/assets/js/f9590654.edf23a67.js new file mode 100644 index 0000000..44cef11 --- /dev/null +++ b/assets/js/f9590654.edf23a67.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[755],{6874:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>t,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var r=s(4848),i=s(8453);const o={sidebar_position:1},t="\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",c={id:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index",title:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",description:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index.md",sourceDirName:"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa",slug:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"onpremSidebar",next:{title:"\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443",permalink:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements"}},l={},d=[{value:"\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438",id:"\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435-\u043c\u043e\u0434\u0443\u043b\u0438",level:2},{value:"\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 Compressa",id:"\u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430-compressa",level:2},{value:"\u041f\u043e\u043c\u043e\u0449\u044c",id:"\u043f\u043e\u043c\u043e\u0449\u044c",level:2}];function a(e){const n={a:"a",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430-compressa",children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa"}),"\n",(0,r.jsx)(n.p,{children:"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa \u2014 \u044d\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u0430\u044f AI-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a OpenAI, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e AI."}),"\n",(0,r.jsx)(n.h2,{id:"\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435-\u043c\u043e\u0434\u0443\u043b\u0438",children:"\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"ETL"}),": \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0447\u0430\u043d\u043a\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b LLM"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"LLM"}),": \u0411\u044b\u0441\u0442\u0440\u044b\u0435 \u0438 \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Embeddings"}),": \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Rerank"}),": \u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u044b\u0445 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Fine-tuning"}),": \u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f GPT-4 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.em,{children:"\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443"})}),"\n",(0,r.jsx)(n.h2,{id:"\u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430-compressa",children:"\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 Compressa"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\ud83d\udee0\ufe0f ",(0,r.jsx)(n.strong,{children:"\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430"}),": \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043c\u0435\u0441\u044f\u0446\u044b \u0438 \u043d\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c\u043d\u044b\u0445 ML \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udcbb ",(0,r.jsx)(n.strong,{children:"\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430"}),": \u0412\u0441\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 API-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438\u043b\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f Langchain. LLM \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 OpenAI-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 API"]}),"\n",(0,r.jsxs)(n.li,{children:["\u26a1 ",(0,r.jsx)(n.strong,{children:"\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f"}),": \u0412 20-70 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0441 1 GPU, \u0432 2-10 \u0440\u0430\u0437 \u0432\u044b\u0448\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f 1 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043a\u0440\u0430\u0442\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"\u043f\u043e\u043c\u043e\u0449\u044c",children:"\u041f\u043e\u043c\u043e\u0449\u044c"}),"\n",(0,r.jsxs)(n.p,{children:["\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ML \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432 \u2014 \u043f\u0440\u043e\u0441\u0438\u043c \u0432\u0430\u0441 \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0430\u043c\u0438 \u0432\xa0",(0,r.jsx)(n.a,{href:"https://t.me/+-0smoj_KpEw3MGQy",children:"\u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0447\u0430\u0442\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438"}),"."]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>c});var r=s(6540);const i={},o=r.createContext(i);function t(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fbf60db8.5c3a8a9c.js b/assets/js/fbf60db8.5c3a8a9c.js deleted file mode 100644 index 154bc93..0000000 --- a/assets/js/fbf60db8.5c3a8a9c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[9245],{7976:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var o=s(4848),t=s(8453);const i={sidebar_position:3},r="Quickstart: Mistral-7B On-Premises",a={id:"onprem/LLM_On-Premises/mistral/index",title:"Quickstart: Mistral-7B On-Premises",description:"This guide will show you how to deploy the Mistral-7B inference on a single A100-40GB GPU.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/mistral/index.md",sourceDirName:"onprem/LLM_On-Premises/mistral",slug:"/onprem/LLM_On-Premises/mistral/",permalink:"/onprem/LLM_On-Premises/mistral/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/mistral/index.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"onpremSidebar",previous:{title:"Inference",permalink:"/onprem/LLM_On-Premises/inference/"},next:{title:"Finetuning",permalink:"/onprem/LLM_On-Premises/finetuning/"}},l={},c=[{value:"Deploy Compressa",id:"deploy-compressa",level:2},{value:"Download model",id:"download-model",level:2},{value:"Deploy model",id:"deploy-model",level:2},{value:"Model access",id:"model-access",level:2}];function d(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",h1:"h1",h2:"h2",img:"img",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"quickstart-mistral-7b-on-premises",children:"Quickstart: Mistral-7B On-Premises"}),"\n",(0,o.jsxs)(n.p,{children:["This guide will show you how to deploy the Mistral-7B inference on a single A100-40GB GPU.",(0,o.jsx)(n.br,{}),"\n","The A100-40GB GPU allows you to host the Mistral-7B without quantization."]}),"\n",(0,o.jsxs)(n.p,{children:["We recommend using ",(0,o.jsx)(n.a,{href:"https://huggingface.co/openchat/openchat-3.5-0106",children:"openchat/openchat-3.5-0106"})," version of the Mistral-7B.",(0,o.jsx)(n.br,{}),"\n","Experiments demonstrate that this model achieves the best quality across a wide range of tasks among models of this size."]}),"\n",(0,o.jsx)(n.h2,{id:"deploy-compressa",children:"Deploy Compressa"}),"\n",(0,o.jsxs)(n.p,{children:["The first step is to deploy compressa according to the ",(0,o.jsx)(n.a,{href:"/onprem/LLM_On-Premises/setup/",children:"instruction"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["Assuming Compressa is deployed on port 8080,\nyou can use the manager's REST API at ",(0,o.jsx)(n.a,{href:"http://localhost:8080/api",children:"http://localhost:8080/api"})," to download and deploy the model."]}),"\n",(0,o.jsxs)(n.p,{children:["Full details about the manager API can be found in the ",(0,o.jsx)(n.a,{href:"/onprem/LLM_On-Premises/services/rest-api",children:"instruction"}),"\nor on the Swagger page at ",(0,o.jsx)(n.code,{children:"http://localhost:8080/api/docs"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"download-model",children:"Download model"}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsxs)(n.p,{children:["If you're deploying Compressa in private network without internet access that step can be skipped.\nPlease use the ",(0,o.jsx)(n.a,{href:"/onprem/LLM_On-Premises/setup/internet-access",children:"instruction"})," to download resources before deployment."]})}),"\n",(0,o.jsxs)(n.p,{children:["You can download the model using the following ",(0,o.jsx)(n.code,{children:"curl"})," command:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/models/add/?model_id=openchat%2Fopenchat-3.5-0106' \\\n -H 'accept: application/json' \\\n -d ''\n"})}),"\n",(0,o.jsxs)(n.p,{children:["Alternatively, download directly from the Swagger page by clicking ",(0,o.jsx)(n.strong,{children:"Try it out"}),":\n",(0,o.jsx)(n.img,{alt:"Add model",src:s(3606).A+"",width:"2324",height:"1022"})]}),"\n",(0,o.jsxs)(n.p,{children:["The model will be downloaded within a few minutes.",(0,o.jsx)(n.br,{}),"\n","The process can be monitored from the console log or via the ",(0,o.jsx)(n.a,{href:"/onprem/LLM_On-Premises/services/rest-api#get-v1models",children:"API"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"deploy-model",children:"Deploy model"}),"\n",(0,o.jsx)(n.p,{children:"You can also deploy the model using the following curl command:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"curl -X 'POST' \\\n 'http://localhost:8080/api/v1/deploy/' \\\n -H 'accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"model_id\": \"openchat/openchat-3.5-0106\"\n }'\n"})}),"\n",(0,o.jsxs)(n.p,{children:["Or directly from the Swagger page:\n",(0,o.jsx)(n.img,{alt:"Deloy model",src:s(9526).A+"",width:"2354",height:"1514"})]}),"\n",(0,o.jsx)(n.p,{children:"Deployment will take less than a minute."}),"\n",(0,o.jsx)(n.h2,{id:"model-access",children:"Model access"}),"\n",(0,o.jsxs)(n.p,{children:["Once the model is deployed, it will be accessible at ",(0,o.jsx)(n.code,{children:"http://localhost:8080/chat"}),":"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Chat",src:s(6336).A+"",width:"2880",height:"1690"})}),"\n",(0,o.jsxs)(n.p,{children:["and through the OpenAI compatible API at ",(0,o.jsx)(n.code,{children:"http://localhost:8080/openai-api"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"curl -X 'GET' \\\n 'http://localhost:8080/openai-api/v1/models'\n"})})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},6336:(e,n,s)=>{s.d(n,{A:()=>o});const o=s.p+"assets/images/chat-8f8e70880036b752e391b980093048b7.png"},3606:(e,n,s)=>{s.d(n,{A:()=>o});const o=s.p+"assets/images/swagger-add-f34083339d3c7663d4a7599c5ee7915a.png"},9526:(e,n,s)=>{s.d(n,{A:()=>o});const o=s.p+"assets/images/swagger-deploy-e5ce0aca812fa2a46efe0e3c105cc24f.png"},8453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>a});var o=s(6540);const t={},i=o.createContext(t);function r(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fdb793ca.ab5ea3d0.js b/assets/js/fdb793ca.ab5ea3d0.js deleted file mode 100644 index edc0ccd..0000000 --- a/assets/js/fdb793ca.ab5ea3d0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[3448],{9473:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var s=i(4848),t=i(8453);const r={sidebar_position:5},o="Finetuning",a={id:"onprem/LLM_On-Premises/finetuning/index",title:"Finetuning",description:"Compressa provides the feature of low-effort models fine-tuning via LoRA/QLoRA adapters.",source:"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/finetuning/index.md",sourceDirName:"onprem/LLM_On-Premises/finetuning",slug:"/onprem/LLM_On-Premises/finetuning/",permalink:"/onprem/LLM_On-Premises/finetuning/",draft:!1,unlisted:!1,editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/finetuning/index.md",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"onpremSidebar",previous:{title:"Quickstart: Mistral-7B On-Premises",permalink:"/onprem/LLM_On-Premises/mistral/"},next:{title:"Quickstart: InsightStream",permalink:"/onprem/RAG_On-Premises/insight-stream/"}},c={},d=[{value:"Preparing data",id:"preparing-data",level:2},{value:"Training",id:"training",level:2},{value:"Compressa Finetuning UI",id:"compressa-finetuning-ui",level:3},{value:"Deploy",id:"deploy",level:3}];function l(n){const e={a:"a",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...n.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h1,{id:"finetuning",children:"Finetuning"}),"\n",(0,s.jsx)(e.p,{children:"Compressa provides the feature of low-effort models fine-tuning via LoRA/QLoRA adapters."}),"\n",(0,s.jsx)(e.p,{children:"Fine-tuning allows to increase quality for business cases, focus model on some topic or introduce format to the output data."}),"\n",(0,s.jsx)(e.h2,{id:"preparing-data",children:"Preparing data"}),"\n",(0,s.jsx)(e.p,{children:"Compressa allows to fine-tune models on chat data.\nTo start the process you should:"}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsx)(e.li,{children:"Prepare conversation examples"}),"\n",(0,s.jsxs)(e.li,{children:["Format them into ",(0,s.jsx)(e.a,{href:"https://jsonlines.org/",children:"JSON Lines"})," format with the next content on each line:"]}),"\n"]}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{children:'{\n "messages": [\n {\n "role": "user",\n "content": " "\n },\n {\n "role": "bot",\n "content": " "\n },\n {\n "role": "user",\n "content": " "\n },\n {\n "role": "bot",\n "content": " "\n },\n ]\n}\n'})}),"\n",(0,s.jsxs)(e.p,{children:["Each dialog can have any number of messages.",(0,s.jsx)(e.br,{}),"\n","Dataset should have at least 100 samples."]}),"\n",(0,s.jsx)(e.h2,{id:"training",children:"Training"}),"\n",(0,s.jsxs)(e.p,{children:["When data is prepared you can start training in Compressa Finetuning UI or with REST API.",(0,s.jsx)(e.br,{}),"\n","Documentation for REST API can be found at Management API documentation ",(0,s.jsx)(e.a,{href:"/onprem/LLM_On-Premises/services/rest-api/",children:"page"}),"."]}),"\n",(0,s.jsx)(e.h3,{id:"compressa-finetuning-ui",children:"Compressa Finetuning UI"}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"URL"}),": ",(0,s.jsx)(e.code,{children:"http://localhost:8080/finetune/"})]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Fine-Tune UI",src:i(9068).A+"",width:"2704",height:"1698"})}),"\n",(0,s.jsx)(e.p,{children:"To finetune model using UI you should:"}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsx)(e.li,{children:"Select a model in the left panel"}),"\n",(0,s.jsx)(e.li,{children:"Fill-in the name of your finetune"}),"\n",(0,s.jsxs)(e.li,{children:["Upload ",(0,s.jsx)(e.code,{children:"jsonl"})," file to the form"]}),"\n",(0,s.jsxs)(e.li,{children:["Click the ",(0,s.jsx)(e.strong,{children:"Finetune"})," button"]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["Then you can track training process in ",(0,s.jsx)(e.a,{href:"https://github.com/aimhubio/aim",children:"AIM"})," dashboard.",(0,s.jsx)(e.br,{}),"\n","Dashboard can be opened by clicking Training Dashboard.\n",(0,s.jsx)(e.img,{alt:"Training Dashboard",src:i(6720).A+"",width:"2714",height:"1702"})]}),"\n",(0,s.jsxs)(e.p,{children:["The dashboard allows to choose run by the provided name and see metrics:\n",(0,s.jsx)(e.img,{alt:"Training Dashboard",src:i(1674).A+"",width:"2858",height:"1770"})]}),"\n",(0,s.jsx)(e.h3,{id:"deploy",children:"Deploy"}),"\n",(0,s.jsxs)(e.p,{children:["When training process is finished, adapter can be deployed in Compressa for inference.",(0,s.jsx)(e.br,{}),"\n","The full instruction for deployment can be found at ",(0,s.jsx)(e.a,{href:"/onprem/LLM_On-Premises/inference/",children:"page"}),"."]})]})}function h(n={}){const{wrapper:e}={...(0,t.R)(),...n.components};return e?(0,s.jsx)(e,{...n,children:(0,s.jsx)(l,{...n})}):l(n)}},1674:(n,e,i)=>{i.d(e,{A:()=>s});const s=i.p+"assets/images/aim-metrics-071e1b428c59dd1f300899a495f778c5.png"},9068:(n,e,i)=>{i.d(e,{A:()=>s});const s=i.p+"assets/images/finetune-272560fe59b36eb751e0d5c92cacd5e7.png"},6720:(n,e,i)=>{i.d(e,{A:()=>s});const s=i.p+"assets/images/training-dashboard-9d0e87da0b7d90d5c8404d052358932c.png"},8453:(n,e,i)=>{i.d(e,{R:()=>o,x:()=>a});var s=i(6540);const t={},r=s.createContext(t);function o(n){const e=s.useContext(r);return s.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function a(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:o(n.components),s.createElement(r.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.6202e412.js b/assets/js/main.6202e412.js deleted file mode 100644 index a2cccd5..0000000 --- a/assets/js/main.6202e412.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.6202e412.js.LICENSE.txt */ -(self.webpackChunkcompressa_docs=self.webpackChunkcompressa_docs||[]).push([[8792],{8328:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});n(6540);var r=n(3259),a=n.n(r),o=n(4054);const i={"0613b3aa":[()=>n.e(8334).then(n.bind(n,7096)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/api-reference/langchain.md",7096],"08d79e2c":[()=>n.e(2895).then(n.bind(n,7862)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/openai.md",7862],"09cf7ae2":[()=>n.e(2280).then(n.bind(n,6687)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_install/index.md",6687],"0a745e13":[()=>n.e(7981).then(n.bind(n,4467)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/index.md",4467],"14c3c2f5":[()=>n.e(4086).then(n.bind(n,6205)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation.md",6205],17896441:[()=>Promise.all([n.e(1869),n.e(8401)]).then(n.bind(n,4313)),"@theme/DocItem",4313],"1b737de1":[()=>n.e(1687).then(n.bind(n,959)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_management/index.md",959],"1d5944e0":[()=>n.e(9701).then(n.bind(n,8118)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/index.md",8118],"1e2aa677":[()=>Promise.all([n.e(1869),n.e(7805)]).then(n.bind(n,8522)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Rerank.md",8522],"22c41bdb":[()=>n.e(8261).then(n.bind(n,3017)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/file_search.md",3017],"2b673715":[()=>n.e(5882).then(n.bind(n,9208)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/file_upload.md",9208],31018403:[()=>n.e(9581).then(n.bind(n,4198)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/index.md",4198],"3983e095":[()=>n.e(2649).then(n.bind(n,1151)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Fine-tuning.md",1151],"44928db4":[()=>n.e(448).then(n.bind(n,9621)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/api-reference/index.md",9621],"4c957044":[()=>n.e(5999).then(n.bind(n,8713)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_basic_semantic_search/index.md",8713],"4edb40be":[()=>n.e(8543).then(n.bind(n,1019)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_management/mistral_7b.md",1019],"51e244a6":[()=>Promise.all([n.e(1869),n.e(9292),n.e(9093)]).then(n.bind(n,2167)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/rest.mdx.md",2167],"56b6add9":[()=>n.e(6336).then(n.bind(n,5351)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/inference/index.md",5351],"5e95c892":[()=>n.e(9647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"653f7a39":[()=>n.e(4503).then(n.bind(n,9043)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/help.md",9043],"6629c45f":[()=>n.e(5820).then(n.t.bind(n,7691,19)),"@generated/docusaurus-plugin-content-docs/default/p/index.json",7691],"76265e76":[()=>n.e(8677).then(n.bind(n,9138)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/platform.md",9138],"877ebdfe":[()=>n.e(9277).then(n.t.bind(n,2217,19)),"/home/runner/work/docs/docs/.docusaurus/docusaurus-plugin-redoc/api/redocApiSpecV1.2-api.json",2217],"8a61c40b":[()=>n.e(4650).then(n.t.bind(n,3184,19)),"/home/runner/work/docs/docs/.docusaurus/docusaurus-plugin-redoc/api/redocApiLayoutV1-api.json",3184],"8c75ad99":[()=>n.e(3185).then(n.bind(n,8251)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_basic_rerank/index.md",8251],"9355aec3":[()=>Promise.all([n.e(1869),n.e(9292),n.e(881)]).then(n.bind(n,6193)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/api-reference/rest.mdx",6193],"96d51b76":[()=>n.e(3733).then(n.bind(n,5354)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/insightstream_module/index.md",5354],"9767abd6":[()=>Promise.all([n.e(1869),n.e(1301)]).then(n.bind(n,6067)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/LLM/OpenAI.md",6067],"977a142a":[()=>n.e(1795).then(n.bind(n,7552)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/RAG_On-Premises/insight-stream/index.md",7552],a457e5e7:[()=>n.e(5542).then(n.bind(n,4694)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation.md",4694],a7bd4aaa:[()=>n.e(7098).then(n.bind(n,4532)),"@theme/DocVersionRoot",4532],a7d3ee69:[()=>n.e(6301).then(n.bind(n,8867)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/setup/internet-access.md",8867],a94703ab:[()=>Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,2559)),"@theme/DocRoot",2559],aba21aa0:[()=>n.e(5742).then(n.t.bind(n,7093,19)),"@generated/docusaurus-plugin-content-docs/default/__plugin.json",7093],b2fef923:[()=>n.e(4430).then(n.bind(n,2317)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/REST_API.md",2317],b346ced0:[()=>n.e(7860).then(n.bind(n,357)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/services/rest-api.md",357],b3789834:[()=>n.e(5673).then(n.bind(n,1519)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/Quickstart/langchain.md",1519],b3f1b113:[()=>Promise.all([n.e(1869),n.e(2482)]).then(n.bind(n,3382)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/ETL.md",3382],b573c74d:[()=>n.e(6156).then(n.bind(n,1496)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/intro.md",1496],b8669da8:[()=>n.e(6729).then(n.bind(n,2923)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/setup/index.mdx",2923],ba1f7e78:[()=>Promise.all([n.e(1869),n.e(3068)]).then(n.bind(n,7374)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/quick_start.md",7374],c1c2681f:[()=>n.e(4175).then(n.bind(n,1939)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment.md",1939],c4107403:[()=>Promise.all([n.e(1869),n.e(1355)]).then(n.bind(n,687)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/Embeddings.md",687],d4390c4c:[()=>n.e(2471).then(n.bind(n,7187)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/Compressa LLM/compressa_llm_install/without_internet.md",7187],de3f9e93:[()=>Promise.all([n.e(1869),n.e(5615)]).then(n.bind(n,4685)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/LLM/index.md",4685],dee5e5ab:[()=>n.e(1383).then(n.bind(n,7066)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/docs/basic_modules/index.md",7066],e5938dfe:[()=>n.e(622).then(n.bind(n,8203)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_rag/index.md",8203],e90f86ee:[()=>n.e(95).then(n.bind(n,3784)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/services/index.md",3784],f0588ab5:[()=>n.e(3676).then(n.bind(n,1101)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/guides/langchain_advanced_chunking/index.md",1101],f0770c1f:[()=>n.e(613).then(n.bind(n,3612)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/index.md",3612],f0ad3fbb:[()=>Promise.all([n.e(1869),n.e(9292),n.e(2969)]).then(n.bind(n,3452)),"@theme/ApiDoc",3452],f5a7f0b4:[()=>n.e(7584).then(n.bind(n,8450)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements.md",8450],f8d89ccd:[()=>n.e(8956).then(n.bind(n,8256)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning.md",8256],f9590654:[()=>n.e(8755).then(n.bind(n,6874)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index.md",6874],fbf60db8:[()=>n.e(9245).then(n.bind(n,7976)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/mistral/index.md",7976],fdb793ca:[()=>n.e(3448).then(n.bind(n,9473)),"@site/i18n/ru/docusaurus-plugin-content-docs/current/onprem/LLM_On-Premises/finetuning/index.md",9473],ffa0f8b1:[()=>n.e(681).then(n.t.bind(n,2152,19)),"@generated/docusaurus-plugin-redoc/api/__plugin.json",2152]};var s=n(4848);function l(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,s.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,s.jsx)("p",{children:String(t)}),(0,s.jsx)("div",{children:(0,s.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,s.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var u=n(6921),c=n(3102);function d(e,t){if("*"===e)return a()({loading:l,loader:()=>n.e(2237).then(n.bind(n,2237)),modules:["@theme/NotFound"],webpack:()=>[2237],render(e,t){const n=e.default;return(0,s.jsx)(c.W,{value:{plugin:{name:"native",id:"default"}},children:(0,s.jsx)(n,{...t})})}});const r=o[`${e}-${t}`],d={},p=[],f=[],m=(0,u.A)(r);return Object.entries(m).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],p.push(r[1]),f.push(r[2]))})),a().Map({loading:l,loader:d,modules:p,webpack:()=>f,render(t,n){const a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const o=r.default;if(!o)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{o[e]=r[e]}));let i=a;const s=n.split(".");s.slice(0,-1).forEach((e=>{i=i[e]})),i[s[s.length-1]]=o}));const o=a.__comp;delete a.__comp;const i=a.__context;delete a.__context;const l=a.__props;return delete a.__props,(0,s.jsx)(c.W,{value:i,children:(0,s.jsx)(o,{...a,...l,...n})})}})}const p=[{path:"/api",component:d("/api","be8"),exact:!0},{path:"/",component:d("/","0cf"),routes:[{path:"/",component:d("/","1f6"),routes:[{path:"/",component:d("/","ef5"),routes:[{path:"/docs/api-reference/",component:d("/docs/api-reference/","eb9"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/api-reference/langchain",component:d("/docs/api-reference/langchain","161"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/api-reference/rest",component:d("/docs/api-reference/rest","d82"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/basic_modules/",component:d("/docs/basic_modules/","867"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/basic_modules/Embeddings",component:d("/docs/basic_modules/Embeddings","fa4"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/basic_modules/ETL",component:d("/docs/basic_modules/ETL","3b6"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/basic_modules/Fine-tuning",component:d("/docs/basic_modules/Fine-tuning","6a8"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/basic_modules/LLM/",component:d("/docs/basic_modules/LLM/","a2c"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/basic_modules/LLM/OpenAI",component:d("/docs/basic_modules/LLM/OpenAI","d61"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/basic_modules/Rerank",component:d("/docs/basic_modules/Rerank","24b"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/help",component:d("/docs/help","1af"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/insightstream_module/",component:d("/docs/insightstream_module/","9e9"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/insightstream_module/file_search",component:d("/docs/insightstream_module/file_search","9b4"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/insightstream_module/file_upload",component:d("/docs/insightstream_module/file_upload","e14"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/intro",component:d("/docs/intro","b8b"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/quick_start",component:d("/docs/quick_start","46d"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/Quickstart/",component:d("/docs/Quickstart/","748"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/Quickstart/langchain",component:d("/docs/Quickstart/langchain","796"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/Quickstart/openai",component:d("/docs/Quickstart/openai","867"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/Quickstart/REST_API",component:d("/docs/Quickstart/REST_API","c31"),exact:!0,sidebar:"docsSidebar"},{path:"/docs/rest.mdx",component:d("/docs/rest.mdx","23d"),exact:!0,sidebar:"docsSidebar"},{path:"/guides/langchain_advanced_chunking/",component:d("/guides/langchain_advanced_chunking/","684"),exact:!0,sidebar:"guidesSidebar"},{path:"/guides/langchain_basic_rerank/",component:d("/guides/langchain_basic_rerank/","1e2"),exact:!0,sidebar:"guidesSidebar"},{path:"/guides/langchain_basic_semantic_search/",component:d("/guides/langchain_basic_semantic_search/","d0f"),exact:!0,sidebar:"guidesSidebar"},{path:"/guides/langchain_rag/",component:d("/guides/langchain_rag/","354"),exact:!0,sidebar:"guidesSidebar"},{path:"/onprem/Compressa LLM/",component:d("/onprem/Compressa LLM/","ef6"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/Compressa LLM/compressa_llm_install/",component:d("/onprem/Compressa LLM/compressa_llm_install/","e61"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/Compressa LLM/compressa_llm_install/without_internet",component:d("/onprem/Compressa LLM/compressa_llm_install/without_internet","d69"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/Compressa LLM/compressa_llm_management/",component:d("/onprem/Compressa LLM/compressa_llm_management/","3e0"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/Compressa LLM/compressa_llm_management/mistral_7b",component:d("/onprem/Compressa LLM/compressa_llm_management/mistral_7b","f21"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/LLM_On-Premises/finetuning/",component:d("/onprem/LLM_On-Premises/finetuning/","242"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/LLM_On-Premises/inference/",component:d("/onprem/LLM_On-Premises/inference/","19c"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/LLM_On-Premises/mistral/",component:d("/onprem/LLM_On-Premises/mistral/","5ff"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/LLM_On-Premises/services/",component:d("/onprem/LLM_On-Premises/services/","e9f"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/LLM_On-Premises/services/rest-api",component:d("/onprem/LLM_On-Premises/services/rest-api","249"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/LLM_On-Premises/setup/",component:d("/onprem/LLM_On-Premises/setup/","a19"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/LLM_On-Premises/setup/internet-access",component:d("/onprem/LLM_On-Premises/setup/internet-access","d29"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/platform",component:d("/onprem/platform","b6f"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/RAG_On-Premises/insight-stream/",component:d("/onprem/RAG_On-Premises/insight-stream/","240"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/",component:d("/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/","da3"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation",component:d("/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation","e71"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/",component:d("/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/","12c"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning",component:d("/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning","5d3"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment",component:d("/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment","7ee"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation",component:d("/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation","cee"),exact:!0,sidebar:"onpremSidebar"},{path:"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements",component:d("/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements","18f"),exact:!0,sidebar:"onpremSidebar"},{path:"/",component:d("/","6d0"),exact:!0,sidebar:"docsSidebar"}]}]}]},{path:"*",component:d("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>o,x:()=>i});var r=n(6540),a=n(4848);const o=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,a.jsx)(o.Provider,{value:n,children:t})}},8536:(e,t,n)=>{"use strict";var r=n(6540),a=n(5338),o=n(4625),i=n(545),s=n(8193);const l=[n(119),n(6134),n(6294),n(1043),n(7767),n(3390)];var u=n(8328),c=n(6347),d=n(2831),p=n(4848);function f(e){let{children:t}=e;return(0,p.jsx)(p.Fragment,{children:t})}var m=n(5260),g=n(4586),h=n(6025),y=n(6342),b=n(1003),v=n(2131),w=n(4090),k=n(2967),x=n(440),_=n(1463);function S(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,g.A)(),r=(0,v.o)(),a=n[e].htmlLang,o=e=>e.replace("-","_");return(0,p.jsxs)(m.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,p.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,p.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,p.jsx)("meta",{property:"og:locale",content:o(a)}),Object.values(n).filter((e=>a!==e.htmlLang)).map((e=>(0,p.jsx)("meta",{property:"og:locale:alternate",content:o(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function C(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,g.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,g.A)(),{pathname:r}=(0,c.zy)();return e+(0,x.applyTrailingSlash)((0,h.A)(r),{trailingSlash:n,baseUrl:t})}(),a=t?`${n}${t}`:r;return(0,p.jsxs)(m.A,{children:[(0,p.jsx)("meta",{property:"og:url",content:a}),(0,p.jsx)("link",{rel:"canonical",href:a})]})}function E(){const{i18n:{currentLocale:e}}=(0,g.A)(),{metadata:t,image:n}=(0,y.p)();return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.A,{children:[(0,p.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,p.jsx)("body",{className:w.w})]}),n&&(0,p.jsx)(b.be,{image:n}),(0,p.jsx)(C,{}),(0,p.jsx)(S,{}),(0,p.jsx)(_.A,{tag:k.Cy,locale:e}),(0,p.jsx)(m.A,{children:t.map(((e,t)=>(0,p.jsx)("meta",{...e},t)))})]})}const T=new Map;var L=n(6125),A=n(6988),P=n(205);function O(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r {const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>a.forEach((e=>e?.()))}const j=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,P.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,a=t.hash===n.hash,o=t.search===n.search;if(r&&a&&!o)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),O("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function N(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.u)(u.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class R extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=s.default.canUseDOM?O("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=O("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),N(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,p.jsx)(j,{previousLocation:this.previousLocation,location:t,children:(0,p.jsx)(c.qh,{location:t,render:()=>e})})}}const M=R,I="__docusaurus-base-url-issue-banner-container",F="__docusaurus-base-url-issue-banner",D="__docusaurus-base-url-issue-banner-suggestion-container";function z(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '${I}';\n var bannerHtml = ${JSON.stringify(function(e){return`\n \n\n`}(e)).replace(/{let{route:t}=e;return!0===t.exact})))return T.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return T.set(e.pathname,t),{...e,pathname:t}}((0,c.zy)());return(0,p.jsx)(M,{location:e,children:W})}function Q(){return(0,p.jsx)(q.A,{children:(0,p.jsx)(A.l,{children:(0,p.jsxs)(L.x,{children:[(0,p.jsxs)(f,{children:[(0,p.jsx)(U,{}),(0,p.jsx)(E,{}),(0,p.jsx)($,{}),(0,p.jsx)(G,{})]}),(0,p.jsx)(V,{})]})})})}var K=n(4054);const Y=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const a=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;a?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Z=n(6921);const X=new Set,J=new Set,ee=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,te={prefetch:e=>{if(!(e=>!ee()&&!J.has(e)&&!X.has(e))(e))return!1;X.add(e);const t=(0,d.u)(u.A,e).flatMap((e=>{return t=e.route.path,Object.entries(K).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Z.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Y(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!ee()&&!J.has(e))(e)&&(J.add(e),N(e))},ne=Object.freeze(te),re=Boolean(!0);if(s.default.canUseDOM){window.docusaurus=ne;const e=document.getElementById("__docusaurus"),t=(0,p.jsx)(i.vd,{children:(0,p.jsx)(o.Kd,{children:(0,p.jsx)(Q,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},s=()=>{if(window.docusaurusRoot)window.docusaurusRoot.render(t);else if(re)window.docusaurusRoot=a.hydrateRoot(e,t,{onRecoverableError:n});else{const r=a.createRoot(e,{onRecoverableError:n});r.render(t),window.docusaurusRoot=r}};N(window.location.pathname).then((()=>{(0,r.startTransition)(s)}))}},6988:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>p});var r=n(6540),a=n(4784);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/","versions":[{"name":"current","label":"Next","isLast":true,"path":"/","mainDocId":"docs/index","docs":[{"id":"docs/api-reference/index","path":"/docs/api-reference/","sidebar":"docsSidebar"},{"id":"docs/api-reference/langchain","path":"/docs/api-reference/langchain","sidebar":"docsSidebar"},{"id":"docs/api-reference/rest","path":"/docs/api-reference/rest","sidebar":"docsSidebar"},{"id":"docs/basic_modules/Embeddings","path":"/docs/basic_modules/Embeddings","sidebar":"docsSidebar"},{"id":"docs/basic_modules/ETL","path":"/docs/basic_modules/ETL","sidebar":"docsSidebar"},{"id":"docs/basic_modules/Fine-tuning","path":"/docs/basic_modules/Fine-tuning","sidebar":"docsSidebar"},{"id":"docs/basic_modules/index","path":"/docs/basic_modules/","sidebar":"docsSidebar"},{"id":"docs/basic_modules/LLM/index","path":"/docs/basic_modules/LLM/","sidebar":"docsSidebar"},{"id":"docs/basic_modules/LLM/OpenAI","path":"/docs/basic_modules/LLM/OpenAI","sidebar":"docsSidebar"},{"id":"docs/basic_modules/Rerank","path":"/docs/basic_modules/Rerank","sidebar":"docsSidebar"},{"id":"docs/help","path":"/docs/help","sidebar":"docsSidebar"},{"id":"docs/index","path":"/","sidebar":"docsSidebar"},{"id":"docs/insightstream_module/file_search","path":"/docs/insightstream_module/file_search","sidebar":"docsSidebar"},{"id":"docs/insightstream_module/file_upload","path":"/docs/insightstream_module/file_upload","sidebar":"docsSidebar"},{"id":"docs/insightstream_module/index","path":"/docs/insightstream_module/","sidebar":"docsSidebar"},{"id":"docs/intro","path":"/docs/intro","sidebar":"docsSidebar"},{"id":"docs/quick_start","path":"/docs/quick_start","sidebar":"docsSidebar"},{"id":"docs/Quickstart/index","path":"/docs/Quickstart/","sidebar":"docsSidebar"},{"id":"docs/Quickstart/langchain","path":"/docs/Quickstart/langchain","sidebar":"docsSidebar"},{"id":"docs/Quickstart/openai","path":"/docs/Quickstart/openai","sidebar":"docsSidebar"},{"id":"docs/Quickstart/REST_API","path":"/docs/Quickstart/REST_API","sidebar":"docsSidebar"},{"id":"docs/rest.mdx","path":"/docs/rest.mdx","sidebar":"docsSidebar"},{"id":"guides/langchain_advanced_chunking/index","path":"/guides/langchain_advanced_chunking/","sidebar":"guidesSidebar"},{"id":"guides/langchain_basic_rerank/index","path":"/guides/langchain_basic_rerank/","sidebar":"guidesSidebar"},{"id":"guides/langchain_basic_semantic_search/index","path":"/guides/langchain_basic_semantic_search/","sidebar":"guidesSidebar"},{"id":"guides/langchain_rag/index","path":"/guides/langchain_rag/","sidebar":"guidesSidebar"},{"id":"onprem/Compressa LLM/compressa_llm_install/index","path":"/onprem/Compressa LLM/compressa_llm_install/","sidebar":"onpremSidebar"},{"id":"onprem/Compressa LLM/compressa_llm_install/without_internet","path":"/onprem/Compressa LLM/compressa_llm_install/without_internet","sidebar":"onpremSidebar"},{"id":"onprem/Compressa LLM/compressa_llm_management/index","path":"/onprem/Compressa LLM/compressa_llm_management/","sidebar":"onpremSidebar"},{"id":"onprem/Compressa LLM/compressa_llm_management/mistral_7b","path":"/onprem/Compressa LLM/compressa_llm_management/mistral_7b","sidebar":"onpremSidebar"},{"id":"onprem/Compressa LLM/index","path":"/onprem/Compressa LLM/","sidebar":"onpremSidebar"},{"id":"onprem/LLM_On-Premises/finetuning/index","path":"/onprem/LLM_On-Premises/finetuning/","sidebar":"onpremSidebar"},{"id":"onprem/LLM_On-Premises/inference/index","path":"/onprem/LLM_On-Premises/inference/","sidebar":"onpremSidebar"},{"id":"onprem/LLM_On-Premises/mistral/index","path":"/onprem/LLM_On-Premises/mistral/","sidebar":"onpremSidebar"},{"id":"onprem/LLM_On-Premises/services/index","path":"/onprem/LLM_On-Premises/services/","sidebar":"onpremSidebar"},{"id":"onprem/LLM_On-Premises/services/rest-api","path":"/onprem/LLM_On-Premises/services/rest-api","sidebar":"onpremSidebar"},{"id":"onprem/LLM_On-Premises/setup/index","path":"/onprem/LLM_On-Premises/setup/","sidebar":"onpremSidebar"},{"id":"onprem/LLM_On-Premises/setup/internet-access","path":"/onprem/LLM_On-Premises/setup/internet-access","sidebar":"onpremSidebar"},{"id":"onprem/platform","path":"/onprem/platform","sidebar":"onpremSidebar"},{"id":"onprem/RAG_On-Premises/insight-stream/index","path":"/onprem/RAG_On-Premises/insight-stream/","sidebar":"onpremSidebar"},{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/index","path":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/","sidebar":"onpremSidebar"},{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation","path":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/Insightstream_installation","sidebar":"onpremSidebar"},{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning","path":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/fine_tuning","sidebar":"onpremSidebar"},{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/index","path":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/","sidebar":"onpremSidebar"},{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment","path":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/LLM_management/model_deployment","sidebar":"onpremSidebar"},{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation","path":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/platform_installation","sidebar":"onpremSidebar"},{"id":"onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements","path":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/server_requirements","sidebar":"onpremSidebar"}],"draftIds":[],"sidebars":{"docsSidebar":{"link":{"path":"/","label":"docs/index"}},"guidesSidebar":{"link":{"path":"/guides/langchain_rag/","label":"\u0411\u0430\u0437\u043e\u0432\u044b\u0439 RAG \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442"}},"onpremSidebar":{"link":{"path":"/onprem/\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa/","label":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 Compressa"}}}}],"breadcrumbs":true}},"docusaurus-plugin-redoc":{"api":{"url":"redocusaurus/api.yaml","themeId":"theme-redoc","isSpecFile":true,"spec":{"openapi":"3.1.0","info":{"version":"1.0.0","title":"Compressa API"},"servers":[{"url":"https://compressa-api.mil-team.ru","description":"Compressa API Server"}],"tags":[{"name":"chat","description":"Compressa Chat API is OpenAI compatible API that allows you to create chat completions.\\n","x-displayName":"Chat API"},{"name":"embeddings","description":"Compressa Embeddings API is OpenAI compatible API that allows you to create embeddings.\\n","x-displayName":"Text Embeddings API"},{"name":"rerank","description":"Compressa Rerank API allows you to rerank documents based on a query.\\n","x-displayName":"Rerank API"},{"name":"layout","description":"Compressa Layout API allows you to partion documents.\\n","x-displayName":"Layout API"}],"paths":{"/v1/chat/completions":{"post":{"tags":["chat"],"summary":"Create Chat Completion","operationId":"create_chat_completion_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/chat/completions\\",\\n headers={\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"messages\\": [\\n {\\n \\"role\\": \\"system\\",\\n \\"content\\": \\"You are an expert in soccer\\"\\n },\\n {\\n \\"role\\": \\"user\\",\\n \\"content\\": \\"Who won the world series in 2020?\\"\\n }\\n ],\\n \\"max_tokens\\": 128,\\n \\"temperature\\": 0.5,\\n \\"stream\\": False\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X \'POST\' \\\\\\n \'https://compressa-api.mil-team.ru/v1/chat/completions\' \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \'accept: application/json\' \\\\\\n -H \'Content-Type: application/json\' \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"messages\\": [\\n {\\n \\"role\\": \\"system\\",\\n \\"content\\": \\"You are expert in soccer\\"\\n },\\n {\\n \\"role\\": \\"user\\",\\n \\"content\\": \\"Who won the world series in 2020?\\"\\n }\\n ],\\n \\"max_tokens\\": 128,\\n \\"temperature\\": 0.5,\\n \\"stream\\": false\\n}\'\\n"}]}},"/v1/completions":{"post":{"tags":["chat"],"summary":"Create Completion","operationId":"create_completion_v1_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/completions\\",\\n headers={\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"prompt\\": \\"Who won the world series in 2020?\\"\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X \'POST\' \\\\\\n \'https://compressa-api.mil-team.ru/v1/completions\' \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \'accept: application/json\' \\\\\\n -H \'Content-Type: application/json\' \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-LLM\\",\\n \\"prompt\\": \\"Who won the world series in 2020?\\"\\n }\'\\n"}]}},"/v1/embeddings":{"post":{"tags":["embeddings"],"summary":"Create Embedding","operationId":"create_embedding_v1_embeddings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/embeddings\\",\\n headers={\\n \\"accept\\": \\"application/json\\",\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-Embedding\\",\\n \\"input\\": \\"string\\"\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X \'POST\' \\\\\\n \'https://compressa-api.mil-team.ru/v1/embeddings\' \\\\\\n -H \'accept: application/json\' \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \'Content-Type: application/json\' \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-Embedding\\",\\n \\"input\\": \\"string\\"\\n }\'\\n"}]}},"/v1/models":{"get":{"tags":["chat"],"summary":"Show Available Models","operationId":"show_available_models_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.get(\\"http://example.com/v1/models\\")\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X GET \\"http://example.com/v1/models\\"\\n"}]}},"/v1/rerank":{"post":{"tags":["rerank"],"summary":" Rerank","description":"","operationId":"rerank","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReRankResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nresponse = requests.post(\\n url=\\"https://compressa-api.mil-team.ru/v1/rerank\\",\\n headers={\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n \\"Content-Type\\": \\"application/json\\"\\n },\\n json={\\n \\"model\\": \\"Compressa-ReRank\\",\\n \\"query\\": \\"Query?\\",\\n \\"documents\\": [\\n \\"document 1\\",\\n \\"document 2\\",\\n \\"document 3\\"\\n ],\\n \\"return_documents\\": False\\n }\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X POST \\\\\\n \\"https://compressa-api.mil-team.ru/v1/rerank\\" \\\\\\n -H \'Authorization: Bearer TOKEN\' \\\\\\n -H \\"accept: application/json\\" \\\\\\n -H \\"Content-Type: application/json\\" \\\\\\n -d \'{\\n \\"model\\": \\"Compressa-ReRank\\",\\n \\"query\\": \\"Query?\\",\\n \\"documents\\": [\\n \\"document 1\\",\\n \\"document 2\\",\\n \\"document 3\\"\\n ],\\n \\"return_documents\\": false\\n }\'\\n"}]}},"/v1/layout":{"post":{"tags":["layout"],"summary":"Summary","description":"Description","operationId":"partition_parameters","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_partition_parameters"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Element"},"title":"Response Partition Parameters","type":"array"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-speakeasy-name-override":"partition","x-codeSamples":[{"lang":"Python","label":"Python","source":"import requests\\n\\nurl = \\"https://compressa-api.mil-team.ru/v1/layout\\"\\nheaders = {\\n \\"Authorization\\": \\"Bearer TOKEN\\",\\n \\"accept\\": \\"application/json\\",\\n}\\n\\nfiles = {\\"files\\": open(\\"path/to/file.pdf\\", \\"rb\\")}\\ndata = {\\n \\"xml_keep_tags\\": \\"false\\",\\n \\"output_format\\": \\"application/json\\",\\n \\"coordinates\\": \\"true\\",\\n \\"strategy\\": \\"auto\\",\\n \\"languages\\": [\\"rus\\", \\"eng\\"]\\n}\\n\\nresponse = requests.post(\\n url,\\n headers=headers,\\n files=files,\\n data=data\\n)\\n\\nprint(response.json())\\n"},{"lang":"curl","label":"cURL","source":"curl -X POST \\"https://compressa-api.mil-team.ru/v1/layout\\" \\\\\\n -H \\"Authorization: Bearer TOKEN\\" \\\\\\n -H \\"accept: application/json\\" \\\\\\n -F \\"files=@path/to/file.pdf\\" \\\\\\n -F \\"xml_keep_tags=false\\" \\\\\\n -F \\"output_format=application/json\\" \\\\\\n -F \\"coordinates=true\\" \\\\\\n -F \\"strategy=auto\\" \\\\\\n -F \\"languages[]=rus\\" \\\\\\n -F \\"languages[]=eng\\"\\n"}]}}},"components":{"schemas":{"BaseModel":{"properties":{},"type":"object","title":"BaseModel"},"ChatCompletionAssistantMessageParam":{"properties":{"role":{"type":"string","enum":["assistant"],"const":"assistant","title":"Role"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"function_call":{"anyOf":[{"$ref":"#/components/schemas/FunctionCall"},{"type":"null"}]},"name":{"type":"string","title":"Name"},"tool_calls":{"items":{"$ref":"#/components/schemas/ChatCompletionMessageToolCallParam"},"type":"array","title":"Tool Calls"}},"type":"object","required":["role"],"title":"ChatCompletionAssistantMessageParam"},"ChatCompletionContentPartImageParam":{"properties":{"image_url":{"$ref":"#/components/schemas/ImageURL"},"type":{"type":"string","enum":["image_url"],"const":"image_url","title":"Type"}},"type":"object","required":["image_url","type"],"title":"ChatCompletionContentPartImageParam"},"ChatCompletionContentPartTextParam":{"properties":{"text":{"type":"string","title":"Text"},"type":{"type":"string","enum":["text"],"const":"text","title":"Type"}},"type":"object","required":["text","type"],"title":"ChatCompletionContentPartTextParam"},"ChatCompletionFunctionMessageParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"name":{"type":"string","title":"Name"},"role":{"type":"string","enum":["function"],"const":"function","title":"Role"}},"type":"object","required":["content","name","role"],"title":"ChatCompletionFunctionMessageParam"},"ChatCompletionMessageToolCallParam":{"properties":{"id":{"type":"string","title":"Id"},"function":{"$ref":"#/components/schemas/Function"},"type":{"type":"string","enum":["function"],"const":"function","title":"Type"}},"type":"object","required":["id","function","type"],"title":"ChatCompletionMessageToolCallParam"},"ChatCompletionNamedFunction":{"properties":{"name":{"type":"string","title":"Name"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ChatCompletionNamedFunction"},"ChatCompletionNamedToolChoiceParam":{"properties":{"function":{"$ref":"#/components/schemas/ChatCompletionNamedFunction"},"type":{"type":"string","enum":["function"],"const":"function","title":"Type","default":"function"}},"additionalProperties":false,"type":"object","required":["function"],"title":"ChatCompletionNamedToolChoiceParam"},"ChatCompletionRequest":{"properties":{"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionSystemMessageParam"},{"$ref":"#/components/schemas/ChatCompletionUserMessageParam"},{"$ref":"#/components/schemas/ChatCompletionAssistantMessageParam"},{"$ref":"#/components/schemas/ChatCompletionToolMessageParam"},{"$ref":"#/components/schemas/ChatCompletionFunctionMessageParam"},{"$ref":"#/components/schemas/CustomChatCompletionMessageParam"}]},"type":"array","title":"Messages"},"model":{"type":"string","title":"Model"},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","default":0},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias"},"logprobs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Logprobs","default":false},"top_logprobs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top Logprobs","default":0},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N","default":1},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","default":0},"response_format":{"anyOf":[{"$ref":"#/components/schemas/ResponseFormat"},{"type":"null"}]},"seed":{"anyOf":[{"type":"integer","maximum":9223372036854776000,"minimum":-9223372036854776000},{"type":"null"}],"title":"Seed"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","default":false},"stream_options":{"anyOf":[{"$ref":"#/components/schemas/StreamOptions"},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","default":0.7},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","default":1},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatCompletionToolsParam"},"type":"array"},{"type":"null"}],"title":"Tools"},"tool_choice":{"anyOf":[{"type":"string","enum":["none"],"const":"none"},{"$ref":"#/components/schemas/ChatCompletionNamedToolChoiceParam"},{"type":"null"}],"title":"Tool Choice","default":"none"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"best_of":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Of"},"use_beam_search":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Beam Search","default":false},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K","default":-1},"min_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min P","default":0},"repetition_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Repetition Penalty","default":1},"length_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Penalty","default":1},"early_stopping":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Early Stopping","default":false},"ignore_eos":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ignore Eos","default":false},"min_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Tokens","default":0},"stop_token_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Stop Token Ids"},"skip_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Special Tokens","default":true},"spaces_between_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Spaces Between Special Tokens","default":true},"echo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Echo","description":"If true, the new message will be prepended with the last message if they belong to the same role.","default":false},"add_generation_prompt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add Generation Prompt","description":"If true, the generation prompt will be added to the chat template. This is a parameter used by chat template in tokenizer config of the model.","default":true},"add_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add Special Tokens","description":"If true, special tokens (e.g. BOS) will be added to the prompt on top of what is added by the chat template. For most models, the chat template takes care of adding the special tokens so this should be set to False (as is the default).","default":false},"include_stop_str_in_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Stop Str In Output","description":"Whether to include the stop string in the output. This is only applied when the stop or stop_token_ids is set.","default":false},"guided_json":{"anyOf":[{"type":"string"},{"type":"object"},{"$ref":"#/components/schemas/BaseModel"},{"type":"null"}],"title":"Guided Json","description":"If specified, the output will follow the JSON schema."},"guided_regex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Regex","description":"If specified, the output will follow the regex pattern."},"guided_choice":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Guided Choice","description":"If specified, the output will be exactly one of the choices."},"guided_grammar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Grammar","description":"If specified, the output will follow the context free grammar."},"guided_decoding_backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Decoding Backend","description":"If specified, will override the default guided decoding backend of the server for this specific request. If set, must be either \'outlines\' / \'lm-format-enforcer\'"},"guided_whitespace_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Whitespace Pattern","description":"If specified, will override the default whitespace pattern for guided json decoding."},"enforced_str":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enforced Str"}},"additionalProperties":false,"type":"object","required":["messages","model"],"title":"ChatCompletionRequest"},"ChatCompletionSystemMessageParam":{"properties":{"content":{"type":"string","title":"Content"},"role":{"type":"string","enum":["system"],"const":"system","title":"Role"},"name":{"type":"string","title":"Name"}},"type":"object","required":["content","role"],"title":"ChatCompletionSystemMessageParam"},"ChatCompletionToolMessageParam":{"properties":{"content":{"type":"string","title":"Content"},"role":{"type":"string","enum":["tool"],"const":"tool","title":"Role"},"tool_call_id":{"type":"string","title":"Tool Call Id"}},"type":"object","required":["content","role","tool_call_id"],"title":"ChatCompletionToolMessageParam"},"ChatCompletionToolsParam":{"properties":{"type":{"type":"string","enum":["function"],"const":"function","title":"Type","default":"function"},"function":{"$ref":"#/components/schemas/FunctionDefinition"}},"additionalProperties":false,"type":"object","required":["function"],"title":"ChatCompletionToolsParam"},"ChatCompletionUserMessageParam":{"properties":{"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},{"$ref":"#/components/schemas/ChatCompletionContentPartImageParam"},{"$ref":"#/components/schemas/CustomChatCompletionContentPartParam"}]},"type":"array"}],"title":"Content"},"role":{"type":"string","enum":["user"],"const":"user","title":"Role"},"name":{"type":"string","title":"Name"}},"type":"object","required":["content","role"],"title":"ChatCompletionUserMessageParam"},"CompletionRequest":{"properties":{"model":{"type":"string","title":"Model"},"prompt":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Prompt"},"best_of":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Of"},"echo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Echo","default":false},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","default":0},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias"},"logprobs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Logprobs"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens","default":16},"n":{"type":"integer","title":"N","default":1},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","default":0},"seed":{"anyOf":[{"type":"integer","maximum":9223372036854776000,"minimum":-9223372036854776000},{"type":"null"}],"title":"Seed"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","default":false},"stream_options":{"anyOf":[{"$ref":"#/components/schemas/StreamOptions"},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suffix"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","default":1},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","default":1},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"use_beam_search":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Beam Search","default":false},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K","default":-1},"min_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min P","default":0},"repetition_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Repetition Penalty","default":1},"length_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length Penalty","default":1},"early_stopping":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Early Stopping","default":false},"stop_token_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Stop Token Ids"},"ignore_eos":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ignore Eos","default":false},"min_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Tokens","default":0},"skip_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Special Tokens","default":true},"spaces_between_special_tokens":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Spaces Between Special Tokens","default":true},"truncate_prompt_tokens":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Truncate Prompt Tokens"},"include_stop_str_in_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Stop Str In Output","description":"Whether to include the stop string in the output. This is only applied when the stop or stop_token_ids is set.","default":false},"response_format":{"anyOf":[{"$ref":"#/components/schemas/ResponseFormat"},{"type":"null"}],"description":"Similar to chat completion, this parameter specifies the format of output. Only {\'type\': \'json_object\'} or {\'type\': \'text\' } is supported."},"guided_json":{"anyOf":[{"type":"string"},{"type":"object"},{"$ref":"#/components/schemas/BaseModel"},{"type":"null"}],"title":"Guided Json","description":"If specified, the output will follow the JSON schema."},"guided_regex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Regex","description":"If specified, the output will follow the regex pattern."},"guided_choice":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Guided Choice","description":"If specified, the output will be exactly one of the choices."},"guided_grammar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Grammar","description":"If specified, the output will follow the context free grammar."},"guided_decoding_backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Decoding Backend","description":"If specified, will override the default guided decoding backend of the server for this specific request. If set, must be one of \'outlines\' / \'lm-format-enforcer\'"},"guided_whitespace_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guided Whitespace Pattern","description":"If specified, will override the default whitespace pattern for guided json decoding."}},"additionalProperties":false,"type":"object","required":["model","prompt"],"title":"CompletionRequest"},"CustomChatCompletionContentPartParam":{"properties":{"type":{"type":"string","title":"Type"}},"additionalProperties":true,"type":"object","required":["type"],"title":"CustomChatCompletionContentPartParam"},"CustomChatCompletionMessageParam":{"properties":{"role":{"type":"string","title":"Role"},"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionContentPartTextParam"},{"$ref":"#/components/schemas/ChatCompletionContentPartImageParam"},{"$ref":"#/components/schemas/CustomChatCompletionContentPartParam"}]},"type":"array"}],"title":"Content"},"name":{"type":"string","title":"Name"}},"type":"object","required":["role"],"title":"CustomChatCompletionMessageParam","description":"Enables custom roles in the Chat Completion API."},"DetokenizeRequest":{"properties":{"model":{"type":"string","title":"Model"},"tokens":{"items":{"type":"integer"},"type":"array","title":"Tokens"}},"additionalProperties":false,"type":"object","required":["model","tokens"],"title":"DetokenizeRequest"},"EmbeddingRequest":{"properties":{"model":{"type":"string","title":"Model"},"input":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"},{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Input"},"encoding_format":{"anyOf":[{"type":"string","pattern":"^(float|base64)$"},{"type":"null"}],"title":"Encoding Format","default":"float"},"dimensions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dimensions"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"additional_data":{"anyOf":[{},{"type":"null"}],"title":"Additional Data"}},"type":"object","required":["model","input"],"title":"EmbeddingRequest"},"Function":{"properties":{"arguments":{"type":"string","title":"Arguments"},"name":{"type":"string","title":"Name"}},"type":"object","required":["arguments","name"],"title":"Function"},"FunctionCall":{"properties":{"arguments":{"type":"string","title":"Arguments"},"name":{"type":"string","title":"Name"}},"type":"object","required":["arguments","name"],"title":"FunctionCall"},"FunctionDefinition":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parameters":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Parameters"}},"additionalProperties":false,"type":"object","required":["name"],"title":"FunctionDefinition"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageURL":{"properties":{"url":{"type":"string","title":"Url"},"detail":{"type":"string","enum":["auto","low","high"],"title":"Detail"}},"type":"object","required":["url"],"title":"ImageURL"},"ResponseFormat":{"properties":{"type":{"type":"string","enum":["text","json_object"],"title":"Type"}},"additionalProperties":false,"type":"object","required":["type"],"title":"ResponseFormat"},"StreamOptions":{"properties":{"include_usage":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Usage"}},"additionalProperties":false,"type":"object","required":["include_usage"],"title":"StreamOptions"},"TokenizeRequest":{"properties":{"model":{"type":"string","title":"Model"},"prompt":{"type":"string","title":"Prompt"},"add_special_tokens":{"type":"boolean","title":"Add Special Tokens","default":true}},"additionalProperties":false,"type":"object","required":["model","prompt"],"title":"TokenizeRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"RerankInput":{"title":"RerankInput","required":["documents","query"],"properties":{"query":{"title":"Query","maxLength":122880},"documents":{"title":"Documents","maxItems":2048,"minItems":1,"items":{"maxLength":122880}},"return_documents":{"title":"Return Documents","default":false},"model":{"title":"Model","default":"default/not-specified"}}},"ReRankResult":{"title":"ReRankResult","required":["model","results","usage"],"properties":{"object":{"title":"Object","enum":["rerank"],"default":"rerank"},"results":{"title":"Results","items":{"$ref":"#/components/schemas/_ReRankObject"}},"model":{"title":"Model"},"usage":{"$ref":"#/components/schemas/_Usage"},"id":{"title":"Id"},"created":{"title":"Created"}}},"_Usage":{"title":"_Usage","required":["prompt_tokens","total_tokens"],"properties":{"prompt_tokens":{"title":"Prompt Tokens"},"total_tokens":{"title":"Total Tokens"}}},"_ReRankObject":{"title":"_ReRankObject","required":["index","relevance_score"],"properties":{"relevance_score":{"title":"Relevance Score"},"index":{"title":"Index"},"document":{"title":"Document","anyOf":[{},{}]}}},"Body_partition_parameters":{"properties":{"files":{"type":"string","format":"binary","description":"The file to extract","required":"true","examples":[{"summary":"File to be partitioned","externalValue":"https://github.com/Unstructured-IO/unstructured/blob/98d3541909f64290b5efb65a226fc3ee8a7cc5ee/example-docs/layout-parser-paper.pdf"}]},"xml_keep_tags":{"type":"boolean","title":"Xml Keep Tags","description":"If True, will retain the XML tags in the output. Otherwise it will simply extract the text from within the tags. Only applies to partition_xml.","default":false},"languages":{"items":{"type":"string"},"type":"array","title":"OCR Languages","description":"The languages present in the document, for use in partitioning and/or OCR","default":[]},"ocr_languages":{"items":{"type":"string"},"type":"array","title":"OCR Languages","description":"The languages present in the document, for use in partitioning and/or OCR","default":[]},"skip_infer_table_types":{"items":{"type":"string"},"type":"array","title":"Skip Infer Table Types","description":"The document types that you want to skip table extraction with. Default: []","default":[]},"gz_uncompressed_content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uncompressed Content Type","description":"If file is gzipped, use this content type after unzipping"},"output_format":{"type":"string","enum":["application/json","text/csv"],"title":"Output Format","description":"The format of the response. Supported formats are application/json and text/csv. Default: application/json.","default":"application/json"},"coordinates":{"type":"boolean","title":"Coordinates","description":"If true, return coordinates for each element. Default: false","default":false},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content type","description":"A hint about the content type to use (such as text/markdown), when there are problems processing a specific file. This value is a MIME type in the format type/subtype."},"encoding":{"type":"string","title":"Encoding","description":"The encoding method used to decode the text input. Default: utf-8","default":"utf-8"},"hi_res_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hi Res Model Name","description":"The name of the inference model used when strategy is hi_res"},"include_page_breaks":{"type":"boolean","title":"Include Page Breaks","description":"If True, the output will include page breaks if the filetype supports it. Default: false","default":false},"pdf_infer_table_structure":{"type":"boolean","title":"Pdf Infer Table Structure","description":"Deprecated! Use skip_infer_table_types to opt out of table extraction for any file type. If False and strategy=hi_res, no Table Elements will be extracted from pdf files regardless of skip_infer_table_types contents.","default":true},"strategy":{"type":"string","enum":["fast","hi_res","auto","ocr_only"],"title":"Strategy","description":"The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto. Default: auto","default":"auto","examples":["auto","hi_res"]},"extract_image_block_types":{"items":{"type":"string"},"type":"array","title":"Image block types to extract","description":"The types of elements to extract, for use in extracting image blocks as base64 encoded data stored in metadata fields","default":[]},"unique_element_ids":{"type":"boolean","title":"unique_element_ids","description":"When `True`, assign UUIDs to element IDs, which guarantees their uniqueness \\n(useful when using them as primary keys in database). Otherwise a SHA-256 of element text is used. Default: False","default":false},"chunking_strategy":{"anyOf":[{"type":"string","enum":["by_title"],"const":"by_title"},{"type":"null"}],"title":"Chunking Strategy","description":"Use one of the supported strategies to chunk the returned elements. Currently supports: by_title","examples":["by_title"]},"combine_under_n_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Combine Under N Chars","description":"If chunking strategy is set, combine elements until a section reaches a length of n chars. Default: 500"},"max_characters":{"type":"integer","title":"Max Characters","description":"If chunking strategy is set, cut off new sections after reaching a length of n chars (hard max). Default: 1500","default":500},"multipage_sections":{"type":"boolean","title":"Multipage Sections","description":"If chunking strategy is set, determines if sections can span multiple sections. Default: true","default":true},"new_after_n_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"New after n chars","description":"If chunking strategy is set, cut off new sections after reaching a length of n chars (soft max). Default: 1500"},"overlap":{"type":"integer","title":"Overlap","description":"Specifies the length of a string (\\"tail\\") to be drawn from each chunk and prefixed to the\\nnext chunk as a context-preserving mechanism. By default, this only applies to split-chunks\\nwhere an oversized element is divided into multiple chunks by text-splitting. Default: 0","default":0},"overlap_all":{"type":"boolean","title":"Overlap all","description":"When `True`, apply overlap between \\"normal\\" chunks formed from whole\\nelements and not subject to text-splitting. Use this with caution as it entails a certain\\nlevel of \\"pollution\\" of otherwise clean semantic chunk boundaries. Default: False","default":false},"starting_page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"PDF Starting Page Number","description":"When PDF is split into pages before sending it into the API, providing this information will allow the page number to be assigned correctly."}},"type":"object","required":["files"],"title":"Body_partition_parameters"},"Element":{"properties":{"type":{"type":"string","title":"Type"},"element_id":{"type":"string","title":"Element Id"},"metadata":{"type":"object","title":"Metadata"},"text":{"type":"string","title":"Text"}},"type":"object","required":["type","element_id","metadata","text"],"title":"Element"}}}}}},"docusaurus-theme-redoc":{"theme-redoc":{"lightTheme":{"typography":{"fontFamily":"var(--ifm-font-family-base)","fontSize":"var(--ifm-font-size-base)","lineHeight":"var(--ifm-line-height-base)","fontWeightLight":"var(--ifm-font-weight-light)","fontWeightRegular":"var(--ifm-font-weight-base)","fontWeightBold":"var(--ifm-font-weight-bold)","headings":{"fontFamily":"var(--ifm-heading-font-family)","fontWeight":"var(--ifm-heading-font-weight)","lineHeight":"var(--ifm-heading-line-height)"},"code":{"fontFamily":"var(--ifm-font-family-monospace)","lineHeight":"var(--ifm-pre-line-height)"}},"sidebar":{"width":"300px","backgroundColor":"#ffffff"},"rightPanel":{"backgroundColor":"#303846"},"colors":{"primary":{"main":"#4786FF"}},"theme":{"prism":{"additionalLanguages":["scala"]}}},"darkTheme":{"typography":{"fontFamily":"var(--ifm-font-family-base)","fontSize":"var(--ifm-font-size-base)","lineHeight":"var(--ifm-line-height-base)","fontWeightLight":"var(--ifm-font-weight-light)","fontWeightRegular":"var(--ifm-font-weight-base)","fontWeightBold":"var(--ifm-font-weight-bold)","headings":{"fontFamily":"var(--ifm-heading-font-family)","fontWeight":"var(--ifm-heading-font-weight)","lineHeight":"var(--ifm-heading-line-height)"},"code":{"fontFamily":"var(--ifm-font-family-monospace)","lineHeight":"var(--ifm-pre-line-height)"}},"sidebar":{"width":"300px","backgroundColor":"rgb(24, 25, 26)","textColor":"#f5f6f7","arrow":{"color":"#f5f6f7"}},"colors":{"text":{"primary":"#f5f6f7","secondary":"rgba(255, 255, 255, 1)"},"gray":{"50":"#FAFAFA","100":"#F5F5F5"},"border":{"dark":"#ffffff","light":"rgba(0,0,0, 0.1)"},"primary":{"main":"#4786FF"}},"schema":{"nestedBackground":"rgb(24, 25, 26)","typeNameColor":"rgba(255, 255, 255, 1)","typeTitleColor":"rgba(255, 255, 255, 1)"},"theme":{"prism":{"additionalLanguages":["scala"]}}},"options":{"scrollYOffset":"nav.navbar","expandSingleSchemaField":true,"menuToggle":true,"suppressWarnings":true,"disableSearch":true,"requiredPropsFirst":true,"noAutoAuth":true}}}}'),i=JSON.parse('{"defaultLocale":"ru","locales":["ru"],"path":"i18n","currentLocale":"ru","localeConfigs":{"ru":{"label":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","direction":"ltr","htmlLang":"ru","calendar":"gregory","path":"ru"}}}');var s=n(2654);const l=JSON.parse('{"docusaurusVersion":"3.3.2","siteVersion":"1.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.3.2"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.3.2"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.3.2"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.3.2"},"docusaurus-plugin-redoc":{"type":"package","name":"docusaurus-plugin-redoc","version":"2.0.2"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.3.2"},"docusaurus-theme-redoc":{"type":"package","name":"docusaurus-theme-redoc","version":"2.0.2"}}}');var u=n(4848);const c={siteConfig:a.A,siteMetadata:l,globalData:o,i18n:i,codeTranslations:s},d=r.createContext(c);function p(e){let{children:t}=e;return(0,u.jsx)(d.Provider,{value:c,children:t})}},7489:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(6540),a=n(8193),o=n(5260),i=n(440),s=n(781),l=n(3102),u=n(4848);function c(e){let{error:t,tryAgain:n}=e;return(0,u.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,u.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,u.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,u.jsx)(d,{error:t})]})}function d(e){let{error:t}=e;const n=(0,i.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,u.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function p(e){let{children:t}=e;return(0,u.jsx)(l.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function f(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)(p,{children:(0,u.jsxs)(g,{fallback:()=>(0,u.jsx)(c,{error:t,tryAgain:n}),children:[(0,u.jsx)(o.A,{children:(0,u.jsx)("title",{children:"Page Error"})}),(0,u.jsx)(s.A,{children:(0,u.jsx)(c,{error:t,tryAgain:n})})]})})}const m=e=>(0,u.jsx)(f,{...e});class g extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.default.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??m)(e)}return e??null}}},8193:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);var r=n(545),a=n(4848);function o(e){return(0,a.jsx)(r.mg,{...e})}},8774:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(6540),a=n(4625),o=n(440),i=n(4586),s=n(6654),l=n(8193),u=n(3427),c=n(6025),d=n(4848);function p(e,t){let{isNavLink:n,to:p,href:f,activeClassName:m,isActive:g,"data-noBrokenLinkCheck":h,autoAddBaseUrl:y=!0,...b}=e;const{siteConfig:{trailingSlash:v,baseUrl:w}}=(0,i.A)(),{withBaseUrl:k}=(0,c.h)(),x=(0,u.A)(),_=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>_.current));const S=p||f;const C=(0,s.A)(S),E=S?.replace("pathname://","");let T=void 0!==E?(L=E,y&&(e=>e.startsWith("/"))(L)?k(L):L):void 0;var L;T&&C&&(T=(0,o.applyTrailingSlash)(T,{trailingSlash:v,baseUrl:w}));const A=(0,r.useRef)(!1),P=n?a.k2:a.N_,O=l.default.canUseIntersectionObserver,j=(0,r.useRef)(),N=()=>{A.current||null==T||(window.docusaurus.preload(T),A.current=!0)};(0,r.useEffect)((()=>(!O&&C&&null!=T&&window.docusaurus.prefetch(T),()=>{O&&j.current&&j.current.disconnect()})),[j,T,O,C]);const R=T?.startsWith("#")??!1,M=!b.target||"_self"===b.target,I=!T||!C||!M||R;return h||!R&&I||x.collectLink(T),b.id&&x.collectAnchor(b.id),I?(0,d.jsx)("a",{ref:_,href:T,...S&&!C&&{target:"_blank",rel:"noopener noreferrer"},...b}):(0,d.jsx)(P,{...b,onMouseEnter:N,onTouchStart:N,innerRef:e=>{_.current=e,O&&e&&C&&(j.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(j.current.unobserve(e),j.current.disconnect(),null!=T&&window.docusaurus.prefetch(T))}))})),j.current.observe(e))},to:T,...n&&{isActive:g,activeClassName:m}})}const f=r.forwardRef(p)},418:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>null},1312:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,T:()=>l});var r=n(6540),a=n(4848);function o(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(2654);function s(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return o(s({message:n,id:r}),t)}function u(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("IllegalYour Docusaurus site did not load properly.
\nA very common reason is a wrong site baseUrl configuration.
\nCurrent configured baseUrl = ${e} ${"/"===e?" (default value)":""}
\nWe suggest trying baseUrl =
\nchildren",t),new Error("The Docusaurus component only accept simple string values");const i=s({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},7065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},6654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},6025:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,h:()=>i});var r=n(6540),a=n(4586),o=n(6654);function i(){const{siteConfig:{baseUrl:e,url:t}}=(0,a.A)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:a=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,o.z)(n))return n;if(a)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const s=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+s:s}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function s(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},3427:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);n(4848);const a=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),o=()=>(0,r.useContext)(a);function i(){return o()}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6988);function o(){return(0,r.useContext)(a.o)}},6588:(e,t,n)=>{"use strict";n.d(t,{P_:()=>i,kh:()=>o});var r=n(4586),a=n(7065);function o(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,r.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}function i(e,t,n){void 0===t&&(t=a.W),void 0===n&&(n={});const r=o(e),i=r?.[t];if(!i&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return i}},2303:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6125);function o(){return(0,r.useContext)(a.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540);const a=n(8193).default.canUseDOM?r.useLayoutEffect:r.useEffect},6921:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function a(e){const t={};return function e(n,a){Object.entries(n).forEach((n=>{let[o,i]=n;const s=a?`${a}.${o}`:o;r(i)?e(i,s):t[s]=i}))}(e),t}},3102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>o});var r=n(6540),a=n(4848);const o=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(o),s=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,a.jsx)(o.Provider,{value:s,children:t})}},8295:(e,t,n)=>{"use strict";n.d(t,{zK:()=>f,vT:()=>c,Gy:()=>l,HW:()=>m,ht:()=>u,r7:()=>p,jh:()=>d});var r=n(6347),a=n(6588);const o=e=>e.versions.find((e=>e.isLast));function i(e,t){const n=function(e,t){const n=o(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}(e,t),a=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const s={},l=()=>(0,a.kh)("docusaurus-plugin-content-docs")??s,u=e=>{try{return(0,a.P_)("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":` (pluginId=${e}`),{cause:t})}};function c(e){void 0===e&&(e={});const t=l(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return o}(t,n,e)}function d(e){return u(e).versions}function p(e){const t=u(e);return o(t)}function f(e){const t=u(e),{pathname:n}=(0,r.zy)();return i(t,n)}function m(e){const t=u(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=o(e);return{latestDocSuggestion:i(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5947),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{a().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){a().done()}}},6134:(e,t,n)=>{"use strict";n.r(t);var r=n(1765),a=n(4784);!function(e){const{themeConfig:{prism:t}}=a.A,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(9700),n(4560)(`./prism-${e}`)})),delete globalThis.Prism}(r.My)},1107:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});n(6540);var r=n(4164),a=n(1312),o=n(6342),i=n(8774),s=n(3427);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var u=n(4848);function c(e){let{as:t,id:n,...c}=e;const d=(0,s.A)(),{navbar:{hideOnScroll:p}}=(0,o.p)();if("h1"===t||!n)return(0,u.jsx)(t,{...c,id:void 0});d.collectAnchor(n);const f=(0,a.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof c.children?c.children:n});return(0,u.jsxs)(t,{...c,className:(0,r.A)("anchor",p?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,c.className),id:n,children:[c.children,(0,u.jsx)(i.A,{className:"hash-link",to:`#${n}`,"aria-label":f,title:f,children:"\u200b"})]})}},3186:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);const r={iconExternalLink:"iconExternalLink_nPIU"};var a=n(4848);function o(e){let{width:t=13.5,height:n=13.5}=e;return(0,a.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,a.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},781:(e,t,n)=>{"use strict";n.d(t,{A:()=>ft});var r=n(6540),a=n(4164),o=n(7489),i=n(1003),s=n(6347),l=n(1312),u=n(5062),c=n(4848);const d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),{action:t}=(0,s.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&p(t)}),[]);return(0,u.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}const m=(0,l.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){const t=e.children??m,{containerRef:n,onClick:r}=f();return(0,c.jsx)("div",{ref:n,role:"region","aria-label":m,children:(0,c.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var h=n(7559),y=n(4090);const b={skipToContent:"skipToContent_fXgn"};function v(){return(0,c.jsx)(g,{className:b.skipToContent})}var w=n(6342),k=n(5041);function x(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:a=1.2,className:o,...i}=e;return(0,c.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,c.jsx)("g",{stroke:r,strokeWidth:a,children:(0,c.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const _={closeButton:"closeButton_CVFx"};function S(e){return(0,c.jsx)("button",{type:"button","aria-label":(0,l.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,a.A)("clean-btn close",_.closeButton,e.className),children:(0,c.jsx)(x,{width:14,height:14,strokeWidth:3.1})})}const C={content:"content_knG7"};function E(e){const{announcementBar:t}=(0,w.p)(),{content:n}=t;return(0,c.jsx)("div",{...e,className:(0,a.A)(C.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const T={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function L(){const{announcementBar:e}=(0,w.p)(),{isActive:t,close:n}=(0,k.Mj)();if(!t)return null;const{backgroundColor:r,textColor:a,isCloseable:o}=e;return(0,c.jsxs)("div",{className:T.announcementBar,style:{backgroundColor:r,color:a},role:"banner",children:[o&&(0,c.jsx)("div",{className:T.announcementBarPlaceholder}),(0,c.jsx)(E,{className:T.announcementBarContent}),o&&(0,c.jsx)(S,{onClick:n,className:T.announcementBarClose})]})}var A=n(2069),P=n(3104);var O=n(9532),j=n(5600);const N=r.createContext(null);function R(e){let{children:t}=e;const n=function(){const e=(0,A.M)(),t=(0,j.YL)(),[n,a]=(0,r.useState)(!1),o=null!==t.component,i=(0,O.ZC)(o);return(0,r.useEffect)((()=>{o&&!i&&a(!0)}),[o,i]),(0,r.useEffect)((()=>{o?e.shown||a(!0):a(!1)}),[e.shown,o]),(0,r.useMemo)((()=>[n,a]),[n])}();return(0,c.jsx)(N.Provider,{value:n,children:t})}function M(e){if(e.component){const t=e.component;return(0,c.jsx)(t,{...e.props})}}function I(){const e=(0,r.useContext)(N);if(!e)throw new O.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,a=(0,r.useCallback)((()=>n(!1)),[n]),o=(0,j.YL)();return(0,r.useMemo)((()=>({shown:t,hide:a,content:M(o)})),[a,o,t])}function F(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:o}=I();return(0,c.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,c.jsxs)("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,c.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,c.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var D=n(5293),z=n(2303);function B(e){return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,c.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function $(e){return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,c.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const U={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function q(e){let{className:t,buttonClassName:n,value:r,onChange:o}=e;const i=(0,z.A)(),s=(0,l.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,l.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,c.jsx)("div",{className:(0,a.A)(U.toggle,t),children:(0,c.jsxs)("button",{className:(0,a.A)("clean-btn",U.toggleButton,!i&&U.toggleButtonDisabled,n),type:"button",onClick:()=>o("dark"===r?"light":"dark"),disabled:!i,title:s,"aria-label":s,"aria-live":"polite",children:[(0,c.jsx)(B,{className:(0,a.A)(U.toggleIcon,U.lightToggleIcon)}),(0,c.jsx)($,{className:(0,a.A)(U.toggleIcon,U.darkToggleIcon)})]})})}const H=r.memo(q),V={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function W(e){let{className:t}=e;const n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode.disableSwitch,{colorMode:a,setColorMode:o}=(0,D.G)();return r?null:(0,c.jsx)(H,{className:t,buttonClassName:"dark"===n?V.darkNavbarColorModeToggle:void 0,value:a,onChange:o})}var G=n(3465);function Q(){return(0,c.jsx)(G.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function K(){const e=(0,A.M)();return(0,c.jsx)("button",{type:"button","aria-label":(0,l.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,c.jsx)(x,{color:"var(--ifm-color-emphasis-600)"})})}function Y(){return(0,c.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,c.jsx)(Q,{}),(0,c.jsx)(W,{className:"margin-right--md"}),(0,c.jsx)(K,{})]})}var Z=n(8774),X=n(6025),J=n(6654);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(3186);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:a,label:o,html:i,isDropdownLink:s,prependBaseUrlToHref:l,...u}=e;const d=(0,X.A)(r),p=(0,X.A)(t),f=(0,X.A)(a,{forcePrependBaseUrl:!0}),m=o&&a&&!(0,J.A)(a),g=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,c.jsxs)(c.Fragment,{children:[o,m&&(0,c.jsx)(te.A,{...s&&{width:12,height:12}})]})};return a?(0,c.jsx)(Z.A,{href:l?f:a,...u,...g}):(0,c.jsx)(Z.A,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(p)},...u,...g})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const o=(0,c.jsx)(ne,{className:(0,a.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,c.jsx)("li",{children:o}):o}function ae(e){let{className:t,isDropdownItem:n,...r}=e;return(0,c.jsx)("li",{className:"menu__list-item",children:(0,c.jsx)(ne,{className:(0,a.A)("menu__link",t),...r})})}function oe(e){let{mobile:t=!1,position:n,...r}=e;const a=t?ae:re;return(0,c.jsx)(a,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(1422),se=n(9169),le=n(4586);const ue={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};function ce(e,t){return e.some((e=>function(e,t){return!!(0,se.ys)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:o,onClick:i,...s}=e;const l=(0,r.useRef)(null),[u,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[l]),(0,c.jsxs)("div",{ref:l,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":u}),children:[(0,c.jsx)(ne,{"aria-haspopup":"true","aria-expanded":u,role:"button",href:s.to?void 0:"#",className:(0,a.A)("navbar__link",o),...s,onClick:s.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!u))},children:s.children??s.label}),(0,c.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(Ce,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function pe(e){let{items:t,className:n,position:o,onClick:i,...l}=e;const u=function(){const{siteConfig:{baseUrl:e}}=(0,le.A)(),{pathname:t}=(0,s.zy)();return t.replace(e,"/")}(),d=ce(t,u),{collapsed:p,toggleCollapsed:f,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[u,d,m]),(0,c.jsxs)("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":p}),children:[(0,c.jsx)(ne,{role:"button",className:(0,a.A)(ue.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",n),...l,onClick:e=>{e.preventDefault(),f()},children:l.children??l.label}),(0,c.jsx)(ie.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:p,children:t.map(((e,t)=>(0,r.createElement)(Ce,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function fe(e){let{mobile:t=!1,...n}=e;const r=t?pe:de;return(0,c.jsx)(r,{...n})}var me=n(2131);function ge(e){let{width:t=20,height:n=20,...r}=e;return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,c.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const he="iconLanguage_nlXk";var ye=n(418);const be={navbarSearchContainer:"navbarSearchContainer_Bca1"};function ve(e){let{children:t,className:n}=e;return(0,c.jsx)("div",{className:(0,a.A)(n,be.navbarSearchContainer),children:t})}var we=n(8295),ke=n(4142);var xe=n(5597);const _e=e=>e.docs.find((t=>t.id===e.mainDocId));const Se={default:oe,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:a="",...o}=e;const{i18n:{currentLocale:i,locales:u,localeConfigs:d}}=(0,le.A)(),p=(0,me.o)(),{search:f,hash:m}=(0,s.zy)(),g=[...n,...u.map((e=>{const n=`${`pathname://${p.createUrl({locale:e,fullyQualified:!1})}`}${f}${m}${a}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],h=t?(0,l.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,c.jsx)(fe,{...o,mobile:t,label:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(ge,{className:he}),h]}),items:g})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,c.jsx)(ve,{className:n,children:(0,c.jsx)(ye.A,{})})},dropdown:fe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:o=!1}=e;const i=o?"li":"div";return(0,c.jsx)(i,{className:(0,a.A)({navbar__item:!r&&!o,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...a}=e;const{activeDoc:o}=(0,we.zK)(r),i=(0,ke.QB)(t,r),s=o?.path===i?.path;return null===i||i.unlisted&&!s?null:(0,c.jsx)(oe,{exact:!0,...a,isActive:()=>s||!!o?.sidebar&&o.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...a}=e;const{activeDoc:o}=(0,we.zK)(r),i=(0,ke.fW)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,c.jsx)(oe,{exact:!0,...a,isActive:()=>o?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...a}=e;const o=(0,ke.Vd)(r)[0],i=t??o.label,s=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(o).path;return(0,c.jsx)(oe,{...a,label:i,to:s})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:a,dropdownItemsAfter:o,...i}=e;const{search:u,hash:d}=(0,s.zy)(),p=(0,we.zK)(n),f=(0,we.jh)(n),{savePreferredVersionName:m}=(0,xe.g1)(n),g=[...a,...f.map((e=>{const t=p.alternateDocVersions[e.name]??_e(e);return{label:e.label,to:`${t.path}${u}${d}`,isActive:()=>e===p.activeVersion,onClick:()=>m(e.name)}})),...o],h=(0,ke.Vd)(n)[0],y=t&&g.length>1?(0,l.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):h.label,b=t&&g.length>1?void 0:_e(h).path;return g.length<=1?(0,c.jsx)(oe,{...i,mobile:t,label:y,to:b,isActive:r?()=>!1:void 0}):(0,c.jsx)(fe,{...i,mobile:t,label:y,to:b,items:g,isActive:r?()=>!1:void 0})}};function Ce(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=Se[r];if(!a)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,c.jsx)(a,{...n})}function Ee(){const e=(0,A.M)(),t=(0,w.p)().navbar.items;return(0,c.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(Ce,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function Te(e){return(0,c.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,c.jsx)(l.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Le(){const e=0===(0,w.p)().navbar.items.length,t=I();return(0,c.jsxs)(c.Fragment,{children:[!e&&(0,c.jsx)(Te,{onClick:()=>t.hide()}),t.content]})}function Ae(){const e=(0,A.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,c.jsx)(F,{header:(0,c.jsx)(Y,{}),primaryMenu:(0,c.jsx)(Ee,{}),secondaryMenu:(0,c.jsx)(Le,{})}):null}const Pe={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Oe(e){return(0,c.jsx)("div",{role:"presentation",...e,className:(0,a.A)("navbar-sidebar__backdrop",e.className)})}function je(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:o}}=(0,w.p)(),i=(0,A.M)(),{navbarRef:s,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(!1),o=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,P.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i =s?n(!1):i+u {if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return a.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,c.jsxs)("nav",{ref:s,"aria-label":(0,l.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,a.A)("navbar","navbar--fixed-top",n&&[Pe.navbarHideable,!d&&Pe.navbarHidden],{"navbar--dark":"dark"===o,"navbar--primary":"primary"===o,"navbar-sidebar--show":i.shown}),children:[t,(0,c.jsx)(Oe,{onClick:i.toggle}),(0,c.jsx)(Ae,{})]})}var Ne=n(440);const Re={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function Me(e){return(0,c.jsx)("button",{type:"button",...e,children:(0,c.jsx)(l.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function Ie(e){let{error:t}=e;const n=(0,Ne.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,c.jsx)("p",{className:Re.errorBoundaryError,children:n})}class Fe extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const De="right";function ze(e){let{width:t=30,height:n=30,className:r,...a}=e;return(0,c.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...a,children:(0,c.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function Be(){const{toggle:e,shown:t}=(0,A.M)();return(0,c.jsx)("button",{onClick:e,"aria-label":(0,l.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,c.jsx)(ze,{})})}const $e={colorModeToggle:"colorModeToggle_DEke"};function Ue(e){let{items:t}=e;return(0,c.jsx)(c.Fragment,{children:t.map(((e,t)=>(0,c.jsx)(Fe,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,c.jsx)(Ce,{...e})},t)))})}function qe(e){let{left:t,right:n}=e;return(0,c.jsxs)("div",{className:"navbar__inner",children:[(0,c.jsx)("div",{className:"navbar__items",children:t}),(0,c.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function He(){const e=(0,A.M)(),t=(0,w.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??De)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),a=t.find((e=>"search"===e.type));return(0,c.jsx)(qe,{left:(0,c.jsxs)(c.Fragment,{children:[!e.disabled&&(0,c.jsx)(Be,{}),(0,c.jsx)(Q,{}),(0,c.jsx)(Ue,{items:n})]}),right:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Ue,{items:r}),(0,c.jsx)(W,{className:$e.colorModeToggle}),!a&&(0,c.jsx)(ve,{children:(0,c.jsx)(ye.A,{})})]})})}function Ve(){return(0,c.jsx)(je,{children:(0,c.jsx)(He,{})})}function We(e){let{item:t}=e;const{to:n,href:r,label:a,prependBaseUrlToHref:o,...i}=t,s=(0,X.A)(n),l=(0,X.A)(r,{forcePrependBaseUrl:!0});return(0,c.jsxs)(Z.A,{className:"footer__link-item",...r?{href:o?l:r}:{to:s},...i,children:[a,r&&!(0,J.A)(r)&&(0,c.jsx)(te.A,{})]})}function Ge(e){let{item:t}=e;return t.html?(0,c.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,c.jsx)("li",{className:"footer__item",children:(0,c.jsx)(We,{item:t})},t.href??t.to)}function Qe(e){let{column:t}=e;return(0,c.jsxs)("div",{className:"col footer__col",children:[(0,c.jsx)("div",{className:"footer__title",children:t.title}),(0,c.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,c.jsx)(Ge,{item:e},t)))})]})}function Ke(e){let{columns:t}=e;return(0,c.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,c.jsx)(Qe,{column:e},t)))})}function Ye(){return(0,c.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function Ze(e){let{item:t}=e;return t.html?(0,c.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,c.jsx)(We,{item:t})}function Xe(e){let{links:t}=e;return(0,c.jsx)("div",{className:"footer__links text--center",children:(0,c.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(Ze,{item:e}),t.length!==n+1&&(0,c.jsx)(Ye,{})]},n)))})})}function Je(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,c.jsx)(Ke,{columns:t}):(0,c.jsx)(Xe,{links:t})}var et=n(1122);const tt={footerLogoLink:"footerLogoLink_BH7S"};function nt(e){let{logo:t}=e;const{withBaseUrl:n}=(0,X.h)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,c.jsx)(et.A,{className:(0,a.A)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function rt(e){let{logo:t}=e;return t.href?(0,c.jsx)(Z.A,{href:t.href,className:tt.footerLogoLink,target:t.target,children:(0,c.jsx)(nt,{logo:t})}):(0,c.jsx)(nt,{logo:t})}function at(e){let{copyright:t}=e;return(0,c.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function ot(e){let{style:t,links:n,logo:r,copyright:o}=e;return(0,c.jsx)("footer",{className:(0,a.A)("footer",{"footer--dark":"dark"===t}),children:(0,c.jsxs)("div",{className:"container container-fluid",children:[n,(r||o)&&(0,c.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,c.jsx)("div",{className:"margin-bottom--sm",children:r}),o]})]})})}function it(){const{footer:e}=(0,w.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:a}=e;return(0,c.jsx)(ot,{style:a,links:n&&n.length>0&&(0,c.jsx)(Je,{links:n}),logo:r&&(0,c.jsx)(rt,{logo:r}),copyright:t&&(0,c.jsx)(at,{copyright:t})})}const st=r.memo(it),lt=(0,O.fM)([D.a,k.oq,P.Tv,xe.VQ,i.Jx,function(e){let{children:t}=e;return(0,c.jsx)(j.y_,{children:(0,c.jsx)(A.e,{children:(0,c.jsx)(R,{children:t})})})}]);function ut(e){let{children:t}=e;return(0,c.jsx)(lt,{children:t})}var ct=n(1107);function dt(e){let{error:t,tryAgain:n}=e;return(0,c.jsx)("main",{className:"container margin-vert--xl",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,c.jsx)(ct.A,{as:"h1",className:"hero__title",children:(0,c.jsx)(l.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,c.jsx)("div",{className:"margin-vert--lg",children:(0,c.jsx)(Me,{onClick:n,className:"button button--primary shadow--lw"})}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"margin-vert--md",children:(0,c.jsx)(Ie,{error:t})})]})})})}const pt={mainWrapper:"mainWrapper_z2l0"};function ft(e){const{children:t,noFooter:n,wrapperClassName:r,title:s,description:l}=e;return(0,y.J)(),(0,c.jsxs)(ut,{children:[(0,c.jsx)(i.be,{title:s,description:l}),(0,c.jsx)(v,{}),(0,c.jsx)(L,{}),(0,c.jsx)(Ve,{}),(0,c.jsx)("div",{id:d,className:(0,a.A)(h.G.wrapper.main,pt.mainWrapper,r),children:(0,c.jsx)(o.A,{fallback:e=>(0,c.jsx)(dt,{...e}),children:t})}),!n&&(0,c.jsx)(st,{})]})}},3465:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});n(6540);var r=n(8774),a=n(6025),o=n(4586),i=n(6342),s=n(1122),l=n(4848);function u(e){let{logo:t,alt:n,imageClassName:r}=e;const o={light:(0,a.A)(t.src),dark:(0,a.A)(t.srcDark||t.src)},i=(0,l.jsx)(s.A,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,l.jsx)("div",{className:r,children:i}):i}function c(e){const{siteConfig:{title:t}}=(0,o.A)(),{navbar:{title:n,logo:s}}=(0,i.p)(),{imageClassName:c,titleClassName:d,...p}=e,f=(0,a.A)(s?.href||"/"),m=n?"":t,g=s?.alt??m;return(0,l.jsxs)(r.A,{to:f,...p,...s?.target&&{target:s.target},children:[s&&(0,l.jsx)(u,{logo:s,alt:g,imageClassName:c}),null!=n&&(0,l.jsx)("b",{className:d,children:n})]})}},1463:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);var r=n(5260),a=n(4848);function o(e){let{locale:t,version:n,tag:o}=e;const i=t;return(0,a.jsxs)(r.A,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},1122:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(6540),a=n(4164),o=n(2303),i=n(5293);const s={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var l=n(4848);function u(e){let{className:t,children:n}=e;const u=(0,o.A)(),{colorMode:c}=(0,i.G)();return(0,l.jsx)(l.Fragment,{children:(u?"dark"===c?["dark"]:["light"]:["light","dark"]).map((e=>{const o=n({theme:e,className:(0,a.A)(t,s.themedComponent,s[`themedComponent--${e}`])});return(0,l.jsx)(r.Fragment,{children:o},e)}))})}function c(e){const{sources:t,className:n,alt:r,...a}=e;return(0,l.jsx)(u,{className:n,children:e=>{let{theme:n,className:o}=e;return(0,l.jsx)("img",{src:t[n],alt:r,className:o,...a})}})}},1422:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,u:()=>u});var r=n(6540),a=n(8193),o=n(205),i=n(3109),s=n(4848);const l="ease-in-out";function u(e){let{initialState:t}=e;const[n,a]=(0,r.useState)(t??!1),o=(0,r.useCallback)((()=>{a((e=>!e))}),[]);return{collapsed:n,setCollapsed:a,toggleCollapsed:o}}const c={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function p(e,t){const n=t?c:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){let{collapsibleRef:t,collapsed:n,animation:a}=e;const o=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=a?.duration??function(e){if((0,i.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${a?.easing??l}`,height:`${t}px`}}function s(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!o.current)return p(e,n),void(o.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(s(),requestAnimationFrame((()=>{e.style.height=c.height,e.style.overflow=c.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{s()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,a])}function m(e){if(!a.default.canUseDOM)return e?c:d}function g(e){let{as:t="div",collapsed:n,children:a,animation:o,onCollapseTransitionEnd:i,className:l,disableSSRStyle:u}=e;const c=(0,r.useRef)(null);return f({collapsibleRef:c,collapsed:n,animation:o}),(0,s.jsx)(t,{ref:c,style:u?void 0:m(n),onTransitionEnd:e=>{"height"===e.propertyName&&(p(c.current,n),i?.(n))},className:l,children:a})}function h(e){let{collapsed:t,...n}=e;const[a,i]=(0,r.useState)(!t),[l,u]=(0,r.useState)(t);return(0,o.A)((()=>{t||i(!0)}),[t]),(0,o.A)((()=>{a&&u(t)}),[a,t]),a?(0,s.jsx)(g,{...n,collapsed:l}):null}function y(e){let{lazy:t,...n}=e;const r=t?h:g;return(0,s.jsx)(r,{...n})}},5041:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>g,oq:()=>m});var r=n(6540),a=n(2303),o=n(9466),i=n(9532),s=n(6342),l=n(4848);const u=(0,o.Wf)("docusaurus.announcement.dismiss"),c=(0,o.Wf)("docusaurus.announcement.id"),d=()=>"true"===u.get(),p=e=>u.set(String(e)),f=r.createContext(null);function m(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,s.p)(),t=(0,a.A)(),[n,o]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{o(d())}),[]);const i=(0,r.useCallback)((()=>{p(!0),o(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=c.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;c.set(t),r&&p(!1),!r&&d()||o(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,l.jsx)(f.Provider,{value:n,children:t})}function g(){const e=(0,r.useContext)(f);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},5293:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>h});var r=n(6540),a=n(8193),o=n(9532),i=n(9466),s=n(6342),l=n(4848);const u=r.createContext(void 0),c="theme",d=(0,i.Wf)(c),p={light:"light",dark:"dark"},f=e=>e===p.dark?p.dark:p.light,m=e=>a.default.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e),g=e=>{d.set(f(e))};function h(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.p)(),[a,o]=(0,r.useState)(m(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:a=!0}=r;t?(o(t),a&&g(t)):(o(n?window.matchMedia("(prefers-color-scheme: dark)").matches?p.dark:p.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",f(a))}),[a]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==c)return;const t=d.get();null!==t&&i(f(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const l=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||l.current?l.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:a,setColorMode:i,get isDarkTheme(){return a===p.dark},setLightTheme(){i(p.light)},setDarkTheme(){i(p.dark)}})),[a,i])}();return(0,l.jsx)(u.Provider,{value:n,children:t})}function y(){const e=(0,r.useContext)(u);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},5597:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>y,g1:()=>v});var r=n(6540),a=n(8295),o=n(7065),i=n(6342),s=n(4142),l=n(9532),u=n(9466),c=n(4848);const d=e=>`docs-preferred-version-${e}`,p={save:(e,t,n)=>{(0,u.Wf)(d(e),{persistence:t}).set(n)},read:(e,t)=>(0,u.Wf)(d(e),{persistence:t}).get(),clear:(e,t)=>{(0,u.Wf)(d(e),{persistence:t}).del()}},f=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const m=r.createContext(null);function g(){const e=(0,a.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[o,s]=(0,r.useState)((()=>f(n)));(0,r.useEffect)((()=>{s(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function a(e){const t=p.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(p.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,a(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[o,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){p.save(e,t,n),s((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=g();return(0,c.jsx)(m.Provider,{value:n,children:t})}function y(e){let{children:t}=e;return s.C5?(0,c.jsx)(h,{children:t}):(0,c.jsx)(c.Fragment,{children:t})}function b(){const e=(0,r.useContext)(m);if(!e)throw new l.dV("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=o.W);const t=(0,a.ht)(e),[n,i]=b(),{preferredVersionName:s}=n[e];return{preferredVersion:t.versions.find((e=>e.name===s))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}},4207:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,t:()=>u});var r=n(6540),a=n(9532),o=n(4848);const i=Symbol("EmptyContext"),s=r.createContext(i);function l(e){let{children:t,name:n,items:a}=e;const i=(0,r.useMemo)((()=>n&&a?{name:n,items:a}:null),[n,a]);return(0,o.jsx)(s.Provider,{value:i,children:t})}function u(){const e=(0,r.useContext)(s);if(e===i)throw new a.dV("DocsSidebarProvider");return e}},2252:(e,t,n)=>{"use strict";n.d(t,{n:()=>s,r:()=>l});var r=n(6540),a=n(9532),o=n(4848);const i=r.createContext(null);function s(e){let{children:t,version:n}=e;return(0,o.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(null===e)throw new a.dV("DocsVersionProvider");return e}},2069:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(6540),a=n(5600),o=n(4581),i=n(7485),s=n(6342),l=n(9532),u=n(4848);const c=r.createContext(void 0);function d(){const e=function(){const e=(0,a.YL)(),{items:t}=(0,s.p)().navbar;return 0===t.length&&!e.component}(),t=(0,o.l)(),n=!e&&"mobile"===t,[l,u]=(0,r.useState)(!1);(0,i.$Z)((()=>{if(l)return u(!1),!1}));const c=(0,r.useCallback)((()=>{u((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&u(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:c,shown:l})),[e,n,c,l])}function p(e){let{children:t}=e;const n=d();return(0,u.jsx)(c.Provider,{value:n,children:t})}function f(){const e=r.useContext(c);if(void 0===e)throw new l.dV("NavbarMobileSidebarProvider");return e}},5600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>u,YL:()=>l,y_:()=>s});var r=n(6540),a=n(9532),o=n(4848);const i=r.createContext(null);function s(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function u(e){let{component:t,props:n}=e;const o=(0,r.useContext)(i);if(!o)throw new a.dV("NavbarSecondaryMenuContentProvider");const[,s]=o,l=(0,a.Be)(n);return(0,r.useEffect)((()=>{s({component:t,props:l})}),[s,t,l]),(0,r.useEffect)((()=>()=>s({component:null,props:null})),[s]),null}},4090:(e,t,n)=>{"use strict";n.d(t,{w:()=>a,J:()=>o});var r=n(6540);const a="navigation-with-keyboard";function o(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},4581:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(6540),a=n(8193);const o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function s(e){let{desktopBreakpoint:t=i}=void 0===e?{}:e;const[n,s]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){s(function(e){if(!a.default.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?o.desktop:o.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},7559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},3109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},4142:(e,t,n)=>{"use strict";n.d(t,{B5:()=>S,C5:()=>p,Nr:()=>f,OF:()=>w,QB:()=>_,Vd:()=>k,Y:()=>b,fW:()=>x,w8:()=>h});var r=n(6540),a=n(6347),o=n(2831),i=n(8295),s=n(5597),l=n(2252),u=n(4207),c=n(1682),d=n(9169);const p=!!i.Gy;function f(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=f(t);if(e)return e}}(e):void 0:e.href}const m=(e,t)=>void 0!==e&&(0,d.ys)(e,t),g=(e,t)=>e.some((e=>h(e,t)));function h(e,t){return"link"===e.type?m(e.href,t):"category"===e.type&&(m(e.href,t)||g(e.items,t))}function y(e,t){switch(e.type){case"category":return h(e,t)||e.items.some((e=>y(e,t)));case"link":return!e.unlisted||h(e,t);default:return!0}}function b(e,t){return(0,r.useMemo)((()=>e.filter((e=>y(e,t)))),[e,t])}function v(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const a=[];return function e(t){for(const o of t)if("category"===o.type&&((0,d.ys)(o.href,n)||e(o.items))||"link"===o.type&&(0,d.ys)(o.href,n)){return r&&"category"!==o.type||a.unshift(o),!0}return!1}(t),a}function w(){const e=(0,u.t)(),{pathname:t}=(0,a.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?v({sidebarItems:e.items,pathname:t}):null}function k(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,s.g1)(e),a=(0,i.r7)(e);return(0,r.useMemo)((()=>(0,c.s)([t,n,a].filter(Boolean))),[t,n,a])}function x(e,t){const n=k(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function _(e,t){const n=k(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${(0,c.s)(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function S(e){let{route:t}=e;const n=(0,a.zy)(),r=(0,l.r)(),i=t.routes,s=i.find((e=>(0,a.B6)(n.pathname,e)));if(!s)return null;const u=s.sidebar,c=u?r.docsSidebars[u]:void 0;return{docElement:(0,o.v)(i),sidebarName:u,sidebarItems:c}}},7485:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>i,aZ:()=>l});var r=n(6540),a=n(6347),o=n(9532);function i(e){!function(e){const t=(0,a.W6)(),n=(0,o._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function s(e){const t=(0,a.W6)();return(0,r.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}function l(e){return s((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}},1682:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter(((n,r)=>e.findIndex((e=>t(e,n)))!==r))}function a(e){return Array.from(new Set(e))}n.d(t,{X:()=>r,s:()=>a})},1003:(e,t,n)=>{"use strict";n.d(t,{e3:()=>f,be:()=>d,Jx:()=>m});var r=n(6540),a=n(4164),o=n(5260),i=n(3102);function s(){const e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(6025),u=n(4586);var c=n(4848);function d(e){let{title:t,description:n,keywords:r,image:a,children:i}=e;const s=function(e){const{siteConfig:t}=(0,u.A)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,l.h)(),p=a?d(a,{absolute:!0}):void 0;return(0,c.jsxs)(o.A,{children:[t&&(0,c.jsx)("title",{children:s}),t&&(0,c.jsx)("meta",{property:"og:title",content:s}),n&&(0,c.jsx)("meta",{name:"description",content:n}),n&&(0,c.jsx)("meta",{property:"og:description",content:n}),r&&(0,c.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),p&&(0,c.jsx)("meta",{property:"og:image",content:p}),p&&(0,c.jsx)("meta",{name:"twitter:image",content:p}),i]})}const p=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(p),s=(0,a.A)(i,t);return(0,c.jsxs)(p.Provider,{value:s,children:[(0,c.jsx)(o.A,{children:(0,c.jsx)("html",{className:s})}),n]})}function m(e){let{children:t}=e;const n=s(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const o=`plugin-id-${n.plugin.id}`;return(0,c.jsx)(f,{className:(0,a.A)(r,o),children:t})}},9532:(e,t,n)=>{"use strict";n.d(t,{Be:()=>u,ZC:()=>s,_q:()=>i,dV:()=>l,fM:()=>c});var r=n(6540),a=n(205),o=n(4848);function i(e){const t=(0,r.useRef)(e);return(0,a.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function s(e){const t=(0,r.useRef)();return(0,a.A)((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(? \w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function u(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function c(e){return t=>{let{children:n}=t;return(0,o.jsx)(o.Fragment,{children:e.reduceRight(((e,t)=>(0,o.jsx)(t,{children:e})),n)})}}},9169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>s,ys:()=>i});var r=n(6540),a=n(8328),o=n(4586);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function s(){const{baseUrl:e}=(0,o.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(a).flatMap((e=>e.routes??[])))}(n)}({routes:a.A,baseUrl:e})),[e])}},3104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>f,Tv:()=>c,a_:()=>m,gk:()=>g});var r=n(6540),a=n(8193),o=n(2303),i=n(205),s=n(9532),l=n(4848);const u=r.createContext(void 0);function c(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,l.jsx)(u.Provider,{value:n,children:t})}function d(){const e=(0,r.useContext)(u);if(null==e)throw new s.dV("ScrollControllerProvider");return e}const p=()=>a.default.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function f(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=d(),a=(0,r.useRef)(p()),o=(0,s._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=p();o(e,a.current),a.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[o,n,...t])}function m(){const e=d(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((t=>{e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((()=>{const{current:{elem:t,top:n}}=e;if(!t)return{restored:!1};const r=t.getBoundingClientRect().top-n;return r&&window.scrollBy({left:0,top:r}),e.current={elem:null,top:0},{restored:0!==r}}),[]);return(0,r.useMemo)((()=>({save:t,restore:n})),[n,t])}(),n=(0,r.useRef)(void 0),a=(0,r.useCallback)((r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const{restored:r}=t.restore();if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}}),[e,t]);return(0,i.A)((()=>{queueMicrotask((()=>n.current?.()))})),{blockElementScrollPositionUntilNextRender:a}}function g(){const e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const a=document.documentElement.scrollTop;(n&&a>e||!n&&a t&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},2967:(e,t,n)=>{"use strict";n.d(t,{Cy:()=>r,tU:()=>a});n(4586);const r="default";function a(e,t){return`docs-${e}-${t}`}},9466:(e,t,n)=>{"use strict";n.d(t,{Dv:()=>c,Wf:()=>u});var r=n(6540);const a="localStorage";function o(e){let{key:t,oldValue:n,newValue:r,storage:a}=e;if(n===r)return;const o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}function i(e){if(void 0===e&&(e=a),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,s||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),s=!0),null}var t}let s=!1;const l={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function u(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(e);const n=i(t?.persistence);return null===n?l:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),o({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),o({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}function c(e,t){const n=(0,r.useRef)((()=>null===e?l:u(e,t))).current(),a=(0,r.useCallback)((e=>"undefined"==typeof window?()=>{}:n.listen(e)),[n]);return[(0,r.useSyncExternalStore)(a,(()=>"undefined"==typeof window?null:n.get()),(()=>null)),n]}},2131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(4586),a=n(6347),o=n(440);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:s}}=(0,r.A)(),{pathname:l}=(0,a.zy)(),u=(0,o.applyTrailingSlash)(l,{trailingSlash:n,baseUrl:e}),c=s===i?e:e.replace(`/${s}/`,"/"),d=u.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${c}`:`${c}${e}/`}(n)}${d}`}}}},5062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(6540),a=n(6347),o=n(9532);function i(e){const t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(4586);function a(){return(0,r.A)().siteConfig.themeConfig}},2983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeTrailingSlash=t.addLeadingSlash=t.addTrailingSlash=void 0;const r=n(2566);function a(e){return e.endsWith("/")?e:`${e}/`}function o(e){return(0,r.removeSuffix)(e,"/")}t.addTrailingSlash=a,t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[i]=e.split(/[#?]/),s="/"===i||i===r?i:(l=i,n?a(l):o(l));var l;return e.replace(i,s)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=o},253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t,...e(t.cause)]:[t]}},440:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.removePrefix=t.addSuffix=t.removeSuffix=t.addPrefix=t.removeTrailingSlash=t.addLeadingSlash=t.addTrailingSlash=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var a=n(2983);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}}),Object.defineProperty(t,"addTrailingSlash",{enumerable:!0,get:function(){return a.addTrailingSlash}}),Object.defineProperty(t,"addLeadingSlash",{enumerable:!0,get:function(){return a.addLeadingSlash}}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return a.removeTrailingSlash}});var o=n(2566);Object.defineProperty(t,"addPrefix",{enumerable:!0,get:function(){return o.addPrefix}}),Object.defineProperty(t,"removeSuffix",{enumerable:!0,get:function(){return o.removeSuffix}}),Object.defineProperty(t,"addSuffix",{enumerable:!0,get:function(){return o.addSuffix}}),Object.defineProperty(t,"removePrefix",{enumerable:!0,get:function(){return o.removePrefix}});var i=n(253);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},2566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removePrefix=t.addSuffix=t.removeSuffix=t.addPrefix=void 0,t.addPrefix=function(e,t){return e.startsWith(t)?e:`${t}${e}`},t.removeSuffix=function(e,t){return""===t?e:e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:`${e}${t}`},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},3390:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});r(n(8193)).default.canUseDOM&&(window.Prism=window.Prism||{},window.Prism.manual=!0)},1513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>w,TM:()=>E,yJ:()=>f,sC:()=>L,AO:()=>p});var r=n(8168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;p--){var f=i[p];"."===f?o(i,p):".."===f?(o(i,p),d++):d&&(o(i,p),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var s=n(1561);function l(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function f(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r t?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=f(e,t,g(),w.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t {"use strict";var r=n(4363),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||a}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=f(n);a&&a!==m&&e(t,a,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var s=l(t),g=l(n),h=0;h {"use strict";e.exports=function(e,t,n,r,a,o,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},7767:(e,t,n)=>{"use strict";n.r(t)},119:(e,t,n)=>{"use strict";n.r(t)},1043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:' '};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),u=o.querySelector(r.barSelector),c=r.speed,d=r.easing;return o.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(u,i(e,c,d)),1===e?(l(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){l(o,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),s=e?"-100":o(n.status||0),u=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&f(a),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function u(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=p(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},5651:()=>{!function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n >/g,(function(){return"(?:"+e+")"}));return e.replace(/< >/g,"[^\\s\\S]")}var a="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",o="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var u=l(o),c=RegExp(l(a+" "+o+" "+i+" "+s)),d=l(o+" "+i+" "+s),p=l(a+" "+o+" "+s),f=r(/<(?:[^<>;=+\-*/%&|^]|< >)*>/.source,2),m=r(/\((?:[^()]|< >)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,h=t(/<<0>>(?:\s*<<1>>)?/.source,[g,f]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,h]),b=/\[\s*(?:,\s*)*\]/.source,v=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,b]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,m,b]),k=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),x=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[k,y,b]),_={keyword:c,punctuation:/[<>()?,.:[\]]/},S=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,C=/"(?:\\.|[^\\"\r\n])*"/.source,E=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[C]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:_},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,x]),lookbehind:!0,inside:_},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[u,h]),lookbehind:!0,inside:_},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:_},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:_},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[x,p,g]),inside:_}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:_},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[x,y]),inside:_,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[x]),lookbehind:!0,inside:_,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,f]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(f),alias:"class-name",inside:_}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[u,h,g,x,c.source,m,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[h,m]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(x),greedy:!0,inside:_},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var T=C+"|"+S,L=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[T]),A=r(t(/[^"'/()]|<<0>>|\(< >*\)/.source,[L]),2),P=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,O=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,A]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[P,O]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[P]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[A]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var j=/:[^}\r\n]+/.source,N=r(t(/[^"'/()]|<<0>>|\(< >*\)/.source,[L]),2),R=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[N,j]),M=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(< >*\)/.source,[T]),2),I=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[M,j]);function F(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,j]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[R]),lookbehind:!0,greedy:!0,inside:F(R,N)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[I]),lookbehind:!0,greedy:!0,inside:F(I,M)}],char:{pattern:RegExp(S),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)},9700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,s=i.length;-1!==n.code.indexOf(a=t(r,s));)++s;return i[s]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(s){for(var l=0;l =o.length);l++){var u=s[l];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=o[a],d=n.tokenStack[c],p="string"==typeof u?u:u.content,f=t(r,c),m=p.indexOf(f);if(m>-1){++a;var g=p.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=p.substring(m+f.length),b=[];g&&b.push.apply(b,i([g])),b.push(h),y&&b.push.apply(b,i([y])),"string"==typeof u?s.splice.apply(s,[l,1].concat(b)):u.content=b}}else u.content&&i(u.content)}return s}(n.tokens)}}}})}(Prism)},3554:()=>{!function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,a=/=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:a,punctuation:o};var i={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:i}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:i}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:a,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){if(/<\?/.test(t.code)){e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(Prism)},905:()=>{!function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}(Prism)},4560:(e,t,n)=>{var r={"./prism-csharp":5651,"./prism-php":3554,"./prism-powershell":905};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=4560},2694:(e,t,n)=>{"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),a=n(9982);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!d.call(m,e)||!d.call(f,e)&&(p.test(e)?m[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);h[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);h[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);h[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){h[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),h.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){h[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),x=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),T=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),j=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var N=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var R=Symbol.iterator;function M(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=R&&e[R]||e["@@iterator"])?e:null}var I,F=Object.assign;function D(e){if(void 0===I)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||""}return"\n"+I+e}var z=!1;function B(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"==typeof u.stack){for(var a=u.stack.split("\n"),o=r.stack.split("\n"),i=a.length-1,s=o.length-1;1<=i&&0<=s&&a[i]!==o[s];)s--;for(;1<=i&&0<=s;i--,s--)if(a[i]!==o[s]){if(1!==i||1!==s)do{if(i--,0>--s||a[i]!==o[s]){var l="\n"+a[i].replace(" at new "," at ");return e.displayName&&l.includes(" ")&&(l=l.replace(" ",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?D(e):""}function $(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return"Fragment";case x:return"Portal";case C:return"Profiler";case S:return"StrictMode";case A:return"Suspense";case P:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case L:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case O:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return U(e(t))}catch(n){}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Q(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function K(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Z(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function X(e,t){Z(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a "+t.valueOf().toString()+"",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function he(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(fe).forEach((function(e){me.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ye=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function be(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function ve(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function ke(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,_e=null,Se=null;function Ce(e){if(e=va(e)){if("function"!=typeof xe)throw Error(o(280));var t=e.stateNode;t&&(t=ka(t),xe(e.stateNode,e.type,t))}}function Ee(e){_e?Se?Se.push(e):Se=[e]:_e=e}function Te(){if(_e){var e=_e,t=Se;if(Se=_e=null,Ce(e),t)for(e=0;e >>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ut=64,ct=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~a;0!==s?r=dt(s):0!==(o&=i)&&(r=dt(o))}else 0!==(i=n&~a)?r=dt(i):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&!(t&a)&&((a=r&-r)>=(o=t&-t)||16===a&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0 n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),a=1< =Mn),Dn=String.fromCharCode(32),zn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qn[e.type]:"textarea"===t}function Vn(e,t,n,r){Ee(r),0<(t=Wr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Gn=null;function Qn(e){Dr(e,0)}function Kn(e){if(G(wa(e)))return e}function Yn(e,t){if("change"===e)return t}var Zn=!1;if(c){var Xn;if(c){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"==typeof er.oninput}Xn=Jn}else Xn=!1;Zn=Xn&&(!document.documentMode||9 =t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=Q();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Q((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var a=n.textContent.length,o=Math.min(r.start,a);r=void 0===r.end?o:Math.min(r.end,a),!e.extend&&o>r&&(a=r,r=o,o=a),a=cr(n,o);var i=cr(n,r);a&&i&&(1!==e.rangeCount||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(a.node,a.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n =document.documentMode,hr=null,yr=null,br=null,vr=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==hr||hr!==Q(r)||("selectionStart"in(r=hr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},br&&lr(br,r)||(br=r,0<(r=Wr(yr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=hr)))}function kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xr={animationend:kr("Animation","AnimationEnd"),animationiteration:kr("Animation","AnimationIteration"),animationstart:kr("Animation","AnimationStart"),transitionend:kr("Transition","TransitionEnd")},_r={},Sr={};function Cr(e){if(_r[e])return _r[e];if(!xr[e])return e;var t,n=xr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return _r[e]=n[t];return e}c&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);var Er=Cr("animationend"),Tr=Cr("animationiteration"),Lr=Cr("animationstart"),Ar=Cr("transitionend"),Pr=new Map,Or="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function jr(e,t){Pr.set(e,t),l(t,[e])}for(var Nr=0;Nr _a||(e.current=xa[_a],xa[_a]=null,_a--)}function Ea(e,t){_a++,xa[_a]=e.current,e.current=t}var Ta={},La=Sa(Ta),Aa=Sa(!1),Pa=Ta;function Oa(e,t){var n=e.type.contextTypes;if(!n)return Ta;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ja(e){return null!=(e=e.childContextTypes)}function Na(){Ca(Aa),Ca(La)}function Ra(e,t,n){if(La.current!==Ta)throw Error(o(168));Ea(La,t),Ea(Aa,n)}function Ma(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in t))throw Error(o(108,q(e)||"Unknown",a));return F({},n,r)}function Ia(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ta,Pa=La.current,Ea(La,e),Ea(Aa,Aa.current),!0}function Fa(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Ma(e,t,Pa),r.__reactInternalMemoizedMergedChildContext=e,Ca(Aa),Ca(La),Ea(La,e)):Ca(Aa),Ea(Aa,n)}var Da=null,za=!1,Ba=!1;function $a(e){null===Da?Da=[e]:Da.push(e)}function Ua(){if(!Ba&&null!==Da){Ba=!0;var e=0,t=vt;try{var n=Da;for(vt=1;e >=i,a-=i,Ya=1<<32-it(t)+a|n<g?(h=d,d=null):h=d.sibling;var y=f(a,d,s[g],l);if(null===y){null===d&&(d=h);break}e&&d&&null===y.alternate&&t(a,d),o=i(y,o,g),null===c?u=y:c.sibling=y,c=y,d=h}if(g===s.length)return n(a,d),ao&&Xa(a,g),u;if(null===d){for(;g h?(y=g,g=null):y=g.sibling;var v=f(a,g,b.value,u);if(null===v){null===g&&(g=y);break}e&&g&&null===v.alternate&&t(a,g),s=i(v,s,h),null===d?c=v:d.sibling=v,d=v,g=y}if(b.done)return n(a,g),ao&&Xa(a,h),c;if(null===g){for(;!b.done;h++,b=l.next())null!==(b=p(a,b.value,u))&&(s=i(b,s,h),null===d?c=b:d.sibling=b,d=b);return ao&&Xa(a,h),c}for(g=r(a,g);!b.done;h++,b=l.next())null!==(b=m(g,a,h,b.value,u))&&(e&&null!==b.alternate&&g.delete(null===b.key?h:b.key),s=i(b,s,h),null===d?c=b:d.sibling=b,d=b);return e&&g.forEach((function(e){return t(a,e)})),ao&&Xa(a,h),c}return function e(r,o,i,l){if("object"==typeof i&&null!==i&&i.type===_&&null===i.key&&(i=i.props.children),"object"==typeof i&&null!==i){switch(i.$$typeof){case k:e:{for(var u=i.key,c=o;null!==c;){if(c.key===u){if((u=i.type)===_){if(7===c.tag){n(r,c.sibling),(o=a(c,i.props.children)).return=r,r=o;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===j&&vo(u)===c.type){n(r,c.sibling),(o=a(c,i.props)).ref=yo(r,c,i),o.return=r,r=o;break e}n(r,c);break}t(r,c),c=c.sibling}i.type===_?((o=Mu(i.props.children,r.mode,l,i.key)).return=r,r=o):((l=Ru(i.type,i.key,i.props,null,r.mode,l)).ref=yo(r,o,i),l.return=r,r=l)}return s(r);case x:e:{for(c=i.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===i.containerInfo&&o.stateNode.implementation===i.implementation){n(r,o.sibling),(o=a(o,i.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Du(i,r.mode,l)).return=r,r=o}return s(r);case j:return e(r,o,(c=i._init)(i._payload),l)}if(te(i))return g(r,o,i,l);if(M(i))return h(r,o,i,l);bo(r,i)}return"string"==typeof i&&""!==i||"number"==typeof i?(i=""+i,null!==o&&6===o.tag?(n(r,o.sibling),(o=a(o,i)).return=r,r=o):(n(r,o),(o=Fu(i,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var ko=wo(!0),xo=wo(!1),_o=Sa(null),So=null,Co=null,Eo=null;function To(){Eo=Co=So=null}function Lo(e){var t=_o.current;Ca(_o),e._currentValue=t}function Ao(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Po(e,t){So=e,Eo=Co=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(vs=!0),e.firstContext=null)}function Oo(e){var t=e._currentValue;if(Eo!==e)if(e={context:e,memoizedValue:t,next:null},null===Co){if(null===So)throw Error(o(308));Co=e,So.dependencies={lanes:0,firstContext:e}}else Co=Co.next=e;return t}var jo=null;function No(e){null===jo?jo=[e]:jo.push(e)}function Ro(e,t,n,r){var a=t.interleaved;return null===a?(n.next=n,No(t)):(n.next=a.next,a.next=n),t.interleaved=n,Mo(e,r)}function Mo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Io=!1;function Fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Do(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Ll){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,Mo(e,n)}return null===(a=r.interleaved)?(t.next=t,No(r)):(t.next=a.next,a.next=t),r.interleaved=t,Mo(e,n)}function $o(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function Uo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function qo(e,t,n,r){var a=e.updateQueue;Io=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,s=a.shared.pending;if(null!==s){a.shared.pending=null;var l=s,u=l.next;l.next=null,null===i?o=u:i.next=u,i=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==o){var d=a.baseState;for(i=0,c=u=l=null,s=o;;){var p=s.lane,f=s.eventTime;if((r&p)===p){null!==c&&(c=c.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(p=t,f=n,g.tag){case 1:if("function"==typeof(m=g.payload)){d=m.call(f,d,p);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(p="function"==typeof(m=g.payload)?m.call(f,d,p):m))break e;d=F({},d,p);break e;case 2:Io=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(p=a.effects)?a.effects=[s]:p.push(s))}else f={eventTime:f,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=f,l=d):c=c.next=f,i|=p;if(null===(s=s.next)){if(null===(s=a.shared.pending))break;s=(p=s).next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}if(null===c&&(l=d),a.baseState=l,a.firstBaseUpdate=u,a.lastBaseUpdate=c,null!==(t=a.shared.interleaved)){a=t;do{i|=a.lane,a=a.next}while(a!==t)}else null===o&&(a.shared.lanes=0);Il|=i,e.lanes=i,e.memoizedState=d}}function Ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t n?n:4,e(!0);var r=oi.transition;oi.transition={};try{e(!1),t()}finally{vt=n,oi.transition=r}}function Wi(){return vi().memoizedState}function Gi(e,t,n){var r=tu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ki(e))Yi(t,n);else if(null!==(n=Ro(e,t,n,r))){nu(n,e,r,eu()),Zi(n,t,r)}}function Qi(e,t,n){var r=tu(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ki(e))Yi(t,a);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=o(i,n);if(a.hasEagerState=!0,a.eagerState=s,sr(s,i)){var l=t.interleaved;return null===l?(a.next=a,No(t)):(a.next=l.next,l.next=a),void(t.interleaved=a)}}catch(u){}null!==(n=Ro(e,t,a,r))&&(nu(n,e,r,a=eu()),Zi(n,t,r))}}function Ki(e){var t=e.alternate;return e===si||null!==t&&t===si}function Yi(e,t){di=ci=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zi(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var Xi={readContext:Oo,useCallback:mi,useContext:mi,useEffect:mi,useImperativeHandle:mi,useInsertionEffect:mi,useLayoutEffect:mi,useMemo:mi,useReducer:mi,useRef:mi,useState:mi,useDebugValue:mi,useDeferredValue:mi,useTransition:mi,useMutableSource:mi,useSyncExternalStore:mi,useId:mi,unstable_isNewReconciler:!1},Ji={readContext:Oo,useCallback:function(e,t){return bi().memoizedState=[e,void 0===t?null:t],e},useContext:Oo,useEffect:Mi,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ni(4194308,4,zi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ni(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ni(4,2,e,t)},useMemo:function(e,t){var n=bi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Gi.bind(null,si,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},bi().memoizedState=e},useState:Pi,useDebugValue:$i,useDeferredValue:function(e){return bi().memoizedState=e},useTransition:function(){var e=Pi(!1),t=e[0];return e=Vi.bind(null,e[1]),bi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=si,a=bi();if(ao){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Al)throw Error(o(349));30&ii||Ci(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Mi(Ti.bind(null,r,i,e),[e]),r.flags|=2048,Oi(9,Ei.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=bi(),t=Al.identifierPrefix;if(ao){var n=Za;t=":"+t+"R"+(n=(Ya&~(1<<32-it(Ya)-1)).toString(32)+n),0<(n=pi++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fi++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Oo,useCallback:Ui,useContext:Oo,useEffect:Ii,useImperativeHandle:Bi,useInsertionEffect:Fi,useLayoutEffect:Di,useMemo:qi,useReducer:ki,useRef:ji,useState:function(){return ki(wi)},useDebugValue:$i,useDeferredValue:function(e){return Hi(vi(),li.memoizedState,e)},useTransition:function(){return[ki(wi)[0],vi().memoizedState]},useMutableSource:_i,useSyncExternalStore:Si,useId:Wi,unstable_isNewReconciler:!1},ts={readContext:Oo,useCallback:Ui,useContext:Oo,useEffect:Ii,useImperativeHandle:Bi,useInsertionEffect:Fi,useLayoutEffect:Di,useMemo:qi,useReducer:xi,useRef:ji,useState:function(){return xi(wi)},useDebugValue:$i,useDeferredValue:function(e){var t=vi();return null===li?t.memoizedState=e:Hi(t,li.memoizedState,e)},useTransition:function(){return[xi(wi)[0],vi().memoizedState]},useMutableSource:_i,useSyncExternalStore:Si,useId:Wi,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=F({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:F({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var as={isMounted:function(e){return!!(e=e._reactInternals)&&Ue(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=eu(),a=tu(e),o=zo(r,a);o.payload=t,null!=n&&(o.callback=n),null!==(t=Bo(e,o,a))&&(nu(t,e,a,r),$o(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=eu(),a=tu(e),o=zo(r,a);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Bo(e,o,a))&&(nu(t,e,a,r),$o(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),r=tu(e),a=zo(n,r);a.tag=2,null!=t&&(a.callback=t),null!==(t=Bo(e,a,r))&&(nu(t,e,r,n),$o(t,e,r))}};function os(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(a,o))}function is(e,t,n){var r=!1,a=Ta,o=t.contextType;return"object"==typeof o&&null!==o?o=Oo(o):(a=ja(t)?Pa:La.current,o=(r=null!=(r=t.contextTypes))?Oa(e,a):Ta),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=as,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&as.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},Fo(e);var o=t.contextType;"object"==typeof o&&null!==o?a.context=Oo(o):(o=ja(t)?Pa:La.current,a.context=Oa(e,o)),a.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(rs(e,t,o,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&as.enqueueReplaceState(a,a.state,null),qo(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4194308)}function us(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var a=n}catch(o){a="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:a,digest:null}}function cs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ps="function"==typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=zo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Vl=r),ds(0,t)},n}function ms(e,t,n){(n=zo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){ds(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!=typeof r&&(null===Wl?Wl=new Set([this]):Wl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ps;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=Cu.bind(null,e,t,n),t.then(e,e))}function hs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,a){return 1&e.mode?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=zo(-1,1)).tag=2,Bo(n,t,1))),n.lanes|=1),e)}var bs=w.ReactCurrentOwner,vs=!1;function ws(e,t,n,r){t.child=null===e?xo(t,null,n,r):ko(t,e.child,n,r)}function ks(e,t,n,r,a){n=n.render;var o=t.ref;return Po(t,a),r=hi(e,t,n,r,o,a),n=yi(),null===e||vs?(ao&&n&&eo(t),t.flags|=1,ws(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Hs(e,t,a))}function xs(e,t,n,r,a){if(null===e){var o=n.type;return"function"!=typeof o||ju(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ru(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,_s(e,t,o,r,a))}if(o=e.child,!(e.lanes&a)){var i=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(i,r)&&e.ref===t.ref)return Hs(e,t,a)}return t.flags|=1,(e=Nu(o,r)).ref=t.ref,e.return=t,t.child=e}function _s(e,t,n,r,a){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(vs=!1,t.pendingProps=r=o,!(e.lanes&a))return t.lanes=e.lanes,Hs(e,t,a);131072&e.flags&&(vs=!0)}}return Es(e,t,n,r,a)}function Ss(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ea(Nl,jl),jl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ea(Nl,jl),jl|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ea(Nl,jl),jl|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ea(Nl,jl),jl|=r;return ws(e,t,a,n),t.child}function Cs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Es(e,t,n,r,a){var o=ja(n)?Pa:La.current;return o=Oa(t,o),Po(t,a),n=hi(e,t,n,r,o,a),r=yi(),null===e||vs?(ao&&r&&eo(t),t.flags|=1,ws(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Hs(e,t,a))}function Ts(e,t,n,r,a){if(ja(n)){var o=!0;Ia(t)}else o=!1;if(Po(t,a),null===t.stateNode)qs(e,t),is(t,n,r),ls(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=n.contextType;"object"==typeof u&&null!==u?u=Oo(u):u=Oa(t,u=ja(n)?Pa:La.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==u)&&ss(t,i,r,u),Io=!1;var p=t.memoizedState;i.state=p,qo(t,r,i,a),l=t.memoizedState,s!==r||p!==l||Aa.current||Io?("function"==typeof c&&(rs(t,n,c,r),l=t.memoizedState),(s=Io||os(t,n,s,r,p,l,u))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Do(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ns(t.type,s),i.props=u,d=t.pendingProps,p=i.context,"object"==typeof(l=n.contextType)&&null!==l?l=Oo(l):l=Oa(t,l=ja(n)?Pa:La.current);var f=n.getDerivedStateFromProps;(c="function"==typeof f||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||p!==l)&&ss(t,i,r,l),Io=!1,p=t.memoizedState,i.state=p,qo(t,r,i,a);var m=t.memoizedState;s!==d||p!==m||Aa.current||Io?("function"==typeof f&&(rs(t,n,f,r),m=t.memoizedState),(u=Io||os(t,n,u,r,p,m,l)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,m,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,m,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=l,r=u):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Ls(e,t,n,r,o,a)}function Ls(e,t,n,r,a,o){Cs(e,t);var i=!!(128&t.flags);if(!r&&!i)return a&&Fa(t,n,!1),Hs(e,t,o);r=t.stateNode,bs.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=ko(t,e.child,null,o),t.child=ko(t,null,s,o)):ws(e,t,s,o),t.memoizedState=r.state,a&&Fa(t,n,!0),t.child}function As(e){var t=e.stateNode;t.pendingContext?Ra(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ra(0,t.context,!1),Yo(e,t.containerInfo)}function Ps(e,t,n,r,a){return mo(),go(a),t.flags|=256,ws(e,t,n,r),t.child}var Os,js,Ns,Rs,Ms={dehydrated:null,treeContext:null,retryLane:0};function Is(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fs(e,t,n){var r,a=t.pendingProps,i=ei.current,s=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&i)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Ea(ei,1&i),null===e)return uo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=a.children,e=a.fallback,s?(a=t.mode,s=t.child,l={mode:"hidden",children:l},1&a||null===s?s=Iu(l,a,0,null):(s.childLanes=0,s.pendingProps=l),e=Mu(e,a,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Is(n),t.memoizedState=Ms,e):Ds(t,l));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,a,i,s){if(n)return 256&t.flags?(t.flags&=-257,zs(e,t,s,r=cs(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,a=t.mode,r=Iu({mode:"visible",children:r.children},a,0,null),(i=Mu(i,a,s,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,1&t.mode&&ko(t,e.child,null,s),t.child.memoizedState=Is(s),t.memoizedState=Ms,i);if(!(1&t.mode))return zs(e,t,s,null);if("$!"===a.data){if(r=a.nextSibling&&a.nextSibling.dataset)var l=r.dgst;return r=l,zs(e,t,s,r=cs(i=Error(o(419)),r,void 0))}if(l=!!(s&e.childLanes),vs||l){if(null!==(r=Al)){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(a=a&(r.suspendedLanes|s)?0:a)&&a!==i.retryLane&&(i.retryLane=a,Mo(e,a),nu(r,e,a,-1))}return gu(),zs(e,t,s,r=cs(Error(o(421))))}return"$?"===a.data?(t.flags|=128,t.child=e.child,t=Tu.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,ro=ua(a.nextSibling),no=t,ao=!0,oo=null,null!==e&&(Ga[Qa++]=Ya,Ga[Qa++]=Za,Ga[Qa++]=Ka,Ya=e.id,Za=e.overflow,Ka=t),t=Ds(t,r.children),t.flags|=4096,t)}(e,t,l,a,r,i,n);if(s){s=a.fallback,l=t.mode,r=(i=e.child).sibling;var u={mode:"hidden",children:a.children};return 1&l||t.child===i?(a=Nu(i,u)).subtreeFlags=14680064&i.subtreeFlags:((a=t.child).childLanes=0,a.pendingProps=u,t.deletions=null),null!==r?s=Nu(r,s):(s=Mu(s,l,n,null)).flags|=2,s.return=t,a.return=t,a.sibling=s,t.child=a,a=s,s=t.child,l=null===(l=e.child.memoizedState)?Is(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ms,a}return e=(s=e.child).sibling,a=Nu(s,{mode:"visible",children:a.children}),!(1&t.mode)&&(a.lanes=n),a.return=t,a.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=a,t.memoizedState=null,a}function Ds(e,t){return(t=Iu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function zs(e,t,n,r){return null!==r&&go(r),ko(t,e.child,null,n),(e=Ds(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ao(e.return,t,n)}function $s(e,t,n,r,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a)}function Us(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(ws(e,t,r.children,n),2&(r=ei.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bs(e,n,t);else if(19===e.tag)Bs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ea(ei,r),1&t.mode)switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===ti(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),$s(t,!1,a,n,o);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===ti(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}$s(t,!0,n,null,o);break;case"together":$s(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function qs(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Il|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Nu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Nu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Vs(e,t){if(!ao)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ws(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=14680064&a.subtreeFlags,r|=14680064&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gs(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ws(t),null;case 1:case 17:return ja(t.type)&&Na(),Ws(t),null;case 3:return r=t.stateNode,Zo(),Ca(Aa),Ca(La),ri(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(po(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==oo&&(iu(oo),oo=null))),js(e,t),Ws(t),null;case 5:Jo(t);var a=Ko(Qo.current);if(n=t.type,null!==e&&null!=t.stateNode)Ns(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Ws(t),null}if(e=Ko(Wo.current),po(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[pa]=t,r[fa]=i,e=!!(1&t.mode),n){case"dialog":zr("cancel",r),zr("close",r);break;case"iframe":case"object":case"embed":zr("load",r);break;case"video":case"audio":for(a=0;a <\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[pa]=t,e[fa]=r,Os(e,t,!1,!1),t.stateNode=e;e:{switch(l=ve(n,r),n){case"dialog":zr("cancel",e),zr("close",e),a=r;break;case"iframe":case"object":case"embed":zr("load",e),a=r;break;case"video":case"audio":for(a=0;a Ul&&(t.flags|=128,r=!0,Vs(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ti(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Vs(i,!0),null===i.tail&&"hidden"===i.tailMode&&!l.alternate&&!ao)return Ws(t),null}else 2*Ze()-i.renderingStartTime>Ul&&1073741824!==n&&(t.flags|=128,r=!0,Vs(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=i.last)?n.sibling=l:t.child=l,i.last=l)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ze(),t.sibling=null,n=ei.current,Ea(ei,r?1&n|2:1&n),t):(Ws(t),null);case 22:case 23:return du(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&jl)&&(Ws(t),6&t.subtreeFlags&&(t.flags|=8192)):Ws(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Qs(e,t){switch(to(t),t.tag){case 1:return ja(t.type)&&Na(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Zo(),Ca(Aa),Ca(La),ri(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Jo(t),null;case 13:if(Ca(ei),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));mo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ca(ei),null;case 4:return Zo(),null;case 10:return Lo(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Os=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},js=function(){},Ns=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,Ko(Wo.current);var o,i=null;switch(n){case"input":a=K(e,a),r=K(e,r),i=[];break;case"select":a=F({},a,{value:void 0}),r=F({},r,{value:void 0}),i=[];break;case"textarea":a=re(e,a),r=re(e,r),i=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(c in be(n,r),n=null,a)if(!r.hasOwnProperty(c)&&a.hasOwnProperty(c)&&null!=a[c])if("style"===c){var l=a[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=a?a[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(i||(i=[]),i.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(i=i||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(i=i||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&zr("scroll",e),i||l===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}},Rs=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ks=!1,Ys=!1,Zs="function"==typeof WeakSet?WeakSet:Set,Xs=null;function Js(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Su(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){Su(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var a=r=r.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,void 0!==o&&el(t,n,o)}a=a.next}while(a!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function al(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[pa],delete t[fa],delete t[ga],delete t[ha],delete t[ya])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function il(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||il(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var cl=null,dl=!1;function pl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(at,n)}catch(s){}switch(n.tag){case 5:Ys||Js(n,t);case 6:var r=cl,a=dl;cl=null,pl(e,t,n),dl=a,null!==(cl=r)&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?la(e.parentNode,n):1===e.nodeType&&la(e,n),Ut(e)):la(cl,n.stateNode));break;case 4:r=cl,a=dl,cl=n.stateNode.containerInfo,dl=!0,pl(e,t,n),cl=r,dl=a;break;case 0:case 11:case 14:case 15:if(!Ys&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){a=r=r.next;do{var o=a,i=o.destroy;o=o.tag,void 0!==i&&(2&o||4&o)&&el(n,t,i),a=a.next}while(a!==r)}pl(e,t,n);break;case 1:if(!Ys&&(Js(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Su(n,t,s)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,pl(e,t,n),Ys=r):pl(e,t,n);break;default:pl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Zs),t.forEach((function(t){var r=Lu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r a&&(a=s),r&=~i}if(r=a,10<(r=(120>(r=Ze()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sl(r/1960))-r)){e.timeoutHandle=ra(ku.bind(null,e,Bl,ql),r);break}ku(e,Bl,ql);break;default:throw Error(o(329))}}}return ru(e,Ze()),e.callbackNode===n?au.bind(null,e):null}function ou(e,t){var n=zl;return e.current.memoizedState.isDehydrated&&(pu(e,t).flags|=256),2!==(e=hu(e,t))&&(t=Bl,Bl=n,null!==t&&iu(t)),e}function iu(e){null===Bl?Bl=e:Bl.push.apply(Bl,e)}function su(e,t){for(t&=~Dl,t&=~Fl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 e?16:e,null===Ql)var r=!1;else{if(e=Ql,Ql=null,Kl=0,6&Ll)throw Error(o(331));var a=Ll;for(Ll|=4,Xs=e.current;null!==Xs;){var i=Xs,s=i.child;if(16&Xs.flags){var l=i.deletions;if(null!==l){for(var u=0;u Ze()-$l?pu(e,0):Dl|=n),ru(e,t)}function Eu(e,t){0===t&&(1&e.mode?(t=ct,!(130023424&(ct<<=1))&&(ct=4194304)):t=1);var n=eu();null!==(e=Mo(e,t))&&(yt(e,t,n),ru(e,n))}function Tu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Eu(e,n)}function Lu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Eu(e,n)}function Au(e,t){return Ge(e,t)}function Pu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ou(e,t,n,r){return new Pu(e,t,n,r)}function ju(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Nu(e,t){var n=e.alternate;return null===n?((n=Ou(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ru(e,t,n,r,a,i){var s=2;if(r=e,"function"==typeof e)ju(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case _:return Mu(n.children,a,i,t);case S:s=8,a|=8;break;case C:return(e=Ou(12,n,t,2|a)).elementType=C,e.lanes=i,e;case A:return(e=Ou(13,n,t,a)).elementType=A,e.lanes=i,e;case P:return(e=Ou(19,n,t,a)).elementType=P,e.lanes=i,e;case N:return Iu(n,a,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case E:s=10;break e;case T:s=9;break e;case L:s=11;break e;case O:s=14;break e;case j:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Ou(s,n,t,a)).elementType=e,t.type=r,t.lanes=i,t}function Mu(e,t,n,r){return(e=Ou(7,e,r,t)).lanes=n,e}function Iu(e,t,n,r){return(e=Ou(22,e,r,t)).elementType=N,e.lanes=n,e.stateNode={isHidden:!1},e}function Fu(e,t,n){return(e=Ou(6,e,null,t)).lanes=n,e}function Du(e,t,n){return(t=Ou(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zu(e,t,n,r,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ht(0),this.expirationTimes=ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Bu(e,t,n,r,a,o,i,s,l){return e=new zu(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Ou(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fo(o),e}function $u(e){if(!e)return Ta;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ja(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(ja(n))return Ma(e,n,t)}return t}function Uu(e,t,n,r,a,o,i,s,l){return(e=Bu(n,r,!0,e,0,o,0,s,l)).context=$u(null),n=e.current,(o=zo(r=eu(),a=tu(n))).callback=null!=t?t:null,Bo(n,o,a),e.current.lanes=a,yt(e,a,r),ru(e,r),e}function qu(e,t,n,r){var a=t.current,o=eu(),i=tu(a);return n=$u(n),null===t.context?t.context=n:t.pendingContext=n,(t=zo(o,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Bo(a,t,i))&&(nu(e,a,i,o),$o(e,a,i)),i}function Hu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n {"use strict";var r=n(961);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},961:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(2551)},115:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,a="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var s,l,u,c;if(Array.isArray(e)){if((s=e.length)!=i.length)return!1;for(l=s;0!=l--;)if(!o(e[l],i[l]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(c=e.entries();!(l=c.next()).done;)if(!i.has(l.value[0]))return!1;for(c=e.entries();!(l=c.next()).done;)if(!o(l.value[1],i.get(l.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(c=e.entries();!(l=c.next()).done;)if(!i.has(l.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((s=e.length)!=i.length)return!1;for(l=s;0!=l--;)if(e[l]!==i[l])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof i.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof i.toString)return e.toString()===i.toString();if((s=(u=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(i,u[l]))return!1;if(t&&e instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==u[l]&&"__v"!==u[l]&&"__o"!==u[l]||!e.$$typeof)&&!o(e[u[l]],i[u[l]]))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},545:(e,t,n)=>{"use strict";n.d(t,{mg:()=>J,vd:()=>V});var r=n(6540),a=n(5556),o=n.n(a),i=n(115),s=n.n(i),l=n(311),u=n.n(l),c=n(2833),d=n.n(c);function p(){return p=Object.assign||function(e){for(var t=1;t =0||(a[n]=e[n]);return a}var h={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},y={rel:["amphtml","canonical","alternate"]},b={type:["application/ld+json"]},v={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},w=Object.keys(h).map((function(e){return h[e]})),k={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},x=Object.keys(k).reduce((function(e,t){return e[k[t]]=t,e}),{}),_=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},S=function(e){var t=_(e,h.TITLE),n=_(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,(function(){return t}));var r=_(e,"defaultTitle");return t||r||void 0},C=function(e){return _(e,"onChangeClientState")||function(){}},E=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return p({},e,t)}),{})},T=function(e,t){return t.filter((function(e){return void 0!==e[h.BASE]})).map((function(e){return e[h.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a /g,">").replace(/"/g,""").replace(/'/g,"'")},M=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},I=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce((function(t,n){return t[k[n]||n]=e[n],t}),t)},F=function(e,t){return t.map((function(t,n){var a,o=((a={key:n})["data-rh"]=!0,a);return Object.keys(t).forEach((function(e){var n=k[e]||e;"innerHTML"===n||"cssText"===n?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]})),r.createElement(e,o)}))},D=function(e,t,n){switch(e){case h.TITLE:return{toComponent:function(){return n=t.titleAttributes,(a={key:e=t.title})["data-rh"]=!0,o=I(n,a),[r.createElement(h.TITLE,o,e)];var e,n,a,o},toString:function(){return function(e,t,n,r){var a=M(n),o=P(t);return a?"<"+e+' data-rh="true" '+a+">"+R(o,r)+""+e+">":"<"+e+' data-rh="true">'+R(o,r)+""+e+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return I(t)},toString:function(){return M(t)}};default:return{toComponent:function(){return F(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var a=Object.keys(r).filter((function(e){return!("innerHTML"===e||"cssText"===e)})).reduce((function(e,t){var a=void 0===r[t]?t:t+'="'+R(r[t],n)+'"';return e?e+" "+a:a}),""),o=r.innerHTML||r.cssText||"",i=-1===N.indexOf(e);return t+"<"+e+' data-rh="true" '+a+(i?"/>":">"+o+""+e+">")}),"")}(e,t,n)}}}},z=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,o=e.noscriptTags,i=e.styleTags,s=e.title,l=void 0===s?"":s,u=e.titleAttributes,c=e.linkTags,d=e.metaTags,p=e.scriptTags,f={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,a=O(e.metaTags,v),o=O(t,y),i=O(n,b);return{priorityMethods:{toComponent:function(){return[].concat(F(h.META,a.priority),F(h.LINK,o.priority),F(h.SCRIPT,i.priority))},toString:function(){return D(h.META,a.priority,r)+" "+D(h.LINK,o.priority,r)+" "+D(h.SCRIPT,i.priority,r)}},metaTags:a.default,linkTags:o.default,scriptTags:i.default}}(e);f=m.priorityMethods,c=m.linkTags,d=m.metaTags,p=m.scriptTags}return{priority:f,base:D(h.BASE,t,r),bodyAttributes:D("bodyAttributes",n,r),htmlAttributes:D("htmlAttributes",a,r),link:D(h.LINK,c,r),meta:D(h.META,d,r),noscript:D(h.NOSCRIPT,o,r),script:D(h.SCRIPT,p,r),style:D(h.STYLE,i,r),title:D(h.TITLE,{title:l,titleAttributes:u},r)}},B=[],$=function(e,t){var n=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?B:n.instances},add:function(e){(n.canUseDOM?B:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?B:n.instances).indexOf(e);(n.canUseDOM?B:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=z({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},U=r.createContext({}),q=o().shape({setHelmet:o().func,helmetInstances:o().shape({get:o().func,add:o().func,remove:o().func})}),H="undefined"!=typeof document,V=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new $(r.props.context,t.canUseDOM),r}return f(t,e),t.prototype.render=function(){return r.createElement(U.Provider,{value:this.helmetData.value},this.props.children)},t}(r.Component);V.canUseDOM=H,V.propTypes={context:o().shape({helmet:o().shape()}),children:o().node.isRequired},V.defaultProps={context:{}},V.displayName="HelmetProvider";var W=function(e,t){var n,r=document.head||document.querySelector(h.HEAD),a=r.querySelectorAll(e+"[data-rh]"),o=[].slice.call(a),i=[];return t&&t.length&&t.forEach((function(t){var r=document.createElement(e);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&("innerHTML"===a?r.innerHTML=t.innerHTML:"cssText"===a?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(a,void 0===t[a]?"":t[a]));r.setAttribute("data-rh","true"),o.some((function(e,t){return n=t,r.isEqualNode(e)}))?o.splice(n,1):i.push(r)})),o.forEach((function(e){return e.parentNode.removeChild(e)})),i.forEach((function(e){return r.appendChild(e)})),{oldTags:o,newTags:i}},G=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),a=r?r.split(","):[],o=[].concat(a),i=Object.keys(t),s=0;s =0;d-=1)n.removeAttribute(o[d]);a.length===o.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==i.join(",")&&n.setAttribute("data-rh",i.join(","))}},Q=function(e,t){var n=e.baseTag,r=e.htmlAttributes,a=e.linkTags,o=e.metaTags,i=e.noscriptTags,s=e.onChangeClientState,l=e.scriptTags,u=e.styleTags,c=e.title,d=e.titleAttributes;G(h.BODY,e.bodyAttributes),G(h.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=P(e)),G(h.TITLE,t)}(c,d);var p={baseTag:W(h.BASE,n),linkTags:W(h.LINK,a),metaTags:W(h.META,o),noscriptTags:W(h.NOSCRIPT,i),scriptTags:W(h.SCRIPT,l),styleTags:W(h.STYLE,u)},f={},m={};Object.keys(p).forEach((function(e){var t=p[e],n=t.newTags,r=t.oldTags;n.length&&(f[e]=n),r.length&&(m[e]=p[e].oldTags)})),t&&t(),s(e,f,m)},K=null,Y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return p({},r,((t={})[n.type]=[].concat(r[n.type]||[],[p({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,o=e.newChildProps,i=e.nestedChildren;switch(r.type){case h.TITLE:return p({},a,((t={})[r.type]=i,t.titleAttributes=p({},o),t));case h.BODY:return p({},a,{bodyAttributes:p({},o)});case h.HTML:return p({},a,{htmlAttributes:p({},o)});default:return p({},a,((n={})[r.type]=p({},o),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=p({},t);return Object.keys(e).forEach((function(t){var r;n=p({},n,((r={})[t]=e[t],r))})),n},n.warnOnInvalidChildren=function(e,t){return u()(w.some((function(t){return e.type===t})),"function"==typeof e.type?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+w.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),u()(!t||"string"==typeof t||Array.isArray(t)&&!t.some((function(e){return"string"!=typeof e})),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}"+e.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,a={};return r.Children.forEach(e,(function(e){if(e&&e.props){var r=e.props,o=r.children,i=g(r,Z),s=Object.keys(i).reduce((function(e,t){return e[x[t]||t]=i[t],e}),{}),l=e.type;switch("symbol"==typeof l?l=l.toString():n.warnOnInvalidChildren(e,o),l){case h.FRAGMENT:t=n.mapChildrenToProps(o,t);break;case h.LINK:case h.META:case h.NOSCRIPT:case h.SCRIPT:case h.STYLE:a=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:a,newChildProps:s,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:s,nestedChildren:o})}}})),this.mapArrayTypeChildrenToProps(a,t)},n.render=function(){var e=this.props,t=e.children,n=g(e,X),a=p({},n),o=n.helmetData;return t&&(a=this.mapChildrenToProps(t,a)),!o||o instanceof $||(o=new $(o.context,o.instances)),o?r.createElement(Y,p({},a,{context:o.value,helmetData:void 0})):r.createElement(U.Consumer,null,(function(e){return r.createElement(Y,p({},a,{context:e}))}))},t}(r.Component);J.propTypes={base:o().object,bodyAttributes:o().object,children:o().oneOfType([o().arrayOf(o().node),o().node]),defaultTitle:o().string,defer:o().bool,encodeSpecialCharacters:o().bool,htmlAttributes:o().object,link:o().arrayOf(o().object),meta:o().arrayOf(o().object),noscript:o().arrayOf(o().object),onChangeClientState:o().func,script:o().arrayOf(o().object),style:o().arrayOf(o().object),title:o().string,titleAttributes:o().object,titleTemplate:o().string,prioritizeSeoTags:o().bool,helmetData:o().object},J.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},J.displayName="Helmet"},2799:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case s:case i:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case h:case g:case l:return e;default:return t}}case a:return t}}}function x(e){return k(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=h,t.Memo=g,t.Portal=a,t.Profiler=s,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||k(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return k(e)===u},t.isContextProvider=function(e){return k(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===p},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===h},t.isMemo=function(e){return k(e)===g},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===s},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===i||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w||e.$$typeof===y)},t.typeOf=k},4363:(e,t,n)=>{"use strict";e.exports=n(2799)},3259:(e,t,n)=>{"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;t {"use strict";n.d(t,{u:()=>i,v:()=>s});var r=n(6347),a=n(8168),o=n(6540);function i(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var a=e.path?(0,r.B6)(t,e):n.length?n[n.length-1].match:r.Ix.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&i(e.routes,t,n)),a})),n}function s(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.createElement(r.dO,n,e.map((function(e,n){return o.createElement(r.qh,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,a.A)({},n,{},t,{route:e})):o.createElement(e.component,(0,a.A)({},n,t,{route:e}))}})}))):null}},4625:(e,t,n)=>{"use strict";n.d(t,{Kd:()=>c,N_:()=>h,k2:()=>v});var r=n(6347),a=n(7387),o=n(6540),i=n(1513),s=n(8168),l=n(8587),u=n(1561),c=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a {"use strict";n.d(t,{B6:()=>_,Ix:()=>v,W6:()=>j,XZ:()=>b,dO:()=>P,qh:()=>S,zy:()=>N});var r=n(7387),a=n(6540),o=n(5556),i=n.n(o),s=n(1513),l=n(1561),u=n(8168),c=n(8505),d=n.n(c),p=(n(4363),n(8587)),f=(n(4146),1073741823),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var g=a.createContext||function(e,t){var n,o,s="__create-react-context-"+function(){var e="__global_unique_id__";return m[e]=(m[e]||0)+1}()+"__",l=function(e){function n(){for(var t,n,r,a=arguments.length,o=new Array(a),i=0;i{var r=n(4634);e.exports=f,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=p;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,i=0,s="",c=t&&t.delimiter||"/";null!=(n=a.exec(e));){var d=n[0],p=n[1],f=n.index;if(s+=e.slice(i,f),i=f+d.length,p)s+=p[1];else{var m=e[i],g=n[2],h=n[3],y=n[4],b=n[5],v=n[6],w=n[7];s&&(r.push(s),s="");var k=null!=g&&null!=m&&m!==g,x="+"===v||"*"===v,_="?"===v||"*"===v,S=n[2]||c,C=y||b;r.push({name:h||o++,prefix:g||"",delimiter:S,optional:_,repeat:x,partial:k,asterisk:!!w,pattern:C?u(C):w?".*":"[^"+l(S)+"]+?"})}}return i {"use strict";var r=n(6540),a=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,o={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:a,type:e,key:u,ref:c,props:o,_owner:s.current}}t.Fragment=o,t.jsx=u,t.jsxs=u},5287:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,h={};function y(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}function b(){}function v(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var w=v.prototype=new b;w.constructor=v,g(w,y.prototype),w.isPureReactComponent=!0;var k=Array.isArray,x=Object.prototype.hasOwnProperty,_={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,r){var a,o={},i=null,s=null;if(null!=t)for(a in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)x.call(t,a)&&!S.hasOwnProperty(a)&&(o[a]=t[a]);var l=arguments.length-2;if(1===l)o.children=r;else if(1 {"use strict";e.exports=n(5287)},4848:(e,t,n)=>{"use strict";e.exports=n(1020)},7463:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0 >>1,a=e[r];if(!(0 >>1;ro(l,n))uo(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(uo(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,p=null,f=3,m=!1,g=!1,h=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(c);null!==t;){if(null===t.callback)a(c);else{if(!(t.startTime<=e))break;a(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function k(e){if(h=!1,w(e),!g)if(null!==r(u))g=!0,N(x);else{var t=r(c);null!==t&&R(k,t.startTime-e)}}function x(e,n){g=!1,h&&(h=!1,b(E),E=-1),m=!0;var o=f;try{for(w(n),p=r(u);null!==p&&(!(p.expirationTime>n)||e&&!A());){var i=p.callback;if("function"==typeof i){p.callback=null,f=p.priorityLevel;var s=i(p.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?p.callback=s:p===r(u)&&a(u),w(n)}else a(u);p=r(u)}if(null!==p)var l=!0;else{var d=r(c);null!==d&&R(k,d.startTime-n),l=!1}return l}finally{p=null,f=o,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,S=!1,C=null,E=-1,T=5,L=-1;function A(){return!(t.unstable_now()-L e||125 i?(e.sortIndex=o,n(c,e),null===r(u)&&e===r(c)&&(h?(b(E),E=-1):h=!0,R(k,o-i))):(e.sortIndex=s,n(u,e),g||m||(g=!0,N(x))),e},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},9982:(e,t,n)=>{"use strict";e.exports=n(7463)},2833:e=>{e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l {"use strict";n.d(t,{A:()=>r});const r={title:"Compressa",favicon:"img/logo-compressa.jpeg",url:"https://compressa.ai",baseUrl:"/",organizationName:"compressa-ai",projectName:"docs",onBrokenLinks:"ignore",onBrokenMarkdownLinks:"warn",i18n:{defaultLocale:"ru",locales:["ru"],path:"i18n",localeConfigs:{}},presets:[["classic",{docs:{path:"i18n/ru/docusaurus-plugin-content-docs/current",routeBasePath:"/",sidebarPath:"./sidebars.js",editUrl:"https://github.com/compressa-ai/compressa-ai.github.io/edit/main/",sidebarCollapsible:!1},theme:{customCss:"./src/css/custom.css"}}],["redocusaurus",{config:"/home/runner/work/docs/docs/redocly.yaml",specs:[{id:"api",route:"/api",spec:"static/resources/openapi.yaml"}],theme:{primaryColor:"#4786FF",options:{disableSearch:!0,requiredPropsFirst:!0,noAutoAuth:!0}}}]],themeConfig:{image:"img/docusaurus-social-card.jpg",navbar:{title:"Compressa",logo:{alt:"Logo",src:"img/logo-compressa.jpeg"},items:[{type:"docSidebar",sidebarId:"docsSidebar",position:"left",label:"\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f"},{type:"docSidebar",sidebarId:"guidesSidebar",position:"left",label:"\u0413\u0430\u0439\u0434\u044b"},{type:"docSidebar",sidebarId:"onpremSidebar",position:"left",label:"\u0417\u0430\u043f\u0443\u0441\u043a \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435"},{href:"https://github.com/compressa-ai/docs/",label:"GitHub",position:"right"}],hideOnScroll:!1},footer:{style:"dark",copyright:"Copyright \xa9 2024 Compressa, Inc.",links:[]},prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},additionalLanguages:["powershell","php","csharp"],magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},baseUrlIssueBanner:!0,onBrokenAnchors:"warn",onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},plugins:[],themes:[],scripts:[],headTags:[],stylesheets:[],clientModules:[],tagline:"",titleDelimiter:"|",noIndex:!1,markdown:{format:"mdx",mermaid:!1,mdx1Compat:{comments:!0,admonitions:!0,headingIds:!0},anchors:{maintainCase:!1}}}},8168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t r})},7387:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(3662);function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}},8587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},3662:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},4164:(e,t,n)=>{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t a});const a=function(){for(var e,t,n=0,a="",o=arguments.length;n {"use strict";n.d(t,{My:()=>T,f4:()=>ee});var r,a,o,i,s,l,u,c=n(6540),d=n(4164),p=Object.create,f=Object.defineProperty,m=Object.defineProperties,g=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,v=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,x=(e,t,n)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_=(e,t)=>{for(var n in t||(t={}))w.call(t,n)&&x(e,n,t[n]);if(b)for(var n of b(t))k.call(t,n)&&x(e,n,t[n]);return e},S=(e,t)=>m(e,h(t)),C=(e,t)=>{var n={};for(var r in e)w.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&b)for(var r of b(e))t.indexOf(r)<0&&k.call(e,r)&&(n[r]=e[r]);return n},E=(r={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);_+=x.value.length,x=x.next){var S=x.value;if(t.length>e.length)return;if(!(S instanceof a)){var C,E=1;if(b){if(!(C=o(k,_,e,y))||C.index>=e.length)break;var T=C.index,L=C.index+C[0].length,A=_;for(A+=x.value.length;T>=A;)A+=(x=x.next).value.length;if(_=A-=x.value.length,x.value instanceof a)continue;for(var P=x;P!==t.tail&&(A d.reach&&(d.reach=R);var M=x.prev;if(j&&(M=l(t,M,j),_+=j.length),u(t,M,E),x=l(t,M,new a(p,h?r.tokenize(O,h):O,v,O)),N&&l(t,x,N),E>1){var I={cause:p+","+m,reach:R};i(e,t,n,x.prev,_,I),d&&I.reach>d.reach&&(d.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function u(e,t,n){for(var r=t.next,a=0;a "+o.content+""+o.tag+">"},r}();t.exports=n,n.default=n}},function(){return a||(0,r[y(r)[0]])((a={exports:{}}).exports,a),a.exports}),T=((e,t,n)=>(n=null!=e?p(v(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of y(t))w.call(e,a)||a===n||f(e,a,{get:()=>t[a],enumerable:!(r=g(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?n:f(n,"default",{value:e,enumerable:!0}),e)))(E());T.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/?[\da-f]{1,8};/i]},T.languages.markup.tag.inside["attr-value"].inside.entity=T.languages.markup.entity,T.languages.markup.doctype.inside["internal-subset"].inside=T.languages.markup,T.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(T.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:T.languages[t]},n.cdata=/^$/i,{"included-cdata":{pattern://i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:T.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},T.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(T.languages.markup.tag,"addAttribute",{value:function(e,t){T.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:T.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),T.languages.html=T.languages.markup,T.languages.mathml=T.languages.markup,T.languages.svg=T.languages.markup,T.languages.xml=T.languages.extend("markup",{}),T.languages.ssml=T.languages.xml,T.languages.atom=T.languages.xml,T.languages.rss=T.languages.xml,o=T,i={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},l="(?:[^\\\\-]|"+(s=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",l=RegExp(l+"-"+l),u={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},o.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:l,inside:{escape:s,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":i,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:s}},"special-escape":i,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":u}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:s,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":u}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},T.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},T.languages.javascript=T.languages.extend("clike",{"class-name":[T.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),T.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,T.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:T.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:T.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:T.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:T.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:T.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),T.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:T.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),T.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),T.languages.markup&&(T.languages.markup.tag.addInlined("script","javascript"),T.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),T.languages.js=T.languages.javascript,T.languages.actionscript=T.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<|>>?>?|[!=]=?)=?|[~?@]/}),T.languages.actionscript["class-name"].alias="function",delete T.languages.actionscript.parameter,delete T.languages.actionscript["literal-property"],T.languages.markup&&T.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:T.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(T),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach((function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var s=0,l=i.length;s |\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(T),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-] )(?:[ \t]*(?:(?![#:]) |: ))*/.source.replace(/ /g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s< >[ \t]+)?)(?:< >)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/< >/g,(function(){return r})).replace(/< >/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s< >[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/< >/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:< >[ \t]+)?)< >(?=\s*:\s)/.source.replace(/< >/g,(function(){return r})).replace(/< >/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(T),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/