Updated titles, descriptions.

This commit is contained in:
leo-gan 2023-08-29 15:40:12 -07:00
parent d799963870
commit 8c1678a8c7
16 changed files with 211 additions and 233 deletions

View File

@ -5,9 +5,9 @@
"id": "245a954a", "id": "245a954a",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# ArXiv API Tool\n", "# ArXiv\n",
"\n", "\n",
"This notebook goes over how to use the `arxiv` component. \n", "This notebook goes over how to use the `arxiv` tool with an agent. \n",
"\n", "\n",
"First, you need to install `arxiv` python package." "First, you need to install `arxiv` python package."
] ]
@ -110,7 +110,7 @@
"source": [ "source": [
"## The ArXiv API Wrapper\n", "## The ArXiv API Wrapper\n",
"\n", "\n",
"The tool wraps the API Wrapper. Below, we can explore some of the features it provides." "The tool uses the `API Wrapper`. Below, we explore some of the features it provides."
] ]
}, },
{ {
@ -167,7 +167,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "840f70c9-8f80-4680-bb38-46198e931bcf", "id": "840f70c9-8f80-4680-bb38-46198e931bcf",
"metadata": {}, "metadata": {},
@ -250,7 +249,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.4" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -1,25 +1,23 @@
{ {
"cells": [ "cells": [
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# AWS Lambda API" "# AWS Lambda"
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"This notebook goes over how to use the AWS Lambda Tool component.\n", ">`Amazon AWS Lambda` is a serverless computing service provided by `Amazon Web Services` (`AWS`). It helps developers to build and run applications and services without provisioning or managing servers. This serverless architecture enables you to focus on writing and deploying code, while AWS automatically takes care of scaling, patching, and managing the infrastructure required to run your applications.\n",
"\n", "\n",
"AWS Lambda is a serverless computing service provided by Amazon Web Services (AWS), designed to allow developers to build and run applications and services without the need for provisioning or managing servers. This serverless architecture enables you to focus on writing and deploying code, while AWS automatically takes care of scaling, patching, and managing the infrastructure required to run your applications.\n", "This notebook goes over how to use the `AWS Lambda` Tool.\n",
"\n", "\n",
"By including a `awslambda` in the list of tools provided to an Agent, you can grant your Agent the ability to invoke code running in your AWS Cloud for whatever purposes you need.\n", "By including a `awslambda` in the list of tools provided to an Agent, you can grant your Agent the ability to invoke code running in your AWS Cloud for whatever purposes you need.\n",
"\n", "\n",
"When an Agent uses the awslambda tool, it will provide an argument of type string which will in turn be passed into the Lambda function via the event parameter.\n", "When an Agent uses the `AWS Lambda` tool, it will provide an argument of type string which will in turn be passed into the Lambda function via the event parameter.\n",
"\n", "\n",
"First, you need to install `boto3` python package." "First, you need to install `boto3` python package."
] ]
@ -38,7 +36,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -48,7 +45,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -98,7 +94,7 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": ".venv", "display_name": "Python 3 (ipykernel)",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
}, },
@ -112,10 +108,9 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.2" "version": "3.10.12"
}, }
"orig_nbformat": 4
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 2 "nbformat_minor": 4
} }

View File

@ -5,11 +5,13 @@
"id": "8f210ec3", "id": "8f210ec3",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# Shell Tool\n", "# Shell (bash)\n",
"\n", "\n",
"Giving agents access to the shell is powerful (though risky outside a sandboxed environment).\n", "Giving agents access to the shell is powerful (though risky outside a sandboxed environment).\n",
"\n", "\n",
"The LLM can use it to execute any shell commands. A common use case for this is letting the LLM interact with your local file system." "The LLM can use it to execute any shell commands. A common use case for this is letting the LLM interact with your local file system.\n",
"\n",
"**Note:** Shell tool does not work with Windows OS."
] ]
}, },
{ {
@ -184,7 +186,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.8.16" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -1,12 +1,12 @@
{ {
"cells": [ "cells": [
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# DataForSeo API Wrapper\n", "# DataForSeo\n",
"This notebook demonstrates how to use the DataForSeo API wrapper to obtain search engine results. The DataForSeo API allows users to retrieve SERP from most popular search engines like Google, Bing, Yahoo. It also allows to get SERPs from different search engine types like Maps, News, Events, etc.\n" "\n",
"This notebook demonstrates how to use the `DataForSeo API` to obtain search engine results. The `DataForSeo API` retrieves `SERP` from most popular search engines like `Google`, `Bing`, `Yahoo`. It also allows to get SERPs from different search engine types like `Maps`, `News`, `Events`, etc.\n"
] ]
}, },
{ {
@ -19,12 +19,12 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"## Setting up the API wrapper with your credentials\n", "## Setting up the API credentials\n",
"You can obtain your API credentials by registering on the DataForSeo website." "\n",
"You can obtain your API credentials by registering on the `DataForSeo` website."
] ]
}, },
{ {
@ -42,7 +42,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -59,7 +58,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -72,7 +70,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -103,7 +100,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -127,7 +123,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -151,7 +146,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -178,7 +172,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -214,7 +207,7 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 3 (ipykernel)",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
}, },
@ -228,10 +221,9 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.11" "version": "3.10.12"
}, }
"orig_nbformat": 4
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 2 "nbformat_minor": 4
} }

View File

@ -4,11 +4,11 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# File System Tools\n", "# File System\n",
"\n", "\n",
"LangChain provides tools for interacting with a local file system out of the box. This notebook walks through some of them.\n", "LangChain provides tools for interacting with a local file system out of the box. This notebook walks through some of them.\n",
"\n", "\n",
"Note: these tools are not recommended for use outside a sandboxed environment! " "**Note:** these tools are not recommended for use outside a sandboxed environment! "
] ]
}, },
{ {
@ -187,7 +187,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.2" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -5,32 +5,35 @@
"id": "dc23c48e", "id": "dc23c48e",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# Google Serper API\n", "# Google Serper\n",
"\n", "\n",
"This notebook goes over how to use the Google Serper component to search the web. First you need to sign up for a free account at [serper.dev](https://serper.dev) and get your api key." "This notebook goes over how to use the `Google Serper` component to search the web. First you need to sign up for a free account at [serper.dev](https://serper.dev) and get your api key."
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": 11,
"id": "a8acfb24",
"metadata": {
"ExecuteTime": {
"end_time": "2023-05-04T00:56:29.336521Z",
"start_time": "2023-05-04T00:56:29.334173Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"pycharm": {
"is_executing": true
}
},
"outputs": [], "outputs": [],
"source": [ "source": [
"import os\n", "import os\n",
"import pprint\n", "import pprint\n",
"\n", "\n",
"os.environ[\"SERPER_API_KEY\"] = \"\"" "os.environ[\"SERPER_API_KEY\"] = \"\""
], ]
"metadata": {
"collapsed": false,
"pycharm": {
"is_executing": true
},
"ExecuteTime": {
"end_time": "2023-05-04T00:56:29.336521Z",
"start_time": "2023-05-04T00:56:29.334173Z"
}
},
"id": "a8acfb24"
}, },
{ {
"cell_type": "code", "cell_type": "code",
@ -75,7 +78,9 @@
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": "'Barack Hussein Obama II'" "text/plain": [
"'Barack Hussein Obama II'"
]
}, },
"execution_count": 4, "execution_count": 4,
"metadata": {}, "metadata": {},
@ -88,33 +93,41 @@
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "1f1c6c22",
"metadata": {},
"source": [ "source": [
"## As part of a Self Ask With Search Chain" "## As part of a Self Ask With Search Chain"
], ]
"metadata": {
"collapsed": false
},
"id": "1f1c6c22"
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": 5,
"outputs": [], "id": "c1b5edd7",
"source": [
"os.environ[\"OPENAI_API_KEY\"] = \"\""
],
"metadata": { "metadata": {
"collapsed": false,
"ExecuteTime": { "ExecuteTime": {
"end_time": "2023-05-04T00:54:14.311773Z", "end_time": "2023-05-04T00:54:14.311773Z",
"start_time": "2023-05-04T00:54:14.304389Z" "start_time": "2023-05-04T00:54:14.304389Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
} }
}, },
"id": "c1b5edd7" "outputs": [],
"source": [
"os.environ[\"OPENAI_API_KEY\"] = \"\""
]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": 5,
"id": "a8ccea61",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
@ -135,7 +148,9 @@
}, },
{ {
"data": { "data": {
"text/plain": "'El Palmar, Spain'" "text/plain": [
"'El Palmar, Spain'"
]
}, },
"execution_count": 5, "execution_count": 5,
"metadata": {}, "metadata": {},
@ -164,26 +179,34 @@
"self_ask_with_search.run(\n", "self_ask_with_search.run(\n",
" \"What is the hometown of the reigning men's U.S. Open champion?\"\n", " \"What is the hometown of the reigning men's U.S. Open champion?\"\n",
")" ")"
], ]
"metadata": {
"collapsed": false
},
"id": "a8ccea61"
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "3aee3682",
"metadata": {},
"source": [ "source": [
"## Obtaining results with metadata\n", "## Obtaining results with metadata\n",
"If you would also like to obtain the results in a structured way including metadata. For this we will be using the `results` method of the wrapper." "If you would also like to obtain the results in a structured way including metadata. For this we will be using the `results` method of the wrapper."
], ]
"metadata": {
"collapsed": false
},
"id": "3aee3682"
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": 6,
"id": "073c3fc5",
"metadata": {
"ExecuteTime": {
"end_time": "2023-05-04T00:54:22.863413Z",
"start_time": "2023-05-04T00:54:20.827395Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
},
"pycharm": {
"is_executing": true
}
},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
@ -344,33 +367,31 @@
"search = GoogleSerperAPIWrapper()\n", "search = GoogleSerperAPIWrapper()\n",
"results = search.results(\"Apple Inc.\")\n", "results = search.results(\"Apple Inc.\")\n",
"pprint.pp(results)" "pprint.pp(results)"
], ]
"metadata": {
"collapsed": false,
"pycharm": {
"is_executing": true
},
"ExecuteTime": {
"end_time": "2023-05-04T00:54:22.863413Z",
"start_time": "2023-05-04T00:54:20.827395Z"
}
},
"id": "073c3fc5"
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "b402c308",
"metadata": {},
"source": [ "source": [
"## Searching for Google Images\n", "## Searching for Google Images\n",
"We can also query Google Images using this wrapper. For example:" "We can also query Google Images using this wrapper. For example:"
], ]
"metadata": {
"collapsed": false
},
"id": "b402c308"
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": 7,
"id": "7fb2b7e2",
"metadata": {
"ExecuteTime": {
"end_time": "2023-05-04T00:54:27.879867Z",
"start_time": "2023-05-04T00:54:26.380022Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
@ -501,30 +522,31 @@
"search = GoogleSerperAPIWrapper(type=\"images\")\n", "search = GoogleSerperAPIWrapper(type=\"images\")\n",
"results = search.results(\"Lion\")\n", "results = search.results(\"Lion\")\n",
"pprint.pp(results)" "pprint.pp(results)"
], ]
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-05-04T00:54:27.879867Z",
"start_time": "2023-05-04T00:54:26.380022Z"
}
},
"id": "7fb2b7e2"
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "85a3bed3",
"metadata": {},
"source": [ "source": [
"## Searching for Google News\n", "## Searching for Google News\n",
"We can also query Google News using this wrapper. For example:" "We can also query Google News using this wrapper. For example:"
], ]
"metadata": {
"collapsed": false
},
"id": "85a3bed3"
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 8,
"id": "afc48b39",
"metadata": {
"ExecuteTime": {
"end_time": "2023-05-04T00:54:34.984087Z",
"start_time": "2023-05-04T00:54:33.369231Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
@ -630,29 +652,30 @@
"search = GoogleSerperAPIWrapper(type=\"news\")\n", "search = GoogleSerperAPIWrapper(type=\"news\")\n",
"results = search.results(\"Tesla Inc.\")\n", "results = search.results(\"Tesla Inc.\")\n",
"pprint.pp(results)" "pprint.pp(results)"
], ]
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-05-04T00:54:34.984087Z",
"start_time": "2023-05-04T00:54:33.369231Z"
}
},
"id": "afc48b39"
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "d42ee7b5",
"metadata": {},
"source": [ "source": [
"If you want to only receive news articles published in the last hour, you can do the following:" "If you want to only receive news articles published in the last hour, you can do the following:"
], ]
"metadata": {
"collapsed": false
},
"id": "d42ee7b5"
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": 9,
"id": "8e3824cb",
"metadata": {
"ExecuteTime": {
"end_time": "2023-05-04T00:54:41.786864Z",
"start_time": "2023-05-04T00:54:40.691905Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
@ -701,18 +724,12 @@
"search = GoogleSerperAPIWrapper(type=\"news\", tbs=\"qdr:h\")\n", "search = GoogleSerperAPIWrapper(type=\"news\", tbs=\"qdr:h\")\n",
"results = search.results(\"Tesla Inc.\")\n", "results = search.results(\"Tesla Inc.\")\n",
"pprint.pp(results)" "pprint.pp(results)"
], ]
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-05-04T00:54:41.786864Z",
"start_time": "2023-05-04T00:54:40.691905Z"
}
},
"id": "8e3824cb"
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "3f13e9f9",
"metadata": {},
"source": [ "source": [
"Some examples of the `tbs` parameter:\n", "Some examples of the `tbs` parameter:\n",
"\n", "\n",
@ -730,26 +747,31 @@
"`qdr:m2` (past 2 years)\n", "`qdr:m2` (past 2 years)\n",
"\n", "\n",
"For all supported filters simply go to [Google Search](https://google.com), search for something, click on \"Tools\", add your date filter and check the URL for \"tbs=\".\n" "For all supported filters simply go to [Google Search](https://google.com), search for something, click on \"Tools\", add your date filter and check the URL for \"tbs=\".\n"
], ]
"metadata": {
"collapsed": false
},
"id": "3f13e9f9"
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "38d4402c",
"metadata": {},
"source": [ "source": [
"## Searching for Google Places\n", "## Searching for Google Places\n",
"We can also query Google Places using this wrapper. For example:" "We can also query Google Places using this wrapper. For example:"
], ]
"metadata": {
"collapsed": false
},
"id": "38d4402c"
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10, "execution_count": 10,
"id": "e7881203",
"metadata": {
"ExecuteTime": {
"end_time": "2023-05-04T00:56:07.271164Z",
"start_time": "2023-05-04T00:56:05.645847Z"
},
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
@ -858,15 +880,7 @@
"search = GoogleSerperAPIWrapper(type=\"places\")\n", "search = GoogleSerperAPIWrapper(type=\"places\")\n",
"results = search.results(\"Italian restaurants in Upper East Side\")\n", "results = search.results(\"Italian restaurants in Upper East Side\")\n",
"pprint.pp(results)" "pprint.pp(results)"
], ]
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-05-04T00:56:07.271164Z",
"start_time": "2023-05-04T00:56:05.645847Z"
}
},
"id": "e7881203"
} }
], ],
"metadata": { "metadata": {
@ -885,9 +899,9 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.9" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 5 "nbformat_minor": 5
} }

View File

@ -5,11 +5,11 @@
"id": "c613812f", "id": "c613812f",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# Gradio Tools\n", "# Gradio\n",
"\n", "\n",
"There are many 1000s of Gradio apps on Hugging Face Spaces. This library puts them at the tips of your LLM's fingers 🦾\n", "There are many 1000s of `Gradio` apps on `Hugging Face Spaces`. This library puts them at the tips of your LLM's fingers 🦾\n",
"\n", "\n",
"Specifically, gradio-tools is a Python library for converting Gradio apps into tools that can be leveraged by a large language model (LLM)-based agent to complete its task. For example, an LLM could use a Gradio tool to transcribe a voice recording it finds online and then summarize it for you. Or it could use a different Gradio tool to apply OCR to a document on your Google Drive and then answer questions about it.\n", "Specifically, `gradio-tools` is a Python library for converting `Gradio` apps into tools that can be leveraged by a large language model (LLM)-based agent to complete its task. For example, an LLM could use a `Gradio` tool to transcribe a voice recording it finds online and then summarize it for you. Or it could use a different `Gradio` tool to apply OCR to a document on your Google Drive and then answer questions about it.\n",
"\n", "\n",
"It's very easy to create you own tool if you want to use a space that's not one of the pre-built tools. Please see this section of the gradio-tools documentation for information on how to do that. All contributions are welcome!" "It's very easy to create you own tool if you want to use a space that's not one of the pre-built tools. Please see this section of the gradio-tools documentation for information on how to do that. All contributions are welcome!"
] ]
@ -99,9 +99,7 @@
"cell_type": "code", "cell_type": "code",
"execution_count": 13, "execution_count": 13,
"id": "98e1e602", "id": "98e1e602",
"metadata": { "metadata": {},
"scrolled": false
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
@ -244,7 +242,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.9.1" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -4,17 +4,17 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# GraphQL\n",
"\n", "\n",
"# GraphQL tool\n", ">[GraphQL](https://graphql.org/) is a query language for APIs and a runtime for executing those queries against your data. `GraphQL` provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.\n",
"This Jupyter Notebook demonstrates how to use the BaseGraphQLTool component with an Agent.\n",
"\n", "\n",
"GraphQL is a query language for APIs and a runtime for executing those queries against your data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.\n", "By including a `BaseGraphQLTool` in the list of tools provided to an Agent, you can grant your Agent the ability to query data from GraphQL APIs for any purposes you need.\n",
"\n", "\n",
"By including a BaseGraphQLTool in the list of tools provided to an Agent, you can grant your Agent the ability to query data from GraphQL APIs for any purposes you need.\n", "This Jupyter Notebook demonstrates how to use the `GraphQLAPIWrapper` component with an Agent.\n",
"\n", "\n",
"In this example, we'll be using the public Star Wars GraphQL API available at the following endpoint: https://swapi-graphql.netlify.app/.netlify/functions/index.\n", "In this example, we'll be using the public `Star Wars GraphQL API` available at the following endpoint: https://swapi-graphql.netlify.app/.netlify/functions/index.\n",
"\n", "\n",
"First, you need to install httpx and gql Python packages." "First, you need to install `httpx` and `gql` Python packages."
] ]
}, },
{ {
@ -131,7 +131,7 @@
"hash": "f85209c3c4c190dca7367d6a1e623da50a9a4392fd53313a7cf9d4bda9c4b85b" "hash": "f85209c3c4c190dca7367d6a1e623da50a9a4392fd53313a7cf9d4bda9c4b85b"
}, },
"kernelspec": { "kernelspec": {
"display_name": "Python 3.9.16 ('langchain')", "display_name": "Python 3 (ipykernel)",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
}, },
@ -145,10 +145,9 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.9.16" "version": "3.10.12"
}, }
"orig_nbformat": 4
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 2 "nbformat_minor": 4
} }

View File

@ -5,9 +5,9 @@
"id": "40a27d3c-4e5c-4b96-b290-4c49d4fd7219", "id": "40a27d3c-4e5c-4b96-b290-4c49d4fd7219",
"metadata": {}, "metadata": {},
"source": [ "source": [
"## HuggingFace Tools\n", "# HuggingFace Hub Tools\n",
"\n", "\n",
"[Huggingface Tools](https://huggingface.co/docs/transformers/v4.29.0/en/custom_tools) supporting text I/O can be\n", ">[Huggingface Tools](https://huggingface.co/docs/transformers/v4.29.0/en/custom_tools) that supporting text I/O can be\n",
"loaded directly using the `load_huggingface_tool` function." "loaded directly using the `load_huggingface_tool` function."
] ]
}, },
@ -94,7 +94,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.2" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -1,24 +1,23 @@
{ {
"cells": [ "cells": [
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "16763ed3", "id": "16763ed3",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# Lemon AI NLP Workflow Automation\n", "# Lemon Agent\n",
"\\\n", "\n",
"Full docs are available at: https://github.com/felixbrock/lemonai-py-client\n", ">[Lemon Agent](https://github.com/felixbrock/lemon-agent) helps you build powerful AI assistants in minutes and automate workflows by allowing for accurate and reliable read and write operations in tools like `Airtable`, `Hubspot`, `Discord`, `Notion`, `Slack` and `Github`.\n",
"\n",
"See [full docs here](https://github.com/felixbrock/lemonai-py-client).\n",
"\n", "\n",
"**Lemon AI helps you build powerful AI assistants in minutes and automate workflows by allowing for accurate and reliable read and write operations in tools like Airtable, Hubspot, Discord, Notion, Slack and Github.**\n",
"\n", "\n",
"Most connectors available today are focused on read-only operations, limiting the potential of LLMs. Agents, on the other hand, have a tendency to hallucinate from time to time due to missing context or instructions.\n", "Most connectors available today are focused on read-only operations, limiting the potential of LLMs. Agents, on the other hand, have a tendency to hallucinate from time to time due to missing context or instructions.\n",
"\n", "\n",
"With Lemon AI, it is possible to give your agents access to well-defined APIs for reliable read and write operations. In addition, Lemon AI functions allow you to further reduce the risk of hallucinations by providing a way to statically define workflows that the model can rely on in case of uncertainty." "With `Lemon AI`, it is possible to give your agents access to well-defined APIs for reliable read and write operations. In addition, `Lemon AI` functions allow you to further reduce the risk of hallucinations by providing a way to statically define workflows that the model can rely on in case of uncertainty."
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "4881b484-1b97-478f-b206-aec407ceff66", "id": "4881b484-1b97-478f-b206-aec407ceff66",
"metadata": {}, "metadata": {},
@ -29,7 +28,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "ff91b41a", "id": "ff91b41a",
"metadata": {}, "metadata": {},
@ -46,7 +44,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "340ff63d", "id": "340ff63d",
"metadata": {}, "metadata": {},
@ -57,7 +54,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "e845f402", "id": "e845f402",
"metadata": {}, "metadata": {},
@ -66,7 +62,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "d3ae6a82", "id": "d3ae6a82",
"metadata": {}, "metadata": {},
@ -75,7 +70,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "43476a22", "id": "43476a22",
"metadata": {}, "metadata": {},
@ -84,7 +78,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "cb038670", "id": "cb038670",
"metadata": {}, "metadata": {},
@ -93,7 +86,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "e423ebbb", "id": "e423ebbb",
"metadata": {}, "metadata": {},
@ -110,7 +102,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "3fdb36ce", "id": "3fdb36ce",
"metadata": {}, "metadata": {},
@ -119,7 +110,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "ebfb8b5d", "id": "ebfb8b5d",
"metadata": {}, "metadata": {},
@ -140,7 +130,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "c9d082cb", "id": "c9d082cb",
"metadata": {}, "metadata": {},
@ -189,7 +178,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"id": "aef3e801", "id": "aef3e801",
"metadata": {}, "metadata": {},
@ -225,7 +213,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.9.1" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -1,17 +1,16 @@
{ {
"cells": [ "cells": [
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# Nuclia Understanding API tool\n", "# Nuclia Understanding\n",
"\n", "\n",
"[Nuclia](https://nuclia.com) automatically indexes your unstructured data from any internal and external source, providing optimized search results and generative answers. It can handle video and audio transcription, image content extraction, and document parsing.\n", ">[Nuclia](https://nuclia.com) automatically indexes your unstructured data from any internal and external source, providing optimized search results and generative answers. It can handle video and audio transcription, image content extraction, and document parsing.\n",
"\n", "\n",
"The Nuclia Understanding API supports the processing of unstructured data, including text, web pages, documents, and audio/video contents. It extracts all texts wherever it is (using speech-to-text or OCR when needed), it identifies entities, it aslo extracts metadata, embedded files (like images in a PDF), and web links. It also provides a summary of the content.\n", "The `Nuclia Understanding API` supports the processing of unstructured data, including text, web pages, documents, and audio/video contents. It extracts all texts wherever it is (using speech-to-text or OCR when needed), it identifies entities, it aslo extracts metadata, embedded files (like images in a PDF), and web links. It also provides a summary of the content.\n",
"\n", "\n",
"To use the Nuclia Understanding API, you need to have a Nuclia account. You can create one for free at [https://nuclia.cloud](https://nuclia.cloud), and then [create a NUA key](https://docs.nuclia.dev/docs/docs/using/understanding/intro)." "To use the `Nuclia Understanding API`, you need to have a `Nuclia` account. You can create one for free at [https://nuclia.cloud](https://nuclia.cloud), and then [create a NUA key](https://docs.nuclia.dev/docs/docs/using/understanding/intro)."
] ]
}, },
{ {
@ -48,7 +47,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -66,7 +64,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -94,7 +91,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -121,7 +117,6 @@
] ]
}, },
{ {
"attachments": {},
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
@ -150,7 +145,7 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "langchain", "display_name": "Python 3 (ipykernel)",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
}, },
@ -164,10 +159,9 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.5" "version": "3.10.12"
}, }
"orig_nbformat": 4
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 2 "nbformat_minor": 4
} }

View File

@ -5,11 +5,11 @@
"id": "245a954a", "id": "245a954a",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# OpenWeatherMap API\n", "# OpenWeatherMap\n",
"\n", "\n",
"This notebook goes over how to use the OpenWeatherMap component to fetch weather information.\n", "This notebook goes over how to use the `OpenWeatherMap` component to fetch weather information.\n",
"\n", "\n",
"First, you need to sign up for an OpenWeatherMap API key:\n", "First, you need to sign up for an `OpenWeatherMap API` key:\n",
"\n", "\n",
"1. Go to OpenWeatherMap and sign up for an API key [here](https://openweathermap.org/api/)\n", "1. Go to OpenWeatherMap and sign up for an API key [here](https://openweathermap.org/api/)\n",
"2. pip install pyowm\n", "2. pip install pyowm\n",
@ -162,7 +162,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.8.16" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -5,11 +5,11 @@
"id": "64f20f38", "id": "64f20f38",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# PubMed Tool\n", "# PubMed\n",
"\n", "\n",
"This notebook goes over how to use PubMed as a tool\n", ">[PubMed®](https://pubmed.ncbi.nlm.nih.gov/) comprises more than 35 million citations for biomedical literature from `MEDLINE`, life science journals, and online books. Citations may include links to full text content from PubMed Central and publisher web sites.\n",
"\n", "\n",
"PubMed® comprises more than 35 million citations for biomedical literature from MEDLINE, life science journals, and online books. Citations may include links to full text content from PubMed Central and publisher web sites." "This notebook goes over how to use `PubMed` as a tool."
] ]
}, },
{ {
@ -78,7 +78,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.9.1" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -6,11 +6,11 @@
"jukit_cell_id": "DUXgyWySl5" "jukit_cell_id": "DUXgyWySl5"
}, },
"source": [ "source": [
"# SearxNG Search API\n", "# SearxNG Search\n",
"\n", "\n",
"This notebook goes over how to use a self hosted SearxNG search API to search the web.\n", "This notebook goes over how to use a self hosted `SearxNG` search API to search the web.\n",
"\n", "\n",
"You can [check this link](https://docs.searxng.org/dev/search_api.html) for more informations about Searx API parameters." "You can [check this link](https://docs.searxng.org/dev/search_api.html) for more informations about `Searx API` parameters."
] ]
}, },
{ {
@ -611,7 +611,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.9.1" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -5,9 +5,9 @@
"id": "acb64858", "id": "acb64858",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# YouTubeSearchTool\n", "# YouTube (youtube_search)\n",
"\n", "\n",
"This notebook shows how to use a tool to search YouTube\n", "This notebook shows how to use a tool to search `YouTube` using `youtube_search` package.\n",
"\n", "\n",
"Adapted from [https://github.com/venuv/langchain_yt_tools](https://github.com/venuv/langchain_yt_tools)" "Adapted from [https://github.com/venuv/langchain_yt_tools](https://github.com/venuv/langchain_yt_tools)"
] ]
@ -117,7 +117,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.9.1" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -5,15 +5,12 @@
"id": "16763ed3", "id": "16763ed3",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# Zapier Natural Language Actions API\n", "# Zapier Natural Language Actions\n",
"\\\n",
"Full docs here: https://nla.zapier.com/start/\n",
"\n", "\n",
"**Zapier Natural Language Actions** gives you access to the 5k+ apps, 20k+ actions on Zapier's platform through a natural language API interface.\n", ">[Zapier Natural Language Actions](https://nla.zapier.com/start/) gives you access to the 5k+ apps, 20k+ actions on Zapier's platform through a natural language API interface.\n",
"\n", ">\n",
"NLA supports apps like Gmail, Salesforce, Trello, Slack, Asana, HubSpot, Google Sheets, Microsoft Teams, and thousands more apps: https://zapier.com/apps\n", ">NLA supports apps like `Gmail`, `Salesforce`, `Trello`, `Slack`, `Asana`, `HubSpot`, `Google Sheets`, `Microsoft Teams`, and thousands more apps: https://zapier.com/apps\n",
"\n", ">`Zapier NLA` handles ALL the underlying API auth and translation from natural language --> underlying API call --> return simplified output for LLMs. The key idea is you, or your users, expose a set of actions via an oauth-like setup window, which you can then query and execute via a REST API.\n",
"Zapier NLA handles ALL the underlying API auth and translation from natural language --> underlying API call --> return simplified output for LLMs. The key idea is you, or your users, expose a set of actions via an oauth-like setup window, which you can then query and execute via a REST API.\n",
"\n", "\n",
"NLA offers both API Key and OAuth for signing NLA API requests.\n", "NLA offers both API Key and OAuth for signing NLA API requests.\n",
"\n", "\n",
@ -21,7 +18,7 @@
"\n", "\n",
"2. User-facing (Oauth): for production scenarios where you are deploying an end-user facing application and LangChain needs access to end-user's exposed actions and connected accounts on Zapier.com\n", "2. User-facing (Oauth): for production scenarios where you are deploying an end-user facing application and LangChain needs access to end-user's exposed actions and connected accounts on Zapier.com\n",
"\n", "\n",
"This quick start will focus mostly on the server-side use case for brevity. Jump to [Example Using OAuth Access Token](#oauth) to see a short example how to set up Zapier for user-facing situations. Review [full docs](https://nla.zapier.com/start/) for full user-facing oauth developer support.\n", "This quick start focus mostly on the server-side use case for brevity. Jump to [Example Using OAuth Access Token](#oauth) to see a short example how to set up Zapier for user-facing situations. Review [full docs](https://nla.zapier.com/start/) for full user-facing oauth developer support.\n",
"\n", "\n",
"This example goes over how to use the Zapier integration with a `SimpleSequentialChain`, then an `Agent`.\n", "This example goes over how to use the Zapier integration with a `SimpleSequentialChain`, then an `Agent`.\n",
"In code, below:" "In code, below:"
@ -369,7 +366,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.9.1" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,