{"id":457078,"date":"2025-04-23T15:00:50","date_gmt":"2025-04-23T15:00:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=457078"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2025-04-23T15:00:50","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=457078","title":{"rendered":"<span>\u0412\u0442\u043e\u0440\u0430\u044f \u0436\u0438\u0437\u043d\u044c \u0434\u043b\u044f \u0440\u0435\u0442\u0440\u043e\u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430. \u041f\u0438\u0448\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442 Ollama \u043d\u0430 Python + Tkinter \u0438 Delphi 7 \u0434\u043b\u044f Windows Vista<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0430\u043b\u044e\u0442, %USERNAME%. \u041f\u0440\u0438\u0437\u043d\u0430\u044e\u0441\u044c, \u044f \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u043b\u044e \u0441\u0442\u0430\u0440\u044b\u0435 \u043b\u044d\u043f\u0442\u043e\u043f\u044b ThinkPad. \u0412 \u0442\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0430, \u043a\u043e\u0433\u0434\u0430 \u0431\u0440\u0435\u043d\u0434\u043e\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u0430 IBM, \u044d\u0442\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u044b \u0432\u043e\u0441\u0445\u0438\u0449\u0430\u043b\u0438 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u0426\u0435\u043d\u0430 \u043d\u0430 \u043d\u0438\u0445 \u043a\u0443\u0441\u0430\u043b\u0430\u0441\u044c, \u043d\u043e \u0442\u044b \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0437\u0430 \u0441\u0442\u0440\u043e\u0433\u0438\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u043e\u043c \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0449\u043d\u043e\u0435 \u00ab\u0436\u0435\u043b\u0435\u0437\u043e\u00bb \u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0427\u0435\u0433\u043e \u0441\u0442\u043e\u0438\u043b\u0430 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b ThinkLight (\u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0441\u044f \u0441 \u043d\u0435\u0439 \u043d\u0430 R61i), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u0430 \u0441 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043f\u043e\u0435\u0437\u0434\u0435 \u0438\u043b\u0438 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0435, \u043d\u0435 \u043d\u0430\u043f\u0440\u044f\u0433\u0430\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u0432\u0435\u0442\u0430. \u041d\u0443 \u0430 \u0442\u0440\u0435\u043a\u043f\u043e\u0439\u043d\u0442 \u043c\u043d\u0435 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u043a\u0440\u0443\u0442\u043e\u0439 \u0442\u0430\u0447\u043f\u0430\u0434.<\/p>\n<p>\u0420\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0441\u0442\u0430\u0440\u044b\u0435 ThinkPad \u0437\u0430 \u0431\u043e\u0440\u0442\u043e\u043c. \u0420\u0430\u0437\u0443\u043c\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e X41 Tablet \u2014 Windows Vista. \u041f\u043e\u0434 \u043d\u0435\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0438 \u043e\u043d\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0433\u0440 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f Windows XP. \u041d\u043e \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441\u0442\u0430\u043b \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u044d\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u0435\u0437\u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0430.<\/p>\n<p>\u0418 \u0442\u0443\u0442 \u043a\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0431\u0435\u0437\u0443\u043c\u043d\u0430\u044f \u0438\u0434\u0435\u044f: \u0430 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0430\u0440\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u043c\u0443 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0443 \u0432\u0442\u043e\u0440\u0443\u044e \u0436\u0438\u0437\u043d\u044c \u0438 \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044f\u043c\u0438? \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442, \u043d\u043e \u0432\u043e\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Ollama \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442. \u0412 \u0438\u0442\u043e\u0433\u0435 \u044f \u043f\u043e\u043b\u0443\u0447\u0443 \u043d\u043e\u0443\u0442\u0431\u0443\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043c\u043d\u0435 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438 \u0438 \u0432\u043d\u043e\u0432\u044c \u043f\u043e\u0434\u0430\u0440\u0438\u0442 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0438\u0437 \u044d\u0442\u043e\u0439 \u0437\u0430\u0442\u0435\u0438, \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bf3\/911\/19d\/bf391119d7853acb9d068e9aa505937e.png\" width=\"2048\" height=\"1536\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/bf3\/911\/19d\/bf391119d7853acb9d068e9aa505937e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bf3\/911\/19d\/bf391119d7853acb9d068e9aa505937e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f. \u041e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0434\u0436\u0438\u0434\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0443: \u043e\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0432\u0440\u043e\u0434\u0435 TLS 1.2 \u0432 Windows Vista. \u041f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Ollama \u043d\u0435 \u0441\u043b\u043e\u0436\u0435\u043d. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 HTTP API, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: http:\/\/[server_ip]:11434\/api\/generate. \u041d\u0430 \u043d\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c POST-\u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043f\u0440\u043e\u043c\u043f\u0442\u043e\u043c, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u0435\u0440\u043d\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON. \u0415\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>HTTPS \u043d\u0435\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0434\u043d\u043e\u0439 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0431\u043e\u043b\u044c\u044e \u043c\u0435\u043d\u044c\u0448\u0435. \u0421\u0435\u0440\u0432\u0435\u0440 Ollama \u0443 \u043c\u0435\u043d\u044f \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u043c HTTP-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u043c\u0435\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 JSON. \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/010\/53b\/e9e\/01053be9eb23cafc53b846b45a3057a6.png\" alt=\"\u0425\u043e\u043a\u043a\u0443 \u043e\u0442 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438\" title=\"\u0425\u043e\u043a\u043a\u0443 \u043e\u0442 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438\" width=\"2048\" height=\"1536\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/010\/53b\/e9e\/01053be9eb23cafc53b846b45a3057a6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/010\/53b\/e9e\/01053be9eb23cafc53b846b45a3057a6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0425\u043e\u043a\u043a\u0443 \u043e\u0442 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/em><\/figcaption><\/div>\n<\/figure>\n<h2>Python + Tkinter<\/h2>\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0441\u0430\u043c\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0441\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <strong>requests <\/strong>(\u0438\u043b\u0438 <strong>urllib<\/strong>), JSON \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>Tkinter<\/strong>, \u0430 exe-\u0448\u043d\u0438\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <strong>cx_Freeze<\/strong>. \u041d\u043e \u0442\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043c\u0430\u0441\u0441\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u041a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Python \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0434\u043b\u044f Vista?<\/p>\n<\/li>\n<li>\n<p>\u0411\u0443\u0434\u0435\u0442 \u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 pip?<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442?<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0431\u0435\u0433\u043b\u043e\u0433\u043e \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0434\u043b\u044f Windows Vista \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 Python \u0441\u0442\u0430\u043b\u0430 <a href=\"https:\/\/www.python.org\/downloads\/release\/python-344\/\">3.4.4<\/a>, \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u0430\u044f \u0432 \u0434\u0435\u043a\u0430\u0431\u0440\u0435 2015. \u041d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u043e \u0432\u043e\u0442 pip \u0443\u0441\u0442\u0430\u0440\u0435\u043b \u0438 \u0443\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u043e\u043d\u043b\u0430\u0439\u043d. \u041f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0437\u0430\u0431\u0438\u0442\u044c \u043d\u0430 requests \u0438 \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 urllib, \u0442\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c <a href=\"https:\/\/pypi.org\/project\/cx-Freeze\/\">cx_Freeze<\/a> \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>\u041c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/marcelotduarte\/cx_Freeze\/releases\/tag\/5.0.2\">\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 5.0.2<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u044f\u043b\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u042d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e, \u043d\u043e \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Microsoft Visual C++ 2010 Express, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044d\u0442\u0430 \u0448\u0442\u0443\u043a\u0430 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0441\u043e\u0431\u0435\u0440\u0435\u0442\u0441\u044f. \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0443\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u2014 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Microsoft \u0432\u0438\u0441\u0438\u0442 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430. \u0422\u0430\u043a \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u043a\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0443\u0442\u044f\u043c\u0438 <a href=\"https:\/\/archive.org\/details\/vs-2010-express-1\">\u0447\u0435\u0440\u0435\u0437 Internet Archive<\/a>.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 Microsoft Visual C++ 2010 Express, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u043d\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u0437\u0430\u0442\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u043b cx_Freeze 5.0.2:<\/p>\n<pre><code class=\"python\">python setup.py build<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<pre><code class=\"python\">python setup.py install<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e-\u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u043b \u043a\u043e\u0434 (<a href=\"http:\/\/app.py\"><strong>app.py<\/strong><\/a>):<\/p>\n<pre><code class=\"python\">import tkinter as tk import urllib.request import json  OLLAMA_API_URL = \"http:\/\/[server_ip]:11434\/api\/generate\"  def send_prompt():     prompt = prompt_entry.get(\"1.0\", tk.END).strip()     if not prompt:         return      response_text.set(\"\u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430...\")      try:         data = json.dumps({             \"model\": \"deepseek-r1:14b\",             \"prompt\": prompt,             \"stream\": False         }).encode(\"utf-8\")          req = urllib.request.Request(             OLLAMA_API_URL,             data=data,             headers={\"Content-Type\": \"application\/json\"}         )          with urllib.request.urlopen(req) as response:             result = response.read().decode(\"utf-8\")             result_json = json.loads(result)             content = result_json.get(\"response\", \"\u041d\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435.\")             response_text.set(content)      except Exception as e:         response_text.set(\"\u041e\u0448\u0438\u0431\u043a\u0430: \" + str(e))  root = tk.Tk() root.title(\"Ollama \u041a\u043b\u0438\u0435\u043d\u0442 (Vista)\")  tk.Label(root, text=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441:\").pack(pady=5) prompt_entry = tk.Text(root, height=5, width=50) prompt_entry.pack(pady=5)  tk.Button(root, text=\"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c\", command=send_prompt).pack(pady=5)  response_text = tk.StringVar() tk.Label(root, textvariable=response_text, wraplength=400, justify=\"left\").pack(pady=10)  root.mainloop()<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u043e\u0437\u0434\u043e\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/044\/855\/d28\/044855d285d4d8460a62d4ea40ed636e.jpg\" width=\"420\" height=\"253\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/044\/855\/d28\/044855d285d4d8460a62d4ea40ed636e.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/044\/855\/d28\/044855d285d4d8460a62d4ea40ed636e.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u042d\u0442\u043e \u043d\u0438 \u0447\u0442\u043e \u0438\u043d\u043e\u0435, \u043a\u0430\u043a \u0441\u043c\u0430\u0439\u043b\u0438\u043a. Tkinter, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 Python 3.4.4, \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e Unicode \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0441 \u043a\u043e\u0434\u0430\u043c\u0438 \u043d\u0435 \u0432\u044b\u0448\u0435 U+FFFF. \u0417\u043d\u0430\u0447\u0438\u0442, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u00ab\u043e\u043f\u0430\u0441\u043d\u044b\u0435\u00bb \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u0440\u0435\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0432 <strong>StringVar<\/strong>. \u041c\u0435\u043d\u044f\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"python\">response_text.set(content)<\/code><\/pre>\n<p>\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 (&#187; \u2014 \u044d\u0442\u043e \u0434\u0432\u0435 \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438):<\/p>\n<pre><code class=\"python\">safe_content = ''.join(c for c in content if ord(c) &lt;= 0xFFFF) response_text.set(safe_content)<\/code><\/pre>\n<p>\u0418 \u043f\u0440\u043e\u0431\u0443\u044e \u0435\u0449\u0435 \u0440\u0430\u0437:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4bc\/bd8\/8b6\/4bcbd88b6925acd17f89e27bd238c2e6.jpg\" alt=\"\u0417\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e\" title=\"\u0417\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e\" width=\"420\" height=\"298\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4bc\/bd8\/8b6\/4bcbd88b6925acd17f89e27bd238c2e6.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4bc\/bd8\/8b6\/4bcbd88b6925acd17f89e27bd238c2e6.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0417\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, \u0443\u0436\u0435 \u043f\u043e\u0431\u0435\u0434\u0430. \u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b. \u041f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0434\u0435\u043b\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u043f\u043e\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f, \u043e\u0431\u0440\u0430\u043c\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0435\u0433\u0430\u043c\u0438 <strong>&lt;think&gt;&lt;\/think&gt;<\/strong>, \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 JSON \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041d\u043e \u0434\u0430\u0436\u0435 \u0442\u0430\u043a \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0436\u0438\u0437\u043d\u044c. \u0413\u043e\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432 exe-\u0448\u043d\u0438\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"python\">from cx_Freeze import setup, Executable  setup(     name=\"OllamaVistaClient\",     version=\"0.1\",     description=\"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 GUI-\u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f Ollama\",     executables=[Executable(\"app.py\")], )<\/code><\/pre>\n<p>\u041a\u043b\u0430\u0434\u0443 \u0435\u0433\u043e \u0440\u044f\u0434\u043e\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u044e <a href=\"http:\/\/setup.py\"><strong>setup.py<\/strong><\/a> \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u044e:<\/p>\n<pre><code class=\"python\">python setup.py build<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6c3\/c03\/57e\/6c3c0357e9062f838f2f0ecf9bb4a979.jpg\" alt=\"\u0424\u0430\u0439\u043b\u044b \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\" title=\"\u0424\u0430\u0439\u043b\u044b \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\" width=\"800\" height=\"600\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/6c3\/c03\/57e\/6c3c0357e9062f838f2f0ecf9bb4a979.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6c3\/c03\/57e\/6c3c0357e9062f838f2f0ecf9bb4a979.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0424\u0430\u0439\u043b\u044b \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/em><\/figcaption><\/div>\n<\/figure>\n<p><em>\u0417\u042b. \u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u044b\u043b \u0443\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0433\u043e\u0434: 2026 \u0432\u043c\u0435\u0441\u0442\u043e 2025. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u0435<\/em><\/p>\n<h2>Delphi 7<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0441 Python \u0432\u0441\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0442\u043e Delphi 7 \u043f\u0440\u0435\u043f\u043e\u0434\u043d\u0435\u0441\u043b\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432. \u042f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043b\u044e\u0431\u043b\u044e \u0438 \u043d\u0435\u043d\u0430\u0432\u0438\u0436\u0443 \u044d\u0442\u0443 \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043e\u043d\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442. \u041d\u043e \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0440\u043e\u0433\u0430 \u043a \u043a\u043e\u0434\u0443 \u0438 \u043f\u043e\u0440\u043e\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u043c\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0432\u0443, \u0432\u044b\u0438\u0441\u043a\u0438\u0432\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432 \u043a\u043e\u043b\u043b\u0435\u0434\u0436\u0435 \u044f \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0435\u0435 \u0437\u043d\u0430\u043b, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043c\u043e\u043b\u043e\u0434\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e Delphi 7 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 Vista \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0430, \u043e\u043d\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434 \u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 (UAC), \u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u0441 \u044d\u0442\u0438\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e.<\/p>\n<p>\u041e\u0442\u0441\u044b\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u0443\u0434\u0443 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 InDy (\u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 Internet Direct) \u2014 <strong>IdHTTP<\/strong>. \u041f\u0430\u0440\u0441\u0438\u043d\u0433 JSON \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/github.com\/hgourvest\/superobject\">SuperObject<\/a>, \u043d\u043e \u043f\u043e\u0442\u0435\u0440\u043f\u0435\u043b \u043d\u0435\u0443\u0434\u0430\u0447\u0443 \u0438 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0439 \u0437\u0430\u0442\u0435\u0438. \u0414\u043b\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043d\u0430\u043a\u0438\u0434\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0444\u043e\u0440\u043c\u0443:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e10\/add\/10f\/e10add10f30ea1eb9fbaefa054045c2b.jpg\" width=\"520\" height=\"400\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e10\/add\/10f\/e10add10f30ea1eb9fbaefa054045c2b.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e10\/add\/10f\/e10add10f30ea1eb9fbaefa054045c2b.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412\u0441\u0435\u0433\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430:<\/p>\n<ol>\n<li>\n<p><strong>MemoInput <\/strong>\u2014 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>ButtonSend <\/strong>\u2014 \u043a\u043d\u043e\u043f\u043a\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Label1 <\/strong>\u2014 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 Enter your message.<\/p>\n<\/li>\n<li>\n<p><strong>MemoOutput <\/strong>\u2014 \u043f\u043e\u043b\u0435 \u0432\u044b\u0432\u043e\u0434\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e curl \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442 \u043c\u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c:<\/p>\n<p><strong><em>{&#171;model&#187;:&#187;deepseek-r1:14b&#187;,&#187;created_at&#187;:&#187;2025-04-07T20:31:19.179407862Z&#187;,&#187;message&#187;:{&#171;role&#187;:&#187;assistant&#187;,&#187;content&#187;:&#187;\\u003cthink\\u003e\\n\\n\\u003c\/think\\u003e\\n\\n\u041f\u0440\u0438\u0432\u0435\u0442! \u041a\u0430\u043a \u044f \u043c\u043e\u0433\u0443 \u043f\u043e\u043c\u043e\u0447\u044c \u0442\u0435\u0431\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f?&#187;},&#187;done_reason&#187;:&#187;stop&#187;,&#187;done&#187;:true,&#187;total_duration&#187;:2226372627,&#187;load_duration&#187;:18673060,&#187;prompt_eval_count&#187;:6,&#187;prompt_eval_duration&#187;:169000000,&#187;eval_count&#187;:18,&#187;eval_duration&#187;:203700<\/em><\/strong><\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u0442\u0430\u043b\u043e \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c Escape-\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0440\u043e\u0434\u0435 <strong>\\u003, \\u003e <\/strong>\u0438<strong> \\n<\/strong>. \u0410 \u0435\u0449\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 UTF-8 \u0432 ANSI, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u043e \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a. \u0418\u0442\u043e\u0433\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ol>\n<li>\n<p><strong>SendToOllama <\/strong>\u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 HTTP POST-\u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 Ollama \u0438      \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON.<\/p>\n<\/li>\n<li>\n<p><strong>UTF8ToAnsiSafe <\/strong>\u2014 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0437 UTF-8 \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 Windows-1251 (ANSI).<\/p>\n<\/li>\n<li>\n<p><strong>ExtractContent <\/strong>\u2014 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0443 &#171;content&#187;:&#187; \u0438\u0437 JSON-\u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>DecodeEscapes <\/strong>\u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 Escape-\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434 \u043a\u043e\u0434\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"delphi\">unit Unit1;  interface  uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls, IdHTTP;  type   TForm1 = class(TForm)     MemoInput: TMemo;     ButtonSend: TButton;     MemoOutput: TMemo;     Label1: TLabel;     procedure ButtonSendClick(Sender: TObject);   private     function SendToOllama(const UserMessage: string): string;     function UTF8ToAnsiSafe(const UTF8Str: string): string;     function ExtractContent(const JSONText: string): string;     function DecodeEscapes(const S: string): string;   public   end;  var   Form1: TForm1;  implementation  {$R *.dfm}  function TForm1.UTF8ToAnsiSafe(const UTF8Str: string): string; begin   Result := UTF8Decode(UTF8Str); \/\/ Convert UTF-8 to Windows-1251 end;  function TForm1.DecodeEscapes(const S: string): string; begin   Result := StringReplace(S, '\\n', #13#10, [rfReplaceAll]);   Result := StringReplace(Result, '\\r', '', [rfReplaceAll]);   Result := StringReplace(Result, '\\t', '    ', [rfReplaceAll]);   Result := StringReplace(Result, '\\\"', '\"', [rfReplaceAll]);   Result := StringReplace(Result, '\\u003c', '&lt;', [rfReplaceAll]);   Result := StringReplace(Result, '\\u003e', '&gt;', [rfReplaceAll]);   Result := StringReplace(Result, '\\u003C', '&lt;', [rfReplaceAll]);   Result := StringReplace(Result, '\\u003E', '&gt;', [rfReplaceAll]); end;  function TForm1.ExtractContent(const JSONText: string): string; var   StartPos, EndPos: Integer;   Extracted: string; begin   Result := '(no content found)';   StartPos := Pos('\"content\":\"', JSONText);   if StartPos &gt; 0 then   begin     StartPos := StartPos + Length('\"content\":\"');     EndPos := StartPos;     while (EndPos &lt;= Length(JSONText)) and not (JSONText[EndPos] in ['\"']) do       Inc(EndPos);     Extracted := Copy(JSONText, StartPos, EndPos - StartPos);     Result := DecodeEscapes(Extracted);   end; end;  function TForm1.SendToOllama(const UserMessage: string): string; var   HTTP: TIdHTTP;   RequestBody: TStringStream;   Mem: TMemoryStream;   JSONStr: UTF8String;   RawBytes, RawResponse: string; begin   HTTP := TIdHTTP.Create(nil);   RequestBody := TStringStream.Create('');   Mem := TMemoryStream.Create;   try     HTTP.Request.ContentType := 'application\/json';     HTTP.Request.Connection := 'close';      JSONStr := UTF8Encode(       '{' +         '\"model\":\"deepseek-r1:14b\",' +         '\"messages\":[{\"role\":\"user\",\"content\":\"' + UserMessage + '\"}],' +         '\"stream\":false' +       '}'     );      RequestBody.WriteString(string(JSONStr));     RequestBody.Position := 0;      HTTP.Post('http:\/\/[server_ip]:11434\/api\/chat', RequestBody, Mem);      SetLength(RawBytes, Mem.Size);     Mem.Position := 0;     Mem.Read(RawBytes[1], Mem.Size);      RawResponse := UTF8ToAnsiSafe(RawBytes);     Result := ExtractContent(RawResponse);   finally     HTTP.Free;     RequestBody.Free;     Mem.Free;   end; end;  procedure TForm1.ButtonSendClick(Sender: TObject); begin   MemoOutput.Lines.Text := SendToOllama(MemoInput.Lines.Text); end;  end.<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u2014 \u0438 \u043e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/118\/7b0\/8c4\/1187b08c425c4d9f55f47b4aa99dbf00.jpg\" alt=\"Deepseek-R1 \u0445\u043e\u043a\u043a\u0443 \u043f\u0438\u0448\u0435\u0442 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c, \u0430 \u0432\u043e\u0442 Llama 3.1 \u0432\u043f\u043e\u043b\u043d\u0435 \u0433\u043e\u0434\u043d\u043e\" title=\"Deepseek-R1 \u0445\u043e\u043a\u043a\u0443 \u043f\u0438\u0448\u0435\u0442 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c, \u0430 \u0432\u043e\u0442 Llama 3.1 \u0432\u043f\u043e\u043b\u043d\u0435 \u0433\u043e\u0434\u043d\u043e\" width=\"520\" height=\"400\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/118\/7b0\/8c4\/1187b08c425c4d9f55f47b4aa99dbf00.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/118\/7b0\/8c4\/1187b08c425c4d9f55f47b4aa99dbf00.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>Deepseek-R1 \u0445\u043e\u043a\u043a\u0443 \u043f\u0438\u0448\u0435\u0442 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c, \u0430 \u0432\u043e\u0442 Llama 3.1 \u0432\u043f\u043e\u043b\u043d\u0435 \u0433\u043e\u0434\u043d\u043e<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>ExtractContent <\/strong>\u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 JSON-\u043f\u0430\u0440\u0441\u0435\u0440. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0412 \u043f\u043e\u043b\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438, \u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u0440\u0430\u0448\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0442\u0435\u043a\u0441\u0442 \u0432 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>Enter<\/strong>. \u041d\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u043e\u0442\u043f\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0437\u0436\u0435. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e \u0438\u0434\u0435\u044f \u043d\u0430\u0448\u043b\u0430 \u0432\u043e\u043f\u043b\u043e\u0449\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u0427\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435<\/h2>\n<p>\u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u0432\u0430\u0441 \u0441\u043a\u0430\u0436\u0443\u0442: \u00ab\u041d\u0443 \u043a\u0430\u043a\u043e\u0439 \u043a \u0447\u0435\u0440\u0442\u0443 Python \u0438\u043b\u0438 Delphi?\u00bb. \u0411\u0435\u0440\u0438 \u0441\u0435\u0431\u0435 C# \u0432 \u043f\u0430\u0440\u0435 \u0441 WinForms \u0438 \u043f\u0438\u0448\u0438 \u043a\u043b\u0438\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043b\u0438\u0437\u043e\u043a \u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c Windows Vista. \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0435\u0448\u044c C#. \u0423\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u043c\u043e\u0433\u0443\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>\u042f \u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u0441\u0442\u0430\u0440\u0443\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0441\u0438\u043b\u0438\u044f\u043c\u0438 \u2014 \u0438 \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0439 ThinkPad \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u043c \u0441\u0432\u044f\u0437\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Ollama. \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0434\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430 Python, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0442\u0443\u0434\u0430 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0432 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432.<\/p>\n<p>\u0410 \u0432\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0444\u0442 \u043f\u043e\u0434 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b? \u0416\u0434\u0435\u043c \u0432\u0430\u0441 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/903492\/\"> https:\/\/habr.com\/ru\/articles\/903492\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0430\u043b\u044e\u0442, %USERNAME%. \u041f\u0440\u0438\u0437\u043d\u0430\u044e\u0441\u044c, \u044f \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u043b\u044e \u0441\u0442\u0430\u0440\u044b\u0435 \u043b\u044d\u043f\u0442\u043e\u043f\u044b ThinkPad. \u0412 \u0442\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0430, \u043a\u043e\u0433\u0434\u0430 \u0431\u0440\u0435\u043d\u0434\u043e\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u0430 IBM, \u044d\u0442\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u044b \u0432\u043e\u0441\u0445\u0438\u0449\u0430\u043b\u0438 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u0426\u0435\u043d\u0430 \u043d\u0430 \u043d\u0438\u0445 \u043a\u0443\u0441\u0430\u043b\u0430\u0441\u044c, \u043d\u043e \u0442\u044b \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0437\u0430 \u0441\u0442\u0440\u043e\u0433\u0438\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u043e\u043c \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0449\u043d\u043e\u0435 \u00ab\u0436\u0435\u043b\u0435\u0437\u043e\u00bb \u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0427\u0435\u0433\u043e \u0441\u0442\u043e\u0438\u043b\u0430 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b ThinkLight (\u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0441\u044f \u0441 \u043d\u0435\u0439 \u043d\u0430 R61i), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u0430 \u0441 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043f\u043e\u0435\u0437\u0434\u0435 \u0438\u043b\u0438 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0435, \u043d\u0435 \u043d\u0430\u043f\u0440\u044f\u0433\u0430\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u0432\u0435\u0442\u0430. \u041d\u0443 \u0430 \u0442\u0440\u0435\u043a\u043f\u043e\u0439\u043d\u0442 \u043c\u043d\u0435 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u043a\u0440\u0443\u0442\u043e\u0439 \u0442\u0430\u0447\u043f\u0430\u0434.<\/p>\n<p>\u0420\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0441\u0442\u0430\u0440\u044b\u0435 ThinkPad \u0437\u0430 \u0431\u043e\u0440\u0442\u043e\u043c. \u0420\u0430\u0437\u0443\u043c\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e X41 Tablet \u2014 Windows Vista. \u041f\u043e\u0434 \u043d\u0435\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0438 \u043e\u043d\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0433\u0440 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f Windows XP. \u041d\u043e \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441\u0442\u0430\u043b \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u044d\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u0435\u0437\u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0430.<\/p>\n<p>\u0418 \u0442\u0443\u0442 \u043a\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0431\u0435\u0437\u0443\u043c\u043d\u0430\u044f \u0438\u0434\u0435\u044f: \u0430 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0430\u0440\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u043c\u0443 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0443 \u0432\u0442\u043e\u0440\u0443\u044e \u0436\u0438\u0437\u043d\u044c \u0438 \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044f\u043c\u0438? \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442, \u043d\u043e \u0432\u043e\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Ollama \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442. \u0412 \u0438\u0442\u043e\u0433\u0435 \u044f \u043f\u043e\u043b\u0443\u0447\u0443 \u043d\u043e\u0443\u0442\u0431\u0443\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043c\u043d\u0435 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438 \u0438 \u0432\u043d\u043e\u0432\u044c \u043f\u043e\u0434\u0430\u0440\u0438\u0442 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0438\u0437 \u044d\u0442\u043e\u0439 \u0437\u0430\u0442\u0435\u0438, \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f. \u041e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0434\u0436\u0438\u0434\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0443: \u043e\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0432\u0440\u043e\u0434\u0435 TLS 1.2 \u0432 Windows Vista. \u041f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Ollama \u043d\u0435 \u0441\u043b\u043e\u0436\u0435\u043d. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 HTTP API, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: http:\/\/[server_ip]:11434\/api\/generate. \u041d\u0430 \u043d\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c POST-\u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043f\u0440\u043e\u043c\u043f\u0442\u043e\u043c, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u0435\u0440\u043d\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON. \u0415\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>HTTPS \u043d\u0435\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0434\u043d\u043e\u0439 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0431\u043e\u043b\u044c\u044e \u043c\u0435\u043d\u044c\u0448\u0435. \u0421\u0435\u0440\u0432\u0435\u0440 Ollama \u0443 \u043c\u0435\u043d\u044f \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u043c HTTP-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u043c\u0435\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 JSON. \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442.<\/p>\n<figure class=\"full-width\">\n<div><figcaption><em>\u0425\u043e\u043a\u043a\u0443 \u043e\u0442 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438<\/em><\/figcaption><\/div>\n<\/figure>\n<h2>Python + Tkinter<\/h2>\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0441\u0430\u043c\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0441\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <strong>requests <\/strong>(\u0438\u043b\u0438 <strong>urllib<\/strong>), JSON \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>Tkinter<\/strong>, \u0430 exe-\u0448\u043d\u0438\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <strong>cx_Freeze<\/strong>. \u041d\u043e \u0442\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043c\u0430\u0441\u0441\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u041a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Python \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0434\u043b\u044f Vista?<\/p>\n<\/li>\n<li>\n<p>\u0411\u0443\u0434\u0435\u0442 \u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 pip?<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442?<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0431\u0435\u0433\u043b\u043e\u0433\u043e \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0434\u043b\u044f Windows Vista \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 Python \u0441\u0442\u0430\u043b\u0430 <a href=\"https:\/\/www.python.org\/downloads\/release\/python-344\/\">3.4.4<\/a>, \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u0430\u044f \u0432 \u0434\u0435\u043a\u0430\u0431\u0440\u0435 2015. \u041d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u043e \u0432\u043e\u0442 pip \u0443\u0441\u0442\u0430\u0440\u0435\u043b \u0438 \u0443\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u043e\u043d\u043b\u0430\u0439\u043d. \u041f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0437\u0430\u0431\u0438\u0442\u044c \u043d\u0430 requests \u0438 \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 urllib, \u0442\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c <a href=\"https:\/\/pypi.org\/project\/cx-Freeze\/\">cx_Freeze<\/a> \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>\u041c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/marcelotduarte\/cx_Freeze\/releases\/tag\/5.0.2\">\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 5.0.2<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u044f\u043b\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u042d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e, \u043d\u043e \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Microsoft Visual C++ 2010 Express, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044d\u0442\u0430 \u0448\u0442\u0443\u043a\u0430 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0441\u043e\u0431\u0435\u0440\u0435\u0442\u0441\u044f. \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0443\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u2014 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Microsoft \u0432\u0438\u0441\u0438\u0442 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430. \u0422\u0430\u043a \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u043a\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0443\u0442\u044f\u043c\u0438 <a href=\"https:\/\/archive.org\/details\/vs-2010-express-1\">\u0447\u0435\u0440\u0435\u0437 Internet Archive<\/a>.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 Microsoft Visual C++ 2010 Express, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u043d\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u0437\u0430\u0442\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u043b cx_Freeze 5.0.2:<\/p>\n<pre><code class=\"python\">python setup.py build<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<pre><code class=\"python\">python setup.py install<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e-\u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u043b \u043a\u043e\u0434 (<a href=\"http:\/\/app.py\"><strong>app.py<\/strong><\/a>):<\/p>\n<pre><code class=\"python\">import tkinter as tk import urllib.request import json  OLLAMA_API_URL = \"http:\/\/[server_ip]:11434\/api\/generate\"  def send_prompt():     prompt = prompt_entry.get(\"1.0\", tk.END).strip()     if not prompt:         return      response_text.set(\"\u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430...\")      try:         data = json.dumps({             \"model\": \"deepseek-r1:14b\",             \"prompt\": prompt,             \"stream\": False         }).encode(\"utf-8\")          req = urllib.request.Request(             OLLAMA_API_URL,             data=data,             headers={\"Content-Type\": \"application\/json\"}         )          with urllib.request.urlopen(req) as response:             result = response.read().decode(\"utf-8\")             result_json = json.loads(result)             content = result_json.get(\"response\", \"\u041d\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435.\")             response_text.set(content)      except Exception as e:         response_text.set(\"\u041e\u0448\u0438\u0431\u043a\u0430: \" + str(e))  root = tk.Tk() root.title(\"Ollama \u041a\u043b\u0438\u0435\u043d\u0442 (Vista)\")  tk.Label(root, text=\"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441:\").pack(pady=5) prompt_entry = tk.Text(root, height=5, width=50) prompt_entry.pack(pady=5)  tk.Button(root, text=\"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c\", command=send_prompt).pack(pady=5)  response_text = tk.StringVar() tk.Label(root, textvariable=response_text, wraplength=400, justify=\"left\").pack(pady=10)  root.mainloop()<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u043e\u0437\u0434\u043e\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u042d\u0442\u043e \u043d\u0438 \u0447\u0442\u043e \u0438\u043d\u043e\u0435, \u043a\u0430\u043a \u0441\u043c\u0430\u0439\u043b\u0438\u043a. Tkinter, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 Python 3.4.4, \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e Unicode \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0441 \u043a\u043e\u0434\u0430\u043c\u0438 \u043d\u0435 \u0432\u044b\u0448\u0435 U+FFFF. \u0417\u043d\u0430\u0447\u0438\u0442, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u00ab\u043e\u043f\u0430\u0441\u043d\u044b\u0435\u00bb \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u0440\u0435\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0432 <strong>StringVar<\/strong>. \u041c\u0435\u043d\u044f\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"python\">response_text.set(content)<\/code><\/pre>\n<p>\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 (&#187; \u2014 \u044d\u0442\u043e \u0434\u0432\u0435 \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438):<\/p>\n<pre><code class=\"python\">safe_content = ''.join(c for c in content if ord(c) &lt;= 0xFFFF) response_text.set(safe_content)<\/code><\/pre>\n<p>\u0418 \u043f\u0440\u043e\u0431\u0443\u044e \u0435\u0449\u0435 \u0440\u0430\u0437:<\/p>\n<figure class=\"\">\n<div><figcaption><em>\u0417\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, \u0443\u0436\u0435 \u043f\u043e\u0431\u0435\u0434\u0430. \u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b. \u041f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0434\u0435\u043b\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u043f\u043e\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f, \u043e\u0431\u0440\u0430\u043c\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u0435\u0433\u0430\u043c\u0438 <strong>&lt;think&gt;&lt;\/think&gt;<\/strong>, \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 JSON \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041d\u043e \u0434\u0430\u0436\u0435 \u0442\u0430\u043a \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0436\u0438\u0437\u043d\u044c. \u0413\u043e\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432 exe-\u0448\u043d\u0438\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"python\">from cx_Freeze import setup, Executable  setup(     name=\"OllamaVistaClient\",     version=\"0.1\",     description=\"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 GUI-\u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f Ollama\",     executables=[Executable(\"app.py\")], )<\/code><\/pre>\n<p>\u041a\u043b\u0430\u0434\u0443 \u0435\u0433\u043e \u0440\u044f\u0434\u043e\u043c, \u043d\u0430\u0437\u044b\u0432\u0430\u044e <a href=\"http:\/\/setup.py\"><strong>setup.py<\/strong><\/a> \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u044e:<\/p>\n<pre><code class=\"python\">python setup.py build<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c:<\/p>\n<figure class=\"full-width\">\n<div><figcaption><em>\u0424\u0430\u0439\u043b\u044b \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/em><\/figcaption><\/div>\n<\/figure>\n<p><em>\u0417\u042b. \u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u044b\u043b \u0443\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0433\u043e\u0434: 2026 \u0432\u043c\u0435\u0441\u0442\u043e 2025. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u0435<\/em><\/p>\n<h2>Delphi 7<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0441 Python \u0432\u0441\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0442\u043e Delphi 7 \u043f\u0440\u0435\u043f\u043e\u0434\u043d\u0435\u0441\u043b\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432. \u042f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043b\u044e\u0431\u043b\u044e \u0438 \u043d\u0435\u043d\u0430\u0432\u0438\u0436\u0443 \u044d\u0442\u0443 \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043e\u043d\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442. \u041d\u043e \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0440\u043e\u0433\u0430 \u043a \u043a\u043e\u0434\u0443 \u0438 \u043f\u043e\u0440\u043e\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u043e\u043c\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0432\u0443, \u0432\u044b\u0438\u0441\u043a\u0438\u0432\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432 \u043a\u043e\u043b\u043b\u0435\u0434\u0436\u0435 \u044f \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0435\u0435 \u0437\u043d\u0430\u043b, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043c\u043e\u043b\u043e\u0434\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e Delphi 7 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 Vista \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0430, \u043e\u043d\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434 \u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 (UAC), \u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u0441 \u044d\u0442\u0438\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e.<\/p>\n<p>\u041e\u0442\u0441\u044b\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u0443\u0434\u0443 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 InDy (\u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 Internet Direct) \u2014 <strong>IdHTTP<\/strong>. \u041f\u0430\u0440\u0441\u0438\u043d\u0433 JSON \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/github.com\/hgourvest\/superobject\">SuperObject<\/a>, \u043d\u043e \u043f\u043e\u0442\u0435\u0440\u043f\u0435\u043b \u043d\u0435\u0443\u0434\u0430\u0447\u0443 \u0438 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0439 \u0437\u0430\u0442\u0435\u0438. \u0414\u043b\u044f \u0441\u0442\u0430\u0440\u0442\u0430 \u043d\u0430\u043a\u0438\u0434\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0444\u043e\u0440\u043c\u0443:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0441\u0435\u0433\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430:<\/p>\n<ol>\n<li>\n<p><strong>MemoInput <\/strong>\u2014 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>ButtonSend <\/strong>\u2014 \u043a\u043d\u043e\u043f\u043a\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Label1 <\/strong>\u2014 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 Enter your message.<\/p>\n<\/li>\n<li>\n<p><strong>MemoOutput <\/strong>\u2014 \u043f\u043e\u043b\u0435 \u0432\u044b\u0432\u043e\u0434\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e curl \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442 \u043c\u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c:<\/p>\n<p><strong><em>{&#171;model&#187;:&#187;deepseek-r1:14b&#187;,&#187;created_at&#187;:&#187;2025-04-07T20:31:19.179407862Z&#187;,&#187;message&#187;:{&#171;role&#187;:&#187;assistant&#187;,&#187;content&#187;:&#187;\\u003cthink\\u003e\\n\\n\\u003c\/think\\u003e\\n\\n\u041f\u0440\u0438\u0432\u0435\u0442! \u041a\u0430\u043a \u044f \u043c\u043e\u0433\u0443 \u043f\u043e\u043c\u043e\u0447\u044c \u0442\u0435\u0431\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f?&#187;},&#187;done_reason&#187;:&#187;stop&#187;,&#187;done&#187;:true,&#187;total_duration&#187;:2226372627,&#187;load_duration&#187;:18673060,&#187;prompt_eval_count&#187;:6,&#187;prompt_eval_duration&#187;:169000000,&#187;eval_count&#187;:18,&#187;eval_duration&#187;:203700<\/em><\/strong><\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u0442\u0430\u043b\u043e \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c Escape-\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0440\u043e\u0434\u0435 <strong>\\u003, \\u003e <\/strong>\u0438<strong> \\n<\/strong>. \u0410 \u0435\u0449\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 UTF-8 \u0432 ANSI, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u043e \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a. \u0418\u0442\u043e\u0433\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ol>\n<li>\n<p><strong>SendToOllama <\/strong>\u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 HTTP POST-\u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 Ollama \u0438      \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON.<\/p>\n<\/li>\n<li>\n<p><strong>UTF8ToAnsiSafe <\/strong>\u2014 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0437 UTF-8 \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 Windows-1251 (ANSI).<\/p>\n<\/li>\n<li>\n<p><strong>ExtractContent <\/strong>\u2014 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0443 &#171;content&#187;:&#187; \u0438\u0437 JSON-\u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>DecodeEscapes <\/strong>\u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 Escape-\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434 \u043a\u043e\u0434\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"delphi\">unit Unit1;  interface  uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls, IdHTTP;  type   TForm1 = class(TForm)     MemoInput: TMemo;     ButtonSend: TButton;     MemoOutput: TMemo;     Label1: TLabel;     procedure ButtonSendClick(Sender: TObject);   private     function SendToOllama(const UserMessage: string): string;     function UTF8ToAnsiSafe(const UTF8Str: string): string;     function ExtractContent(const JSONText: string): string;     function DecodeEscapes(const S: string): string;   public   end;  var   Form1: TForm1;  implementation  {$R *.dfm}  function TForm1.UTF8ToAnsiSafe(const UTF8Str: string): string; begin   Result := UTF8Decode(UTF8Str); \/\/ Convert UTF-8 to Windows-1251 end;  function TForm1.DecodeEscapes(const S: string): string; begin   Result := StringReplace(S, '\\n', #13#10, [rfReplaceAll]);   Result := StringReplace(Result, '\\r', '', [rfReplaceAll]);   Result := StringReplace(Result, '\\t', '    ', [rfReplaceAll]);   Result := StringReplace(Result, '\\\"', '\"', [rfReplaceAll]);   Result := StringReplace(Result, '\\u003c', '&lt;', [rfReplaceAll]);   Result := StringReplace(Result, '\\u003e', '&gt;', [rfReplaceAll]);   Result := StringReplace(Result, '\\u003C', '&lt;', [rfReplaceAll]);   Result := StringReplace(Result, '\\u003E', '&gt;', [rfReplaceAll]); end;  function TForm1.ExtractContent(const JSONText: string): string; var   StartPos, EndPos: Integer;   Extracted: string; begin   Result := '(no content found)';   StartPos := Pos('\"content\":\"', JSONText);   if StartPos &gt; 0 then   begin     StartPos := StartPos + Length('\"content\":\"');     EndPos := StartPos;     while (EndPos &lt;= Length(JSONText)) and <\/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-457078","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457078","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=457078"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457078\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}