From 251187d745e2ca56062c9094aaa227314ce83b5b Mon Sep 17 00:00:00 2001 From: edward Date: Thu, 14 Mar 2024 17:57:54 +0800 Subject: [PATCH] PythonAstREPLTool has been removed from langchain langchain has removed the PythonAstREPLTool from langchain to langchain_experimental due to security reason --- examples/langchain_tooluse.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/langchain_tooluse.ipynb b/examples/langchain_tooluse.ipynb index de91bceb..e817ee88 100644 --- a/examples/langchain_tooluse.ipynb +++ b/examples/langchain_tooluse.ipynb @@ -34,7 +34,7 @@ "!pip install -r requirements.txt\n", "\n", "# 安装 langchain 相关依赖\n", - "!pip install langchain google-search-results wolframalpha arxiv;" + "!pip install langchain google-search-results wolframalpha arxiv langchain_experimental;" ] }, { @@ -73,7 +73,7 @@ "from langchain import SerpAPIWrapper\n", "from langchain.utilities.wolfram_alpha import WolframAlphaAPIWrapper\n", "from langchain.utilities import ArxivAPIWrapper\n", - "from langchain.tools.python.tool import PythonAstREPLTool\n", + "from langchain_experimental.tools.python.tool import PythonAstREPLTool\n", "\n", "from typing import Dict, Tuple\n", "import os\n",