Harrison/searchapi (#14252)

Co-authored-by: SebastjanPrachovskij <86522260+SebastjanPrachovskij@users.noreply.github.com>
This commit is contained in:
Harrison Chase
2023-12-04 16:34:15 -08:00
committed by GitHub
parent 224aa5151d
commit 921c4b5597
8 changed files with 46 additions and 8 deletions

View File

@@ -393,14 +393,24 @@ from langchain.chat_loaders.gmail import GMailLoader
## 3rd Party Integrations
### SearchApi
>[SearchApi](https://www.searchapi.io/) provides a 3rd-party API to access Google search results, YouTube search & transcripts, and other Google-related engines.
See [usage examples and authorization instructions](/docs/integrations/tools/searchapi).
```python
from langchain.utilities import SearchApiAPIWrapper
```
### SerpAPI
>[SerpApi](https://serpapi.com/) provides a 3rd-party API to access Google search results.
See a [usage example and authorization instructions](/docs/integrations/tools/google_serper).
See a [usage example and authorization instructions](/docs/integrations/tools/serpapi).
```python
from langchain.utilities import GoogleSerperAPIWrapper
from langchain.utilities import SerpAPIWrapper
```
### YouTube

View File

@@ -9,7 +9,7 @@
"\n",
"LangChain provides async support for Agents by leveraging the [asyncio](https://docs.python.org/3/library/asyncio.html) library.\n",
"\n",
"Async methods are currently supported for the following `Tool`s: [`GoogleSerperAPIWrapper`](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/utilities/google_serper.py), [`SerpAPIWrapper`](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/utilities/serpapi.py), [`LLMMathChain`](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/chains/llm_math/base.py) and [`Qdrant`](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/vectorstores/qdrant.py). Async support for other agent tools are on the roadmap.\n",
"Async methods are currently supported for the following `Tool`s: [`SearchApiAPIWrapper`](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/utilities/searchapi.py), [`GoogleSerperAPIWrapper`](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/utilities/google_serper.py), [`SerpAPIWrapper`](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/utilities/serpapi.py), [`LLMMathChain`](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/chains/llm_math/base.py) and [`Qdrant`](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/vectorstores/qdrant.py). Async support for other agent tools are on the roadmap.\n",
"\n",
"For `Tool`s that have a `coroutine` implemented (the four mentioned above), the `AgentExecutor` will `await` them directly. Otherwise, the `AgentExecutor` will call the `Tool`'s `func` via `asyncio.get_event_loop().run_in_executor` to avoid blocking the main runloop.\n",
"\n",