{"id":457630,"date":"2025-04-28T03:06:15","date_gmt":"2025-04-28T03:06:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=457630"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=457630","title":{"rendered":"<span>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c A\/B-\u0442\u0435\u0441\u0442\u044b SMS-\u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a \u0441 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e DeepSeek<\/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>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430\u043c \u0431\u0438\u0437\u043d\u0435\u0441\u043e\u0432 \u0438 \u043c\u0430\u0440\u043a\u0435\u0442\u043e\u043b\u043e\u0433\u0430\u043c \u0432 \u0434\u0432\u0430 \u043a\u043b\u0438\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u044b \u0434\u043b\u044f A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f SMS-\u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u0440\u0430\u0437\u043e\u0441\u043b\u0430\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c \u0438\u0437 CRM.<\/p>\n<p>\u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c API DeepSeek, \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a \u2014 <a href=\"https:\/\/exolve.ru\/products\/sms-api\/?utm_source=habr&amp;utm_medium=refferal&amp;utm_campaign=sms_api_article&amp;utm_content=article_abtestsds&amp;utm_term=sms_api_exolve\">SMS API<\/a> \u043e\u0442 \u041c\u0422\u0421 Exolve, \u0430 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b \u0431\u0435\u0440\u0451\u043c \u0438\u0437 CRM-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u00ab\u0411\u0438\u0442\u0440\u0438\u043a\u044124\u00bb.<\/p>\n<p>\u0421 \u044d\u0442\u0438\u043c \u043c\u0438\u043a\u0440\u043e\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u044f\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 SMS \u2014 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0430\u0434\u0438\u043c. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433 \u0438 \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u043f\u044f\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0430\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e \u0440\u043e\u043b\u044c<\/p>\n<\/li>\n<li>\n<p>\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0448\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0434\u043e\u0431\u0440\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0442\u0435\u043a\u0441\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u0447\u0435\u043a\u0431\u043e\u043a\u0441 \u2014 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b \u0438\u0437 CRM-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u0431\u0438\u0442\u044b \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0441\u0434\u0435\u043b\u043a\u0430\u0445 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435. \u041d\u0430 \u044d\u0442\u043e\u043c \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438. \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u0435\u0441\u0442\u044c \u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0438\u043b\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u044b \u0448\u0443\u043c\u043e\u043c.\u00a0<\/p>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u0438 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043e\u0442 \u0440\u0443\u0442\u0438\u043d\u044b \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0434\u043e\u0445\u043e\u0434 \u043e\u0442 \u043f\u0440\u043e\u0434\u0430\u0436.<\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 API DeepSeek<\/h3>\n<p>\u0414\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 DeepSeek \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 deepseek \u0441 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u043a API \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u041f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0432\u0435\u0431-\u0444\u043e\u0440\u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f:<\/p>\n<pre><code class=\"python\">def dump_JSON(JSON):    with open(SETTINGS_PATH, 'w') as f:        json.dump(JSON, f) @csrf_exempt def save_and_run_deep_seek(request):    # Get prompt textfields content    conditions_JSON = json.loads(request.body.decode('utf-8'))    dump_JSON(conditions_JSON)    # Compose prompt and run API    prompt = prompt_constructor(conditions_JSON)    print(prompt)    response = api_client.chat_completion(prompt=prompt).replace('```json', '').replace('```', '')    print(response)    answer_JSON = json.loads(response)    sms_data.set_JSON(answer_JSON)    return show_page(request, answer_JSON)<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f save_and_run_deep_seek \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044e \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u043e\u0435\u0434\u0438\u043d\u043e \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u0437 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0435. \u041b\u0438\u0448\u043d\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Markdown, \u0438 JSON \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043b\u0435\u0436\u0438\u0442 \u043a\u043e\u0434.<\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u043b\u0435\u0439 \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h4>\n<p>\u0414\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 SMS \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0432\u0430\u0436\u043d\u043e \u0447\u0451\u0442\u043a\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438. \u0422\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044e, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u0441\u0430\u043c\u0443 \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<p>\u041c\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0430\u044f \u0440\u043e\u043b\u044c \u0437\u0430\u0434\u0430\u0451\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u0441\u0442\u0438\u043b\u044c \u0442\u0435\u043a\u0441\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0439<\/p>\n<\/li>\n<li>\n<p>\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438 \u043c\u043e\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0437\u0430\u0434\u0430\u0451\u0442 \u0447\u0451\u0442\u043a\u0443\u044e \u0446\u0435\u043b\u044c, \u0447\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ol>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0439 \u0432\u0435\u0431-\u0444\u043e\u0440\u043c\u044b \u0438 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0448 \u043f\u0440\u043e\u043c\u043f\u0442:<\/p>\n<pre><code class=\"python\">PROMPT_CONDITIONS_NAMES = ['\u0422\u0432\u043e\u044f \u0440\u043e\u043b\u044c: ', '\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f: ', '\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438: ', '\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f: ',                           '\u0422\u0432\u043e\u044f \u0437\u0430\u0434\u0430\u0447\u0430: '] prompt_initial = [    {\"role\": \"system\",     \"content\": \"\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0438 5 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u0430. \u0417\u0430\u043f\u0438\u0448\u0438 \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u0442\u0440\u043e\u043a \u0432 \u043f\u043e\u043b\u0435 proposition JSON-\u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0412\u0435\u0440\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u043e JSON \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.\"}, ]<\/code><\/pre>\n<pre><code class=\"python\">def prompt_constructor(conditions_JSON):    prompt = prompt_initial.copy()    for ai, cond in enumerate(conditions_JSON['prompts']):        if len(cond) == 0: continue        prompt.append(            {\"role\": \"user\",             \"content\": PROMPT_CONDITIONS_NAMES[ai] + cond})    return prompt<\/code><\/pre>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u043a\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0430\u044f \u0440\u043e\u043b\u044c<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c, \u0447\u0442\u043e \u0442\u044b \u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u043c\u0430\u0440\u043a\u0435\u0442\u043e\u043b\u043e\u0433, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0448\u044c \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u00ab\u0420\u0430\u0434\u0443\u0433\u0430\u00bb, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0449\u0435\u0439 \u0443\u0445\u043e\u0434\u043e\u0432\u0443\u044e \u043a\u043e\u0441\u043c\u0435\u0442\u0438\u043a\u0443. \u0422\u0435\u0431\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f SMS. \u0415\u0433\u043e \u0442\u0435\u043a\u0441\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438 \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u043f\u043e\u0431\u0443\u0436\u0434\u0430\u044e\u0449\u0438\u043c \u043a \u043f\u043e\u043a\u0443\u043f\u043a\u0435 \u0438\u043b\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044e \u0430\u0441\u0441\u043e\u0440\u0442\u0438\u043c\u0435\u043d\u0442\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0430\u043c\u0430 \u0441 \u0440\u0435\u0431\u0451\u043d\u043a\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0448\u0451\u043b \u0432 \u0434\u0435\u0442\u0441\u043a\u0438\u0439 \u0441\u0430\u0434. \u041c\u0430\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u0432\u0435\u043d\u0430, \u0438\u043c\u0435\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0438 \u0432\u044b\u0448\u0435 \u0434\u043e\u0445\u043e\u0434, \u0440\u0430\u0437\u0432\u0435\u0434\u0435\u043d\u0430. \u0421 \u0440\u0435\u0431\u0451\u043d\u043a\u043e\u043c \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u043c\u0430\u043c\u044b. \u0412\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0441\u0435\u0431\u044f \u043c\u0430\u043b\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043a\u0438\u0434\u043a\u0430 30% \u043d\u0430 \u0441\u0435\u0440\u0438\u044e \u043a\u0440\u0435\u043c\u043e\u0432 \u0434\u043b\u044f \u043b\u0438\u0446\u0430. \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043e 15 \u0430\u043f\u0440\u0435\u043b\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412 SMS \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432: \u043e\u0442 70 \u0434\u043e 140 \u0437\u043d\u0430\u043a\u043e\u0432 \u0441 \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0417\u0430\u0434\u0430\u0447\u0430<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0438 SMS \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u0441\u0440\u0435\u0434\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u043a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0448 \u0442\u043e\u0432\u0430\u0440<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Python \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Django<\/h3>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u0411\u044d\u043a\u0435\u043d\u0434 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u043d\u043e \u0438 \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0431\u0430\u0437\u043e\u0439 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b. \u0421 Django \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u2014 \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432 \u0434\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c.\u00a0<\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0412 <a href=\"http:\/\/views.py\">views.py<\/a> \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041f\u043e\u043c\u0438\u043c\u043e save_and_run_deep_seek, \u0432 \u0444\u0430\u0439\u043b\u0435 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 DeepSeek \u0438 \u0434\u0440\u0443\u0433\u0438\u0435, \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435.<\/p>\n<pre><code class=\"python\">sms_data = SmsTrial() db = DB() def show_page(request, proposition_JSON=None):    # Read JSON, fill in textareas previously saved conditions    return render(request, 'deep_seek_api_app\/index.html', context=get_context(proposition_JSON)) @csrf_exempt def process_selected_propositions(request):    numbers_JSON = json.loads(request.body.decode('utf-8'))    print(numbers_JSON)    sms_data.select(numbers_JSON['buttons'])    start_processing()    return show_page(request) def start_processing():    db.fill_bases(sms_data.groups_number())    for ID in db.interactions_table.index:        current_text_index = db.interactions_table.loc[ID, 'group']        current_text = sms_data.get_text_by_group_number(current_text_index)        send_SMS(db.get_phone(ID), current_text) def get_list(texts_iterable=None, number: int = 5):    if texts_iterable is None:        texts_iterable = ()    ans = []    for ai in range(number):        if ai &lt; len(texts_iterable):            ans.append(texts_iterable[ai])            continue        ans.append('')    return ans def get_context(answer_JSON=None):    if answer_JSON is None: answer_JSON = {}    proposition = get_list(answer_JSON.get('proposition'))    prompt_JSON = get_settings()    prompts = get_list(prompt_JSON.get('prompts'))    ans = {'prompts': prompts, 'proposition': proposition}    print(ans)    return ans def get_settings():    if not os.path.exists(SETTINGS_PATH):        return {}    with open(SETTINGS_PATH, 'r') as f:        return json.load(f) @dataclass class SmsTrial:    answer_JSON = {}    selected_propositions = []    def set_JSON(self, JSON):        self.answer_JSON = JSON    def select(self, buttons_number):        self.selected_propositions = buttons_number    def get_text_by_group_number(self, number):        answer_id = self.selected_propositions[number]        return self.answer_JSON['proposition'][answer_id]    def groups_number(self):        return len(self.selected_propositions)<\/code><\/pre>\n<p>\u041e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0437\u0434\u0435\u0441\u044c \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u043a\u043b\u0430\u0441\u0441\u0435 DB \u2014 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043f\u043e\u0437\u0436\u0435.<\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432<\/h4>\n<p>\u0412 <a href=\"http:\/\/urls.py\">urls.py<\/a> \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f URL, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u0432\u0435\u0431-\u0444\u043e\u0440\u043c\u044b \u0441 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"python\">from django.contrib import admin from django.urls import path from . import views urlpatterns = [    path('admin\/', admin.site.urls),    path('main_page\/', views.show_page),    path('response\/', views.save_and_run_deep_seek),    path('try\/', views.process_selected_propositions), ]<\/code><\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0433\u043b\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b. \u0428\u0430\u0431\u043b\u043e\u043d \u2014 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u0433\u0434\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u0439 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 render \u0438\u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438. HTML-\u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 templates\/&lt;\u0438\u043c\u044f_\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f&gt;\/.<\/p>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u0435\u0439, \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0434\u043b\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438, \u043a\u043d\u043e\u043f\u043a\u0438 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438. \u042d\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043f\u043e\u043a\u0430\u0437 \u043e\u043a\u043d\u0430 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0431\u044d\u043a \u0438, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u043e\u0432.<\/p>\n<p>\u041d\u043e\u043c\u0435\u0440\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c \u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html&gt; &lt;html lang=\"ru\"&gt; &lt;head&gt;    &lt;meta charset=\"UTF-8\"&gt;    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;    &lt;title&gt;\u0410\u0412 \u0442\u0435\u0441\u0442 SMS&lt;\/title&gt;    &lt;style&gt;        \/* \u041f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u0435\u0439 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u0443\u0431\u0440\u0430\u043b\u0438, \u043f\u043e\u043b\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0433\u0438\u0442\u0445\u0430\u0431\u0435 https:\/\/github.com\/duckdevdotdev\/postprod-article-mar2025-ab-test-sms-with-deepseek-ai *\/    &lt;\/style&gt; &lt;\/head&gt; &lt;body&gt;    &lt;h1&gt;\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438 \u0410\u0412 \u0442\u0435\u0441\u0442 \u043c\u043e\u0442\u0438\u0432\u0438\u0440\u0443\u044e\u0449\u0438\u0445 SMS&lt;\/h1&gt;    &lt;h2&gt;\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 SMS&lt;\/h2&gt;    &lt;!-- \u041f\u0435\u0440\u0432\u044b\u0439 \u0431\u043b\u043e\u043a --&gt;    &lt;div class=\"block\"&gt;        &lt;label for=\"textarea1\"&gt;\u0420\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0418\u0418:&lt;\/label&gt;        &lt;textarea id=\"textarea1\" placeholder=\"\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\"&gt;{{prompts.0}}&lt;\/textarea&gt;        &lt;label for=\"textarea2\"&gt;\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f:&lt;\/label&gt;        &lt;textarea id=\"textarea2\" placeholder=\"\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\"&gt;{{prompts.1}}&lt;\/textarea&gt;        &lt;label for=\"textarea3\"&gt;\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438:&lt;\/label&gt;        &lt;textarea id=\"textarea3\" placeholder=\"\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\"&gt;{{prompts.2}}&lt;\/textarea&gt;        &lt;label for=\"textarea4\"&gt;\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f:&lt;\/label&gt;        &lt;textarea id=\"textarea4\" placeholder=\"\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\"&gt;{{prompts.3}}&lt;\/textarea&gt;        &lt;label for=\"textarea5\"&gt;\u0417\u0430\u0434\u0430\u0447\u0430:&lt;\/label&gt;        &lt;textarea id=\"textarea5\" placeholder=\"\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\"&gt;{{prompts.4}}&lt;\/textarea&gt;        &lt;button id=\"send_req_button\"&gt;\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e&lt;\/button&gt;    &lt;\/div&gt;    &lt;h2&gt;\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 Deep Seek&lt;\/h2&gt;    &lt;!-- \u0412\u0442\u043e\u0440\u043e\u0439 \u0431\u043b\u043e\u043a --&gt;    &lt;div class=\"block\"&gt;        &lt;div class=\"block-2\"&gt;            &lt;label for=\"textarea6\"&gt;\u0412\u0430\u0440\u0438\u0430\u043d\u0442 1:&lt;\/label&gt;            &lt;textarea id=\"textarea6\" placeholder=\"\u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0421\u041c\u0421, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e\"&gt;{{proposition.0}}&lt;\/textarea&gt;            &lt;input type=\"checkbox\" id=\"checkbox1\"&gt;        &lt;\/div&gt;        &lt;div class=\"block-2\"&gt;            &lt;label for=\"textarea7\"&gt;\u0412\u0430\u0440\u0438\u0430\u043d\u0442 2:&lt;\/label&gt;            &lt;textarea id=\"textarea7\" placeholder=\"\u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0421\u041c\u0421, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e\"&gt;{{proposition.1}}&lt;\/textarea&gt;            &lt;input type=\"checkbox\" id=\"checkbox2\"&gt;        &lt;\/div&gt;        &lt;div class=\"block-2\"&gt;            &lt;label for=\"textarea8\"&gt;\u0412\u0430\u0440\u0438\u0430\u043d\u0442 2:&lt;\/label&gt;            &lt;textarea id=\"textarea8\" placeholder=\"\u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0421\u041c\u0421, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e\"&gt;{{proposition.2}}&lt;\/textarea&gt;            &lt;input type=\"checkbox\" id=\"checkbox3\"&gt;        &lt;\/div&gt;        &lt;div class=\"block-2\"&gt;            &lt;label for=\"textarea9\"&gt;\u0412\u0430\u0440\u0438\u0430\u043d\u0442 4:&lt;\/label&gt;            &lt;textarea id=\"textarea9\" placeholder=\"\u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0421\u041c\u0421, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e\"&gt;{{proposition.3}}&lt;\/textarea&gt;            &lt;input type=\"checkbox\" id=\"checkbox4\"&gt;        &lt;\/div&gt;        &lt;div class=\"block-2\"&gt;            &lt;label for=\"textarea10\"&gt;\u0412\u0430\u0440\u0438\u0430\u043d\u0442 5:&lt;\/label&gt;            &lt;textarea id=\"textarea10\" placeholder=\"\u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0421\u041c\u0421, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e\"&gt;{{proposition.4}}&lt;\/textarea&gt;            &lt;input type=\"checkbox\" id=\"checkbox5\"&gt;        &lt;\/div&gt;        &lt;button id=\"showModalButton\"&gt;\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435&lt;\/button&gt;    &lt;\/div&gt;    &lt;!-- \u041c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e --&gt;    &lt;div id=\"modal\" class=\"modal\"&gt;        &lt;div class=\"modal-content\"&gt;            &lt;p id=\"selectedCheckboxes\"&gt;&lt;\/p&gt;            &lt;div class=\"modal-buttons\"&gt;                &lt;button id=\"okButton\"&gt;\u041e\u041a&lt;\/button&gt;                &lt;button id=\"cancelButton\"&gt;\u041e\u0442\u043c\u0435\u043d\u0430&lt;\/button&gt;            &lt;\/div&gt;        &lt;\/div&gt;    &lt;\/div&gt;    &lt;script&gt;       const backend_site = 'http:\/\/127.0.0.1:8000\/'       document.getElementById('send_req_button').addEventListener('click', async function() {       const prompts = [];       \/\/ \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c textarea, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u043e\u043c\u043f\u0442\u0430.       for (let i = 1; i &lt;= 5; i++) {          const textarea = document.getElementById(`textarea${i}`);          if (textarea) {             prompts.push(textarea.value);          }       }       \/\/ \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c JSON-\u043e\u0431\u044a\u0435\u043a\u0442       const json = {          prompts: prompts       };       try {          \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c JSON \u0441 \u043f\u043e\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438          const response = await fetch(backend_site+'response\/', {             method: 'POST',             headers: {                'Content-Type': 'application\/json'             },             body: JSON.stringify(json)          });          if (response.ok) {             console.log('JSON \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d!');             \/\/ alert('JSON \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d!');             document.body.innerHTML = await response.text();          } else {             console.error('\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 JSON:', response.statusText);             alert('\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 JSON.');          }       } catch (error) {          console.error('\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:', error);          alert('\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.');       }        });           \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430        const showModalButton = document.getElementById('showModalButton');        const modal = document.getElementById('modal');        const selectedCheckboxesText = document.getElementById('selectedCheckboxes');        const okButton = document.getElementById('okButton');        const cancelButton = document.getElementById('cancelButton');        showModalButton.addEventListener('click', () =&gt; {            const checkboxes = document.querySelectorAll('.block-2 input[type=\"checkbox\"]');            const selected = [];            checkboxes.forEach((checkbox, index) =&gt; {                if (checkbox.checked) {                    selected.push(index + 1);                }            });            if (selected.length &gt; 0) {                selectedCheckboxesText.textContent = `\u0412\u044b\u0431\u0440\u0430\u043d\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: ${selected.join(', ')}. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u041e\u041a \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438.`;            } else {                selectedCheckboxesText.textContent = '\u041d\u0438 \u043e\u0434\u0438\u043d \u0447\u0435\u043a\u0431\u043e\u043a\u0441 \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d.';            }            modal.style.display = 'flex';        });        \/\/ \u0417\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430        cancelButton.addEventListener('click', () =&gt; {            modal.style.display = 'none';        });        \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 \u041e\u041a        okButton.addEventListener('click', () =&gt; {            const checkboxes = document.querySelectorAll('.block-2 input[type=\"checkbox\"]');            const selected = [];            checkboxes.forEach((checkbox, index) =&gt; {                if (checkbox.checked) {                    selected.push(index + 1);                }            });            \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 JSON            const data = { buttons: selected };            fetch(backend_site+'try\/', {                method: 'POST',                headers: {                    'Content-Type': 'application\/json',                },                body: JSON.stringify(data),            })            .then(response =&gt; response.json())            .then(data =&gt; {                console.log('\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e:', data);            })            .catch((error) =&gt; {                console.error('\u041e\u0448\u0438\u0431\u043a\u0430:', error);            });            modal.style.display = 'none';        });    &lt;\/script&gt; &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u0438\u0434\u0438\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u044b\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0432 JSON.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b85\/70d\/125\/b8570d1253b221b49dd43d3a4b540f5b.png\" width=\"1600\" height=\"805\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b85\/70d\/125\/b8570d1253b221b49dd43d3a4b540f5b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b85\/70d\/125\/b8570d1253b221b49dd43d3a4b540f5b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u00ab\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e\u00bb. \u0427\u0435\u0440\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u044e process_selected_positions \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u043a API DeepSeek. JSON-\u043e\u0442\u0432\u0435\u0442\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e proposition. Django \u043f\u0440\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u0435\u0451 HTML-\u043a\u043e\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 proposition. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u043e\u0432:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c38\/a99\/fda\/c38a99fdabe38f3ea06ecd1019af6209.png\" width=\"1600\" height=\"813\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c38\/a99\/fda\/c38a99fdabe38f3ea06ecd1019af6209.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c38\/a99\/fda\/c38a99fdabe38f3ea06ecd1019af6209.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435\u00bb \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u044d\u0442\u0430\u043f, \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0435\u0440\u0435\u0441\u043f\u0440\u043e\u0441\u0438\u0442 \u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u0445 \u2014 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043e\u043a\u043d\u043e.<\/p>\n<p>\u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u0438\u044f JSON \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043d\u0430 \u0431\u044d\u043a. \u0418 \u0442\u043e\u0433\u0434\u0430 \u0443\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b \u0441 \u00ab\u0411\u0438\u0442\u0440\u0438\u043a\u0441\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u043e\u0431\u044c\u044e\u0442\u0441\u044f \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u2014 \u0438\u043c \u043f\u0440\u0438\u0434\u0443\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 SMS).<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/da9\/fb7\/c32\/da9fb7c32bdd1e5d867268a8010bc2c7.png\" width=\"1600\" height=\"814\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/da9\/fb7\/c32\/da9fb7c32bdd1e5d867268a8010bc2c7.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/da9\/fb7\/c32\/da9fb7c32bdd1e5d867268a8010bc2c7.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 CRM \u00ab\u0411\u0438\u0442\u0440\u0438\u043a\u044124\u00bb \u043a\u0430\u043a \u0431\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u00ab\u0411\u0438\u0442\u0440\u0438\u043a\u044124\u00bb \u043d\u0443\u0436\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u0438 \u0441\u0434\u0435\u043b\u043e\u043a, \u043f\u043e\u0438\u0441\u043a\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u0434\u0435\u043b\u043e\u043a \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u043c. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043a\u043e\u0434\u0430, \u043c\u044b \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043d\u0430\u0448\u0435\u0439<a href=\"https:\/\/habr.com\/ru\/companies\/exolve\/articles\/888368\/\"> \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e \u044d\u043a\u043e\u0447\u0435\u043b\u043b\u0435\u043d\u0434\u0436<\/a>. \u0422\u0430\u043c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438: get_contacts, get_deals, is_contact_in_deal, search_deals_by_contact, get_deals_sum. \u0412\u043e\u0437\u044c\u043c\u0438\u0442\u0435 \u043a\u043e\u0434 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 \u0444\u0430\u0439\u043b \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0439\u0434\u0451\u0442 \u0440\u0435\u0447\u044c \u043d\u0438\u0436\u0435, \u043b\u0438\u0431\u043e \u0432\u043e\u0437\u044c\u043c\u0438\u0442\u0435 \u043f\u043e\u043b\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043a\u043e\u0434\u0430<a href=\"https:\/\/github.com\/duckdevdotdev\/postprod-article-mar2025-ab-test-sms-with-deepseek-ai\"> \u0438\u0437 \u0433\u0438\u0442\u0445\u0430\u0431\u0430<\/a>.<\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u043a \u0433\u0440\u0443\u043f\u043f\u0435 \u0438 \u0441\u0443\u043c\u043c\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0445 \u0441\u0434\u0435\u043b\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0432\u043e\u0439 \u0434\u0430\u0442\u0430-\u043a\u043b\u0430\u0441\u0441. \u041e\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u0434\u0430\u0442\u0430-\u0444\u0440\u0435\u0439\u043c\u0430: \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u043d\u043e\u043c\u0435\u0440\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u0438 \u0441\u0443\u043c\u043c\u044b \u0441\u0434\u0435\u043b\u043e\u043a.<\/p>\n<pre><code class=\"python\">@dataclass class DB:    interactions_table = pd.DataFrame(columns=['ID', 'group', 'sales']).set_index(['ID'])    phone_table = pd.DataFrame(columns=['phone', 'client_id']).set_index(['phone'])    def add_client_phones(self, client_full_record):        contact_phones = [ph.get('VALUE', '').strip('+') for ph in client_full_record.get('PHONE', [{}])]        if len(contact_phones) == 0:            return 0        for c in contact_phones:            self.phone_table.loc[c] = [client_full_record.get('ID')]        return 1    def add_interaction_item(self, client_full_record):        if not self.add_client_phones(client_full_record):            return        self.interactions_table.loc[client_full_record.get('ID')] = 0    def get_phone(self, client_ID):        phone_indexes = self.phone_table['client_id'] == client_ID        return self.phone_table.loc[phone_indexes].index[0].strip('+')    def set_sales_by_tel(self, tel, num=1):        client_id = db.phone_table.loc[tel].iloc[0]        db.task_table.loc[client_id, 'sales'] += num    def fill_bases(self, groups_number=2):        contacts = get_contacts()        for c in contacts:            self.add_client_phones(c)            self.add_interaction_item(c)        split_into_groups(self.interactions_table, groups_number)    def select_by_group(self, number):        indexes = self.interactions_table['group'] == number        return self.interactions_table.loc[indexes]    def calculate_deals(self):        dls = get_deals()        for ID in self.interactions_table.index:            current_deals = search_deals_by_contact(dls, ID)            total_ordered = get_deals_sum(current_deals)            self.interactions_table.loc[ID, 'sales'] += total_ordered def split_into_groups(df: pd.DataFrame, groups_num=2):    shuffled = df.sample(frac=1).index.values    splitted_index = np.array_split(shuffled, groups_num)    for ai in range(groups_num):        df.loc[splitted_index[ai], 'group'] = ai<\/code><\/pre>\n<h3>\u0420\u0430\u0441\u0441\u044b\u043b\u043a\u0430 SMS \u043f\u043e API<\/h3>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a \u0432 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 CRM-\u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 <a href=\"https:\/\/exolve.ru\/products\/sms-api\/?utm_source=habr&amp;utm_medium=refferal&amp;utm_campaign=sms_api_article&amp;utm_content=article_abtestsds&amp;utm_term=sms_api_exolve\">\u041c\u0422\u0421 Exolve<\/a>, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c API-\u043a\u043b\u044e\u0447 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0435\u0440\u0435\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 requests \u0432 Python) \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"python\">def send_SMS(recepient: str, send_str: str):    payload = {'number': crm_phone, 'destination': recepient, 'text': send_str}    r = requests.post(r'https:\/\/api.exolve.ru\/messaging\/v1\/SendSMS', headers={'Authorization': 'Bearer ' + sms_api_key},                      data=json.dumps(payload))    print(r.text)    return r.text, r.status_code<\/code><\/pre>\n<h3>\u0410\u043d\u0430\u043b\u0438\u0437 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b, \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0441\u0434\u0435\u043b\u043e\u043a \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445. \u0414\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Z-\u0442\u0435\u0441\u0442 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0439. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e, \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u0434\u0435\u043b\u043e\u043a \u043e\u0442\u043b\u0438\u0447\u043d\u0430 \u043e\u0442 \u043d\u0443\u043b\u044f.<\/p>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u0435\u0441\u0442\u0430 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u043a\u043b\u0438\u043a\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c\u044e. \u0422\u0435\u0441\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u043e\u0442\u043a\u043b\u0438\u043a\u043e\u0432 \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e proportions_ztest \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 statsmodels. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 Python:<\/p>\n<pre><code class=\"python\">z_stat, pval = proportions_ztest(dealed, nobs=nobs)<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 p-value \u043c\u0435\u043d\u044c\u0448\u0435 0,05, \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c\u0438.  <\/p>\n<pre><code class=\"python\">def get_numbers(group_num):    selected_contacts = db.select_by_group(group_num)    nobs = selected_contacts.shape[0] + 1    dealed = np.count_nonzero(selected_contacts['sales'].values)    return dealed, nobs def finish_observation():    pval = []    dealed0, nobs0 = get_numbers(0)    for ai in range(1, sms_data.groups_number()):        dealed = [dealed0]        nobs = [nobs0]        dealed1, nobs1 = get_numbers(ai)        dealed.append(dealed1)        nobs.append(nobs1)        z_stat, pval1 = proportions_ztest(dealed, nobs=nobs)        pval.append(pval1)    index = np.argmin(pval)    pval_min = min(pval)    return index, pval_min<\/code><\/pre>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u043a\u043b\u0438\u043a\u043e\u0432 \u2014 15 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0438 25 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439, \u043f\u0440\u0438 40 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u0445 \u2014 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c\u0438 (p = 0,025 &lt; 0,05), \u0430 \u043f\u0440\u0438 65 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u0445 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c\u0438 (p = 0,057 &gt; 0,05).<\/p>\n<p>\u041f\u043e\u043a\u0430 \u0440\u0430\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b \u043e \u0442\u043e\u043c, \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043b\u0438 DeepSeek \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043d\u043e \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0448\u0430\u043d\u0441\u044b. \u0421\u0435\u0439\u0447\u0430\u0441 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043d\u0430 13% \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0442\u0435 SMS, \u0433\u0434\u0435 \u043c\u044b \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u0438\u0434\u043a\u0443 \u0438 \u0446\u0438\u0444\u0440\u044b. \u0418 \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u044b \u0438 \u043e\u0442\u0441\u0435\u0438\u0432\u0430\u0442\u044c \u044f\u0432\u043d\u043e \u043b\u0438\u0448\u043d\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b.<\/p>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430\u043c \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u0438 \u043c\u0430\u0440\u043a\u0435\u0442\u043e\u043b\u043e\u0433\u0430\u043c \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445. \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439 \u041c\u0422\u0421 Exolve \u0438 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e DeepSeek \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043d\u043e \u0438 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0435\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0432\u0435\u0434\u0451\u0442 \u043a \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0434\u0430\u0436. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u043c\u043e\u0449\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0430\u043f\u043f\u0430\u0440\u0430\u0442\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438.<\/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\/898764\/\"> https:\/\/habr.com\/ru\/articles\/898764\/<\/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>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430\u043c \u0431\u0438\u0437\u043d\u0435\u0441\u043e\u0432 \u0438 \u043c\u0430\u0440\u043a\u0435\u0442\u043e\u043b\u043e\u0433\u0430\u043c \u0432 \u0434\u0432\u0430 \u043a\u043b\u0438\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u044b \u0434\u043b\u044f A\/B-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f SMS-\u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u0440\u0430\u0437\u043e\u0441\u043b\u0430\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c \u0438\u0437 CRM.<\/p>\n<p>\u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c API DeepSeek, \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a \u2014 <a href=\"https:\/\/exolve.ru\/products\/sms-api\/?utm_source=habr&amp;utm_medium=refferal&amp;utm_campaign=sms_api_article&amp;utm_content=article_abtestsds&amp;utm_term=sms_api_exolve\">SMS API<\/a> \u043e\u0442 \u041c\u0422\u0421 Exolve, \u0430 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b \u0431\u0435\u0440\u0451\u043c \u0438\u0437 CRM-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u00ab\u0411\u0438\u0442\u0440\u0438\u043a\u044124\u00bb.<\/p>\n<p>\u0421 \u044d\u0442\u0438\u043c \u043c\u0438\u043a\u0440\u043e\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u044f\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 SMS \u2014 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0430\u0434\u0438\u043c. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433 \u0438 \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u043f\u044f\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0430\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e \u0440\u043e\u043b\u044c<\/p>\n<\/li>\n<li>\n<p>\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0448\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0434\u043e\u0431\u0440\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0442\u0435\u043a\u0441\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u0447\u0435\u043a\u0431\u043e\u043a\u0441 \u2014 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b \u0438\u0437 CRM-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u0431\u0438\u0442\u044b \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0441\u0434\u0435\u043b\u043a\u0430\u0445 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435. \u041d\u0430 \u044d\u0442\u043e\u043c \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438. \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u0435\u0441\u0442\u044c \u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0438\u043b\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u044b \u0448\u0443\u043c\u043e\u043c.\u00a0<\/p>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u0438 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043e\u0442 \u0440\u0443\u0442\u0438\u043d\u044b \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0434\u043e\u0445\u043e\u0434 \u043e\u0442 \u043f\u0440\u043e\u0434\u0430\u0436.<\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 API DeepSeek<\/h3>\n<p>\u0414\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 DeepSeek \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 deepseek \u0441 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u043a API \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u041f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0432\u0435\u0431-\u0444\u043e\u0440\u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f:<\/p>\n<pre><code class=\"python\">def dump_JSON(JSON):    with open(SETTINGS_PATH, 'w') as f:        json.dump(JSON, f) @csrf_exempt def save_and_run_deep_seek(request):    # Get prompt textfields content    conditions_JSON = json.loads(request.body.decode('utf-8'))    dump_JSON(conditions_JSON)    # Compose prompt and run API    prompt = prompt_constructor(conditions_JSON)    print(prompt)    response = api_client.chat_completion(prompt=prompt).replace('```json', '').replace('```', '')    print(response)    answer_JSON = json.loads(response)    sms_data.set_JSON(answer_JSON)    return show_page(request, answer_JSON)<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f save_and_run_deep_seek \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044e \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u043e\u0435\u0434\u0438\u043d\u043e \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u0437 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0435. \u041b\u0438\u0448\u043d\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Markdown, \u0438 JSON \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043b\u0435\u0436\u0438\u0442 \u043a\u043e\u0434.<\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u043e\u043b\u0435\u0439 \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h4>\n<p>\u0414\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 SMS \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0432\u0430\u0436\u043d\u043e \u0447\u0451\u0442\u043a\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438. \u0422\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044e, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u0441\u0430\u043c\u0443 \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<p>\u041c\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f:<\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0430\u044f \u0440\u043e\u043b\u044c \u0437\u0430\u0434\u0430\u0451\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438 \u0441\u0442\u0438\u043b\u044c \u0442\u0435\u043a\u0441\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0439<\/p>\n<\/li>\n<li>\n<p>\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438 \u043c\u043e\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0437\u0430\u0434\u0430\u0451\u0442 \u0447\u0451\u0442\u043a\u0443\u044e \u0446\u0435\u043b\u044c, \u0447\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ol>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0439 \u0432\u0435\u0431-\u0444\u043e\u0440\u043c\u044b \u0438 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0448 \u043f\u0440\u043e\u043c\u043f\u0442:<\/p>\n<pre><code class=\"python\">PROMPT_CONDITIONS_NAMES = ['\u0422\u0432\u043e\u044f \u0440\u043e\u043b\u044c: ', '\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f: ', '\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438: ', '\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f: ',                           '\u0422\u0432\u043e\u044f \u0437\u0430\u0434\u0430\u0447\u0430: '] prompt_initial = [    {\"role\": \"system\",     \"content\": \"\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0438 5 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u0430. \u0417\u0430\u043f\u0438\u0448\u0438 \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u0442\u0440\u043e\u043a \u0432 \u043f\u043e\u043b\u0435 proposition JSON-\u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0412\u0435\u0440\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u043e JSON \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.\"}, ]<\/code><\/pre>\n<pre><code class=\"python\">def prompt_constructor(conditions_JSON):    prompt = prompt_initial.copy()    for ai, cond in enumerate(conditions_JSON['prompts']):        if len(cond) == 0: continue        prompt.append(            {\"role\": \"user\",             \"content\": PROMPT_CONDITIONS_NAMES[ai] + cond})    return prompt<\/code><\/pre>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u043a\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0418\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0430\u044f \u0440\u043e\u043b\u044c<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c, \u0447\u0442\u043e \u0442\u044b \u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u043c\u0430\u0440\u043a\u0435\u0442\u043e\u043b\u043e\u0433, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0448\u044c \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u00ab\u0420\u0430\u0434\u0443\u0433\u0430\u00bb, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0449\u0435\u0439 \u0443\u0445\u043e\u0434\u043e\u0432\u0443\u044e \u043a\u043e\u0441\u043c\u0435\u0442\u0438\u043a\u0443. \u0422\u0435\u0431\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f SMS. \u0415\u0433\u043e \u0442\u0435\u043a\u0441\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438 \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u043f\u043e\u0431\u0443\u0436\u0434\u0430\u044e\u0449\u0438\u043c \u043a \u043f\u043e\u043a\u0443\u043f\u043a\u0435 \u0438\u043b\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044e \u0430\u0441\u0441\u043e\u0440\u0442\u0438\u043c\u0435\u043d\u0442\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0430\u043c\u0430 \u0441 \u0440\u0435\u0431\u0451\u043d\u043a\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0448\u0451\u043b \u0432 \u0434\u0435\u0442\u0441\u043a\u0438\u0439 \u0441\u0430\u0434. \u041c\u0430\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u0432\u0435\u043d\u0430, \u0438\u043c\u0435\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0438 \u0432\u044b\u0448\u0435 \u0434\u043e\u0445\u043e\u0434, \u0440\u0430\u0437\u0432\u0435\u0434\u0435\u043d\u0430. \u0421 \u0440\u0435\u0431\u0451\u043d\u043a\u043e\u043c \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u043c\u0430\u043c\u044b. \u0412\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0441\u0435\u0431\u044f \u043c\u0430\u043b\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043a\u0438\u0434\u043a\u0430 30% \u043d\u0430 \u0441\u0435\u0440\u0438\u044e \u043a\u0440\u0435\u043c\u043e\u0432 \u0434\u043b\u044f \u043b\u0438\u0446\u0430. \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043e 15 \u0430\u043f\u0440\u0435\u043b\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412 SMS \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432: \u043e\u0442 70 \u0434\u043e 140 \u0437\u043d\u0430\u043a\u043e\u0432 \u0441 \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>\u0417\u0430\u0434\u0430\u0447\u0430<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0438 SMS \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u0441\u0440\u0435\u0434\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u043a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0448 \u0442\u043e\u0432\u0430\u0440<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Python \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Django<\/h3>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u0411\u044d\u043a\u0435\u043d\u0434 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u043d\u043e \u0438 \u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0431\u0430\u0437\u043e\u0439 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b. \u0421 Django \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u2014 \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432 \u0434\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c.\u00a0<\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0412 <a href=\"http:\/\/views.py\">views.py<\/a> \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041f\u043e\u043c\u0438\u043c\u043e save_and_run_deep_seek, \u0432 \u0444\u0430\u0439\u043b\u0435 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 DeepSeek \u0438 \u0434\u0440\u0443\u0433\u0438\u0435, \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435.<\/p>\n<pre><code class=\"python\">sms_data = SmsTrial() db = DB() def show_page(request, proposition_JSON=None):    # Read JSON, fill in textareas previously saved conditions    return render(request, 'deep_seek_api_app\/index.html', context=get_context(proposition_JSON)) @csrf_exempt def process_selected_propositions(request):    numbers_JSON = json.loads(request.body.decode('utf-8'))    print(numbers_JSON)    sms_data.select(numbers_JSON['buttons'])    start_processing()    return show_page(request) def start_processing():    db.fill_bases(sms_data.groups_number())    for ID in db.interactions_table.index:        current_text_index = db.interactions_table.loc[ID, 'group']        current_text = sms_data.get_text_by_group_number(current_text_index)        send_SMS(db.get_phone(ID), current_text) def get_list(texts_iterable=None, number: int = 5):    if texts_iterable is None:        texts_iterable = ()    ans = []    for ai in range(number):        if ai &lt; len(texts_iterable):            ans.append(texts_iterable[ai])            continue        ans.append('')    return ans def get_context(answer_JSON=None):    if answer_JSON is None: answer_JSON = {}    proposition = get_list(answer_JSON.get('proposition'))    prompt_JSON = get_settings()    prompts = get_list(prompt_JSON.get('prompts'))    ans = {'prompts': prompts, 'proposition': proposition}    print(ans)    return ans def get_settings():    if not os.path.exists(SETTINGS_PATH):        return {}    with open(SETTINGS_PATH, 'r') as f:        return json.load(f) @dataclass class SmsTrial:    answer_JSON = {}    selected_propositions = []    def set_JSON(self, JSON):        self.answer_JSON = JSON    def select(self, buttons_number):        self.selected_propositions = buttons_number    def get_text_by_group_number(self, number):        answer_id = self.selected_propositions[number]        return self.answer_JSON['proposition'][answer_id]    def groups_number(self):        return len(self.selected_propositions)<\/code><\/pre>\n<p>\u041e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0437\u0434\u0435\u0441\u044c \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u043a\u043b\u0430\u0441\u0441\u0435 DB \u2014 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043f\u043e\u0437\u0436\u0435.<\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432<\/h4>\n<p>\u0412 <a href=\"http:\/\/urls.py\">urls.py<\/a> \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f URL, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u0432\u0435\u0431-\u0444\u043e\u0440\u043c\u044b \u0441 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"python\">from django.contrib import admin from django.urls import path from . import views urlpatterns = [    path('admin\/', admin.site.urls),    path('main_page\/', views.show_page),    path('response\/', views.save_and_run_deep_seek),    path('try\/', views.process_selected_propositions), ]<\/code><\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0433\u043b\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b. \u0428\u0430\u0431\u043b\u043e\u043d \u2014 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u0433\u0434\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u0439 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 render \u0438\u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438. HTML-\u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 templates\/&lt;\u0438\u043c\u044f_\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f&gt;\/.<\/p>\n<p>\u0428\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u0435\u0439, \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0434\u043b\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438, \u043a\u043d\u043e\u043f\u043a\u0438 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438. \u042d\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043f\u043e\u043a\u0430\u0437 \u043e\u043a\u043d\u0430 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0431\u044d\u043a \u0438, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u043e\u0432.<\/p>\n<p>\u041d\u043e\u043c\u0435\u0440\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c \u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html&gt; &lt;html lang=\"ru\"&gt; &lt;head&gt;    &lt;meta charset=\"UTF-8\"&gt;    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;    &lt;title&gt;\u0410\u0412 \u0442\u0435\u0441\u0442 SMS&lt;\/title&gt;    &lt;style&gt;        \/* \u041f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u0435\u0439 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u0443\u0431\u0440\u0430\u043b\u0438, \u043f\u043e\u043b\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0433\u0438\u0442\u0445\u0430\u0431\u0435 https:\/\/github.com\/duckdevdotdev\/postprod-article-mar2025-ab-test-sms-with-deepseek-ai *\/    &lt;\/style&gt; &lt;\/head&gt; &lt;body&gt;    &lt;h1&gt;\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0438 \u0410\u0412 \u0442\u0435\u0441\u0442 \u043c\u043e\u0442\u0438\u0432\u0438\u0440\u0443\u044e\u0449\u0438\u0445 SMS&lt;\/h1&gt;    &lt;h2&gt;\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 SMS&lt;\/h2&gt;    &lt;!-- \u041f\u0435\u0440\u0432\u044b\u0439 \u0431\u043b\u043e\u043a --&gt;    &lt;div class=\"block\"&gt;        &lt;label for=\"textarea1\"&gt;\u0420\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0418\u0418:&lt;\/label&gt;        &lt;textarea id=\"textarea1\" placeholder=\"\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\"&gt;{{prompts.0}}&lt;\/textarea&gt;        &lt;label for=\"textarea2\"&gt;\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f:&lt;\/label&gt;        &lt;textarea id=\"textarea2\" placeholder=\"\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\"&gt;{{prompts.1}}&lt;\/textarea&gt;        &lt;label for=\"textarea3\"&gt;\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438:&lt;\/label&gt;        &lt;textarea id=\"textarea3\" placeholder=\"\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\"&gt;{{prompts.2}}&lt;\/textarea&gt;        &lt;label for=\"textarea4\"&gt;\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f:&lt;\/label&gt;        &lt;textarea id=\"textarea4\" placeholder=\"\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\"&gt;{{prompts.3}}&lt;\/textarea&gt;        &lt;label for=\"textarea5\"&gt;\u0417\u0430\u0434\u0430\u0447\u0430:&lt;\/label&gt;        &lt;textarea id=\"textarea5\" placeholder=\"\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\"&gt;{{prompts.4}}&lt;\/textarea&gt;        &lt;button id=\"send_req_button\"&gt;\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e&lt;\/button&gt;    &lt;\/div&gt;    &lt;h2&gt;\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 Deep Seek&lt;\/h2&gt;    &lt;!-- \u0412\u0442\u043e\u0440\u043e\u0439 \u0431\u043b\u043e\u043a --&gt;    &lt;div class=\"block\"&gt;        &lt;div class=\"block-2\"&gt;            &lt;label for=\"textarea6\"&gt;\u0412\u0430\u0440\u0438\u0430\u043d\u0442 1:&lt;\/label&gt;            &lt;textarea id=\"textarea6\" placeholder=\"\u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0421\u041c\u0421, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e\"&gt;{{proposition.0}}&lt;\/textarea&gt;            &lt;input<\/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-457630","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457630","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=457630"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457630\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}