diff --git a/docs/_scripts/copy_notebooks.py b/docs/_scripts/copy_notebooks.py index 6608f1613..9bf27cfd1 100644 --- a/docs/_scripts/copy_notebooks.py +++ b/docs/_scripts/copy_notebooks.py @@ -116,11 +116,11 @@ def copy_notebooks(): ) print(f"Overriding: {src_path} to {dst_path}") break - + # Avoid double nesting. - dst_path = dst_path.replace( - "tutorials/tutorials", "tutorials" - ).replace("how-tos/how-tos", "how-tos") + dst_path = dst_path.replace("tutorials/tutorials", "tutorials").replace( + "how-tos/how-tos", "how-tos" + ) os.makedirs(os.path.dirname(dst_path), exist_ok=True) print(f"Copying: {src_path} to {dst_path}") shutil.copy(src_path, dst_path) diff --git a/examples/agent_executor/base.ipynb b/examples/agent_executor/base.ipynb index 460e9d5f7..99def6da0 100644 --- a/examples/agent_executor/base.ipynb +++ b/examples/agent_executor/base.ipynb @@ -27,7 +27,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain langchain_openai langchainhub tavily-python" + "%pip install --quiet -U langgraph langchain langchain_openai langchainhub tavily-python" ] }, { diff --git a/examples/agent_executor/force-calling-a-tool-first.ipynb b/examples/agent_executor/force-calling-a-tool-first.ipynb index 264d27810..8034cf8ce 100644 --- a/examples/agent_executor/force-calling-a-tool-first.ipynb +++ b/examples/agent_executor/force-calling-a-tool-first.ipynb @@ -32,7 +32,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain langchain_openai tavily-python" + "%pip install --quiet -U langgraph langchain langchain_openai tavily-python" ] }, { diff --git a/examples/agent_executor/human-in-the-loop.ipynb b/examples/agent_executor/human-in-the-loop.ipynb index 630859f61..6916fe32c 100644 --- a/examples/agent_executor/human-in-the-loop.ipynb +++ b/examples/agent_executor/human-in-the-loop.ipynb @@ -32,7 +32,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain langchain_openai tavily-python" + "%pip install --quiet -U langgraph langchain langchain_openai tavily-python" ] }, { @@ -319,7 +319,7 @@ ] }, { - "name": "stdin", + "name": "stdout", "output_type": "stream", "text": [ "[y/n] continue with: tool='tavily_search_results_json' tool_input={'query': 'weather in San Francisco'} log=\"\\nInvoking: `tavily_search_results_json` with `{'query': 'weather in San Francisco'}`\\n\\n\\n\" message_log=[AIMessage(content='', additional_kwargs={'function_call': {'arguments': '{\"query\":\"weather in San Francisco\"}', 'name': 'tavily_search_results_json'}})]? y\n" diff --git a/examples/agent_executor/managing-agent-steps.ipynb b/examples/agent_executor/managing-agent-steps.ipynb index 014ad747e..1f463df94 100644 --- a/examples/agent_executor/managing-agent-steps.ipynb +++ b/examples/agent_executor/managing-agent-steps.ipynb @@ -32,7 +32,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain langchain_openai tavily-python" + "%pip install --quiet -U langgraph langchain langchain_openai tavily-python" ] }, { diff --git a/examples/chat_agent_executor_with_function_calling/base.ipynb b/examples/chat_agent_executor_with_function_calling/base.ipynb index 658dbc14f..b45c62232 100644 --- a/examples/chat_agent_executor_with_function_calling/base.ipynb +++ b/examples/chat_agent_executor_with_function_calling/base.ipynb @@ -28,7 +28,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain langchain_openai tavily-python" + "%pip install --quiet -U langgraph langchain langchain_openai tavily-python" ] }, { @@ -645,7 +645,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.2" + "version": "3.12.2" } }, "nbformat": 4, diff --git a/examples/chat_agent_executor_with_function_calling/dynamically-returning-directly.ipynb b/examples/chat_agent_executor_with_function_calling/dynamically-returning-directly.ipynb index 7377fe85d..ebe8c6cfb 100644 --- a/examples/chat_agent_executor_with_function_calling/dynamically-returning-directly.ipynb +++ b/examples/chat_agent_executor_with_function_calling/dynamically-returning-directly.ipynb @@ -40,7 +40,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain langchain_openai tavily-python" + "%pip install --quiet -U langgraph langchain langchain_openai tavily-python" ] }, { @@ -591,7 +591,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.2" + "version": "3.12.2" } }, "nbformat": 4, diff --git a/examples/chat_agent_executor_with_function_calling/managing-agent-steps.ipynb b/examples/chat_agent_executor_with_function_calling/managing-agent-steps.ipynb index 26b391a29..fd99f9245 100644 --- a/examples/chat_agent_executor_with_function_calling/managing-agent-steps.ipynb +++ b/examples/chat_agent_executor_with_function_calling/managing-agent-steps.ipynb @@ -32,7 +32,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain langchain_openai tavily-python" + "%pip install --quiet -U langgraph langchain langchain_openai tavily-python" ] }, { @@ -493,7 +493,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.2" + "version": "3.12.2" } }, "nbformat": 4, diff --git a/examples/chat_agent_executor_with_function_calling/prebuilt-tool-node.ipynb b/examples/chat_agent_executor_with_function_calling/prebuilt-tool-node.ipynb index a232adcbe..9bd9b1df8 100644 --- a/examples/chat_agent_executor_with_function_calling/prebuilt-tool-node.ipynb +++ b/examples/chat_agent_executor_with_function_calling/prebuilt-tool-node.ipynb @@ -29,7 +29,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain langchain_openai tavily-python" + "%pip install --quiet -U langgraph langchain langchain_openai tavily-python" ] }, { diff --git a/examples/chat_agent_executor_with_function_calling/respond-in-format.ipynb b/examples/chat_agent_executor_with_function_calling/respond-in-format.ipynb index dbfdb7586..c641fd6db 100644 --- a/examples/chat_agent_executor_with_function_calling/respond-in-format.ipynb +++ b/examples/chat_agent_executor_with_function_calling/respond-in-format.ipynb @@ -174,7 +174,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain langchain_openai tavily-python" + "%pip install --quiet -U langgraph langchain langchain_openai tavily-python" ] }, { @@ -634,7 +634,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.2" + "version": "3.12.2" } }, "nbformat": 4, diff --git a/examples/extraction/retries.ipynb b/examples/extraction/retries.ipynb index afff58742..9612c99a7 100644 --- a/examples/extraction/retries.ipynb +++ b/examples/extraction/retries.ipynb @@ -1036,7 +1036,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.2" + "version": "3.12.2" } }, "nbformat": 4, diff --git a/examples/force-calling-a-tool-first.ipynb b/examples/force-calling-a-tool-first.ipynb index b50f09c9e..7f4cd6086 100644 --- a/examples/force-calling-a-tool-first.ipynb +++ b/examples/force-calling-a-tool-first.ipynb @@ -28,7 +28,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain langchain_openai tavily-python" + "%pip install --quiet -U langgraph langchain langchain_openai tavily-python" ] }, { diff --git a/examples/lats/lats.ipynb b/examples/lats/lats.ipynb index 3fd1a8f03..3e1a5cca2 100644 --- a/examples/lats/lats.ipynb +++ b/examples/lats/lats.ipynb @@ -38,8 +38,9 @@ "metadata": {}, "outputs": [], "source": [ - "# %pip install -U --quiet langchain langgraph langchain_openai\n", - "# %pip install -U --quiet tavily-python" + "%%capture --no-stderr\n", + "%pip install -U --quiet langchain langgraph langchain_openai\n", + "%pip install -U --quiet tavily-python" ] }, { @@ -49,7 +50,7 @@ "metadata": {}, "outputs": [], "source": [ - "from __future__ import annotations\n", + "from __future__ import annotations # noqa: F404\n", "\n", "import getpass\n", "import os\n", diff --git a/examples/learning.ipynb b/examples/learning.ipynb index ac6ceec47..1f00937a3 100644 --- a/examples/learning.ipynb +++ b/examples/learning.ipynb @@ -39,7 +39,7 @@ } ], "source": [ - "!pip install --quiet -U langchain langchain_openai tavily-python" + "!%pip install --quiet -U langgraph langchain langchain_openai tavily-pythonvily-python" ] }, { diff --git a/examples/multi_agent/agent_supervisor.ipynb b/examples/multi_agent/agent_supervisor.ipynb index 089c1c58c..3b84dc8f1 100644 --- a/examples/multi_agent/agent_supervisor.ipynb +++ b/examples/multi_agent/agent_supervisor.ipynb @@ -27,8 +27,8 @@ "metadata": {}, "outputs": [], "source": [ - "# %%capture --no-stderr\n", - "# %pip install -U langchain langchain_openai langchain_experimental langsmith pandas" + "%%capture --no-stderr\n", + "%pip install -U langgraph langchain langchain_openai langchain_experimental langsmith pandas" ] }, { diff --git a/examples/pass-run-time-values-to-tools.ipynb b/examples/pass-run-time-values-to-tools.ipynb index 2d474f115..feda568af 100644 --- a/examples/pass-run-time-values-to-tools.ipynb +++ b/examples/pass-run-time-values-to-tools.ipynb @@ -37,7 +37,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain langchain_openai" + "%pip install --quiet -U langgraph langchain langchain_openai" ] }, { diff --git a/examples/plan-and-execute/plan-and-execute.ipynb b/examples/plan-and-execute/plan-and-execute.ipynb index 13c26b44a..1612fd730 100644 --- a/examples/plan-and-execute/plan-and-execute.ipynb +++ b/examples/plan-and-execute/plan-and-execute.ipynb @@ -47,7 +47,7 @@ "outputs": [], "source": [ "%%capture --no-stderr\n", - "%pip install --quiet -U langchain-community langchain-openai tavily-python" + "%pip install --quiet -U langgraph langchain-community langchain-openai tavily-python" ] }, { diff --git a/examples/reflexion/reflexion.ipynb b/examples/reflexion/reflexion.ipynb index 3c4ca26dc..2793ec514 100644 --- a/examples/reflexion/reflexion.ipynb +++ b/examples/reflexion/reflexion.ipynb @@ -609,7 +609,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.2" + "version": "3.12.2" } }, "nbformat": 4, diff --git a/examples/storm/storm.ipynb b/examples/storm/storm.ipynb index 49998a021..5d99703bb 100644 --- a/examples/storm/storm.ipynb +++ b/examples/storm/storm.ipynb @@ -48,9 +48,10 @@ "metadata": {}, "outputs": [], "source": [ - "# %pip install -U langchain_community langchain_openai langgraph wikipedia scikit-learn langchain_fireworks\n", + "%%capture --no-stderr\n", + "%pip install -U langchain_community langchain_openai langgraph wikipedia scikit-learn langchain_fireworks\n", "# We use one or the other search engine below\n", - "# %pip install -U duckduckgo tavily-python" + "%pip install -U duckduckgo tavily-python" ] }, { diff --git a/examples/visualization.ipynb b/examples/visualization.ipynb index c20d0ea6d..2c8ae3853 100644 --- a/examples/visualization.ipynb +++ b/examples/visualization.ipynb @@ -423,7 +423,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.2" + "version": "3.12.2" } }, "nbformat": 4, diff --git a/examples/web-navigation/web_voyager.ipynb b/examples/web-navigation/web_voyager.ipynb index 620d133bf..728003605 100644 --- a/examples/web-navigation/web_voyager.ipynb +++ b/examples/web-navigation/web_voyager.ipynb @@ -29,24 +29,12 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "af83b042", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", - "langchain-experimental 0.0.47 requires langchain<0.1,>=0.0.350, but you have langchain 0.1.4 which is incompatible.\u001b[0m\u001b[31m\n", - "\u001b[0m\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.0\u001b[0m\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], + "outputs": [], "source": [ + "%%capture --no-stderr\n", "%pip install -U --quiet langgraph langsmith langchain_openai" ] },