From 33dbad02fe970a940cde69268c4bec7af61ba8a0 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Fri, 17 May 2024 16:05:28 -0400 Subject: [PATCH] docs: update how-to for built in tools and toolkits (#21828) Fix some typos --- docs/docs/how_to/tools_builtin.ipynb | 48 ++++++++-------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/docs/docs/how_to/tools_builtin.ipynb b/docs/docs/how_to/tools_builtin.ipynb index 4674f32feb..fbdc163645 100644 --- a/docs/docs/how_to/tools_builtin.ipynb +++ b/docs/docs/how_to/tools_builtin.ipynb @@ -25,14 +25,12 @@ "\n", "- [LangChain Tools](/docs/concepts/#tools)\n", "- [LangChain Toolkits](/docs/concepts/#tools)\n", - "- \n", - ":::\n", "\n", - "LangChain has a large collection of 3rd party tools. \n", + ":::\n", "\n", "## Tools\n", "\n", - "Please visit [Tool Integrations](/docs/integrations/tools/) for a list of the available tools.\n", + "LangChain has a large collection of 3rd party tools. Please visit [Tool Integrations](/docs/integrations/tools/) for a list of the available tools.\n", "\n", ":::{.callout-important}\n", "\n", @@ -48,20 +46,10 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "id": "84f70856-b865-4658-9930-7577fb4712ce", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\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.2.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;49mpython -m pip install --upgrade pip\u001b[0m\n" - ] - } - ], + "outputs": [], "source": [ "!pip install -qU wikipedia" ] @@ -96,12 +84,12 @@ "id": "cb870984-52d5-4453-be35-7072a08c6c14", "metadata": {}, "source": [ - "The tool has defaults associated with it:" + "The tool has the following defaults associated with it:" ] }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 55, "id": "7f094f01-2e98-4947-acc4-0846963a96e0", "metadata": {}, "outputs": [ @@ -109,10 +97,10 @@ "name": "stdout", "output_type": "stream", "text": [ - "Name: wikipedia\n", - "Description: A wrapper around Wikipedia. Useful for when you need to answer general questions about people, places, companies, facts, historical events, or other subjects. Input should be a search query.\n", - "args schema: {'query': {'title': 'Query', 'type': 'string'}}\n", - "returns directly?: False\n" + "Name: wiki-tool\n", + "Description: look up things in wikipedia\n", + "args schema: {'query': {'title': 'Query', 'description': 'query to look up in Wikipedia, should be 3 or less words', 'type': 'string'}}\n", + "returns directly?: True\n" ] } ], @@ -120,7 +108,7 @@ "print(f\"Name: {tool.name}\")\n", "print(f\"Description: {tool.description}\")\n", "print(f\"args schema: {tool.args}\")\n", - "print(f\"returns directly?: {tool.return_direct}\") # Only relevant for agents" + "print(f\"returns directly?: {tool.return_direct}\")" ] }, { @@ -136,7 +124,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 56, "id": "1365784c-e666-41c8-a1bb-e50f822b5936", "metadata": {}, "outputs": [ @@ -176,7 +164,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 57, "id": "6e8850d6-6840-443e-a2be-adf64b30975c", "metadata": {}, "outputs": [ @@ -195,7 +183,7 @@ "print(f\"Name: {tool.name}\")\n", "print(f\"Description: {tool.description}\")\n", "print(f\"args schema: {tool.args}\")\n", - "print(f\"returns directly?: {tool.return_direct}\") # Only relevant for agents" + "print(f\"returns directly?: {tool.return_direct}\")" ] }, { @@ -222,14 +210,6 @@ "tools = toolkit.get_tools()\n", "```" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "b1ec2a6d-02f7-4c91-bf94-189694d00a91", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {