{"id":25221,"date":"2023-06-01T07:25:25","date_gmt":"2023-06-01T03:55:25","guid":{"rendered":"https:\/\/nabfollower.com\/blog\/build-a-basketball-sms-chatbot-with-langchain-prompt-templates-in-python-5dld\/"},"modified":"2023-06-01T07:25:25","modified_gmt":"2023-06-01T03:55:25","slug":"build-a-basketball-sms-chatbot-with-langchain-prompt-templates-in-python-5dld","status":"publish","type":"post","link":"https:\/\/nabfollower.com\/blog\/build-a-basketball-sms-chatbot-with-langchain-prompt-templates-in-python-5dld\/","title":{"rendered":"\u06cc\u06a9 \u0686\u062a \u0631\u0628\u0627\u062a \u0627\u0633 \u0627\u0645 \u0627\u0633 \u0628\u0633\u06a9\u062a\u0628\u0627\u0644 \u0628\u0627 \u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a LangChain \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0628\u0633\u0627\u0632\u06cc\u062f"},"content":{"rendered":"<div data-article-id=\"1487637\" id=\"article-body\">\n<p>\u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u0628\u0627 OpenAI API (\u0648 \u0645\u062f\u0644\u200c\u0647\u0627\u06cc DALL\u00b7E \u0648 \u062a\u0646\u0638\u06cc\u0645 \u062f\u0642\u06cc\u0642) \u0628\u0627\u0632\u06cc \u06a9\u0631\u062f\u0647\u200c\u0627\u0645 \u0648 \u0628\u06cc\u0634\u062a\u0631 \u0648\u0627\u0631\u062f ML \u0634\u062f\u0647\u200c\u0627\u0645\u060c \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646\u06cc \u06a9\u0647 \u0645\u06cc\u200c\u0628\u06cc\u0646\u0645 (\u0648 \u0647\u0645\u0686\u0646\u06cc\u0646 \u0645\u0646 <a href=\"https:\/\/twitter.com\/craigsdennis\" rel=\"nofollow noopener\" target=\"_blank\">\u0647\u0645\u06a9\u0627\u0631 \u0641\u0648\u0642 \u0627\u0644\u0639\u0627\u062f\u0647 \u06a9\u0631\u06cc\u06af \u062f\u0646\u06cc\u0633<\/a> \u06a9\u0633\u06cc \u06a9\u0647 \u062f\u0631 \u0645\u0648\u0631\u062f \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0628\u0647 \u0645\u0646 \u062a\u0648\u0635\u06cc\u0647 \u06a9\u0631\u062f) \u0645\u062f\u0627\u0645 \u0628\u0647 \u0645\u0646 \u0645\u06cc \u06af\u0648\u06cc\u0646\u062f \u06a9\u0647 \u0627\u0632 LangChain \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0645\u060c \u06cc\u06a9 \u0686\u0627\u0631\u0686\u0648\u0628 \u0642\u062f\u0631\u062a\u0645\u0646\u062f \u0648 \u0627\u0646\u0639\u0637\u0627\u0641 \u067e\u0630\u06cc\u0631 \u0628\u0631\u0627\u06cc \u062a\u0648\u0633\u0639\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0627 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0632\u0628\u0627\u0646.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0646\u062d\u0648\u0647 \u0633\u0627\u062e\u062a \u06cc\u06a9 \u0686\u062a \u0631\u0628\u0627\u062a \u067e\u06cc\u0627\u0645\u06a9\u06cc \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u0627\u0639\u0644\u0627\u0646\u0627\u062a LangChain\u060c OpenAI\u060c \u067e\u06cc\u0627\u0645\u200c\u0631\u0633\u0627\u0646\u06cc \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u067e\u0630\u06cc\u0631 Twilio \u0648 Python \u0628\u0647 \u0627\u062f\u0627\u0645\u0647 \u0645\u0637\u0644\u0628 \u0628\u0631\u0648\u06cc\u062f.<br \/><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter-rtl ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u0641\u0647\u0631\u0633\u062a \u0645\u0637\u0627\u0644\u0628<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/nabfollower.com\/blog\/build-a-basketball-sms-chatbot-with-langchain-prompt-templates-in-python-5dld\/#%D9%85%D8%AF%D9%84_%D9%87%D8%A7%DB%8C_%D8%B2%D8%A8%D8%A7%D9%86_%D8%A8%D8%B2%D8%B1%DA%AF\" >\u0645\u062f\u0644 \u0647\u0627\u06cc \u0632\u0628\u0627\u0646 \u0628\u0632\u0631\u06af<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/nabfollower.com\/blog\/build-a-basketball-sms-chatbot-with-langchain-prompt-templates-in-python-5dld\/#LangChain\" >LangChain<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/nabfollower.com\/blog\/build-a-basketball-sms-chatbot-with-langchain-prompt-templates-in-python-5dld\/#%D8%A7%D9%84%DA%AF%D9%88%D9%87%D8%A7%DB%8C_%D8%AF%D8%B1%D8%AE%D9%88%D8%A7%D8%B3%D8%AA_LangChain\" >\u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a LangChain<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/nabfollower.com\/blog\/build-a-basketball-sms-chatbot-with-langchain-prompt-templates-in-python-5dld\/#%D9%BE%DB%8C%D8%B4_%D9%86%DB%8C%D8%A7%D8%B2%D9%87%D8%A7\" >\u067e\u06cc\u0634 \u0646\u06cc\u0627\u0632\u0647\u0627<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/nabfollower.com\/blog\/build-a-basketball-sms-chatbot-with-langchain-prompt-templates-in-python-5dld\/#%D9%BE%DB%8C%DA%A9%D8%B1%D8%A8%D9%86%D8%AF%DB%8C\" >\u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/nabfollower.com\/blog\/build-a-basketball-sms-chatbot-with-langchain-prompt-templates-in-python-5dld\/#%D8%AA%D9%88%D9%84%DB%8C%D8%AF_%D9%85%D8%AA%D9%86_%D8%A7%D8%B2_%D8%B7%D8%B1%DB%8C%D9%82_LangChain_%D8%A8%D8%A7_OpenAI_%D8%AF%D8%B1_%D9%BE%D8%A7%DB%8C%D8%AA%D9%88%D9%86_%D8%A7%D8%B2_%D8%B7%D8%B1%DB%8C%D9%82_SMS\" >\u062a\u0648\u0644\u06cc\u062f \u0645\u062a\u0646 \u0627\u0632 \u0637\u0631\u06cc\u0642 LangChain \u0628\u0627 OpenAI \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u0632 \u0637\u0631\u06cc\u0642 SMS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/nabfollower.com\/blog\/build-a-basketball-sms-chatbot-with-langchain-prompt-templates-in-python-5dld\/#%D8%A2%DB%8C%D9%86%D8%AF%D9%87_%D8%A8%D8%B1%D8%A7%DB%8C_Twilio_%D9%88_LangChain_%DA%86%DB%8C%D8%B3%D8%AA\" >\u0622\u06cc\u0646\u062f\u0647 \u0628\u0631\u0627\u06cc Twilio \u0648 LangChain \u0686\u06cc\u0633\u062a<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%D9%85%D8%AF%D9%84_%D9%87%D8%A7%DB%8C_%D8%B2%D8%A8%D8%A7%D9%86_%D8%A8%D8%B2%D8%B1%DA%AF\"><\/span>\n<p>  \u0645\u062f\u0644 \u0647\u0627\u06cc \u0632\u0628\u0627\u0646 \u0628\u0632\u0631\u06af<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u0645\u062f\u0644\u200c\u0647\u0627\u06cc \u0632\u0628\u0627\u0646 \u0628\u0632\u0631\u06af \u0628\u0631 \u0631\u0648\u06cc \u0645\u0642\u0627\u062f\u06cc\u0631 \u0632\u06cc\u0627\u062f\u06cc \u0627\u0632 \u062f\u0627\u062f\u0647\u200c\u0647\u0627\u06cc \u0645\u062a\u0646\u06cc \u0622\u0645\u0648\u0632\u0634 \u062f\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f (\u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644 \u062f\u0631 \u0645\u0648\u0631\u062f ChatGPT\u060c \u06a9\u0644 \u0627\u06cc\u0646\u062a\u0631\u0646\u062a \u062a\u0627 \u0633\u0627\u0644 2021\u2014\u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0632\u0645\u06cc\u0646\u0647 \u06cc\u0627 \u062f\u0627\u062f\u0647\u200c\u0647\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631\u06cc \u0631\u0627 \u06a9\u0647 \u0645\u062f\u0644 \u0627\u0632 \u062f\u0633\u062a \u062f\u0627\u062f\u0647 \u0627\u0633\u062a \u0628\u0627 \u0645\u0647\u0646\u062f\u0633\u06cc \u0633\u0631\u06cc\u0639 \u0648 \u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u0627\u0639\u0644\u0627\u0646 \u0627\u0631\u0627\u0626\u0647 \u062f\u0647\u06cc\u062f \u2013 \u062f\u0631 \u0622\u06cc\u0646\u062f\u0647 \u0628\u06cc\u0634\u062a\u0631 \u062f\u0631 \u0645\u0648\u0631\u062f \u0622\u0646\u200c\u0647\u0627 \u0628\u06cc\u0634\u062a\u0631 \u062e\u0648\u0627\u0647\u062f \u0634\u062f). \u067e\u0627\u0633\u062e\u200c\u0647\u0627\u06cc\u06cc \u0634\u0628\u06cc\u0647 \u0627\u0646\u0633\u0627\u0646 \u0628\u0647 \u06af\u0641\u062a\u06af\u0648 \u06cc\u0627 \u0633\u0627\u06cc\u0631 \u0648\u0631\u0648\u062f\u06cc\u200c\u0647\u0627\u06cc \u0632\u0628\u0627\u0646 \u0637\u0628\u06cc\u0639\u06cc \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0628\u0647 \u062f\u0633\u062a \u0622\u0648\u0631\u062f\u0646 \u0627\u06cc\u0646 \u067e\u0627\u0633\u062e \u0647\u0627\u06cc \u0632\u0628\u0627\u0646 \u0637\u0628\u06cc\u0639\u06cc\u060c LLM \u0647\u0627 \u0627\u0632 \u0645\u062f\u0644 \u0647\u0627\u06cc \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0639\u0645\u06cc\u0642 (DL) \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u0646\u062f \u06a9\u0647 \u0627\u0632 \u0634\u0628\u06a9\u0647 \u0647\u0627\u06cc \u0639\u0635\u0628\u06cc \u0686\u0646\u062f \u0644\u0627\u06cc\u0647 \u0628\u0631\u0627\u06cc \u067e\u0631\u062f\u0627\u0632\u0634\u060c \u062a\u062c\u0632\u06cc\u0647 \u0648 \u062a\u062d\u0644\u06cc\u0644 \u0648 \u067e\u06cc\u0634 \u0628\u06cc\u0646\u06cc \u0628\u0627 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u067e\u06cc\u0686\u06cc\u062f\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u0646\u062f.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"LangChain\"><\/span>\n<p>  LangChain<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/nabfollower.com\/blog\/wp-content\/uploads\/2023\/06\/\u06cc\u06a9-\u0686\u062a-\u0631\u0628\u0627\u062a-\u0627\u0633-\u0627\u0645-\u0627\u0633-\u0628\u0633\u06a9\u062a\u0628\u0627\u0644-\u0628\u0627-\u0627\u0644\u06af\u0648\u0647\u0627\u06cc-\u062f\u0631\u062e\u0648\u0627\u0633\u062a.webp.jpeg\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u0644\u0648\u06af\u0648\u06cc LangChain\" loading=\"lazy\" width=\"800\" height=\"419\" title=\"\"><br \/>LangChain \u0627\u0648\u0627\u062e\u0631 \u0633\u0627\u0644 \u06af\u0630\u0634\u062a\u0647 \u0645\u0646\u062a\u0634\u0631 \u0634\u062f \u0648 \u062f\u0631 \u062d\u0627\u0644 \u062d\u0627\u0636\u0631 \u0628\u06cc\u0634 \u0627\u0632 43000 \u0633\u062a\u0627\u0631\u0647 \u062f\u0631 GitHub \u0648 \u06cc\u06a9 \u062c\u0627\u0645\u0639\u0647 \u067e\u0631 \u0631\u0648\u0646\u0642 \u0627\u0632 \u0645\u0634\u0627\u0631\u06a9\u062a \u06a9\u0646\u0646\u062f\u06af\u0627\u0646 \u062f\u0627\u0631\u062f.<\/p>\n<p>\u0627\u06cc\u0646 \u0686\u06cc\u0632\u0647\u0627\u06cc \u0632\u06cc\u0627\u062f\u06cc \u0627\u0633\u062a\u060c \u0627\u0645\u0627 \u062f\u0631 \u0646\u0647\u0627\u06cc\u062a \u062f\u0631 \u0647\u0633\u062a\u0647 \u0622\u0646 \u06cc\u06a9 \u0686\u0627\u0631\u0686\u0648\u0628 \u0645\u062a\u0646 \u0628\u0627\u0632 \u0627\u0633\u062a \u06a9\u0647 \u062a\u0648\u0633\u0639\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627 \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062f\u0644 \u0647\u0627\u06cc \u0632\u0628\u0627\u0646 \u0628\u0632\u0631\u06af (LLMs)\u060c \u0645\u0627\u0646\u0646\u062f OpenAI \u06cc\u0627 Hugging Face \u0633\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f.  \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0627\u0632 \u0622\u0646 \u0628\u0631\u0627\u06cc \u0686\u062a\u200c\u0628\u0627\u062a\u200c\u0647\u0627\u060c \u067e\u0627\u0633\u062e\u200c\u06af\u0648\u06cc\u06cc \u0628\u0647 \u0633\u0624\u0627\u0644\u0627\u062a (GQA)\u060c \u062e\u0644\u0627\u0635\u0647\u200c\u0633\u0627\u0632\u06cc \u0648 \u0645\u0648\u0627\u0631\u062f \u062f\u06cc\u06af\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0646\u062f.<\/p>\n<p>\u0628\u0627 LangChain\u060c \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0627\u062c\u0632\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 LLM \u0631\u0627 \u0628\u0647 \u0647\u0645 \u0645\u062a\u0635\u0644 \u06a9\u0646\u0646\u062f \u062a\u0627 \u0645\u0648\u0627\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u067e\u06cc\u0634\u0631\u0641\u062a\u0647\u200c\u062a\u0631\u06cc \u0631\u0627 \u062f\u0631 \u0627\u0637\u0631\u0627\u0641 LLM \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u0646\u062f.  \u0632\u0646\u062c\u06cc\u0631\u0647 \u0647\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u0646\u062f \u0627\u0632 \u0686\u0646\u062f\u06cc\u0646 \u062c\u0632\u0621 \u0627\u0632 \u0686\u0646\u062f\u06cc\u0646 \u0645\u0627\u0698\u0648\u0644 \u062a\u0634\u06a9\u06cc\u0644 \u0634\u062f\u0647 \u0628\u0627\u0634\u0646\u062f:<\/p>\n<ul>\n<li>Prompt Templates: \u0627\u0644\u06af\u0648\u0647\u0627\u06cc Prompt \u0627\u0644\u06af\u0648\u0647\u0627\u06cc\u06cc \u0628\u0631\u0627\u06cc \u0627\u0646\u0648\u0627\u0639 \u0645\u062e\u062a\u0644\u0641 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0647\u0627 \u0647\u0633\u062a\u0646\u062f.  \u0645\u0627\u0646\u0646\u062f \u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u0633\u0628\u06a9 \u00abchatbot\u00bb\u060c \u067e\u0627\u0633\u062e\u06af\u0648\u06cc\u06cc \u0628\u0647 \u0633\u0624\u0627\u0644\u0627\u062a ELI5 \u0648 \u063a\u06cc\u0631\u0647<\/li>\n<li>LLM: \u0645\u062f\u0644 \u0647\u0627\u06cc \u0632\u0628\u0627\u0646 \u0628\u0632\u0631\u06af \u0645\u0627\u0646\u0646\u062f GPT-3\u060c Hugging Face\u060c BLOOM \u0648 \u063a\u06cc\u0631\u0647<\/li>\n<li>\u0646\u0645\u0627\u06cc\u0646\u062f\u06af\u0627\u0646: \u0646\u0645\u0627\u06cc\u0646\u062f\u06af\u0627\u0646 \u0627\u0632 LLM \u0628\u0631\u0627\u06cc \u062a\u0635\u0645\u06cc\u0645 \u06af\u06cc\u0631\u06cc \u062f\u0631 \u0645\u0648\u0631\u062f \u0627\u0642\u062f\u0627\u0645\u0627\u062a\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0627\u0646\u062c\u0627\u0645 \u0634\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u0646\u062f.  \u0645\u06cc \u062a\u0648\u0627\u0646 \u0627\u0632 \u0627\u0628\u0632\u0627\u0631\u0647\u0627\u06cc\u06cc \u0645\u0627\u0646\u0646\u062f \u062c\u0633\u062a\u062c\u0648\u06cc \u0648\u0628 \u06cc\u0627 \u0645\u0627\u0634\u06cc\u0646 \u062d\u0633\u0627\u0628 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f \u0648 \u0647\u0645\u0647 \u062f\u0631 \u06cc\u06a9 \u062d\u0644\u0642\u0647 \u0645\u0646\u0637\u0642\u06cc \u0627\u0632 \u0639\u0645\u0644\u06cc\u0627\u062a \u0628\u0633\u062a\u0647 \u0628\u0646\u062f\u06cc \u0645\u06cc \u0634\u0648\u0646\u062f.<\/li>\n<li>\u062d\u0627\u0641\u0638\u0647: \u062d\u0627\u0641\u0638\u0647 \u06a9\u0648\u062a\u0627\u0647 \u0645\u062f\u062a\u060c \u062d\u0627\u0641\u0638\u0647 \u0628\u0644\u0646\u062f \u0645\u062f\u062a.  LangChain \u0642\u062f\u0631\u062a \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0631\u0627 \u062a\u0634\u062e\u06cc\u0635 \u0645\u06cc \u062f\u0647\u062f \u0648 \u0645\u062c\u0645\u0648\u0639\u0647 \u06a9\u0627\u0645\u0644\u06cc \u0627\u0632 \u0627\u0634\u06cc\u0627\u0621 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0622\u0646\u0647\u0627 \u0633\u0627\u062e\u062a\u0647 \u0627\u0633\u062a.  \u0647\u0645\u0686\u0646\u06cc\u0646 \u06cc\u06a9 \u0628\u0633\u062a\u0647 \u0628\u0646\u062f\u06cc \u062f\u0631 \u0627\u0637\u0631\u0627\u0641 LLM \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc \u062f\u0647\u062f \u062a\u0627 \u0628\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647 \u0631\u0627\u062d\u062a\u06cc \u0645\u062f\u0644 \u0647\u0627 \u0631\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f \u0648 \u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0627 \u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u06a9\u0646\u06cc\u062f.  \u0645\u062f\u0644 \u0686\u062a \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0645\u062a\u0641\u0627\u0648\u062a \u0628\u0627\u0634\u062f\u060c \u0627\u0645\u0627 \u0627\u062c\u0631\u0627 \u0648 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0622\u0646 \u06cc\u06a9\u0633\u0627\u0646 \u0627\u0633\u062a \u2013 \u06cc\u06a9 \u0645\u0641\u0647\u0648\u0645 \u0628\u0633\u06cc\u0627\u0631 \u0634\u0628\u06cc\u0647 \u062c\u0627\u0648\u0627!  ## LangChain Twilio Tool \u0627\u062e\u06cc\u0631\u0627\u064b\u060c LangChain \u0628\u0627 \u0627\u0628\u0632\u0627\u0631 Twilio \u0639\u0631\u0636\u0647 \u0634\u062f \u062a\u0627 \u0646\u0645\u0627\u06cc\u0646\u062f\u06af\u0627\u0646 LangChain \u0634\u0645\u0627 \u0628\u062a\u0648\u0627\u0646\u0646\u062f \u067e\u06cc\u0627\u0645\u200c\u0647\u0627\u06cc \u0645\u062a\u0646\u06cc \u0627\u0631\u0633\u0627\u0644 \u06a9\u0646\u0646\u062f.  \u0628\u0631\u0627\u06cc \u0645\u062b\u0627\u0644\u060c LLM \u0634\u0645\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0648\u0631\u0648\u062f\u06cc \u0631\u0627 \u0628\u0647 \u0632\u0628\u0627\u0646 \u0637\u0628\u06cc\u0639\u06cc \u062f\u0631\u06a9 \u06a9\u0646\u062f\u060c \u0627\u0645\u0627 Agents \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0628\u0647 \u0634\u0645\u0627 \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u062f \u06a9\u0627\u0631\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641\u06cc \u0645\u0627\u0646\u0646\u062f \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u06cc\u06a9 API \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f.<\/li>\n<\/ul>\n<p>\u0634\u0645\u0627 \u0628\u0647 \u0627\u0639\u062a\u0628\u0627\u0631\u0646\u0627\u0645\u0647 Twilio \u062e\u0648\u062f \u0648 \u0646\u0635\u0628 \u0622\u0646 \u0628\u0627 \u0622\u0646 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u06cc\u062f <code>pip install twilio<\/code>.  \u06a9\u062f \u0627\u06cc\u0646 \u0627\u0628\u0632\u0627\u0631 \u0686\u06cc\u0632\u06cc \u0634\u0628\u06cc\u0647 \u0628\u0647 \u0627\u06cc\u0646 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight python\"><code><span class=\"kn\">from<\/span> <span class=\"nn\">langchain.utilities.twilio<\/span> <span class=\"kn\">import<\/span> <span class=\"n\">TwilioAPIWrapper<\/span>\n\n<span class=\"n\">twilio<\/span> <span class=\"o\">=<\/span> <span class=\"n\">TwilioAPIWrapper<\/span><span class=\"p\">(<\/span>\n     <span class=\"n\">account_sid<\/span><span class=\"o\">=<\/span><span class=\"s\">\"YOUR-ACCOUNT-SID\"<\/span><span class=\"p\">,<\/span>\n     <span class=\"n\">auth_token<\/span><span class=\"o\">=<\/span><span class=\"s\">\"YOUR-TWILIO-AUTH-TOKEN\"<\/span><span class=\"p\">,<\/span>\n     <span class=\"n\">from_number<\/span><span class=\"o\">=<\/span><span class=\"s\">\"YOUR-TWILIO-NUMBER,\"<\/span>\n<span class=\"p\">)<\/span>\n<span class=\"err\">\u200b\u200b<\/span><span class=\"n\">twilio<\/span><span class=\"p\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"s\">\"hello world\"<\/span><span class=\"p\">,<\/span> <span class=\"s\">\"NUMBER-TO-TEXT\"<\/span><span class=\"p\">)<\/span>\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0628\u0627 \u0627\u06cc\u0646 \u062d\u0627\u0644\u060c \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0628\u0647 \u0634\u0645\u0627 \u0646\u0634\u0627\u0646 \u0645\u06cc \u062f\u0647\u062f \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0627\u0632 \u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a LangChain \u0628\u0627 Twilio \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u06cc\u06a9 \u0631\u0628\u0627\u062a \u06af\u0641\u062a\u06af\u0648\u06cc \u067e\u06cc\u0627\u0645\u06a9\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%D8%A7%D9%84%DA%AF%D9%88%D9%87%D8%A7%DB%8C_%D8%AF%D8%B1%D8%AE%D9%88%D8%A7%D8%B3%D8%AA_LangChain\"><\/span>\n<p>  \u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a LangChain<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>&#8220;Prompt&#8221; \u0628\u0647 \u0648\u0631\u0648\u062f\u06cc \u0645\u062f\u0644 \u0627\u0634\u0627\u0631\u0647 \u062f\u0627\u0631\u062f \u0648 \u0645\u0639\u0645\u0648\u0644\u0627\u064b \u06a9\u062f\u06af\u0630\u0627\u0631\u06cc \u0633\u062e\u062a\u06cc \u0646\u062f\u0627\u0631\u0646\u062f\u060c \u0627\u0645\u0627 \u0627\u063a\u0644\u0628 \u0627\u0632 \u0686\u0646\u062f\u06cc\u0646 \u0645\u0624\u0644\u0641\u0647 \u0633\u0627\u062e\u062a\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f. \u06cc\u06a9 \u0627\u0644\u06af\u0648\u06cc Prompt \u0628\u0647 \u0633\u0627\u062e\u062a \u0627\u06cc\u0646 \u0648\u0631\u0648\u062f\u06cc \u06a9\u0645\u06a9 \u0645\u06cc\u200c\u06a9\u0646\u062f. LangChain \u0686\u0646\u062f\u06cc\u0646 \u06a9\u0644\u0627\u0633 \u0648 \u062a\u0648\u0627\u0628\u0639 \u0631\u0627 \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc\u200c\u06a9\u0646\u062f \u062a\u0627 \u0633\u0627\u062e\u062a \u0648 \u06a9\u0627\u0631 \u0628\u0627 \u0627\u0639\u0644\u0627\u0646\u200c\u0647\u0627 \u0631\u0627 \u0622\u0633\u0627\u0646 \u06a9\u0646\u062f.<\/p>\n<p>\u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0628\u0647 LLM \u0647\u0627 \u0648\u0627\u0631\u062f \u0645\u06cc \u0634\u0648\u0646\u062f \u0627\u063a\u0644\u0628 \u0628\u0647 \u0631\u0648\u0634 \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641\u06cc \u0633\u0627\u062e\u062a\u0627\u0631 \u0645\u06cc \u0634\u0648\u0646\u062f \u062a\u0627 \u0628\u062a\u0648\u0627\u0646\u06cc\u0645 \u0646\u062a\u0627\u06cc\u062c \u0645\u062a\u0641\u0627\u0648\u062a\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0646\u06cc\u0645.  \u0628\u0631\u0627\u06cc \u067e\u0631\u0633\u0634 \u0648 \u067e\u0627\u0633\u062e\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0633\u0624\u0627\u0644 \u06a9\u0627\u0631\u0628\u0631 \u0631\u0627 \u0628\u06af\u06cc\u0631\u06cc\u062f \u0648 \u0622\u0646 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0633\u0628\u06a9\u200c\u0647\u0627\u06cc \u067e\u0631\u0633\u0634 \u0648 \u067e\u0627\u0633\u062e \u0645\u062e\u062a\u0644\u0641\u060c \u0645\u0627\u0646\u0646\u062f \u067e\u0631\u0633\u0634 \u0648 \u067e\u0627\u0633\u062e \u0645\u0639\u0645\u0648\u0644\u06cc\u060c \u0641\u0647\u0631\u0633\u062a\u06cc \u0627\u0632 \u067e\u0627\u0633\u062e\u200c\u0647\u0627\u060c \u06cc\u0627 \u062d\u062a\u06cc \u062e\u0644\u0627\u0635\u0647\u200c\u0627\u06cc \u0627\u0632 \u0645\u0634\u06a9\u0644\u0627\u062a \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u0633\u0624\u0627\u0644 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647\u060c \u0642\u0627\u0644\u0628\u200c\u0628\u0646\u062f\u06cc \u06a9\u0646\u06cc\u062f.  \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u062f\u0631 \u0627\u06cc\u0646\u062c\u0627 \u062f\u0631 \u0645\u0633\u062a\u0646\u062f\u0627\u062a LangChain \u062f\u0631\u0628\u0627\u0631\u0647 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0628\u06cc\u0634\u062a\u0631 \u0628\u062e\u0648\u0627\u0646\u06cc\u062f.<\/p>\n<p>\u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u0627\u0639\u0644\u0627\u0646 \u06cc\u06a9 \u0631\u0627\u0647 \u062a\u06a9\u0631\u0627\u0631\u067e\u0630\u06cc\u0631 \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0627\u0639\u0644\u0627\u0646 \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc \u062f\u0647\u0646\u062f.  \u0645\u0627\u0646\u0646\u062f \u06cc\u06a9 \u0642\u0627\u0644\u0628 HTML \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0627\u0634\u062a\u0631\u0627\u06a9 \u0628\u06af\u0630\u0627\u0631\u06cc\u062f\u060c \u0622\u0632\u0645\u0627\u06cc\u0634 \u06a9\u0646\u06cc\u062f\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u06a9\u0646\u06cc\u062f \u0648 \u062a\u06a9\u0631\u0627\u0631 \u06a9\u0646\u06cc\u062f \u0648 \u0628\u0647 \u0631\u0648\u0632 \u0645\u06cc \u0634\u0648\u062f.  \u0648\u0642\u062a\u06cc \u06cc\u06a9 \u0627\u0644\u06af\u0648\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u06cc \u0631\u0627 \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f\u060c \u0628\u0631\u0627\u06cc \u0627\u0641\u0631\u0627\u062f \u062f\u06cc\u06af\u0631\u06cc \u06a9\u0647 \u0627\u0632 \u0622\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f \u06cc\u0627 \u06a9\u0644 \u0645\u062c\u0645\u0648\u0639\u0647 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0627\u0632 \u0622\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0646\u062f\u060c \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n<p>\u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u062d\u0627\u0648\u06cc \u06cc\u06a9 \u0631\u0634\u062a\u0647 \u0645\u062a\u0646\u06cc (\u0628\u0627 \u0646\u0627\u0645 \u0645\u0633\u062a\u0639\u0627\u0631 &#8220;\u0627\u0644\u06af\u0648&#8221;) \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0645\u062c\u0645\u0648\u0639\u0647 \u0627\u06cc \u0627\u0632 \u067e\u0627\u0631\u0627\u0645\u062a\u0631\u0647\u0627 \u0631\u0627 \u0627\u0632 \u06a9\u0627\u0631\u0628\u0631 \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0646\u062f \u0648 \u06cc\u06a9 \u0627\u0639\u0644\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u062f.<\/p>\n<p>\u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0646 \u0648 \u0645\u0642\u062f\u0627\u0631\u062f\u0647\u06cc \u0627\u0648\u0644\u06cc\u0647 \u06cc\u06a9 LangChain <code>PromptTemplate<\/code> \u06a9\u0644\u0627\u0633 \u0628\u0647 \u0627\u06cc\u0646 \u0635\u0648\u0631\u062a \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight python\"><code><span class=\"kn\">from<\/span> <span class=\"nn\">langchain<\/span> <span class=\"kn\">import<\/span> <span class=\"n\">PromptTemplate<\/span>\n\n<span class=\"n\">template<\/span> <span class=\"o\">=<\/span> <span class=\"s\">\"\"\"Question: {question}\n\nAnswer: \"\"\"<\/span>\n<span class=\"n\">prompt<\/span> <span class=\"o\">=<\/span> <span class=\"n\">PromptTemplate<\/span><span class=\"p\">(<\/span>\n        <span class=\"n\">template<\/span><span class=\"o\">=<\/span><span class=\"n\">template<\/span><span class=\"p\">,<\/span>\n    <span class=\"n\">input_variables<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"s\">'question'<\/span><span class=\"p\">]<\/span>\n<span class=\"p\">)<\/span>\n\n<span class=\"c1\"># user question\n<\/span><span class=\"n\">question<\/span> <span class=\"o\">=<\/span> <span class=\"s\">\"Which NBA team won the finals in 1996?\"<\/span>\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0627\u0632 \u0622\u0646\u062c\u0627\u06cc\u06cc \u06a9\u0647 OpenAI LLM \u067e\u0633 \u0627\u0632 \u0633\u067e\u062a\u0627\u0645\u0628\u0631 2021 \u0641\u0627\u0642\u062f \u062f\u0627\u062f\u0647 \u0627\u0633\u062a\u060c \u0645\u062f\u0644 \u0647\u0627\u06cc \u0622\u0646 \u0646\u0645\u06cc \u062a\u0648\u0627\u0646\u0646\u062f \u0628\u062f\u0648\u0646 \u0632\u0645\u06cc\u0646\u0647 \u0627\u0636\u0627\u0641\u06cc \u0628\u0647 \u0647\u0631 \u0686\u06cc\u0632\u06cc \u06a9\u0647 \u067e\u0633 \u0627\u0632 \u0622\u0646 \u0631\u062e \u062f\u0627\u062f\u0647 \u0627\u0633\u062a \u067e\u0627\u0633\u062e \u062f\u0647\u0646\u062f.  \u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u0633\u0631\u06cc\u0639 \u0628\u0647 \u0627\u0631\u0627\u0626\u0647 \u0632\u0645\u06cc\u0646\u0647 \u0627\u0636\u0627\u0641\u06cc \u06a9\u0645\u06a9 \u0645\u06cc \u06a9\u0646\u0646\u062f\u060c \u0627\u0645\u0627 \u0628\u0627 \u062a\u0646\u0638\u06cc\u0645 \u062f\u0642\u06cc\u0642 \u062a\u0641\u0627\u0648\u062a \u062f\u0627\u0631\u0646\u062f &#8211; \u062a\u0646\u0638\u06cc\u0645 \u062f\u0642\u06cc\u0642 \u0645\u0627\u0646\u0646\u062f \u0647\u062f\u0627\u06cc\u062a \u0645\u062f\u0644 \u0628\u0627 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u062c\u062f\u06cc\u062f \u0628\u0631\u0627\u06cc \u0628\u0647 \u062f\u0633\u062a \u0622\u0648\u0631\u062f\u0646 \u062e\u0631\u0648\u062c\u06cc \u0645\u0634\u062e\u0635 \u0627\u0633\u062a\u060c \u0627\u0645\u0627 \u0645\u0647\u0646\u062f\u0633\u06cc \u0633\u0631\u06cc\u0639 \u0628\u0627 \u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u0627\u0639\u0644\u0627\u0646 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u062e\u0627\u0635 \u0645\u062f\u0644 \u0631\u0627 \u0628\u0631\u0627\u06cc \u06a9\u0645\u06a9 \u0628\u0647 \u062e\u0631\u0648\u062c\u06cc \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062f\u0631 \u0627\u062e\u062a\u06cc\u0627\u0631 \u0645\u062f\u0644 \u0642\u0631\u0627\u0631 \u0645\u06cc \u062f\u0647\u062f.<\/p>\n<p>\u0628\u06cc\u0627\u06cc\u06cc\u062f \u0627\u0632 \u0627\u06cc\u0646 \u0627\u0644\u06af\u0648 \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0631\u0628\u0627\u062a \u0686\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%D9%BE%DB%8C%D8%B4_%D9%86%DB%8C%D8%A7%D8%B2%D9%87%D8%A7\"><\/span>\n<p>  \u067e\u06cc\u0634 \u0646\u06cc\u0627\u0632\u0647\u0627<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ol>\n<li>\u06cc\u06a9 \u062d\u0633\u0627\u0628 Twilio &#8211; \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u062d\u0633\u0627\u0628 \u0631\u0627\u06cc\u06af\u0627\u0646 \u062f\u0631 \u0627\u06cc\u0646\u062c\u0627 \u062b\u0628\u062a \u0646\u0627\u0645 \u06a9\u0646\u06cc\u062f\n<\/li>\n<li>\u0634\u0645\u0627\u0631\u0647 \u062a\u0644\u0641\u0646 Twilio \u0628\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u067e\u06cc\u0627\u0645\u06a9 &#8211; \u0646\u062d\u0648\u0647 \u062e\u0631\u06cc\u062f \u0634\u0645\u0627\u0631\u0647 \u062a\u0644\u0641\u0646 Twilio \u0631\u0627 \u0627\u0632 \u0627\u06cc\u0646\u062c\u0627 \u0628\u06cc\u0627\u0645\u0648\u0632\u06cc\u062f\n<\/li>\n<li>\u062d\u0633\u0627\u0628 OpenAI &#8211; \u062f\u0631 \u0627\u06cc\u0646\u062c\u0627 \u06cc\u06a9 \u062d\u0633\u0627\u0628 OpenAI \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f\n<\/li>\n<li>\u067e\u0627\u06cc\u062a\u0648\u0646 \u0646\u0635\u0628 \u0634\u062f &#8211; \u067e\u0627\u06cc\u062a\u0648\u0646 \u0631\u0627 \u0627\u0632 \u0627\u06cc\u0646\u062c\u0627 \u062f\u0627\u0646\u0644\u0648\u062f \u06a9\u0646\u06cc\u062f\n<\/li>\n<li>\n<p>ngrok\u060c \u06cc\u06a9 \u0627\u0628\u0632\u0627\u0631 \u0645\u0641\u06cc\u062f \u0628\u0631\u0627\u06cc \u0627\u062a\u0635\u0627\u0644 \u0646\u0633\u062e\u0647 \u062a\u0648\u0633\u0639\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0645\u0627 \u06a9\u0647 \u0631\u0648\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u0634\u0645\u0627 \u0627\u062c\u0631\u0627 \u0645\u06cc \u0634\u0648\u062f \u0628\u0647 \u06cc\u06a9 URL \u0639\u0645\u0648\u0645\u06cc \u06a9\u0647 Twilio \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0628\u0647 \u0622\u0646 \u062f\u0633\u062a\u0631\u0633\u06cc \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f.<\/li>\n<\/ol>\n<blockquote>\n<p>\u26a0\ufe0f <strong>ngrok \u0628\u0631\u0627\u06cc \u0646\u0633\u062e\u0647 \u062a\u0648\u0633\u0639\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0627\u0633\u062a \u0632\u06cc\u0631\u0627 \u0631\u0627\u06cc\u0627\u0646\u0647 \u0634\u0645\u0627 \u0627\u062d\u062a\u0645\u0627\u0644\u0627\u064b \u067e\u0634\u062a \u06cc\u06a9 \u0631\u0648\u062a\u0631 \u06cc\u0627 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u0627\u0633\u062a\u060c \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0645\u0633\u062a\u0642\u06cc\u0645\u0627\u064b \u062f\u0631 \u0627\u06cc\u0646\u062a\u0631\u0646\u062a \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633\u06cc \u0646\u06cc\u0633\u062a.  \u0647\u0645\u0686\u0646\u06cc\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0646\u0634\u0627\u0646 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a\u060c ngrok \u0631\u0627 \u062e\u0648\u062f\u06a9\u0627\u0631 \u06a9\u0646\u06cc\u062f.<\/strong><\/p>\n<\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"%D9%BE%DB%8C%DA%A9%D8%B1%D8%A8%D9%86%D8%AF%DB%8C\"><\/span>\n<p>  \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u0627\u0632 \u0622\u0646\u062c\u0627\u06cc\u06cc \u06a9\u0647 \u062a\u0639\u062f\u0627\u062f\u06cc \u0628\u0633\u062a\u0647 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u067e\u0631\u0648\u0698\u0647 \u0646\u0635\u0628 \u062e\u0648\u0627\u0647\u06cc\u062f \u06a9\u0631\u062f\u060c \u0628\u0627\u06cc\u062f \u06cc\u06a9 \u0641\u0647\u0631\u0633\u062a \u067e\u0631\u0648\u0698\u0647 \u062c\u062f\u06cc\u062f \u0648 \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u0645\u062c\u0627\u0632\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u0627\u06af\u0631 \u0627\u0632 \u0633\u06cc\u0633\u062a\u0645 \u06cc\u0648\u0646\u06cc\u06a9\u0633 \u06cc\u0627 macOS \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f\u060c \u06cc\u06a9 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u0648 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code><span class=\"nb\">mkdir <\/span>lc-sms \n<span class=\"nb\">cd <\/span>lc-sms \npython3 <span class=\"nt\">-m<\/span> venv venv \n<span class=\"nb\">source <\/span>venv\/bin\/activate \n<span class=\"o\">!<\/span>pip <span class=\"nb\">install <\/span>langchain\n<span class=\"o\">!<\/span>pip <span class=\"nb\">install <\/span>openai\npip <span class=\"nb\">install <\/span>Flask\npip <span class=\"nb\">install <\/span>twilio\npip <span class=\"nb\">install <\/span>load_dotenv\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0627\u06af\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0631\u0627 \u062f\u0631 \u0648\u06cc\u0646\u062f\u0648\u0632 \u062f\u0646\u0628\u0627\u0644 \u0645\u06cc \u06a9\u0646\u06cc\u062f\u060c \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u067e\u0646\u062c\u0631\u0647 \u062e\u0637 \u0641\u0631\u0645\u0627\u0646 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code><span class=\"nb\">mkdir <\/span>lc-sms \n<span class=\"nb\">cd <\/span>lc-sms \npython <span class=\"nt\">-m<\/span> venv venv \nvenv<span class=\"se\">\\S<\/span>cripts<span class=\"se\">\\a<\/span>ctivate \npip <span class=\"nb\">install <\/span>langchain\npip <span class=\"nb\">install <\/span>openai\npip <span class=\"nb\">install <\/span>Flask\npip <span class=\"nb\">install <\/span>twilio\npip <span class=\"nb\">install <\/span>load_dotenv\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0622\u062e\u0631\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f <code>pip<\/code>\u060c \u0646\u0635\u0628 \u06a9\u0646\u0646\u062f\u0647 \u0628\u0633\u062a\u0647 Python\u060c \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u0633\u0647 \u0628\u0633\u062a\u0647 \u0627\u06cc \u06a9\u0647 \u0642\u0631\u0627\u0631 \u0627\u0633\u062a \u062f\u0631 \u0627\u06cc\u0646 \u067e\u0631\u0648\u0698\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f\u060c \u06a9\u0647 \u0639\u0628\u0627\u0631\u062a\u0646\u062f \u0627\u0632:<\/p>\n<p>\u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 <em>env<\/em> \u062f\u0631 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u0631\u06cc\u0634\u0647 \u067e\u0631\u0648\u0698\u0647 \u062e\u0648\u062f \u0641\u0627\u06cc\u0644 \u06a9\u0646\u06cc\u062f \u0648 \u062e\u0637 \u0645\u062a\u0646 \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f \u0648 \u062d\u062a\u0645\u0627 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u06a9\u0646\u06cc\u062f <code>&lt;OPENAI_API_KEY&gt;<\/code> \u0628\u0627 \u06a9\u0644\u06cc\u062f \u0648\u0627\u0642\u0639\u06cc \u0634\u0645\u0627:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight shell\"><code><span class=\"nv\">OPENAI_API_KEY<\/span><span class=\"o\">=<\/span> &lt;YOUR-OPENAI-KEY&gt;\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0645\u0637\u0645\u0626\u0646 \u0634\u0648\u06cc\u062f \u06a9\u0647 OPENAI_API_KEY \u0627\u06cc\u0645\u0646 \u0627\u0633\u062a \u0648 \u062e\u0648\u062f \u0631\u0627 \u0641\u0627\u0634 \u0646\u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f <em>env<\/em> \u0641\u0627\u06cc\u0644 \u062f\u0631 \u06cc\u06a9 \u0645\u06a9\u0627\u0646 \u0639\u0645\u0648\u0645\u06cc \u0645\u0627\u0646\u0646\u062f GitHub.<\/p>\n<p>\u0627\u06a9\u0646\u0648\u0646\u060c \u0628\u0631\u0646\u0627\u0645\u0647 Flask \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0648\u0628 \u0642\u0627\u0628\u0644 \u0645\u0634\u0627\u0647\u062f\u0647 \u0628\u0627\u0634\u062f\u060c \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 Twilio \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0647\u0627 \u0631\u0627 \u0628\u0647 \u0622\u0646 \u0627\u0631\u0633\u0627\u0644 \u06a9\u0646\u062f.  ngrok \u0628\u0647 \u0634\u0645\u0627 \u0627\u0645\u06a9\u0627\u0646 \u0645\u06cc \u062f\u0647\u062f \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f: \u0628\u0627 \u0646\u0635\u0628 ngrok\u060c \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f <code>ngrok http 5000<\/code> \u062f\u0631 \u06cc\u06a9 \u062a\u0628 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u062c\u062f\u06cc\u062f \u062f\u0631 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u06a9\u0647 \u06a9\u062f \u0634\u0645\u0627 \u062f\u0631 \u0622\u0646 \u0627\u0633\u062a.<br \/><img decoding=\"async\" src=\"https:\/\/nabfollower.com\/blog\/wp-content\/uploads\/2023\/06\/1685591725_496_\u06cc\u06a9-\u0686\u062a-\u0631\u0628\u0627\u062a-\u0627\u0633-\u0627\u0645-\u0627\u0633-\u0628\u0633\u06a9\u062a\u0628\u0627\u0644-\u0628\u0627-\u0627\u0644\u06af\u0648\u0647\u0627\u06cc-\u062f\u0631\u062e\u0648\u0627\u0633\u062a.webp.png\" alt=\"\u062a\u0631\u0645\u06cc\u0646\u0627\u0644 ngrok \u0628\u0627 \u0627\u0631\u0633\u0627\u0644 \u0622\u062f\u0631\u0633 ngrok\" loading=\"lazy\" width=\"800\" height=\"334\" title=\"\"><br \/>\u0628\u0627\u06cc\u062f \u0635\u0641\u062d\u0647 \u0628\u0627\u0644\u0627 \u0631\u0627 \u0628\u0628\u06cc\u0646\u06cc\u062f.  \u0622\u0646 ngrok \u0631\u0627 \u0628\u06af\u06cc\u0631 <strong>URL \u0628\u0627\u0632\u0627\u0631\u0633\u0627\u0644<\/strong> \u0628\u0631\u0627\u06cc \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0634\u0645\u0627\u0631\u0647 Twilio: \u0634\u0645\u0627\u0631\u0647 Twilio \u062e\u0648\u062f \u0631\u0627 \u062f\u0631 \u0632\u06cc\u0631 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f <strong>\u0627\u0639\u062f\u0627\u062f \u0641\u0639\u0627\u0644<\/strong> \u062f\u0631 \u06a9\u0646\u0633\u0648\u0644 Twilio \u062e\u0648\u062f\u060c \u0628\u0647 \u0628\u062e\u0634 \u067e\u06cc\u0627\u0645\u200c\u0631\u0633\u0627\u0646\u06cc \u0628\u0631\u0648\u06cc\u062f \u0648 \u0633\u067e\u0633 \u0645\u0633\u06cc\u0631\u06cc\u0627\u0628\u06cc \u0634\u0645\u0627\u0631\u0647 \u062a\u0644\u0641\u0646 \u0631\u0627 \u0628\u0627 \u0686\u0633\u0628\u0627\u0646\u062f\u0646 URL ngrok \u062f\u0631 \u06a9\u0627\u062f\u0631 \u0645\u062a\u0646\u06cc \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u0632\u0645\u0627\u0646 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f. <strong>\u06cc\u06a9 \u067e\u06cc\u0627\u0645 \u0648\u0627\u0631\u062f \u0645\u06cc \u0634\u0648\u062f<\/strong> \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0632\u06cc\u0631 \u0646\u0634\u0627\u0646 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a:<br \/><img decoding=\"async\" src=\"https:\/\/nabfollower.com\/blog\/wp-content\/uploads\/2023\/06\/1685591725_157_\u06cc\u06a9-\u0686\u062a-\u0631\u0628\u0627\u062a-\u0627\u0633-\u0627\u0645-\u0627\u0633-\u0628\u0633\u06a9\u062a\u0628\u0627\u0644-\u0628\u0627-\u0627\u0644\u06af\u0648\u0647\u0627\u06cc-\u062f\u0631\u062e\u0648\u0627\u0633\u062a.webp.png\" alt=\"\u0647\u0646\u06af\u0627\u0645\u06cc \u06a9\u0647 \u067e\u06cc\u0627\u0645\u06cc \u0628\u0627 webhook \u0628\u0647 \u0646\u0627\u0645 ngrok url \u0648\u0627\u0631\u062f \u0645\u06cc \u0634\u0648\u062f\u060c \u0634\u0645\u0627\u0631\u0647 \u062a\u0644\u0641\u0646 Twilio \u0631\u0627 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u06a9\u0646\u06cc\u062f\" loading=\"lazy\" width=\"800\" height=\"335\" title=\"\"><br \/>\u06a9\u0644\u06cc\u06a9 <strong>\u0635\u0631\u0641\u0647 \u062c\u0648\u06cc\u06cc<\/strong> \u0648 \u0627\u06a9\u0646\u0648\u0646 \u0634\u0645\u0627\u0631\u0647 \u062a\u0644\u0641\u0646 Twilio \u0634\u0645\u0627 \u0628\u0647 \u06af\u0648\u0646\u0647\u200c\u0627\u06cc \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0634\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0648\u0628 \u0634\u0645\u0627 \u06a9\u0647 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u062d\u0644\u06cc \u0631\u0648\u06cc \u0631\u0627\u06cc\u0627\u0646\u0647 \u0634\u0645\u0627 \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u0634\u0648\u062f\u060c \u0646\u06af\u0627\u0634\u062a \u0634\u0648\u062f.  \u062d\u0627\u0644\u0627 \u0628\u06cc\u0627\u06cc\u06cc\u062f \u0622\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0628\u0633\u0627\u0632\u06cc\u0645.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%D8%AA%D9%88%D9%84%DB%8C%D8%AF_%D9%85%D8%AA%D9%86_%D8%A7%D8%B2_%D8%B7%D8%B1%DB%8C%D9%82_LangChain_%D8%A8%D8%A7_OpenAI_%D8%AF%D8%B1_%D9%BE%D8%A7%DB%8C%D8%AA%D9%88%D9%86_%D8%A7%D8%B2_%D8%B7%D8%B1%DB%8C%D9%82_SMS\"><\/span>\n<p>  \u062a\u0648\u0644\u06cc\u062f \u0645\u062a\u0646 \u0627\u0632 \u0637\u0631\u06cc\u0642 LangChain \u0628\u0627 OpenAI \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u0632 \u0637\u0631\u06cc\u0642 SMS<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u062f\u0627\u062e\u0644 \u0634\u0645\u0627 <code>lc-sms<\/code> \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc\u060c \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u062c\u062f\u06cc\u062f \u0628\u0647 \u0646\u0627\u0645 \u0628\u0633\u0627\u0632\u06cc\u062f <em>app.py<\/em>.<\/p>\n<p>\u06a9\u062f \u0632\u06cc\u0631 \u0631\u0627 \u06a9\u067e\u06cc \u0648 \u062f\u0631 \u0622\u0646 \u067e\u06cc\u0633\u062a \u06a9\u0646\u06cc\u062f <em>app.py<\/em> \u0628\u0631\u0627\u06cc \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u067e\u06cc\u0627\u0645 \u06a9\u0648\u062a\u0627\u0647 ChatGPT \u0645\u0627\u0646\u0646\u062f \u0628\u0631\u0627\u06cc \u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0646 \u06a9\u062a\u0627\u0628\u062e\u0627\u0646\u0647 \u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight python\"><code><span class=\"kn\">from<\/span> <span class=\"nn\">flask<\/span> <span class=\"kn\">import<\/span> <span class=\"n\">Flask<\/span><span class=\"p\">,<\/span> <span class=\"n\">request<\/span><span class=\"p\">,<\/span> <span class=\"n\">redirect<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">dotenv<\/span> <span class=\"kn\">import<\/span> <span class=\"n\">load_dotenv<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">twilio.twiml.messaging_response<\/span> <span class=\"kn\">import<\/span> <span class=\"n\">MessagingResponse<\/span>\n\n<span class=\"kn\">from<\/span> <span class=\"nn\">langchain.llms<\/span> <span class=\"kn\">import<\/span> <span class=\"n\">OpenAI<\/span>\n<span class=\"kn\">from<\/span> <span class=\"nn\">langchain<\/span> <span class=\"kn\">import<\/span> <span class=\"n\">PromptTemplate<\/span>\n\n<span class=\"kn\">import<\/span> <span class=\"nn\">os<\/span>\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0633\u067e\u0633\u060c \u0634\u06cc OpenAI LLM \u0631\u0627 \u0628\u0633\u0627\u0632\u06cc\u062f (\u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f LLM \u062f\u06cc\u06af\u0631\u06cc \u0628\u0627\u0634\u062f &#8211; \u0627\u06cc\u0646\u062c\u0627\u0633\u062a \u06a9\u0647 LangChain \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062c\u062f\u062f \u0631\u0627 \u0622\u0633\u0627\u0646\u200c\u062a\u0631 \u06a9\u0646\u062f!)\u060c \u0646\u0627\u0645 \u0645\u062f\u0644 \u0648 \u06a9\u0644\u06cc\u062f API \u0631\u0627 \u0627\u0632 \u0641\u0627\u06cc\u0644 .env \u0628\u0647 \u0622\u0646 \u0627\u0631\u0633\u0627\u0644 \u06a9\u0646\u06cc\u062f \u0648 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 Flask \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight python\"><code><span class=\"n\">load_dotenv<\/span><span class=\"p\">()<\/span>\n\n\n<span class=\"n\">llm<\/span> <span class=\"o\">=<\/span> <span class=\"n\">OpenAI<\/span><span class=\"p\">(<\/span>\n    <span class=\"n\">model_name<\/span><span class=\"o\">=<\/span><span class=\"s\">\"text-davinci-003\"<\/span><span class=\"p\">,<\/span>\n    <span class=\"n\">openai_api_key<\/span><span class=\"o\">=<\/span><span class=\"n\">os<\/span><span class=\"p\">.<\/span><span class=\"n\">environ<\/span><span class=\"p\">.<\/span><span class=\"n\">get<\/span><span class=\"p\">(<\/span><span class=\"s\">'OPENAI_API_KEY'<\/span><span class=\"p\">)<\/span>\n<span class=\"p\">)<\/span>\n\n\n<span class=\"n\">app<\/span> <span class=\"o\">=<\/span> <span class=\"n\">Flask<\/span><span class=\"p\">(<\/span><span class=\"n\">__name__<\/span><span class=\"p\">)<\/span>\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0634\u0631\u0648\u0639 \u06a9\u0646\u06cc\u062f <em>\/\u067e\u06cc\u0627\u0645\u06a9<\/em> \u0648\u0628 \u0647\u0648\u06a9\u06cc \u062d\u0627\u0648\u06cc \u067e\u0627\u0633\u062e TwiML \u0628\u0631\u0627\u06cc \u067e\u0627\u0633\u062e \u0628\u0647 \u067e\u06cc\u0627\u0645\u06a9 \u0647\u0627\u06cc \u0648\u0631\u0648\u062f\u06cc \u0628\u0627.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight python\"><code><span class=\"o\">@<\/span><span class=\"n\">app<\/span><span class=\"p\">.<\/span><span class=\"n\">route<\/span><span class=\"p\">(<\/span><span class=\"s\">\"\/sms\"<\/span><span class=\"p\">,<\/span> <span class=\"n\">methods<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"s\">'GET'<\/span><span class=\"p\">,<\/span> <span class=\"s\">'POST'<\/span><span class=\"p\">])<\/span>\n<span class=\"k\">def<\/span> <span class=\"nf\">sms_reply<\/span><span class=\"p\">():<\/span>\n    <span class=\"c1\"># Start our TwiML response\n<\/span>    <span class=\"n\">resp<\/span> <span class=\"o\">=<\/span> <span class=\"n\">MessagingResponse<\/span><span class=\"p\">()<\/span>\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u06a9\u062f \u0627\u0644\u06af\u0648\u06cc \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u06a9\u0645\u06a9 \u0628\u0647 \u0634\u06a9\u0644\u200c\u062f\u0647\u06cc \u067e\u0631\u0633\u0634\u200c\u0647\u0627 \u0648 \u067e\u0627\u0633\u062e\u200c\u0647\u0627\u06cc LLM \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f.  \u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634\u060c \u0645\u0648\u0636\u0648\u0639 \u0628\u0633\u06a9\u062a\u0628\u0627\u0644 Warriors \u0627\u0633\u062a.  (\u0628\u0644\u0647\u060c \u0645\u0646 \u0645\u06cc \u062f\u0627\u0646\u0645 \u06a9\u0647 \u0641\u06cc\u0646\u0627\u0644 NBA 2023 \u0647\u06cc\u062a \u062f\u0631 \u0645\u0642\u0627\u0628\u0644 \u0646\u0627\u06af\u062a\u0633 \u0627\u0633\u062a. \u06cc\u06a9 \u062f\u062e\u062a\u0631 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0631\u0648\u06cc\u0627\u067e\u0631\u062f\u0627\u0632\u06cc \u06a9\u0646\u062f.)<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight python\"><code> <span class=\"n\">template<\/span> <span class=\"o\">=<\/span> <span class=\"s\">\"\"\"Answer the question based on the context below. If the question cannot be answered using the information provided, answer with \"I don't know, but the Warriors are the best team in the NBA\".\n    Context: Steph Curry has won 4 NBA Finals series. His Golden State Warriors defeated the Cleveland Cavaliers three times and the Boston Celtics once. \n\nIn 2015 Steph Curry and the Warriors defeated the Cleveland Cavaliers. The Cavs featured LeBron James, Kyrie Irving and not much else! \nIn 2017 Steph Curry, Kevin Durant and the Warriors defeated the Cavs again. The Cavs still had Lebron and Kyrie.\nIn 2018 the Warriors, featuring Steph and KD again, defeated the Cavs for the third time in four years. The Cavs still had Kyrie and Lebron. \nIn 2022 Steph and the Warriors defeated the Boston Celtics for his fourth title. The Celtics featured Jayson Tatum and Jaylen Brown. Steph Curry and the Golden State Warriors lost one NBA Finals series to the Cleveland Cavaliers and one to the Toronto Raptors. \n\nIn 2016 Steph, Klay, Draymond and the rest of the Warriors lost to the Cleveland Cavaliers.  The Cavs starred LeBron James and Kyrie Irving. \nIn 2019 the Steph and the Warriors, missing an injured KD, lost to the Toronto Raptors. The Raptors featured Kawhi Leonard in his only season in Canada alongside Kyle Lowry and Pascal Siakham. Steph Curry has only won one NBA Finals MVP up to this point in his career. . \n\nIn 2022 Steph Curry averaged 31 points, 6 rebounds and 5 assists per game to win the MVP award in the Warriors 6-game defeat of the Boston Celtics.\nIn 2015 Andre Iguodala won the MVP in the Warriors defeat of the Cavs.\nIn both 2017 &amp; 2018 Kevin Durant was Finals MVP in the Warriors victories over the Cavs. Steph Curry's 4-2 NBA Finals record puts him ahead of many NBA greats including Larry Bird (3-2) and LeBron James (4-6). Steph still comes up short of the greatest NBA Finals winners including Bill Russell (11-1) and Michael Jordan (6-0).  \n    Question: {query}\n    Answer: \"\"\"<\/span>\n    <span class=\"n\">basketball_query_template<\/span> <span class=\"o\">=<\/span> <span class=\"n\">PromptTemplate<\/span><span class=\"p\">(<\/span>\n        <span class=\"n\">input_variables<\/span><span class=\"o\">=<\/span><span class=\"p\">[<\/span><span class=\"s\">\"query\"<\/span><span class=\"p\">],<\/span>\n        <span class=\"n\">template<\/span><span class=\"o\">=<\/span><span class=\"n\">template<\/span>\n    <span class=\"p\">)<\/span>\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u0633\u0624\u0627\u0644 \u06a9\u0627\u0631\u0628\u0631 \u0631\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u067e\u06cc\u0627\u0645 \u0645\u062a\u0646\u06cc \u0648\u0631\u0648\u062f\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0646\u06cc\u062f\u060c \u0628\u0627 \u0627\u0631\u0633\u0627\u0644 \u0633\u0624\u0627\u0644 \u0628\u0647 \u0627\u0644\u06af\u0648\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u06cc \u0648 \u0642\u0627\u0644\u0628 \u0628\u0646\u062f\u06cc \u0622\u0646\u060c \u067e\u0627\u0633\u062e \u0631\u0627 \u0686\u0627\u067e \u06a9\u0646\u06cc\u062f \u0648 \u0633\u067e\u0633 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u067e\u06cc\u0627\u0645 \u0645\u062a\u0646\u06cc \u0628\u0647 Twilio \u0627\u0631\u0633\u0627\u0644 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0628\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0627\u0631\u0633\u0627\u0644 \u0634\u0648\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight python\"><code><span class=\"n\">question<\/span> <span class=\"o\">=<\/span> <span class=\"n\">request<\/span><span class=\"p\">.<\/span><span class=\"n\">form<\/span><span class=\"p\">[<\/span><span class=\"s\">'Body'<\/span><span class=\"p\">].<\/span><span class=\"n\">lower<\/span><span class=\"p\">().<\/span><span class=\"n\">strip<\/span><span class=\"p\">()<\/span>\n    <span class=\"k\">print<\/span><span class=\"p\">(<\/span><span class=\"n\">llm<\/span><span class=\"p\">(<\/span>\n        <span class=\"n\">basketball_query_template<\/span><span class=\"p\">.<\/span><span class=\"nb\">format<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">query<\/span><span class=\"o\">=<\/span><span class=\"n\">question<\/span>\n        <span class=\"p\">)<\/span>\n    <span class=\"p\">))<\/span>\n    <span class=\"n\">resp<\/span><span class=\"p\">.<\/span><span class=\"n\">message<\/span><span class=\"p\">(<\/span><span class=\"n\">openai<\/span><span class=\"p\">(<\/span>\n        <span class=\"n\">basketball_query_template<\/span><span class=\"p\">.<\/span><span class=\"nb\">format<\/span><span class=\"p\">(<\/span>\n            <span class=\"n\">query<\/span><span class=\"o\">=<\/span><span class=\"n\">question<\/span>\n        <span class=\"p\">)<\/span>\n    <span class=\"p\">))<\/span>\n\n    <span class=\"k\">return<\/span> <span class=\"nb\">str<\/span><span class=\"p\">(<\/span><span class=\"n\">resp<\/span><span class=\"p\">)<\/span>\n\n<span class=\"k\">if<\/span> <span class=\"n\">__name__<\/span> <span class=\"o\">==<\/span> <span class=\"s\">\"__main__\"<\/span><span class=\"p\">:<\/span>\n    <span class=\"n\">app<\/span><span class=\"p\">.<\/span><span class=\"n\">run<\/span><span class=\"p\">(<\/span><span class=\"n\">debug<\/span><span class=\"o\">=<\/span><span class=\"bp\">True<\/span><span class=\"p\">)<\/span>\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>\u062f\u0631 \u06cc\u06a9 \u0628\u0631\u06af\u0647 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u062c\u062f\u06cc\u062f (\u062f\u0631 \u062d\u0627\u0644\u06cc \u06a9\u0647 \u0628\u0631\u06af\u0647 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u062f\u06cc\u06af\u0631 \u0647\u0646\u0648\u0632 \u062f\u0631 \u062d\u0627\u0644 \u0627\u062c\u0631\u0627 \u0627\u0633\u062a <code>ngrok http 5000<\/code>)\u060c \u0627\u062c\u0631\u0627 \u06a9\u0646 <code>python app.py<\/code>.  \u0627\u06a9\u0646\u0648\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0634\u0645\u0627\u0631\u0647 Twilio \u062e\u0648\u062f \u0631\u0627 \u067e\u06cc\u0627\u0645\u06a9 \u06a9\u0646\u06cc\u062f (\u0633\u0624\u0627\u0644\u0627\u062a\u06cc \u062f\u0631 \u0645\u0648\u0631\u062f Warriors \u0632\u06cc\u0631\u0627 \u0645\u0627 \u0645\u062f\u0644 \u0632\u0645\u06cc\u0646\u0647 Warriors \u0631\u0627 \u0627\u0631\u0627\u0626\u0647 \u06a9\u0631\u062f\u06cc\u0645) \u06a9\u0647 \u0627\u0632 \u0628\u0627\u0644\u0627 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0634\u062f\u0647 \u0627\u0633\u062a.<br \/><img decoding=\"async\" src=\"https:\/\/nabfollower.com\/blog\/wp-content\/uploads\/2023\/06\/1685591725_647_\u06cc\u06a9-\u0686\u062a-\u0631\u0628\u0627\u062a-\u0627\u0633-\u0627\u0645-\u0627\u0633-\u0628\u0633\u06a9\u062a\u0628\u0627\u0644-\u0628\u0627-\u0627\u0644\u06af\u0648\u0647\u0627\u06cc-\u062f\u0631\u062e\u0648\u0627\u0633\u062a.webp.jpeg\" alt=\"\u0645\u062b\u0627\u0644 \u0627\u0633 \u0627\u0645 \u0627\u0633\u06cc \u06a9\u0647 \u062f\u0631 \u0645\u0648\u0631\u062f \u0627\u06cc\u0646\u06a9\u0647 \u062c\u0646\u06af\u062c\u0648\u06cc\u0627\u0646 \u0633\u0644\u062a\u06cc\u06a9 \u0647\u0627 \u0631\u0627 \u0634\u06a9\u0633\u062a \u0645\u06cc \u062f\u0647\u0646\u062f \u0648 \u0627\u06cc\u0646\u06a9\u0647 \u062c\u0646\u06af\u062c\u0648\u06cc\u0627\u0646 \u062f\u0631 \u0633\u0627\u0644 2015 \u0686\u0647 \u06a9\u0633\u0627\u0646\u06cc \u0631\u0627 \u0634\u06a9\u0633\u062a \u062f\u0627\u062f\u0646\u062f \u0627\u06cc\u0646 \u06a9\u0627\u0648\u0647\u0627 \u0628\u0648\u062f.\" loading=\"lazy\" width=\"800\" height=\"221\" title=\"\"><br \/>\u06a9\u062f \u06a9\u0627\u0645\u0644 \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062f\u0631 \u0627\u06cc\u0646\u062c\u0627 \u062f\u0631 GitHub \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%D8%A2%DB%8C%D9%86%D8%AF%D9%87_%D8%A8%D8%B1%D8%A7%DB%8C_Twilio_%D9%88_LangChain_%DA%86%DB%8C%D8%B3%D8%AA\"><\/span>\n<p>  \u0622\u06cc\u0646\u062f\u0647 \u0628\u0631\u0627\u06cc Twilio \u0648 LangChain \u0686\u06cc\u0633\u062a<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>LangChain \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0631\u0627\u06cc \u0686\u062a \u0628\u0627\u062a \u0647\u0627 (\u0646\u0647 \u0641\u0642\u0637 \u0628\u0627 \u0645\u0636\u0645\u0648\u0646 \u0631\u0632\u0645\u0646\u062f\u06af\u0627\u0646\/\u0628\u0633\u06a9\u062a\u0628\u0627\u0644)\u060c \u0632\u0646\u062c\u06cc\u0631\u0647 \u0648\u0638\u0627\u06cc\u0641 \u0645\u062e\u062a\u0644\u0641\u060c \u067e\u0627\u0633\u062e\u06af\u0648\u06cc\u06cc \u0628\u0647 \u0633\u0624\u0627\u0644\u0627\u062a (GQA)\u060c \u062e\u0644\u0627\u0635\u0647 \u0633\u0627\u0632\u06cc \u0648 \u0645\u0648\u0627\u0631\u062f \u062f\u06cc\u06af\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f.  \u0628\u0631\u0627\u06cc \u0645\u0637\u0627\u0644\u0628 \u0628\u06cc\u0634\u062a\u0631 LangChain \u0648 Twilio \u0628\u0627 \u0648\u0628\u0644\u0627\u06af Twilio \u0647\u0645\u0631\u0627\u0647 \u0628\u0627\u0634\u06cc\u062f \u0648 \u0628\u0647 \u0645\u0646 \u0627\u0637\u0644\u0627\u0639 \u062f\u0647\u06cc\u062f \u06a9\u0647 \u0628\u0627 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0686\u0647 \u0686\u06cc\u0632\u06cc \u0645\u06cc \u0633\u0627\u0632\u06cc\u062f!<\/p>\n<\/p><\/div>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u0628\u0627 OpenAI API (\u0648 \u0645\u062f\u0644\u200c\u0647\u0627\u06cc DALL\u00b7E \u0648 \u062a\u0646\u0638\u06cc\u0645 \u062f\u0642\u06cc\u0642) \u0628\u0627\u0632\u06cc \u06a9\u0631\u062f\u0647\u200c\u0627\u0645 \u0648 \u0628\u06cc\u0634\u062a\u0631 \u0648\u0627\u0631\u062f ML \u0634\u062f\u0647\u200c\u0627\u0645\u060c \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646\u06cc \u06a9\u0647 \u0645\u06cc\u200c\u0628\u06cc\u0646\u0645 (\u0648 \u0647\u0645\u0686\u0646\u06cc\u0646 \u0645\u0646 \u0647\u0645\u06a9\u0627\u0631 \u0641\u0648\u0642 \u0627\u0644\u0639\u0627\u062f\u0647 \u06a9\u0631\u06cc\u06af \u062f\u0646\u06cc\u0633 \u06a9\u0633\u06cc \u06a9\u0647 \u062f\u0631 \u0645\u0648\u0631\u062f \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0628\u0647 \u0645\u0646 \u062a\u0648\u0635\u06cc\u0647 \u06a9\u0631\u062f) \u0645\u062f\u0627\u0645 \u0628\u0647 \u0645\u0646 \u0645\u06cc \u06af\u0648\u06cc\u0646\u062f \u06a9\u0647 \u0627\u0632 LangChain \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0645\u060c \u06cc\u06a9 \u0686\u0627\u0631\u0686\u0648\u0628 \u0642\u062f\u0631\u062a\u0645\u0646\u062f \u0648 \u0627\u0646\u0639\u0637\u0627\u0641 \u067e\u0630\u06cc\u0631 &hellip;<\/p>\n","protected":false},"author":2,"featured_media":25222,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[339],"tags":[],"class_list":["post-25221","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/25221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/comments?post=25221"}],"version-history":[{"count":0,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/25221\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media\/25222"}],"wp:attachment":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media?parent=25221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/categories?post=25221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/tags?post=25221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}