The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: Fix requests alias for load_tools (#23734)
Jacob Lee7791d92711be
diff --git a/docs/docs/integrations/tools/requests.ipynb b/docs/docs/integrations/tools/requests.ipynbindex 0f41f8ea98..b0a9ec5ad9 100644--- a/docs/docs/integrations/tools/requests.ipynb+++ b/docs/docs/integrations/tools/requests.ipynb@@ -12,38 +12,40 @@},{"cell_type": "code",- "execution_count": 3,- "id": "5d8764ba",+ "execution_count": null,+ "id": "8a84d1fd","metadata": {},"outputs": [],"source": [- "from langchain.agents import load_tools\n",- "\n",- "requests_tools = load_tools([\"requests_all\"])"+ "%pip install --upgrade --quiet langchain-community"]},{"cell_type": "code",- "execution_count": 6,- "id": "bc5edde2",+ "execution_count": 3,+ "id": "5d8764ba","metadata": {},"outputs": [{"data": {"text/plain": [- "[RequestsGetTool(name='requests_get', description='A portal to the internet. Use this when you need to get specific content from a website. Input should be a url (i.e. https://www.google.com). The output will be the text response of the GET request.', args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manager=None, requests_wrapper=TextRequestsWrapper(headers=None, aiosession=None)),\n",- " RequestsPostTool(name='requests_post', description='Use this when you want to POST to a website.\\n Input should be a json string with two keys: \"url\" and \"data\".\\n The value of \"url\" should be a string, and the value of \"data\" should be a dictionary of \\n key-value pairs you want to POST to the url.\\n Be careful to always use double quotes for strings in the json string\\n The output will be the text response of the POST request.\\n ', args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manager=None, requests_wrapper=TextRequestsWrapper(headers=None, aiosession=None)),\n",- " RequestsPatchTool(name='requests_patch', description='Use this when you want to PATCH to a website.\\n Input should be a json string with two keys: \"url\" and \"data\".\\n The value of \"url\" should be a string, and the value of \"data\" should be a dictionary of \\n key-value pairs you want to PATCH to the url.\\n Be careful to always use double quotes for strings in the json string\\n The output will be the text response of the PATCH request.\\n ', args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manager=None, requests_wrapper=TextRequestsWrapper(headers=None, aiosession=None)),\n",- " RequestsPutTool(name='requests_put', description='Use this when you want to PUT to a website.\\n Input should be a json string with two keys: \"url\" and \"data\".\\n The value of \"url\" should be a string, and the value of \"data\" should be a dictionary of \\n key-value pairs you want to PUT to the url.\\n Be careful to always use double quotes for strings in the json string.\\n The output will be the text response of the PUT request.\\n ', args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manager=None, requests_wrapper=TextRequestsWrapper(headers=None, aiosession=None)),\n",- " RequestsDeleteTool(name='requests_delete', description='A portal to the internet. Use this when you need to make a DELETE request to a URL. Input should be a specific url, and the output will be the text response of the DELETE request.', args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manager=None, requests_wrapper=TextRequestsWrapper(headers=None, aiosession=None))]"+ "[RequestsGetTool(requests_wrapper=TextRequestsWrapper(headers=None, aiosession=None, auth=None, response_content_type='text', verify=True), allow_dangerous_requests=True),\n",+ " RequestsPostTool(requests_wrapper=TextRequestsWrapper(headers=None, aiosession=None, auth=None, response_content_type='text', verify=True), allow_dangerous_requests=True),\n",+ " RequestsPatchTool(requests_wrapper=TextRequestsWrapper(headers=None, aiosession=None, auth=None, response_content_type='text', verify=True), allow_dangerous_requests=True),\n",+ " RequestsPutTool(requests_wrapper=TextRequestsWrapper(headers=None, aiosession=None, auth=None, response_content_type='text', verify=True), allow_dangerous_requests=True),\n",+ " RequestsDeleteTool(requests_wrapper=TextRequestsWrapper(headers=None, aiosession=None, auth=None, response_content_type='text', verify=True), allow_dangerous_requests=True)]"]},- "execution_count": 6,+ "execution_count": 3,"metadata": {},"output_type": "execute_result"}],"source": [+ "from langchain_community.agent_toolkits.load_tools import load_tools\n",+ "\n",+ "requests_tools = load_tools([\"requests_all\"], allow_dangerous_tools=True)\n",+ "\n","requests_tools"]},@@ -60,17 +62,17 @@},{"cell_type": "code",- "execution_count": 8,+ "execution_count": 4,"id": "c56d4678","metadata": {},"outputs": [{"data": {"text/plain": [- "TextRequestsWrapper(headers=None, aiosession=None)"+ "TextRequestsWrapper(headers=None, aiosession=None, auth=None, response_content_type='text', verify=True)"]},- "execution_count": 8,+ "execution_count": 4,"metadata": {},"output_type": "execute_result"}@@ -80,28 +82,16 @@"requests_tools[0].requests_wrapper"]},- {- "cell_type": "code",- "execution_count": 4,- "id": "81aae09e",- "metadata": {},- "outputs": [],- "source": [- "from langchain_community.utilities import TextRequestsWrapper\n",- "\n",- "requests = TextRequestsWrapper()"- ]- },{"cell_type": "code","execution_count": 5,- "id": "fd210142",+ "id": "81aae09e","metadata": {},"outputs": [{"data": {"text/plain": [- "'<!doctype html><html itemscope=\"\" itemtype=\"http://schema.org/WebPage\" lang=\"en\"><head><meta content=\"Search the world\\'s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you\\'re looking for.\" name=\"description\"><meta content=\"noodp\" name=\"robots\"><meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\"><meta content=\"/images/branding/googleg/1x/googleg_standard_color_128dp.png\" itemprop=\"image\"><title>Google</title><script nonce=\"MXrF0nnIBPkxBza4okrgPA\">(function(){window.google={kEI:\\'TA9QZOa5EdTakPIPuIad-Ac\\',kEXPI:\\'0,1359409,6059,206,4804,2316,383,246,5,1129120,1197768,626,380097,16111,28687,22431,1361,12319,17581,4997,13228,37471,7692,2891,3926,213,7615,606,50058,8228,17728,432,3,346,1244,1,16920,2648,4,1528,2304,29062,9871,3194,13658,2980,1457,16786,5803,2554,4094,7596,1,42154,2,14022,2373,342,23024,6699,31123,4568,6258,23418,1252,5835,14967,4333,4239,3245,445,2,2,1,26632,239,7916,7321,60,2,3,15965,872,7830,1796,10008,7,1922,9779,36154,6305,2007,17765,427,20136,14,82,2730,184,13600,3692,109,2412,1548,4308,3785,15175,3888,1515,3030,5628,478,4,9706,1804,7734,2738,1853,1032,9480,2995,576,1041,5648,3722,2058,3048,2130,2365,662,476,958,87,111,5807,2,975,1167,891,3580,1439,1128,7343,426,249,517,95,1102,14,696,1270,750,400,2208,274,2776,164,89,119,204,139,129,1710,2505,320,3,631,439,2,300,1645,172,1783,784,169,642,329,401,50,479,614,238,757,535,717,102,2,739,738,44,232,22,442,961,45,214,383,567,500,487,151,120,256,253,179,673,2,102,2,10,535,123,135,1685,5206695,190,2,20,50,198,5994221,2804424,3311,141,795,19735,1,1,346,5008,7,13,10,24,31,2,39,1,5,1,16,7,2,41,247,4,9,7,9,15,4,4,121,24,23944834,4042142,1964,16672,2894,6250,15739,1726,647,409,837,1411438,146986,23612960,7,84,93,33,101,816,57,532,163,1,441,86,1,951,73,31,2,345,178,243,472,2,148,962,455,167,178,29,702,1856,288,292,805,93,137,68,416,177,292,399,55,95,2566\\',kBL:\\'hw1A\\',kOPI:89978449};google.sn=\\'webhp\\';google.kHL=\\'en\\';})();(function(){\\nvar h=this||self;function l(){return void 0!==window.google&&void 0!==window.google.kOPI&&0!==window.google.kOPI?window.google.kOPI:null};var m,n=[];function p(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute(\"eid\")));)a=a.parentNode;return b||m}function q(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute(\"leid\")));)a=a.parentNode;return b}function r(a){/^http:/i.test(a)&&\"https:\"===window.location.protocol&&(google.ml&&google.ml(Error(\"a\"),!1,{src:a,glmm:1}),a=\"\");return a}\\nfunction t(a,b,c,d,k){var e=\"\";-1===b.search(\"&ei=\")&&(e=\"&ei=\"+p(d),-1===b.search(\"&lei=\")&&(d=q(d))&&(e+=\"&lei=\"+d));d=\"\";var g=-1===b.search(\"&cshid=\")&&\"slh\"!==a,f=[];f.push([\"zx\",Date.now().toString()]);h._cshid&&g&&f.push([\"cshid\",h._cshid]);c=c();null!=c&&f.push([\"opi\",c.toString()]);for(c=0;c<f.length;c++){if(0===c||0<c)d+=\"&\";d+=f[c][0]+\"=\"+f[c][1]}return\"/\"+(k||\"gen_204\")+\"?atyp=i&ct=\"+String(a)+\"&cad=\"+(b+e+d)};m=google.kEI;google.getEI=p;google.getLEI=q;google.ml=function(){return null};google.log=function(a,b,c,d,k,e){e=void 0===e?l:e;c||(c=t(a,b,e,d,k));if(c=r(c)){a=new Image;var g=n.length;n[g]=a;a.onerror=a.onload=a.onabort=function(){delete n[g]};a.src=c}};google.logUrl=function(a,b){b=void 0===b?l:b;return t(\"\",a,b)};}).call(this);(function(){google.y={};google.sy=[];google.x=function(a,b){if(a)var c=a.id;else{do c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.sx=function(a){google.sy.push(a)};google.lm=[];google.plm=function(a){google.lm.push.apply(google.lm,a)};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};google.bx=!1;google.lx=function(){};}).call(this);google.f={};(function(){\\ndocument.documentElement.addEventListener(\"submit\",function(b){var a;if(a=b.target){var c=a.getAttribute(\"data-submitfalse\");a=\"1\"===c||\"q\"===c&&!a.elements.q.value?!0:!1}else a=!1;a&&(b.preventDefault(),b.stopPropagation())},!0);document.documentElement.addEventListener(\"click\",function(b){var a;a:{for(a=b.target;a&&a!==document.documentElement;a=a.parentElement)if(\"A\"===a.tagName){a=\"1\"===a.getAttribute(\"data-nohref\");break a}a=!1}a&&b.preventDefault()},!0);}).call(this);</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}\\n</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#1558d6}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}body{background:#fff;color:#000}a{color:#4b11a8;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#1558d6}a:visited{color:#4b11a8}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#f8f9fa;border:solid 1px;border-color:#dadce0 #70757a #70757a #dadce0;height:30px}.lsbb{display:block}#WqQANb a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#dadce0}.lst:focus{outline:none}</style><script nonce=\"MXrF0nnIBPkxBza4okrgPA\">(function(){window.google.erd={jsr:1,bv:1785,de:true};\\nvar h=this||self;var k,l=null!=(k=h.mei)?k:1,n,p=null!=(n=h.sdo)?n:!0,q=0,r,t=google.erd,v=t.jsr;google.ml=function(a,b,d,m,e){e=void 0===e?2:e;b&&(r=a&&a.message);if(google.dl)return google.dl(a,e,d),null;if(0>v){window.console&&console.error(a,d);if(-2===v)throw a;b=!1}else b=!a||!a.message||\"Error loading script\"===a.message||q>=l&&!m?!1:!0;if(!b)return null;q++;d=d||{};b=encodeURIComponent;var c=\"/gen_204?atyp=i&ei=\"+b(google.kEI);google.kEXPI&&(c+=\"&jexpid=\"+b(google.kEXPI));c+=\"&srcpg=\"+b(google.sn)+\"&jsr=\"+b(t.jsr)+\"&bver=\"+b(t.bv);var f=a.lineNumber;void 0!==f&&(c+=\"&line=\"+f);var g=\\na.fileName;g&&(0<g.indexOf(\"-extension:/\")&&(e=3),c+=\"&script=\"+b(g),f&&g===window.location.href&&(f=document.documentElement.outerHTML.split(\"\\\\n\")[f],c+=\"&cad=\"+b(f?f.substring(0,300):\"No script found.\")));c+=\"&jsel=\"+e;for(var u in d)c+=\"&\",c+=b(u),c+=\"=\",c+=b(d[u]);c=c+\"&emsg=\"+b(a.name+\": \"+a.message);c=c+\"&jsst=\"+b(a.stack||\"N/A\");12288<=c.length&&(c=c.substr(0,12288));a=c;m||google.log(0,\"\",a);return a};window.onerror=function(a,b,d,m,e){r!==a&&(a=e instanceof Error?e:Error(a),void 0===d||\"lineNumber\"in a||(a.lineNumber=d),void 0===b||\"fileName\"in a||(a.fileName=b),google.ml(a,!1,void 0,!1,\"SyntaxError\"===a.name||\"SyntaxError\"===a.message.substring(0,11)||-1!==a.message.indexOf(\"Script error\")?3:0));r=null;p&&q>=l&&(window.onerror=null)};})();</script></head><body bgcolor=\"#fff\"><script nonce=\"MXrF0nnIBPkxBza4okrgPA\">(function(){var src=\\'/images/nav_logo229.png\\';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}\\nif (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}\\n}\\n})();</script><div id=\"mngb\"><div id=gbar><nobr><b class=gb1>Search</b> <a class=gb1 href=\"https://www.google.com/imghp?hl=en&tab=wi\">Images</a> <a class=gb1 href=\"https://maps.google.com/maps?hl=en&tab=wl\">Maps</a> <a class=gb1 href=\"https://play.google.com/?hl=en&tab=w8\">Play</a> <a class=gb1 href=\"https://www.youtube.com/?tab=w1\">YouTube</a> <a class=gb1 href=\"https://news.google.com/?tab=wn\">News</a> <a class=gb1 href=\"https://mail.google.com/mail/?tab=wm\">Gmail</a> <a class=gb1 href=\"https://drive.google.com/?tab=wo\">Drive</a> <a class=gb1 style=\"text-decoration:none\" href=\"https://www.google.com/intl/en/about/products?tab=wh\"><u>More</u> »</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href=\"http://www.google.com/history/optout?hl=en\" class=gb4>Web History</a> | <a href=\"/preferences?hl=en\" class=gb4>Settings</a> | <a target=_top id=gb_70 href=\"https://accounts.google.com/ServiceLogin?hl=en&passive=true&continue=https://www.google.com/&ec=GAZAAQ\" class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div></div><center><br clear=\"all\" id=\"lgpd\"><div id=\"lga\"><img alt=\"Google\" height=\"92\" src=\"/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png\" style=\"padding:28px 0 14px\" width=\"272\" id=\"hplogo\"><br><br></div><form action=\"/search\" name=\"f\"><table cellpadding=\"0\" cellspacing=\"0\"><tr valign=\"top\"><td width=\"25%\"> </td><td align=\"center\" nowrap=\"\"><input name=\"ie\" value=\"ISO-8859-1\" type=\"hidden\"><input value=\"en\" name=\"hl\" type=\"hidden\"><input name=\"source\" type=\"hidden\" value=\"hp\"><input name=\"biw\" type=\"hidden\"><input name=\"bih\" type=\"hidden\"><div class=\"ds\" style=\"height:32px;margin:4px 0\"><input class=\"lst\" style=\"margin:0;padding:5px 8px 0 6px;vertical-align:top;color:#000\" autocomplete=\"off\" value=\"\" title=\"Google Search\" maxlength=\"2048\" name=\"q\" size=\"57\"></div><br style=\"line-height:0\"><span class=\"ds\"><span class=\"lsbb\"><input class=\"lsb\" value=\"Google Search\" name=\"btnG\" type=\"submit\"></span></span><span class=\"ds\"><span class=\"lsbb\"><input class=\"lsb\" id=\"tsuid_1\" value=\"I\\'m Feeling Lucky\" name=\"btnI\" type=\"submit\"><script nonce=\"MXrF0nnIBPkxBza4okrgPA\">(function(){var id=\\'tsuid_1\\';document.getElementById(id).onclick = function(){if (this.form.q.value){this.checked = 1;if (this.form.iflsig)this.form.iflsig.disabled = false;}\\nelse top.location=\\'/doodles/\\';};})();</script><input value=\"AOEireoAAAAAZFAdXGKCXWBK5dlWxPhh8hNPQz1s9YT6\" name=\"iflsig\" type=\"hidden\"></span></span></td><td class=\"fl sblc\" align=\"left\" nowrap=\"\" width=\"25%\"><a href=\"/advanced_search?hl=en&authuser=0\">Advanced search</a></td></tr></table><input id=\"gbv\" name=\"gbv\" type=\"hidden\" value=\"1\"><script nonce=\"MXrF0nnIBPkxBza4okrgPA\">(function(){var a,b=\"1\";if(document&&document.getElementById)if(\"undefined\"!=typeof XMLHttpRequest)b=\"2\";else if(\"undefined\"!=typeof ActiveXObject){var c,d,e=[\"MSXML2.XMLHTTP.6.0\",\"MSXML2.XMLHTTP.3.0\",\"MSXML2.XMLHTTP\",\"Microsoft.XMLHTTP\"];for(c=0;d=e[c++];)try{new ActiveXObject(d),b=\"2\"}catch(h){}}a=b;if(\"2\"==a&&-1==location.search.indexOf(\"&gbv=2\")){var f=google.gbvu,g=document.getElementById(\"gbv\");g&&(g.value=a);f&&window.setTimeout(function(){location.href=f},0)};}).call(this);</script></form><div id=\"gac_scont\"></div><div style=\"font-size:83%;min-height:3.5em\"><br><div id=\"prm\"><style>.szppmdbYutt__middle-slot-promo{font-size:small;margin-bottom:32px}.szppmdbYutt__middle-slot-promo a.ZIeIlb{display:inline-block;text-decoration:none}.szppmdbYutt__middle-slot-promo img{border:none;margin-right:5px;vertical-align:middle}</style><div class=\"szppmdbYutt__middle-slot-promo\" data-ved=\"0ahUKEwjmj7fr6dT-AhVULUQIHThDB38QnIcBCAQ\"><a class=\"NKcBbd\" href=\"https://www.google.com/url?q=https://blog.google/outreach-initiatives/diversity/asian-pacific-american-heritage-month-2023/%3Futm_source%3Dhpp%26utm_medium%3Downed%26utm_campaign%3Dapahm&source=hpp&id=19035152&ct=3&usg=AOvVaw1zrN82vzhoWl4hz1zZ4gLp&sa=X&ved=0ahUKEwjmj7fr6dT-AhVULUQIHThDB38Q8IcBCAU\" rel=\"nofollow\">Celebrate Asian Pacific American Heritage Month with Google</a></div></div></div><span id=\"footer\"><div style=\"font-size:10pt\"><div style=\"margin:19px auto;text-align:center\" id=\"WqQANb\"><a href=\"/intl/en/ads/\">Advertising</a><a href=\"/services/\">Business Solutions</a><a href=\"/intl/en/about.html\">About Google</a></div></div><p style=\"font-size:8pt;color:#70757a\">© 2023 - <a href=\"/intl/en/policies/privacy/\">Privacy</a> - <a href=\"/intl/en/policies/terms/\">Terms</a></p></span></center><script nonce=\"MXrF0nnIBPkxBza4okrgPA\">(function(){window.google.cdo={height:757,width:1440};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b){var c=window.document,d=\"CSS1Compat\"==c.compatMode?c.documentElement:c.body;a=d.clientWidth;b=d.clientHeight}a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log(\"\",\"\",\"/client_204?&atyp=i&biw=\"+a+\"&bih=\"+b+\"&ei=\"+google.kEI);}).call(this);})();</script> <script nonce=\"MXrF0nnIBPkxBza4okrgPA\">(function(){google.xjs={ck:\\'xjs.hp.vUsZk7fd8do.L.X.O\\',cs:\\'ACT90oF8ktm8JGoaZ23megDhHoJku7YaGw\\',excm:[]};})();</script> <script nonce=\"MXrF0nnIBPkxBza4okrgPA\">(function(){var u=\\'/xjs/_/js/k\\\\x3dxjs.hp.en.q0lHXBfs9JY.O/am\\\\x3dAAAA6AQAUABgAQ/d\\\\x3d1/ed\\\\x3d1/rs\\\\x3dACT90oE3ek6-fjkab6CsTH0wUEUUPhnExg/m\\\\x3dsb_he,d\\';var amd=0;\\nvar e=this||self,f=function(c){return c};var h;var n=function(c,g){this.g=g===l?c:\"\"};n.prototype.toString=function(){return this.g+\"\"};var l={};\\nfunction p(){var c=u,g=function(){};google.lx=google.stvsc?g:function(){google.timers&&google.timers.load&&google.tick&&google.tick(\"load\",\"xjsls\");var a=document;var b=\"SCRIPT\";\"application/xhtml+xml\"===a.contentType&&(b=b.toLowerCase());b=a.createElement(b);a=null===c?\"null\":void 0===c?\"undefined\":c;if(void 0===h){var d=null;var m=e.trustedTypes;if(m&&m.createPolicy){try{d=m.createPolicy(\"goog#html\",{createHTML:f,createScript:f,createScriptURL:f})}catch(r){e.console&&e.console.error(r.message)}h=\\nd}else h=d}a=(d=h)?d.createScriptURL(a):a;a=new n(a,l);b.src=a instanceof n&&a.constructor===n?a.g:\"type_error:TrustedResourceUrl\";var k,q;(k=(a=null==(q=(k=(b.ownerDocument&&b.ownerDocument.defaultView||window).document).querySelector)?void 0:q.call(k,\"script[nonce]\"))?a.nonce||a.getAttribute(\"nonce\")||\"\":\"\")&&b.setAttribute(\"nonce\",k);document.body.appendChild(b);google.psa=!0;google.lx=g};google.bx||google.lx()};google.xjsu=u;e._F_jsUrl=u;setTimeout(function(){0<amd?google.caft(function(){return p()},amd):p()},0);})();window._ = window._ || {};window._DumpException = _._DumpException = function(e){throw e;};window._s = window._s || {};_s._DumpException = _._DumpException;window._qs = window._qs || {};_qs._DumpException = _._DumpException;function _F_installCss(c){}\\n(function(){google.jl={blt:\\'none\\',chnk:0,dw:false,dwu:true,emtn:0,end:0,ico:false,ikb:0,ine:false,injs:\\'none\\',injt:0,injth:0,injv2:false,lls:\\'default\\',pdt:0,rep:0,snet:true,strt:0,ubm:false,uwp:true};})();(function(){var pmc=\\'{\\\\x22d\\\\x22:{},\\\\x22sb_he\\\\x22:{\\\\x22agen\\\\x22:true,\\\\x22cgen\\\\x22:true,\\\\x22client\\\\x22:\\\\x22heirloom-hp\\\\x22,\\\\x22dh\\\\x22:true,\\\\x22ds\\\\x22:\\\\x22\\\\x22,\\\\x22fl\\\\x22:true,\\\\x22host\\\\x22:\\\\x22google.com\\\\x22,\\\\x22jsonp\\\\x22:true,\\\\x22msgs\\\\x22:{\\\\x22cibl\\\\x22:\\\\x22Clear Search\\\\x22,\\\\x22dym\\\\x22:\\\\x22Did you mean:\\\\x22,\\\\x22lcky\\\\x22:\\\\x22I\\\\\\\\u0026#39;m Feeling Lucky\\\\x22,\\\\x22lml\\\\x22:\\\\x22Learn more\\\\x22,\\\\x22psrc\\\\x22:\\\\x22This search was removed from your \\\\\\\\u003Ca href\\\\x3d\\\\\\\\\\\\x22/history\\\\\\\\\\\\x22\\\\\\\\u003EWeb History\\\\\\\\u003C/a\\\\\\\\u003E\\\\x22,\\\\x22psrl\\\\x22:\\\\x22Remove\\\\x22,\\\\x22sbit\\\\x22:\\\\x22Search by image\\\\x22,\\\\x22srch\\\\x22:\\\\x22Google Search\\\\x22},\\\\x22ovr\\\\x22:{},\\\\x22pq\\\\x22:\\\\x22\\\\x22,\\\\x22rfs\\\\x22:[],\\\\x22sbas\\\\x22:\\\\x220 3px 8px 0 rgba(0,0,0,0.2),0 0 0 1px rgba(0,0,0,0.08)\\\\x22,\\\\x22stok\\\\x22:\\\\x22C3TIBpTor6RHJfEIn2nbidnhv50\\\\x22}}\\';google.pmc=JSON.parse(pmc);})();</script> </body></html>'"+ "'<!doctype html><html itemscope=\"\" itemtype=\"http://schema.org/WebPage\" lang=\"en\"><head><meta content=\"Search the world\\'s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you\\'re looking for.\" name=\"description\"><meta content=\"noodp, \" name=\"robots\"><meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\"><meta content=\"/images/branding/googleg/1x/googleg_standard_color_128dp.png\" itemprop=\"image\"><title>Google</title><script nonce=\"by8KWCDpfJGbptqAqr4KTA\">(function(){var _g={kEI:\\'FRCDZqbtEKPNkPIPsYSpgA0\\',kEXPI:\\'0,18167,775177,2906997,608,432,7,302122,236535,2872,2891,3926,4423,3405,61296,6397,27869,145701,2,16392,342,23024,6699,28950,12996,57737,2,2,1,24626,2006,8155,23350,8702,13734,9779,45600,17057,36747,3801,2412,1549,28670,3030,15816,1804,7734,18098,9161,12089,476,1156,9711,46651,5211785,891,622,38,5991770,2839759,16,527,242,5,16,4,51,1,47,6,1,20717334,7264126,16673,43886,3,318,4,1281,3,2124363,23029351,8163,4636,8409,6577,1450,2727,5911,3780,24246,24917,11953,10511,2370,4834,1573,2960,10886,884,9590,2478,2211,8183,5933,39356,4140,75,1,10009,8926,2657,3437,1365,1,3,1950,155,1,1,1,2481,13504,1004,6732,6595,4,2539,968,540,3092,206,122,3217,4,3004,10345,3552,1694,2968,1115,409,518,4408,3,85,1224,1009,2,3,2297,56,2121,1814,24,664,4436,791,1401,45,1122,3,1,416,1354,156,423,665,2688,7,1538,2,211,2724,975,709,4618,1704,334,2821,709,683,452,212,14,5657,45,126,339,914,748,317,515,2074,216,107,715,38,2,237,498,1,1140,1489,4,432,279,7,12,622,1458,279,870,46,451,4,267,3,1,816,455,669,46,202,691,1,2,1435,5,243,295,834,642,4,525,767,471,436,867,396,412,1570,4,367,3,93,910,790,6,108,172,1,3,9,275,3,251,26,40,448,51,23,1,3,1,1103,162,2,2636,67,178,289,1826,554,881,402,1032,13,651,119,385,1,3,107,21,2,490,118,125,458,41,427,445,207,213,360,460,1472,1,1421,270,60,456,12,89,1140,181,621,579,39,119,600,5,207,24,292,35,1051,1005,23,73,47,6,948,435,120,4,96,2,44,3,61,325,1789,2,285,39,1138,675,2,130,315,50,36,180,597,781,424,14,1,62,5,253,1043,1,973,2,130,7,21544198,5720,3,980,5,6549,10805,2206,20,390,576,343\\',kBL:\\'z8iO\\',kOPI:89978449};(function(){var a;((a=window.google)==null?0:a.stvsc)?google.kEI=_g.kEI:window.google=_g;}).call(this);})();(function(){google.sn=\\'webhp\\';google.kHL=\\'en\\';})();(function(){\\nvar h=this||self;function l(){return window.google!==void 0&&window.google.kOPI!==void 0&&window.google.kOPI!==0?window.google.kOPI:null};var m,n=[];function p(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute(\"eid\")));)a=a.parentNode;return b||m}function q(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute(\"leid\")));)a=a.parentNode;return b}function r(a){/^http:/i.test(a)&&window.location.protocol===\"https:\"&&(google.ml&&google.ml(Error(\"a\"),!1,{src:a,glmm:1}),a=\"\");return a}\\nfunction t(a,b,c,d,k){var e=\"\";b.search(\"&ei=\")===-1&&(e=\"&ei=\"+p(d),b.search(\"&lei=\")===-1&&(d=q(d))&&(e+=\"&lei=\"+d));d=\"\";var g=b.search(\"&cshid=\")===-1&&a!==\"slh\",f=[];f.push([\"zx\",Date.now().toString()]);h._cshid&&g&&f.push([\"cshid\",h._cshid]);c=c();c!=null&&f.push([\"opi\",c.toString()]);for(c=0;c<f.length;c++){if(c===0||c>0)d+=\"&\";d+=f[c][0]+\"=\"+f[c][1]}return\"/\"+(k||\"gen_204\")+\"?atyp=i&ct=\"+String(a)+\"&cad=\"+(b+e+d)};m=google.kEI;google.getEI=p;google.getLEI=q;google.ml=function(){return null};google.log=function(a,b,c,d,k,e){e=e===void 0?l:e;c||(c=t(a,b,e,d,k));if(c=r(c)){a=new Image;var g=n.length;n[g]=a;a.onerror=a.onload=a.onabort=function(){delete n[g]};a.src=c}};google.logUrl=function(a,b){b=b===void 0?l:b;return t(\"\",a,b)};}).call(this);(function(){google.y={};google.sy=[];google.x=function(a,b){if(a)var c=a.id;else{do c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.sx=function(a){google.sy.push(a)};google.lm=[];google.plm=function(a){google.lm.push.apply(google.lm,a)};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};google.bx=!1;google.lx=function(){};var d=[];google.fce=function(a,b,c,e){d.push([a,b,c,e])};google.qce=d;}).call(this);google.f={};(function(){\\ndocument.documentElement.addEventListener(\"submit\",function(b){var a;if(a=b.target){var c=a.getAttribute(\"data-submitfalse\");a=c===\"1\"||c===\"q\"&&!a.elements.q.value?!0:!1}else a=!1;a&&(b.preventDefault(),b.stopPropagation())},!0);document.documentElement.addEventListener(\"click\",function(b){var a;a:{for(a=b.target;a&&a!==document.documentElement;a=a.parentElement)if(a.tagName===\"A\"){a=a.getAttribute(\"data-nohref\")===\"1\";break a}a=!1}a&&b.preventDefault()},!0);}).call(this);</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}\\n</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#1967d2}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}body{background:#fff;color:#000}a{color:#681da8;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#1967d2}a:visited{color:#681da8}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#f8f9fa;border:solid 1px;border-color:#dadce0 #70757a #70757a #dadce0;height:30px}.lsbb{display:block}#WqQANb a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;color:#000;border:none;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#dadce0}.lst:focus{outline:none}</style><script nonce=\"by8KWCDpfJGbptqAqr4KTA\">(function(){window.google.erd={jsr:1,bv:2034,de:true};\\nvar h=this||self;var k,l=(k=h.mei)!=null?k:1,n,p=(n=h.sdo)!=null?n:!0,q=0,r,t=google.erd,v=t.jsr;google.ml=function(a,b,d,m,e){e=e===void 0?2:e;b&&(r=a&&a.message);d===void 0&&(d={});d.cad=\"ple_\"+google.ple+\".aple_\"+google.aple;if(google.dl)return google.dl(a,e,d,!0),null;b=d;if(v<0){window.console&&console.error(a,b);if(v===-2)throw a;b=!1}else b=!a||!a.message||a.message===\"Error loading script\"||q>=l&&!m?!1:!0;if(!b)return null;q++;d=d||{};b=encodeURIComponent;var c=\"/gen_204?atyp=i&ei=\"+b(google.kEI);google.kEXPI&&(c+=\"&jexpid=\"+b(google.kEXPI));c+=\"&srcpg=\"+b(google.sn)+\"&jsr=\"+b(t.jsr)+\\n\"&bver=\"+b(t.bv);var f=a.lineNumber;f!==void 0&&(c+=\"&line=\"+f);var g=a.fileName;g&&(g.indexOf(\"-extension:/\")>0&&(e=3),c+=\"&script=\"+b(g),f&&g===window.location.href&&(f=document.documentElement.outerHTML.split(\"\\\\n\")[f],c+=\"&cad=\"+b(f?f.substring(0,300):\"No script found.\")));google.ple&&google.ple===1&&(e=2);c+=\"&jsel=\"+e;for(var u in d)c+=\"&\",c+=b(u),c+=\"=\",c+=b(d[u]);c=c+\"&emsg=\"+b(a.name+\": \"+a.message);c=c+\"&jsst=\"+b(a.stack||\"N/A\");c.length>=12288&&(c=c.substr(0,12288));a=c;m||google.log(0,\"\",a);return a};window.onerror=function(a,b,d,m,e){r!==a&&(a=e instanceof Error?e:Error(a),d===void 0||\"lineNumber\"in a||(a.lineNumber=d),b===void 0||\"fileName\"in a||(a.fileName=b),google.ml(a,!1,void 0,!1,a.name===\"SyntaxError\"||a.message.substring(0,11)===\"SyntaxError\"||a.message.indexOf(\"Script error\")!==-1?3:0));r=null;p&&q>=l&&(window.onerror=null)};})();</script></head><body bgcolor=\"#fff\"><script nonce=\"by8KWCDpfJGbptqAqr4KTA\">(function(){var src=\\'/images/nav_logo229.png\\';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}\\nif (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}\\n}\\n})();</script><div id=\"mngb\"><div id=gbar><nobr><b class=gb1>Search</b> <a class=gb1 href=\"https://www.google.com/imghp?hl=en&tab=wi\">Images</a> <a class=gb1 href=\"https://maps.google.com/maps?hl=en&tab=wl\">Maps</a> <a class=gb1 href=\"https://play.google.com/?hl=en&tab=w8\">Play</a> <a class=gb1 href=\"https://www.youtube.com/?tab=w1\">YouTube</a> <a class=gb1 href=\"https://news.google.com/?tab=wn\">News</a> <a class=gb1 href=\"https://mail.google.com/mail/?tab=wm\">Gmail</a> <a class=gb1 href=\"https://drive.google.com/?tab=wo\">Drive</a> <a class=gb1 style=\"text-decoration:none\" href=\"https://www.google.com/intl/en/about/products?tab=wh\"><u>More</u> »</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href=\"http://www.google.com/history/optout?hl=en\" class=gb4>Web History</a> | <a href=\"/preferences?hl=en\" class=gb4>Settings</a> | <a target=_top id=gb_70 href=\"https://accounts.google.com/ServiceLogin?hl=en&passive=true&continue=https://www.google.com/&ec=GAZAAQ\" class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div></div><center><br clear=\"all\" id=\"lgpd\"><div id=\"lga\"><img alt=\"Google\" height=\"92\" src=\"/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png\" style=\"padding:28px 0 14px\" width=\"272\" id=\"hplogo\"><br><br></div><form action=\"/search\" name=\"f\"><table cellpadding=\"0\" cellspacing=\"0\"><tr valign=\"top\"><td width=\"25%\"> </td><td align=\"center\" nowrap=\"\"><input name=\"ie\" value=\"ISO-8859-1\" type=\"hidden\"><input value=\"en\" name=\"hl\" type=\"hidden\"><input name=\"source\" type=\"hidden\" value=\"hp\"><input name=\"biw\" type=\"hidden\"><input name=\"bih\" type=\"hidden\"><div class=\"ds\" style=\"height:32px;margin:4px 0\"><input class=\"lst\" style=\"margin:0;padding:5px 8px 0 6px;vertical-align:top;color:#000\" autocomplete=\"off\" value=\"\" title=\"Google Search\" maxlength=\"2048\" name=\"q\" size=\"57\"></div><br style=\"line-height:0\"><span class=\"ds\"><span class=\"lsbb\"><input class=\"lsb\" value=\"Google Search\" name=\"btnG\" type=\"submit\"></span></span><span class=\"ds\"><span class=\"lsbb\"><input class=\"lsb\" id=\"tsuid_1\" value=\"I\\'m Feeling Lucky\" name=\"btnI\" type=\"submit\"><script nonce=\"by8KWCDpfJGbptqAqr4KTA\">(function(){var id=\\'tsuid_1\\';document.getElementById(id).onclick = function(){if (this.form.q.value){this.checked = 1;if (this.form.iflsig)this.form.iflsig.disabled = false;}\\nelse top.location=\\'/doodles/\\';};})();</script><input value=\"AL9hbdgAAAAAZoMeJdl-EuyCyG18Q3UnIHL6DneTFAmo\" name=\"iflsig\" type=\"hidden\"></span></span></td><td class=\"fl sblc\" align=\"left\" nowrap=\"\" width=\"25%\"><a href=\"/advanced_search?hl=en&authuser=0\">Advanced search</a></td></tr></table><input id=\"gbv\" name=\"gbv\" type=\"hidden\" value=\"1\"><script nonce=\"by8KWCDpfJGbptqAqr4KTA\">(function(){var a,b=\"1\";if(document&&document.getElementById)if(typeof XMLHttpRequest!=\"undefined\")b=\"2\";else if(typeof ActiveXObject!=\"undefined\"){var c,d,e=[\"MSXML2.XMLHTTP.6.0\",\"MSXML2.XMLHTTP.3.0\",\"MSXML2.XMLHTTP\",\"Microsoft.XMLHTTP\"];for(c=0;d=e[c++];)try{new ActiveXObject(d),b=\"2\"}catch(h){}}a=b;if(a==\"2\"&&location.search.indexOf(\"&gbv=2\")==-1){var f=google.gbvu,g=document.getElementById(\"gbv\");g&&(g.value=a);f&&window.setTimeout(function(){location.href=f},0)};}).call(this);</script></form><div id=\"gac_scont\"></div><div style=\"font-size:83%;min-height:3.5em\"><br></div><span id=\"footer\"><div style=\"font-size:10pt\"><div style=\"margin:19px auto;text-align:center\" id=\"WqQANb\"><a href=\"/intl/en/ads/\">Advertising</a><a href=\"/services/\">Business Solutions</a><a href=\"/intl/en/about.html\">About Google</a></div></div><p style=\"font-size:8pt;color:#70757a\">© 2024 - <a href=\"/intl/en/policies/privacy/\">Privacy</a> - <a href=\"/intl/en/policies/terms/\">Terms</a></p></span></center><script nonce=\"by8KWCDpfJGbptqAqr4KTA\">(function(){window.google.cdo={height:757,width:1440};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b){var c=window.document,d=c.compatMode==\"CSS1Compat\"?c.documentElement:c.body;a=d.clientWidth;b=d.clientHeight}\\nif(a&&b&&(a!=google.cdo.width||b!=google.cdo.height)){var e=google,f=e.log,g=\"/client_204?&atyp=i&biw=\"+a+\"&bih=\"+b+\"&ei=\"+google.kEI,h=\"\",k=[],l=window.google!==void 0&&window.google.kOPI!==void 0&&window.google.kOPI!==0?window.google.kOPI:null;l!=null&&k.push([\"opi\",l.toString()]);for(var m=0;m<k.length;m++){if(m===0||m>0)h+=\"&\";h+=k[m][0]+\"=\"+k[m][1]}f.call(e,\"\",\"\",g+h)};}).call(this);})();</script> <script nonce=\"by8KWCDpfJGbptqAqr4KTA\">(function(){google.xjs={basecomb:\\'/xjs/_/js/k\\\\x3dxjs.hp.en.zYvPhVQQvCg.O/ck\\\\x3dxjs.hp.QNuQMmLLXgc.L.X.O/am\\\\x3dAQAAgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAHAAAAIABAIAAAAAAAHgAAAAAAAABAAIABCAiAA_EdAYAAWAQAgBc/d\\\\x3d1/ed\\\\x3d1/dg\\\\x3d0/ujg\\\\x3d1/rs\\\\x3dACT90oGbsR9qT71QB9Cz2Gz7BlFT7kp4oA\\',basecss:\\'/xjs/_/ss/k\\\\x3dxjs.hp.QNuQMmLLXgc.L.X.O/am\\\\x3dAQAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAIAAAAAAAAAAAAAAAAABAAIABCAg/rs\\\\x3dACT90oGZG0ZsREnCg9-8cuPVUcm9WBw7Aw\\',basejs:\\'/xjs/_/js/k\\\\x3dxjs.hp.en.zYvPhVQQvCg.O/am\\\\x3dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAHAAAAAAAAAAAAAAAAHgAAAAAAAAAAAAAAAACAA_EdAYAAWAQAgBc/dg\\\\x3d0/rs\\\\x3dACT90oHWuEjyPCBYBGaNekEh4EZolvOY8g\\',excm:[]};})();</script> <link href=\"/xjs/_/ss/k=xjs.hp.QNuQMmLLXgc.L.X.O/am=AQAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAIAAAAAAAAAAAAAAAAABAAIABCAg/d=1/ed=1/rs=ACT90oGZG0ZsREnCg9-8cuPVUcm9WBw7Aw/m=sb_he,d\" rel=\"stylesheet\" nonce=\"by8KWCDpfJGbptqAqr4KTA\"> <script nonce=\"by8KWCDpfJGbptqAqr4KTA\">(function(){var u=\\'/xjs/_/js/k\\\\x3dxjs.hp.en.zYvPhVQQvCg.O/am\\\\x3dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAHAAAAAAAAAAAAAAAAHgAAAAAAAAAAAAAAAACAA_EdAYAAWAQAgBc/d\\\\x3d1/ed\\\\x3d1/rs\\\\x3dACT90oHWuEjyPCBYBGaNekEh4EZolvOY8g/m\\\\x3dsb_he,d\\';var st=1;var amd=1000;var mmd=0;\\nvar e=this||self,f=function(a){return a};var g;var h=function(a){this.g=a};h.prototype.toString=function(){return this.g+\"\"};var k={};\\nfunction l(a,b){a.src=b instanceof h&&b.constructor===h?b.g:\"type_error:TrustedResourceUrl\";var c,d;(c=(b=(d=(c=(a.ownerDocument&&a.ownerDocument.defaultView||window).document).querySelector)==null?void 0:d.call(c,\"script[nonce]\"))?b.nonce||b.getAttribute(\"nonce\")||\"\":\"\")&&a.setAttribute(\"nonce\",c)};var m=function(){var a=document;var b=\"SCRIPT\";a.contentType===\"application/xhtml+xml\"&&(b=b.toLowerCase());return a.createElement(b)};function n(a){a=a===null?\"null\":a===void 0?\"undefined\":a;if(g===void 0){var b=null;var c=e.trustedTypes;if(c&&c.createPolicy){try{b=c.createPolicy(\"goog#html\",{createHTML:f,createScript:f,createScriptURL:f})}catch(d){e.console&&e.console.error(d.message)}g=b}else g=b}a=(b=g)?b.createScriptURL(a):a;return new h(a,k)};google.ps===void 0&&(google.ps=[]);function p(){var a=u,b=function(){};google.lx=google.stvsc?b:function(){q(a);google.lx=b};google.bx||google.lx()}function r(a,b){b&&l(a,n(b));var c=a.onload;a.onload=function(d){c&&c(d);google.ps=google.ps.filter(function(F){return a!==F})};google.ps.push(a);document.body.appendChild(a)}google.as=r;function q(a){google.timers&&google.timers.load&&google.tick&&google.tick(\"load\",\"xjsls\");var b=m();b.onerror=function(){google.ple=1};b.onload=function(){google.ple=0};google.xjsus=void 0;r(b,a);google.aple=-1;google.psa=!0};function t(a){var b=a.getAttribute(\"jscontroller\");return(b===\"UBXHI\"||b===\"R3fhkb\"||b===\"TSZEqd\")&&a.hasAttribute(\"data-src\")}function w(){for(var a=document.getElementsByTagName(\"img\"),b=0,c=a.length;b<c;b++){var d=a[b];if(d.hasAttribute(\"data-lzy_\")&&Number(d.getAttribute(\"data-atf\"))&1&&!t(d))return!0}return!1}for(var x=document.getElementsByTagName(\"img\"),y=0,z=x.length;y<z;++y){var A=x[y];Number(A.getAttribute(\"data-atf\"))&1&&t(A)&&(A.src=A.getAttribute(\"data-src\"))};var B,C,D,E;function G(){google.xjsu=u;e._F_jsUrl=u;E=function(){p()};B=!1;C=(st===1||st===3)&&!!google.caft&&!w();D=(st===2||st===3)&&!!google.rairicb&&!w()}function H(){B||C||D||(E(),B=!0)}setTimeout(function(){google&&google.tick&&google.timers&&google.timers.load&&google.tick(\"load\",\"xjspls\");G();if(C||D){if(C){var a=function(){C=!1;H()};google.caft(a);window.setTimeout(a,amd)}D&&(a=function(){D=!1;H()},(0,google.rairicb)(a),window.setTimeout(a,mmd))}else E()},0);})();window._ = window._ || {};window._DumpException = _._DumpException = function(e){throw e;};window._s = window._s || {};_s._DumpException = _._DumpException;window._qs = window._qs || {};_qs._DumpException = _._DumpException;(function(){var t=[1,2,0,0,0,83886080,0,655360,67567769,8388644,132096,147456,30,0,402654208,537002512,18739459,291570176,24641536];window._F_toggles = window._xjs_toggles = t;})();function _F_installCss(c){}\\n(function(){google.jl={bfl:0,dw:false,ine:false,ubm:false,uwp:true,vs:false};})();(function(){var pmc=\\'{\\\\x22d\\\\x22:{},\\\\x22sb_he\\\\x22:{\\\\x22agen\\\\x22:false,\\\\x22cgen\\\\x22:false,\\\\x22client\\\\x22:\\\\x22heirloom-hp\\\\x22,\\\\x22dh\\\\x22:true,\\\\x22ds\\\\x22:\\\\x22\\\\x22,\\\\x22fl\\\\x22:true,\\\\x22host\\\\x22:\\\\x22google.com\\\\x22,\\\\x22jsonp\\\\x22:true,\\\\x22msgs\\\\x22:{\\\\x22cibl\\\\x22:\\\\x22Clear Search\\\\x22,\\\\x22dym\\\\x22:\\\\x22Did you mean:\\\\x22,\\\\x22lcky\\\\x22:\\\\x22I\\\\\\\\u0026#39;m Feeling Lucky\\\\x22,\\\\x22lml\\\\x22:\\\\x22Learn more\\\\x22,\\\\x22psrc\\\\x22:\\\\x22This search was removed from your \\\\\\\\u003Ca href\\\\x3d\\\\\\\\\\\\x22/history\\\\\\\\\\\\x22\\\\\\\\u003EWeb History\\\\\\\\u003C/a\\\\\\\\u003E\\\\x22,\\\\x22psrl\\\\x22:\\\\x22Remove\\\\x22,\\\\x22sbit\\\\x22:\\\\x22Search by image\\\\x22,\\\\x22srch\\\\x22:\\\\x22Google Search\\\\x22},\\\\x22ovr\\\\x22:{},\\\\x22pq\\\\x22:\\\\x22\\\\x22,\\\\x22rfs\\\\x22:[],\\\\x22sbas\\\\x22:\\\\x220 3px 8px 0 rgba(0,0,0,0.2),0 0 0 1px rgba(0,0,0,0.08)\\\\x22,\\\\x22stok\\\\x22:\\\\x22MGFc934x08Qb93lxNIdhRo63tyg\\\\x22}}\\';google.pmc=JSON.parse(pmc);})();(function(){var c=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};\\nvar e=this||self;var g,h;a:{for(var k=[\"CLOSURE_FLAGS\"],l=e,n=0;n<k.length;n++)if(l=l[k[n]],l==null){h=null;break a}h=l}var p=h&&h[610401301];g=p!=null?p:!1;var q,r=e.navigator;q=r?r.userAgentData||null:null;function t(a){return g?q?q.brands.some(function(b){return(b=b.brand)&&b.indexOf(a)!=-1}):!1:!1}function u(a){var b;a:{if(b=e.navigator)if(b=b.userAgent)break a;b=\"\"}return b.indexOf(a)!=-1};function v(){return g?!!q&&q.brands.length>0:!1}function w(){return u(\"Safari\")&&!(x()||(v()?0:u(\"Coast\"))||(v()?0:u(\"Opera\"))||(v()?0:u(\"Edge\"))||(v()?t(\"Microsoft Edge\"):u(\"Edg/\"))||(v()?t(\"Opera\"):u(\"OPR\"))||u(\"Firefox\")||u(\"FxiOS\")||u(\"Silk\")||u(\"Android\"))}function x(){return v()?t(\"Chromium\"):(u(\"Chrome\")||u(\"CriOS\"))&&!(v()?0:u(\"Edge\"))||u(\"Silk\")}function y(){return u(\"Android\")&&!(x()||u(\"Firefox\")||u(\"FxiOS\")||(v()?0:u(\"Opera\"))||u(\"Silk\"))};var z=v()?!1:u(\"Trident\")||u(\"MSIE\");y();x();w();var A=typeof Symbol===\"function\"&&typeof Symbol()===\"symbol\",B;B=typeof Symbol===\"function\"&&typeof Symbol()===\"symbol\"?Symbol():void 0;var C=[];(A?function(a,b){a[B]=b}:function(a,b){a.g!==void 0?a.g=b:Object.defineProperties(a,{g:{value:b,configurable:!0,writable:!0,enumerable:!1}})})(C,55);Object.freeze(C);var D=function(){};Object.freeze(new function(){});Object.freeze(new D);Object.freeze(new D);var G=!z&&!w(),H=function(a){if(/-[a-z]/.test(\"ved\"))return null;if(G&&a.dataset){if(y()&&!(\"ved\"in a.dataset))return null;a=a.dataset.ved;return a===void 0?null:a}return a.getAttribute(\"data-\"+\"ved\".replace(/([A-Z])/g,\"-$1\").toLowerCase())};var I=[],J=null;function K(a){a=a.target;var b=performance.now(),f=[],L=f.concat,d=I;if(!(d instanceof Array)){var m=typeof Symbol!=\"undefined\"&&Symbol.iterator&&d[Symbol.iterator];if(m)d=m.call(d);else if(typeof d.length==\"number\")d={next:c(d)};else throw Error(\"b`\"+String(d));for(var E=[];!(m=d.next()).done;)E.push(m.value);d=E}I=L.call(f,d,[b]);if(a&&a instanceof HTMLElement)if(a===J){if(b=I.length>=4)b=(I[I.length-1]-I[I.length-4])/1E3<5;if(b){b=google.getEI(a);a.hasAttribute(\"data-ved\")?f=a?H(a)||\"\":\"\":f=(f=\\na.closest(\"[data-ved]\"))?H(f)||\"\":\"\";f=f||\"\";if(a.hasAttribute(\"jsname\"))a=a.getAttribute(\"jsname\");else{var F;a=(F=a.closest(\"[jsname]\"))==null?void 0:F.getAttribute(\"jsname\")}google.log(\"rcm\",\"&ei=\"+b+\"&tgtved=\"+f+\"&jsname=\"+(a||\"\"))}}else J=a,I=[b]}window.document.addEventListener(\"DOMContentLoaded\",function(){document.body.addEventListener(\"click\",K)});}).call(this);</script></body></html>'"]},"execution_count": 5,@@ -110,6 +100,10 @@}],"source": [+ "from langchain_community.utilities import TextRequestsWrapper\n",+ "\n",+ "requests = TextRequestsWrapper()\n",+ "\n","requests.get(\"https://www.google.com\")"]},@@ -123,7 +117,7 @@},{"cell_type": "code",- "execution_count": 1,+ "execution_count": 6,"id": "3f27ee3d","metadata": {},"outputs": [diff --git a/libs/community/langchain_community/agent_toolkits/load_tools.py b/libs/community/langchain_community/agent_toolkits/load_tools.pyindex cc72afd232..18df5b3dee 100644--- a/libs/community/langchain_community/agent_toolkits/load_tools.py+++ b/libs/community/langchain_community/agent_toolkits/load_tools.py@@ -626,6 +626,25 @@ def load_huggingface_tool()+def raise_dangerous_tools_exception(name: str) -> None:+ raise ValueError(+ f"{name} is a dangerous tool. You cannot use it without opting in "+ "by setting allow_dangerous_tools to True. "+ "Most tools have some inherit risk to them merely because they are "+ 'allowed to interact with the "real world".'+ "Please refer to LangChain security guidelines "+ "to https://python.langchain.com/docs/security."+ "Some tools have been designated as dangerous because they pose "+ "risk that is not intuitively obvious. For example, a tool that "+ "allows an agent to make requests to the web, can also be used "+ "to make requests to a server that is only accessible from the "+ "server hosting the code."+ "Again, all tools carry some risk, and it's your responsibility to "+ "understand which tools you're using and the risks associated with "+ "them."+ )++def load_tools(tool_names: List[str],llm: Optional[BaseLanguageModel] = None,@@ -684,22 +703,7 @@ def load_tools()for name in tool_names:if name in DANGEROUS_TOOLS and not allow_dangerous_tools:- raise ValueError(- f"{name} is a dangerous tool. You cannot use it without opting in "- "by setting allow_dangerous_tools to True. "- "Most tools have some inherit risk to them merely because they are "- 'allowed to interact with the "real world".'- "Please refer to LangChain security guidelines "- "to https://python.langchain.com/docs/security."- "Some tools have been designated as dangerous because they pose "- "risk that is not intuitively obvious. For example, a tool that "- "allows an agent to make requests to the web, can also be used "- "to make requests to a server that is only accessible from the "- "server hosting the code."- "Again, all tools carry some risk, and it's your responsibility to "- "understand which tools you're using and the risks associated with "- "them."- )+ raise_dangerous_tools_exception(name)if name in {"requests"}:warnings.warn(@@ -708,8 +712,10 @@ def load_tools()if name == "requests_all":# expand requests into various methods+ if not allow_dangerous_tools:+ raise_dangerous_tools_exception(name)requests_method_tools = [- _tool for _tool in _BASE_TOOLS if _tool.startswith("requests_")+ _tool for _tool in DANGEROUS_TOOLS if _tool.startswith("requests_")]tool_names.extend(requests_method_tools)elif name in _BASE_TOOLS:diff --git a/libs/community/tests/unit_tests/agent_toolkits/test_load_tools.py b/libs/community/tests/unit_tests/agent_toolkits/test_load_tools.pynew file mode 100644index 0000000000..21c2df7ba3--- /dev/null+++ b/libs/community/tests/unit_tests/agent_toolkits/test_load_tools.py@@ -0,0 +1,18 @@+from langchain_community.agent_toolkits.load_tools import load_tools+from langchain_community.tools.requests.tool import (+ RequestsDeleteTool,+ RequestsGetTool,+ RequestsPatchTool,+ RequestsPostTool,+ RequestsPutTool,+)+++def test_load_request_tools() -> None:+ request_tools = load_tools(["requests_all"], allow_dangerous_tools=True)+ assert len(request_tools) == 5+ assert any(isinstance(tool, RequestsDeleteTool) for tool in request_tools)+ assert any(isinstance(tool, RequestsGetTool) for tool in request_tools)+ assert any(isinstance(tool, RequestsPatchTool) for tool in request_tools)+ assert any(isinstance(tool, RequestsPostTool) for tool in request_tools)+ assert any(isinstance(tool, RequestsPutTool) for tool in request_tools)