From b34bfe165a66fc4ea56f4e4edcb3c7dc621d2e2f Mon Sep 17 00:00:00 2001 From: Isaac Francisco <78627776+isahers1@users.noreply.github.com> Date: Thu, 5 Sep 2024 09:03:55 -0700 Subject: [PATCH] docs fixes (#1620) --- .../high-level-tools.ipynb | 8 -------- examples/docs/quickstart.ipynb | 7 ------- examples/human_in_the_loop/review-tool-calls.ipynb | 2 +- examples/introduction.ipynb | 5 +---- examples/reflexion/reflexion.ipynb | 2 +- examples/storm/storm.ipynb | 7 ------- examples/tutorials/rag-agent-testing-local.ipynb | 8 -------- examples/tutorials/rag-agent-testing.ipynb | 8 -------- examples/tutorials/tool-calling-agent-local.ipynb | 8 -------- 9 files changed, 3 insertions(+), 52 deletions(-) diff --git a/examples/chat_agent_executor_with_function_calling/high-level-tools.ipynb b/examples/chat_agent_executor_with_function_calling/high-level-tools.ipynb index bf1f9c029..516704843 100644 --- a/examples/chat_agent_executor_with_function_calling/high-level-tools.ipynb +++ b/examples/chat_agent_executor_with_function_calling/high-level-tools.ipynb @@ -103,14 +103,6 @@ " print(list(s.values())[0])\n", " print(\"----\")" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "87f147e3-f96f-4b96-a3cc-ec7affd7a57f", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/examples/docs/quickstart.ipynb b/examples/docs/quickstart.ipynb index 84d73c024..add27212f 100644 --- a/examples/docs/quickstart.ipynb +++ b/examples/docs/quickstart.ipynb @@ -211,13 +211,6 @@ "source": [ "runnable.invoke(HumanMessage(\"What is your name?\"))" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/examples/human_in_the_loop/review-tool-calls.ipynb b/examples/human_in_the_loop/review-tool-calls.ipynb index 84373b90b..9bf173583 100644 --- a/examples/human_in_the_loop/review-tool-calls.ipynb +++ b/examples/human_in_the_loop/review-tool-calls.ipynb @@ -680,7 +680,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.1" + "version": "3.11.9" } }, "nbformat": 4, diff --git a/examples/introduction.ipynb b/examples/introduction.ipynb index 52cd1018b..8aa4bd007 100644 --- a/examples/introduction.ipynb +++ b/examples/introduction.ipynb @@ -1265,7 +1265,6 @@ "\n", "from langchain_anthropic import ChatAnthropic\n", "from langchain_community.tools.tavily_search import TavilySearchResults\n", - "from langchain_core.messages import BaseMessage\n", "from typing_extensions import TypedDict\n", "\n", "from langgraph.checkpoint.memory import MemorySaver\n", @@ -1583,7 +1582,6 @@ "\n", "from langchain_anthropic import ChatAnthropic\n", "from langchain_community.tools.tavily_search import TavilySearchResults\n", - "from langchain_core.messages import BaseMessage\n", "from typing_extensions import TypedDict\n", "\n", "from langgraph.checkpoint.memory import MemorySaver\n", @@ -1698,7 +1696,7 @@ } ], "source": [ - "from langchain_core.messages import AIMessage\n", + "from langchain_core.messages import AIMessage, ToolMessage\n", "\n", "answer = (\n", " \"LangGraph is a library for building stateful, multi-actor applications with LLMs.\"\n", @@ -2082,7 +2080,6 @@ "\n", "from langchain_anthropic import ChatAnthropic\n", "from langchain_community.tools.tavily_search import TavilySearchResults\n", - "from langchain_core.messages import BaseMessage\n", "from typing_extensions import TypedDict\n", "\n", "from langgraph.checkpoint.memory import MemorySaver\n", diff --git a/examples/reflexion/reflexion.ipynb b/examples/reflexion/reflexion.ipynb index 8c183c817..5a2443513 100644 --- a/examples/reflexion/reflexion.ipynb +++ b/examples/reflexion/reflexion.ipynb @@ -573,7 +573,7 @@ ], "source": [ "events = graph.stream(\n", - " [HumanMessage(content=\"How should we handle the climate crisis?\")],\n", + " {\"messages\": [(\"user\", \"How should we handle the climate crisis?\")]},\n", " stream_mode=\"values\",\n", ")\n", "for i, step in enumerate(events):\n", diff --git a/examples/storm/storm.ipynb b/examples/storm/storm.ipynb index 42ba05faa..7f9ee3985 100644 --- a/examples/storm/storm.ipynb +++ b/examples/storm/storm.ipynb @@ -1667,13 +1667,6 @@ "# We will down-header the sections to create less confusion in this notebook\n", "Markdown(article.replace(\"\\n#\", \"\\n##\"))" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/examples/tutorials/rag-agent-testing-local.ipynb b/examples/tutorials/rag-agent-testing-local.ipynb index 7fd810943..3147d8677 100644 --- a/examples/tutorials/rag-agent-testing-local.ipynb +++ b/examples/tutorials/rag-agent-testing-local.ipynb @@ -604,14 +604,6 @@ "\n", "![Screenshot 2024-07-23 at 12.39.27 PM.png](attachment:5e0fb308-080e-4621-ba20-55a655bb981e.png)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "8eb46884-08aa-4ab4-8bb9-f72277c3b35b", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/examples/tutorials/rag-agent-testing.ipynb b/examples/tutorials/rag-agent-testing.ipynb index 5d83ae068..84c876241 100644 --- a/examples/tutorials/rag-agent-testing.ipynb +++ b/examples/tutorials/rag-agent-testing.ipynb @@ -1266,14 +1266,6 @@ "\n", "![Screenshot 2024-06-23 at 1.32.31 PM.png](attachment:953411a8-f352-4c8f-a923-d3ff171c6080.png)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "bfa533b4-007f-4f86-b146-02c56a4e667a", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/examples/tutorials/tool-calling-agent-local.ipynb b/examples/tutorials/tool-calling-agent-local.ipynb index 12c43038f..f7d87a8a9 100644 --- a/examples/tutorials/tool-calling-agent-local.ipynb +++ b/examples/tutorials/tool-calling-agent-local.ipynb @@ -337,14 +337,6 @@ "\n", "https://smith.langchain.com/public/7a4938e3-f94f-4e04-a162-bf592fba4643/r" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "74b813cb-18ed-42d8-b313-6ee56ded4bcc", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {