Skip to content

Commit

Permalink
docs: update how-to for built in tools and toolkits (#21828)
Browse files Browse the repository at this point in the history
Fix some typos
  • Loading branch information
eyurtsev committed May 17, 2024
1 parent 2331062 commit 33dbad0
Showing 1 changed file with 14 additions and 34 deletions.
48 changes: 14 additions & 34 deletions docs/docs/how_to/tools_builtin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
]
Expand Down Expand Up @@ -96,31 +84,31 @@
"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": [
{
"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"
]
}
],
"source": [
"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}\")"
]
},
{
Expand All @@ -136,7 +124,7 @@
},
{
"cell_type": "code",
"execution_count": 53,
"execution_count": 56,
"id": "1365784c-e666-41c8-a1bb-e50f822b5936",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -176,7 +164,7 @@
},
{
"cell_type": "code",
"execution_count": 54,
"execution_count": 57,
"id": "6e8850d6-6840-443e-a2be-adf64b30975c",
"metadata": {},
"outputs": [
Expand All @@ -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}\")"
]
},
{
Expand All @@ -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": {
Expand Down

0 comments on commit 33dbad0

Please sign in to comment.