{"id":452391,"date":"2025-03-19T21:00:05","date_gmt":"2025-03-19T21:00:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=452391"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=452391","title":{"rendered":"<span>\u0412\u044b\u0431\u043e\u0440 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 LLM \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043d\u0430 \u0441\u0430\u0439\u0442 \u0441 \u0447\u0430\u0442\u043e\u043c<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<blockquote>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, <a href=\"https:\/\/github.com\/tripolskypetr\/agent-swarm-kit\/blob\/master\/demo\/client-server-chat\/src\/server.ts\" rel=\"noopener noreferrer nofollow\">\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u0432 \u044d\u0442\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a><\/p>\n<\/blockquote>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0431\u0438\u0437\u043d\u0435\u0441-\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a LLM \u043c\u043e\u0434\u0435\u043b\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u0436\u0435\u043b\u0435\u0437\u0435. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 SJW \u0446\u0435\u043d\u0437\u0443\u0440\u043e\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f Llama \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u0446\u0438\u0438, \u043d\u043e\u0441\u044f\u0449\u0438\u0435 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0438\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440: \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u0430, \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u043d\u043e\u0441\u044f\u0449\u0443\u044e \u0438\u043d\u0442\u0438\u043c\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0443\u044e \u0442\u0430\u0439\u043d\u0443 \u0441 \u0418\u0418-\u0442\u0435\u0440\u0430\u043f\u0435\u0432\u0442\u043e\u043c  (\u0441\u043c \u043f\u043e\u0431\u043e\u0447\u043a\u0438 \u0430\u043d\u0442\u0438\u0434\u0435\u043f\u0440\u0435\u0441\u0441\u0430\u043d\u0442\u043e\u0432)<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b8b\/256\/a11\/b8b256a11017a4adade993462eb64830.png\" alt=\"DeepSeek-R1 \u0432 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u0435, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\" title=\"DeepSeek-R1 \u0432 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u0435, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\" width=\"1754\" height=\"760\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b8b\/256\/a11\/b8b256a11017a4adade993462eb64830.png\"\/><\/p>\n<div><figcaption>DeepSeek-R1 \u0432 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u0435, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a \u0436\u0435, \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c <a href=\"https:\/\/platform.openai.com\/docs\/guides\/function-calling\" rel=\"noopener noreferrer nofollow\">\u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/a>, \u043e\u043d\u0430 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430: \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u0432\u0435\u0441\u0442\u0438 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0435\u0439 \u0444\u0430\u0440\u043c\u043e\u043a\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u044e\u0442 \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u044b\u0439 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b<\/p>\n<h2>\u041e\u0431\u0437\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h2>\n<ul>\n<li>\n<p><strong>NVidia Nemotron Mini, <\/strong><a href=\"https:\/\/ollama.com\/library\/nemotron-mini\" rel=\"noopener noreferrer nofollow\">https:\/\/ollama.com\/library\/nemotron-mini<\/a><\/p>\n<p>\u0426\u0438\u0442\u0430\u0442\u0430: This instruct model is optimized for roleplay, RAG QA, and function calling in English. It supports a context length of 4,096 tokens. This model is ready for commercial use.  <\/p>\n<p><strong>\u041f\u043b\u044e\u0441\u044b<\/strong><\/p>\n<p>1. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0435 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 \u0441 4\u0413\u0431 \u043f\u0430\u043c\u044f\u0442\u0438<\/p>\n<p><sub>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u0433\u043b\u0430\u0441\u0438\u0442\u044c \u0441\u0442\u0430\u0436\u0435\u0440\u0430 \u0438, \u043d\u0435 \u0437\u0430\u0441\u0432\u0435\u0442\u0438\u0432 \u043a\u043b\u044e\u0447\u0438 openai, \u043f\u043e\u043d\u044f\u0442\u044c, \u0430 \u0441\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u043e\u043d \u0432\u043e\u043e\u0431\u0449\u0435 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/sub><\/p>\n<p>2. \u0423\u043c\u0435\u0435\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435<\/p>\n<p><sub>\u0412\u0430\u0436\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442, \u0441\u043c \u0444\u043e\u0442\u043e \u043f\u0440\u043e deepseek<\/sub><\/p>\n<p>3. \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/p>\n<p><sub>\u0423\u0441\u043b\u043e\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0432\u0438\u043d\u043e\u0432\u0430\u0442\u0430 Ollama: <\/sub><a href=\"https:\/\/github.com\/ollama\/ollama\/issues\/8287\" rel=\"noopener noreferrer nofollow\"><sub>\u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u043c\u043f\u0442-\u043a\u043e\u0441\u0442\u044b\u043b\u044c<\/sub><\/a><sub>. \u041e\u0434\u043d\u0430\u043a\u043e, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 required \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 100% \u0443\u0432\u0435\u0440\u0435\u043d\u0430<\/sub><\/p>\n<p>4. \u041d\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u0435\u043d: \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0437\u0430\u0442\u043e\u0447\u0435\u043d \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432: \u041d\u0438\u043a\u0430\u043a\u0438\u0445 &#171;\u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435&#187; \u0438\u043b\u0438 &#171;\u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c?&#187;<\/p>\n<p><sub>\u041e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u043b\u044e\u0441, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e Gemini: \u043e\u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043f\u0430\u043c\u0438\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0432\u0438\u0434\u0430: <\/sub><code><sub>Would you like me to<\/sub><\/code><sub>, <\/sub><code><sub>Okay, here\u2019s a<\/sub><\/code><sub>, <\/sub><code><sub>Okay, this is a<\/sub><\/code><sub>, <\/sub><code><sub>This is likely<\/sub><\/code><\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b<\/strong><\/p>\n<p>1. \u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u044f \u043d\u0430 tool output. <\/p>\n<p><sub>\u0420\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u0431\u0440\u043e\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0437\u0430\u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 system prompt<\/sub><\/p>\n<p>2. \u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 required \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/p>\n<p><em><sub>\u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u0430 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u0442\u043e\u0432\u0430\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0440\u0443\u043a\u0430\u043c\u0438<\/sub><\/em><\/p>\n<p>3. \u0418\u0437-\u0437\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435 \u0437\u0430\u043c\u043e\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0432\u0435\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0443: \u0440\u0430\u0437\u0432\u0435\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u044f \u043d\u0430\u0432\u043e\u0434\u044f\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b <\/p>\n<p><sub>\u0420\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0435\u043c \u0430\u0433\u0435\u043d\u0442\u0430\u043c \u0440\u043e\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u044b. \u042d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u043d\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0431\u044f \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0442\u043e\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u0447\u0430\u0442 \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u0440\u0446\u0438\u0438<\/sub><\/p>\n<p>4. \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/p>\n<p><sub>\u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0441\u044c\u0431\u0443 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437, \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u0437\u043e\u0432\u0435\u0442 <\/sub><code><sub>checkout_tool <\/sub><\/code><sub>\u0434\u0430\u0436\u0435, \u0435\u0441\u043b\u0438 \u0431\u044b\u043b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e <\/sub><code><sub>add_to_cart_tool<\/sub><\/code><\/p>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p><strong>Saiga\/YandexGPT, <\/strong><a href=\"https:\/\/huggingface.co\/IlyaGusev\/saiga_yandexgpt_8b\" rel=\"noopener noreferrer nofollow\">https:\/\/huggingface.co\/IlyaGusev\/saiga_yandexgpt_8b<\/a><\/p>\n<p><em>Pretrain-\u0432\u0435\u0440\u0441\u0438\u044f \u043c\u043b\u0430\u0434\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438\u00a0\u2014 YandexGPT\u00a05\u00a0Lite\u00a0Pretrain\u00a0\u2014 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u0430 \u0432\u00a0\u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u0438\u00a0\u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u044e\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u043c\u0438 \u043d\u0430\u00a0\u0435\u0451\u00a0\u043e\u0441\u043d\u043e\u0432\u0435 instruct-\u0432\u0435\u0440\u0441\u0438\u044f \u0432\u00a0\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0430\u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 API.\u00a0  <\/em><\/p>\n<p><strong>\u041f\u043b\u044e\u0441\u044b<\/strong><\/p>\n<p>1. \u042f\u043d\u0434\u0435\u043a\u0441 \u0437\u0430\u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u0438\u043b \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044e \u0441\u0432\u043e\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0410\u043b\u0438\u0441\u044b \u043f\u043e \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e<\/p>\n<p><sub>\u042d\u0442\u043e \u0441\u0430\u043c\u0430\u044f \u0433\u043e\u0434\u043d\u0430\u044f \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f \u043d\u0430 \u0440\u044b\u043d\u043a\u0435, \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435: <\/sub><strong><sub>\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0443\u0447\u0448\u0435<\/sub><\/strong><sub> <\/sub><code><sub>Mistral NeMo<\/sub><\/code><sub>,  <\/sub><code><sub>Llama 3.1<\/sub><\/code><sub>,  <\/sub><code><sub>Nemotron<\/sub><\/code><sub>,  <\/sub><code><sub>Deepseek <\/sub><\/code><sub>\u0438 \u0434\u0440\u0443\u0433\u0438\u0445<\/sub><\/p>\n<p>2. \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 required \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/p>\n<p><sub>\u0412\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Nemotron mini<\/sub><\/p>\n<p>3. \u041d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e<\/p>\n<p><sub>\u041a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Nemotron mini: \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 deadlock \u0447\u0430\u0442\u0430. \u042d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0430\u043a\u0438\u043c \u043f\u0440\u0435\u043b\u0435\u0441\u0442\u043d\u044b\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442<\/sub><\/p>\n<p>4. \u041d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435, \u043d\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u0441 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u043e\u0439 3060 \u0442\u044f\u043d\u0435\u0442 \u044d\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u044c<\/p>\n<p><sub>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 Saiga\/YandexGPT, \u043b\u0443\u0447\u0448\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043a\u0430\u0442 \u0434\u043e OpenAI<\/sub><\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b<\/strong><\/p>\n<p>1. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0438 \u0431\u044b\u043b \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c, \u042f\u043d\u0434\u0435\u043a\u0441 \u0443\u0442\u0430\u0438\u043b \u0434\u0430\u0442\u0430\u0441\u0435\u0442. <\/p>\n<p><sub>\u0411\u043b\u0430\u0433\u043e, \u0435\u0441\u0442\u044c Saiga: \u0434\u043e\u043a\u0438\u043d\u0443\u0432 10% \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f LLama \u0442\u0443\u043f\u043e \u043f\u043e\u0432\u0435\u0437\u043b\u043e \u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0430\u043c\u0430 \u0432\u044b\u0443\u0447\u0438\u043b\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439<\/sub><\/p>\n<p>2. \u041b\u0435\u043a\u0441\u0435\u0440 LMStudio \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0437\u043e\u0432 \u0434\u0432\u0443\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e<\/p>\n<p><sub>\u041f\u0440\u0438 \u043f\u0440\u043e\u0441\u044c\u0431\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432 \u0447\u0430\u0442 \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e <\/sub><code><sub>tool_calls: IToolCall[]<\/sub><\/code><sub> \u0443\u043b\u0435\u0442\u0430\u0435\u0442 <\/sub><code><sub>[TOOL_REQUEST]\\n{\"name\": \"add_to_cart_tool\", \"arguments\": {\"title\": \"\u0410\u0441\u043f\u0438\u0440\u0438\u043d\"}}\\n[END_TOOL_REQUEST<\/sub><\/code><sub> \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0430 <\/sub><code><sub>content<\/sub><\/code><sub>. \u041b\u0435\u0447\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0442 \u043d\u0435\u0439\u0440\u043e\u043d\u043a\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f JSON \u0432\u043e\u043e\u0431\u0449\u0435, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 system prompt \u0438 \u043c\u0430\u043d\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 \u0432\u044b\u0445\u043b\u043e\u043f\u0430 \u0438\u0437 completer<\/sub><\/p>\n<p><sub>\u041d\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043b\u043e\u0432 JSON \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u041d\u043e, \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0438: \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043b\u0433\u043e \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0430\u0435\u0442 \u0438 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0434\u0430\u0435\u0442 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0434\u0435\u0442\u0435\u043a\u0442\u0435 JSON \u0432 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 &#8212; \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0438 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438: <\/sub><code><sub>\u042f \u043d\u0435 \u0440\u0430\u0441\u0441\u043b\u044b\u0448\u0430\u043b, \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0432\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c<\/sub><\/code><\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0440\u0435\u0434\u044b<\/h3>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <strong>Nemotron <\/strong>\u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/ollama.com\/download\" rel=\"noopener noreferrer nofollow\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c ollama \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430<\/a>, \u0434\u0430\u043b\u0435\u0435 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0432\u0431\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>ollama pull nemotron-mini:4b<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e60\/973\/782\/e609737826d80fbfd3481366ee6dd685.png\" alt=\"Ollama CLI\" title=\"Ollama CLI\" width=\"859\" height=\"300\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e60\/973\/782\/e609737826d80fbfd3481366ee6dd685.png\"\/><\/p>\n<div><figcaption>Ollama CLI<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f YandexGPT \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f<a href=\"https:\/\/lmstudio.ai\/\" rel=\"noopener noreferrer nofollow\"> \u0441\u043a\u0430\u0447\u0430\u0442\u044c LMStudio<\/a>, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a \u043a\u0430\u043a \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/223\/842\/dd1\/223842dd1759c7383ff24046854e0251.png\" alt=\"LMStudio HuggingFace\" title=\"LMStudio HuggingFace\" width=\"1920\" height=\"1040\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/223\/842\/dd1\/223842dd1759c7383ff24046854e0251.png\"\/><\/p>\n<div><figcaption>LMStudio HuggingFace<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435, \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 OpenAI API \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437\u0434\u0435\u043b \u0432 \u0431\u043e\u043a\u043e\u0432\u043e\u043c \u043c\u0435\u043d\u044e. \u0412 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/be8\/dda\/2ce\/be8dda2ceabe17d7107bec60c0c87820.png\" alt=\"LMStudio OpenAI Server\" title=\"LMStudio OpenAI Server\" width=\"1920\" height=\"1040\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/be8\/dda\/2ce\/be8dda2ceabe17d7107bec60c0c87820.png\"\/><\/p>\n<div><figcaption>LMStudio OpenAI Server<\/figcaption><\/div>\n<\/figure>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b, \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0443\u043a\u0430\u0436\u0443 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0430\u0442\u0430. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u043e \u0436\u0435 API \u043a \u0432\u0435\u0440\u0441\u0442\u043a\u0435, \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u0440\u0443\u0434\u0430: \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439,<a href=\"https:\/\/github.com\/jakobhoeg\/shadcn-chat\" rel=\"noopener noreferrer nofollow\"> \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0448\u0430\u0431\u043b\u043e\u043d<\/a><\/p>\n<pre><code class=\"typescript\">import readline from \"readline\";  import { randomString, Subject } from \"functools-kit\";  const clientId = randomString();  const incomingSubject = new Subject(); const outgoingSubject = new Subject();  const ws = new WebSocket(`http:\/\/127.0.0.1:1337\/?clientId=${clientId}`);  ws.onmessage = (e) =&gt; {   incomingSubject.next(JSON.parse(e.data)); };  ws.onopen = () =&gt; {   outgoingSubject.subscribe((data) =&gt; {     ws.send(JSON.stringify({ data }));   }); };  ws.onclose = () =&gt; {   console.log(\"Connection closed\");   process.exit(-1); };  ws.onerror = () =&gt; {   console.log(\"Connection error\");   process.exit(-1); };  const rl = readline.createInterface({   input: process.stdin,   output: process.stdout, });  const askQuestion = () =&gt; {   rl.question(\"pharma-bot =&gt; \", async (input) =&gt; {     if (input === \"exit\") {       rl.close();       return;     }      console.time(\"Timing\");     await outgoingSubject.waitForListener();     await outgoingSubject.next(input);     const { agentName, data } = await incomingSubject.toPromise();     console.timeEnd(\"Timing\");      console.log(`[${agentName}]: ${data}`);      askQuestion();   }); };  askQuestion();  rl.on(\"close\", () =&gt; {   process.exit(0); }); <\/code><\/pre>\n<p>\u041a\u043e\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439. \u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0433\u0435\u043d\u0442\u0430 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0443 LLM, \u043c\u0435\u043d\u044f\u0435\u043c <code>completion: CompletionName.NemotronMiniCompletion<\/code> \u043d\u0430 <code>completion: CompletionName.SaigaYandexGPTCompletion,<\/code><\/p>\n<pre><code class=\"typescript\">import {   Adapter,   addAgent,   addCompletion,   addSwarm,   addTool,   commitFlush,   commitToolOutput,   emit,   execute,   getAgentName,   session, } from \"agent-swarm-kit\"; import type { ServerWebSocket } from \"bun\"; import { singleshot, str } from \"functools-kit\"; import { Ollama } from \"ollama\"; import OpenAI from \"openai\";  const getOllama = singleshot(   () =&gt; new Ollama({ host: \"http:\/\/127.0.0.1:11434\" }) );  const getOpenAI = singleshot(   () =&gt; new OpenAI({ baseURL: \"http:\/\/127.0.0.1:12345\/v1\", apiKey: \"noop\" }) );  enum CompletionName {   NemotronMiniCompletion = \"nemotron_mini_completion\",   SaigaYandexGPTCompletion = \"saiga_yandex_gpt_completion\", }  enum AgentName {   TestAgent = \"test_agent\", }  enum ToolName {   AddToCartTool = `add_to_cart_tool`, }  enum SwarmName {   TestSwarm = \"test_swarm\", }  addCompletion({   completionName: CompletionName.NemotronMiniCompletion,   getCompletion: Adapter.fromOllama(getOllama(), \"nemotron-mini:4b\"), });  addCompletion({   completionName: CompletionName.SaigaYandexGPTCompletion,   getCompletion: Adapter.fromOpenAI(getOpenAI(), \"saiga_yandexgpt_8b_gguf\"), });  addAgent({   agentName: AgentName.TestAgent,   completion: CompletionName.SaigaYandexGPTCompletion,   prompt: str.newline(     \"\u0412\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u043f\u043e \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u0444\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432.\",     \"\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043c\u043d\u0435 \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u0446\u0438\u044e \u043f\u043e \u0444\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443\"   ),   system: [     `\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443, \u0432\u044b\u0437\u043e\u0432\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442: ${ToolName.AddToCartTool}`,   ],   tools: [ToolName.AddToCartTool], });  addTool({   toolName: ToolName.AddToCartTool,   validate: async ({ params }) =&gt; true,   call: async ({ toolId, clientId, agentName, params }) =&gt; {     console.log(ToolName.AddToCartTool, params);     await commitToolOutput(       toolId,       `\u0424\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 ${params.title} \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d.`,       clientId,       agentName     );     await emit(       `\u041f\u0440\u043e\u0434\u0443\u043a\u0442 ${params.title} \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437?`,       clientId,       agentName     );   },   type: \"function\",   function: {     name: ToolName.AddToCartTool,     description:       \"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443. \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 title.\",     parameters: {       type: \"object\",       properties: {         title: {           type: \"string\",           description: `\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443`,         },       },       required: [],     },   }, });  addSwarm({   swarmName: SwarmName.TestSwarm,   agentList: [AgentName.TestAgent],   defaultAgent: AgentName.TestAgent, });  type WebSocketData = {   clientId: string;   session: ReturnType&lt;typeof session&gt;; };  Bun.serve({   fetch(req, server) {     const clientId = new URL(req.url).searchParams.get(\"clientId\")!;     console.log(`Connected clientId=${clientId}`);     server.upgrade&lt;WebSocketData&gt;(req, {       data: {         clientId,         session: session(clientId, SwarmName.TestSwarm),       },     });   },   websocket: {     async message(ws: ServerWebSocket&lt;WebSocketData&gt;, message: string) {       const { data } = JSON.parse(message);       const answer = await ws.data.session.complete(data);       ws.send(         JSON.stringify({           data: answer,           agentName: await getAgentName(ws.data.clientId),         })       );     },   },   hostname: \"0.0.0.0\",   port: 1337, }); <\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0432\u044b\u0448\u0435\u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0437\u0438\u0441\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b<\/p>\n<ol>\n<li>\n<p><strong>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0430\u0442\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0440\u043e\u0439 \u0430\u0433\u0435\u043d\u0442\u043e\u0432<\/strong><\/p>\n<p>\u042f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 system prompt \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u0447\u0443\u0436\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u044f\u0437\u044b\u043a\u0435: \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e OpenSource \u043c\u043e\u0434\u0435\u043b\u044f\u043c \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0442<\/strong><\/p>\n<p>\u0410\u0434\u0430\u043f\u0442\u0435\u0440 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441 OpenAI \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u0435\u043d \u0434\u043b\u044f \u043e\u0442\u043b\u043e\u0432\u0430 edge cases: \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0447\u0430\u0441\u0442\u043e \u0433\u043b\u044e\u0447\u0430\u0442, \u043d\u0430 \u043d\u0438\u0445 \u043f\u0440\u043e\u0449\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u041f\u0440\u043e\u0434 \u0441\u0440\u0435\u0434\u0443 \u0436\u0435 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/p>\n<\/li>\n<li>\n<p><strong>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u0446\u0435\u043b\u0435\u043d \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u0443\u044e \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044e &#8212; \u0431\u0435\u0440\u0438\u0442\u0435 Saiga\/YandexGPT<\/strong><\/p>\n<p>\u041c\u043d\u043e\u0439 \u0442\u0430\u043a \u0436\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432 LMStudio <a href=\"https:\/\/huggingface.co\/Vikhrmodels\/Vikhr-YandexGPT-5-Lite-8B-it\" rel=\"noopener noreferrer nofollow\">Vikhr-YandexGPT-5-Lite-8B<\/a>, \u043d\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c. \u0411\u0435\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u044f\u0437\u044b\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/892468\/\"> https:\/\/habr.com\/ru\/articles\/892468\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<blockquote>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, <a href=\"https:\/\/github.com\/tripolskypetr\/agent-swarm-kit\/blob\/master\/demo\/client-server-chat\/src\/server.ts\" rel=\"noopener noreferrer nofollow\">\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u0432 \u044d\u0442\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a><\/p>\n<\/blockquote>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0431\u0438\u0437\u043d\u0435\u0441-\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a LLM \u043c\u043e\u0434\u0435\u043b\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u0436\u0435\u043b\u0435\u0437\u0435. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 SJW \u0446\u0435\u043d\u0437\u0443\u0440\u043e\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f Llama \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u0446\u0438\u0438, \u043d\u043e\u0441\u044f\u0449\u0438\u0435 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0438\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440: \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u0430, \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u043d\u043e\u0441\u044f\u0449\u0443\u044e \u0438\u043d\u0442\u0438\u043c\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0443\u044e \u0442\u0430\u0439\u043d\u0443 \u0441 \u0418\u0418-\u0442\u0435\u0440\u0430\u043f\u0435\u0432\u0442\u043e\u043c  (\u0441\u043c \u043f\u043e\u0431\u043e\u0447\u043a\u0438 \u0430\u043d\u0442\u0438\u0434\u0435\u043f\u0440\u0435\u0441\u0441\u0430\u043d\u0442\u043e\u0432)<\/p>\n<figure class=\"full-width\">\n<div><figcaption>DeepSeek-R1 \u0432 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u0435, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a \u0436\u0435, \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c <a href=\"https:\/\/platform.openai.com\/docs\/guides\/function-calling\" rel=\"noopener noreferrer nofollow\">\u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/a>, \u043e\u043d\u0430 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430: \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u0432\u0435\u0441\u0442\u0438 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0435\u0439 \u0444\u0430\u0440\u043c\u043e\u043a\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0447\u0435\u0442\u0430\u044e\u0442 \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u044b\u0439 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b<\/p>\n<h2>\u041e\u0431\u0437\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h2>\n<ul>\n<li>\n<p><strong>NVidia Nemotron Mini, <\/strong><a href=\"https:\/\/ollama.com\/library\/nemotron-mini\" rel=\"noopener noreferrer nofollow\">https:\/\/ollama.com\/library\/nemotron-mini<\/a><\/p>\n<p>\u0426\u0438\u0442\u0430\u0442\u0430: This instruct model is optimized for roleplay, RAG QA, and function calling in English. It supports a context length of 4,096 tokens. This model is ready for commercial use.  <\/p>\n<p><strong>\u041f\u043b\u044e\u0441\u044b<\/strong><\/p>\n<p>1. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0435 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 \u0441 4\u0413\u0431 \u043f\u0430\u043c\u044f\u0442\u0438<\/p>\n<p><sub>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u0433\u043b\u0430\u0441\u0438\u0442\u044c \u0441\u0442\u0430\u0436\u0435\u0440\u0430 \u0438, \u043d\u0435 \u0437\u0430\u0441\u0432\u0435\u0442\u0438\u0432 \u043a\u043b\u044e\u0447\u0438 openai, \u043f\u043e\u043d\u044f\u0442\u044c, \u0430 \u0441\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u043e\u043d \u0432\u043e\u043e\u0431\u0449\u0435 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/sub><\/p>\n<p>2. \u0423\u043c\u0435\u0435\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435<\/p>\n<p><sub>\u0412\u0430\u0436\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442, \u0441\u043c \u0444\u043e\u0442\u043e \u043f\u0440\u043e deepseek<\/sub><\/p>\n<p>3. \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/p>\n<p><sub>\u0423\u0441\u043b\u043e\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0432\u0438\u043d\u043e\u0432\u0430\u0442\u0430 Ollama: <\/sub><a href=\"https:\/\/github.com\/ollama\/ollama\/issues\/8287\" rel=\"noopener noreferrer nofollow\"><sub>\u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u043c\u043f\u0442-\u043a\u043e\u0441\u0442\u044b\u043b\u044c<\/sub><\/a><sub>. \u041e\u0434\u043d\u0430\u043a\u043e, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 required \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 100% \u0443\u0432\u0435\u0440\u0435\u043d\u0430<\/sub><\/p>\n<p>4. \u041d\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u0435\u043d: \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0437\u0430\u0442\u043e\u0447\u0435\u043d \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432: \u041d\u0438\u043a\u0430\u043a\u0438\u0445 &#171;\u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435&#187; \u0438\u043b\u0438 &#171;\u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c?&#187;<\/p>\n<p><sub>\u041e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u043b\u044e\u0441, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e Gemini: \u043e\u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043f\u0430\u043c\u0438\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0432\u0438\u0434\u0430: <\/sub><code><sub>Would you like me to<\/sub><\/code><sub>, <\/sub><code><sub>Okay, here\u2019s a<\/sub><\/code><sub>, <\/sub><code><sub>Okay, this is a<\/sub><\/code><sub>, <\/sub><code><sub>This is likely<\/sub><\/code><\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b<\/strong><\/p>\n<p>1. \u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u044f \u043d\u0430 tool output. <\/p>\n<p><sub>\u0420\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u0431\u0440\u043e\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0437\u0430\u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 system prompt<\/sub><\/p>\n<p>2. \u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 required \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/p>\n<p><em><sub>\u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u0430 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u0442\u043e\u0432\u0430\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0440\u0443\u043a\u0430\u043c\u0438<\/sub><\/em><\/p>\n<p>3. \u0418\u0437-\u0437\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435 \u0437\u0430\u043c\u043e\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0432\u0435\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0443: \u0440\u0430\u0437\u0432\u0435\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u044f \u043d\u0430\u0432\u043e\u0434\u044f\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b <\/p>\n<p><sub>\u0420\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0435\u043c \u0430\u0433\u0435\u043d\u0442\u0430\u043c \u0440\u043e\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u044b. \u042d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u043d\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0431\u044f \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0442\u043e\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u0447\u0430\u0442 \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u0440\u0446\u0438\u0438<\/sub><\/p>\n<p>4. \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/p>\n<p><sub>\u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u043c\u043f\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0441\u044c\u0431\u0443 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437, \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u0437\u043e\u0432\u0435\u0442 <\/sub><code><sub>checkout_tool <\/sub><\/code><sub>\u0434\u0430\u0436\u0435, \u0435\u0441\u043b\u0438 \u0431\u044b\u043b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e <\/sub><code><sub>add_to_cart_tool<\/sub><\/code><\/p>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p><strong>Saiga\/YandexGPT, <\/strong><a href=\"https:\/\/huggingface.co\/IlyaGusev\/saiga_yandexgpt_8b\" rel=\"noopener noreferrer nofollow\">https:\/\/huggingface.co\/IlyaGusev\/saiga_yandexgpt_8b<\/a><\/p>\n<p><em>Pretrain-\u0432\u0435\u0440\u0441\u0438\u044f \u043c\u043b\u0430\u0434\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438\u00a0\u2014 YandexGPT\u00a05\u00a0Lite\u00a0Pretrain\u00a0\u2014 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u0430 \u0432\u00a0\u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u0438\u00a0\u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043e\u0431\u0443\u0447\u0430\u044e\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. \u0414\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u043c\u0438 \u043d\u0430\u00a0\u0435\u0451\u00a0\u043e\u0441\u043d\u043e\u0432\u0435 instruct-\u0432\u0435\u0440\u0441\u0438\u044f \u0432\u00a0\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0430\u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 API.\u00a0  <\/em><\/p>\n<p><strong>\u041f\u043b\u044e\u0441\u044b<\/strong><\/p>\n<p>1. \u042f\u043d\u0434\u0435\u043a\u0441 \u0437\u0430\u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u0438\u043b \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044e \u0441\u0432\u043e\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0410\u043b\u0438\u0441\u044b \u043f\u043e \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e<\/p>\n<p><sub>\u042d\u0442\u043e \u0441\u0430\u043c\u0430\u044f \u0433\u043e\u0434\u043d\u0430\u044f \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f \u043d\u0430 \u0440\u044b\u043d\u043a\u0435, \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435: <\/sub><strong><sub>\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0443\u0447\u0448\u0435<\/sub><\/strong><sub> <\/sub><code><sub>Mistral NeMo<\/sub><\/code><sub>,  <\/sub><code><sub>Llama 3.1<\/sub><\/code><sub>,  <\/sub><code><sub>Nemotron<\/sub><\/code><sub>,  <\/sub><code><sub>Deepseek <\/sub><\/code><sub>\u0438 \u0434\u0440\u0443\u0433\u0438\u0445<\/sub><\/p>\n<p>2. \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 required \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/p>\n<p><sub>\u0412\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Nemotron mini<\/sub><\/p>\n<p>3. \u041d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e<\/p>\n<p><sub>\u041a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Nemotron mini: \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 deadlock \u0447\u0430\u0442\u0430. \u042d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0430\u043a\u0438\u043c \u043f\u0440\u0435\u043b\u0435\u0441\u0442\u043d\u044b\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442<\/sub><\/p>\n<p>4. \u041d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435, \u043d\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u0441 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u043e\u0439 3060 \u0442\u044f\u043d\u0435\u0442 \u044d\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u044c<\/p>\n<p><sub>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 Saiga\/YandexGPT, \u043b\u0443\u0447\u0448\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043a\u0430\u0442 \u0434\u043e OpenAI<\/sub><\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0441\u044b<\/strong><\/p>\n<p>1. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0438 \u0431\u044b\u043b \u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c, \u042f\u043d\u0434\u0435\u043a\u0441 \u0443\u0442\u0430\u0438\u043b \u0434\u0430\u0442\u0430\u0441\u0435\u0442. <\/p>\n<p><sub>\u0411\u043b\u0430\u0433\u043e, \u0435\u0441\u0442\u044c Saiga: \u0434\u043e\u043a\u0438\u043d\u0443\u0432 10% \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0434\u043b\u044f \u0434\u043e\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f LLama \u0442\u0443\u043f\u043e \u043f\u043e\u0432\u0435\u0437\u043b\u043e \u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0430\u043c\u0430 \u0432\u044b\u0443\u0447\u0438\u043b\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439<\/sub><\/p>\n<p>2. \u041b\u0435\u043a\u0441\u0435\u0440 LMStudio \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0437\u043e\u0432 \u0434\u0432\u0443\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e<\/p>\n<p><sub>\u041f\u0440\u0438 \u043f\u0440\u043e\u0441\u044c\u0431\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432 \u0447\u0430\u0442 \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e <\/sub><code><sub>tool_calls: IToolCall[]<\/sub><\/code><sub> \u0443\u043b\u0435\u0442\u0430\u0435\u0442 <\/sub><code><sub>[TOOL_REQUEST]\\n{\"name\": \"add_to_cart_tool\", \"arguments\": {\"title\": \"\u0410\u0441\u043f\u0438\u0440\u0438\u043d\"}}\\n[END_TOOL_REQUEST<\/sub><\/code><sub> \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0430 <\/sub><code><sub>content<\/sub><\/code><sub>. \u041b\u0435\u0447\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0442 \u043d\u0435\u0439\u0440\u043e\u043d\u043a\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f JSON \u0432\u043e\u043e\u0431\u0449\u0435, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 system prompt \u0438 \u043c\u0430\u043d\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 \u0432\u044b\u0445\u043b\u043e\u043f\u0430 \u0438\u0437 completer<\/sub><\/p>\n<p><sub>\u041d\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043b\u043e\u0432 JSON \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u041d\u043e, \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0438: \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043b\u0433\u043e \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0430\u0435\u0442 \u0438 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0434\u0430\u0435\u0442 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0434\u0435\u0442\u0435\u043a\u0442\u0435 JSON \u0432 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 &#8212; \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0438 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438: <\/sub><code><sub>\u042f \u043d\u0435 \u0440\u0430\u0441\u0441\u043b\u044b\u0448\u0430\u043b, \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0432\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c<\/sub><\/code><\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0440\u0435\u0434\u044b<\/h3>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <strong>Nemotron <\/strong>\u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/ollama.com\/download\" rel=\"noopener noreferrer nofollow\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c ollama \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430<\/a>, \u0434\u0430\u043b\u0435\u0435 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0432\u0431\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>ollama pull nemotron-mini:4b<\/code><\/p>\n<figure class=\"full-width\">\n<div><figcaption>Ollama CLI<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f YandexGPT \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f<a href=\"https:\/\/lmstudio.ai\/\" rel=\"noopener noreferrer nofollow\"> \u0441\u043a\u0430\u0447\u0430\u0442\u044c LMStudio<\/a>, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a \u043a\u0430\u043a \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435<\/p>\n<figure class=\"full-width\">\n<div><figcaption>LMStudio HuggingFace<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435, \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 OpenAI API \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437\u0434\u0435\u043b \u0432 \u0431\u043e\u043a\u043e\u0432\u043e\u043c \u043c\u0435\u043d\u044e. \u0412 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/p>\n<figure class=\"full-width\">\n<div><figcaption>LMStudio OpenAI Server<\/figcaption><\/div>\n<\/figure>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b, \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0443\u043a\u0430\u0436\u0443 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0430\u0442\u0430. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u043e \u0436\u0435 API \u043a \u0432\u0435\u0440\u0441\u0442\u043a\u0435, \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u0440\u0443\u0434\u0430: \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439,<a href=\"https:\/\/github.com\/jakobhoeg\/shadcn-chat\" rel=\"noopener noreferrer nofollow\"> \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0448\u0430\u0431\u043b\u043e\u043d<\/a><\/p>\n<pre><code class=\"typescript\">import readline from \"readline\";  import { randomString, Subject } from \"functools-kit\";  const clientId = randomString();  const incomingSubject = new Subject(); const outgoingSubject = new Subject();  const ws = new WebSocket(`http:\/\/127.0.0.1:1337\/?clientId=${clientId}`);  ws.onmessage = (e) =&gt; {   incomingSubject.next(JSON.parse(e.data)); };  ws.onopen = () =&gt; {   outgoingSubject.subscribe((data) =&gt; {     ws.send(JSON.stringify({ data }));   }); };  ws.onclose = () =&gt; {   console.log(\"Connection closed\");   process.exit(-1); };  ws.onerror = () =&gt; {   console.log(\"Connection error\");   process.exit(-1); };  const rl = readline.createInterface({   input: process.stdin,   output: process.stdout, });  const askQuestion = () =&gt; {   rl.question(\"pharma-bot =&gt; \", async (input) =&gt; {     if (input === \"exit\") {       rl.close();       return;     }      console.time(\"Timing\");     await outgoingSubject.waitForListener();     await outgoingSubject.next(input);     const { agentName, data } = await incomingSubject.toPromise();     console.timeEnd(\"Timing\");      console.log(`[${agentName}]: ${data}`);      askQuestion();   }); };  askQuestion();  rl.on(\"close\", () =&gt; {   process.exit(0); }); <\/code><\/pre>\n<p>\u041a\u043e\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439. \u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0433\u0435\u043d\u0442\u0430 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0443 LLM, \u043c\u0435\u043d\u044f\u0435\u043c <code>completion: CompletionName.NemotronMiniCompletion<\/code> \u043d\u0430 <code>completion: CompletionName.SaigaYandexGPTCompletion,<\/code><\/p>\n<pre><code class=\"typescript\">import {   Adapter,   addAgent,   addCompletion,   addSwarm,   addTool,   commitFlush,   commitToolOutput,   emit,   execute,   getAgentName,   session, } from \"agent-swarm-kit\"; import type { ServerWebSocket } from \"bun\"; import { singleshot, str } from \"functools-kit\"; import { Ollama } from \"ollama\"; import OpenAI from \"openai\";  const getOllama = singleshot(   () =&gt; new Ollama({ host: \"http:\/\/127.0.0.1:11434\" }) );  const getOpenAI = singleshot(   () =&gt; new OpenAI({ baseURL: \"http:\/\/127.0.0.1:12345\/v1\", apiKey: \"noop\" }) );  enum CompletionName {   NemotronMiniCompletion = \"nemotron_mini_completion\",   SaigaYandexGPTCompletion = \"saiga_yandex_gpt_completion\", }  enum AgentName {   TestAgent = \"test_agent\", }  enum ToolName {   AddToCartTool = `add_to_cart_tool`, }  enum SwarmName {   TestSwarm = \"test_swarm\", }  addCompletion({   completionName: CompletionName.NemotronMiniCompletion,   getCompletion: Adapter.fromOllama(getOllama(), \"nemotron-mini:4b\"), });  addCompletion({   completionName: CompletionName.SaigaYandexGPTCompletion,   getCompletion: Adapter.fromOpenAI(getOpenAI(), \"saiga_yandexgpt_8b_gguf\"), });  addAgent({   agentName: AgentName.TestAgent,   completion: CompletionName.SaigaYandexGPTCompletion,   prompt: str.newline(     \"\u0412\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u043f\u043e \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u0444\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432.\",     \"\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043c\u043d\u0435 \u043a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u0446\u0438\u044e \u043f\u043e \u0444\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443\"   ),   system: [     `\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443, \u0432\u044b\u0437\u043e\u0432\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442: ${ToolName.AddToCartTool}`,   ],   tools: [ToolName.AddToCartTool], });  addTool({   toolName: ToolName.AddToCartTool,   validate: async ({ params }) =&gt; true,   call: async ({ toolId, clientId, agentName, params }) =&gt; {     console.log(ToolName.AddToCartTool, params);     await commitToolOutput(       toolId,       `\u0424\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 ${params.title} \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d.`,       clientId,       agentName     );     await emit(       `\u041f\u0440\u043e\u0434\u0443\u043a\u0442 ${params.title} \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443. \u0412\u044b \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437?`,       clientId,       agentName     );   },   type: \"function\",   function: {     name: ToolName.AddToCartTool,     description:       \"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443. \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 title.\",     parameters: {       type: \"object\",       properties: {         title: {           type: \"string\",           description: `\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0440\u043c\u0430\u0446\u0435\u0432\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443`,         },       },       required: [],     },   }, });  addSwarm({   swarmName: SwarmName.TestSwarm,   agentList: [AgentName.TestAgent],   defaultAgent: AgentName.TestAgent, });  type WebSocketData = {   clientId: string;   session: ReturnType&lt;typeof session&gt;; };  Bun.serve({   fetch(req, server) {     const clientId = new URL(req.url).searchParams.get(\"clientId\")!;     console.log(`Connected clientId=${clientId}`);     server.upgrade&lt;WebSocketData&gt;(req, {       data: {         clientId,         session: session(clientId, SwarmName.TestSwarm),       },     });   },   websocket: {     async message(ws: ServerWebSocket&lt;WebSocketData&gt;, message: string) {       const { data } = JSON.parse(message);       const answer = await ws.data.session.complete(data);       ws.send(<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-452391","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/452391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=452391"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/452391\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=452391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=452391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=452391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}