mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-15 12:02:11 +00:00
* Rename tools to built in tools * Merge built in tools and toolkits * Update links from providers
37 lines
1.0 KiB
Plaintext
37 lines
1.0 KiB
Plaintext
# Stack Exchange
|
|
|
|
>[Stack Exchange](https://en.wikipedia.org/wiki/Stack_Exchange) is a network of
|
|
question-and-answer (Q&A) websites on topics in diverse fields, each site covering
|
|
a specific topic, where questions, answers, and users are subject to a reputation award process.
|
|
|
|
This page covers how to use the `Stack Exchange API` within LangChain.
|
|
|
|
## Installation and Setup
|
|
- Install requirements with
|
|
```bash
|
|
pip install stackapi
|
|
```
|
|
|
|
## Wrappers
|
|
|
|
### Utility
|
|
|
|
There exists a StackExchangeAPIWrapper utility which wraps this API. To import this utility:
|
|
|
|
```python
|
|
from langchain_community.utilities import StackExchangeAPIWrapper
|
|
```
|
|
|
|
For a more detailed walkthrough of this wrapper, see [this notebook](/docs/integrations/tools/stackexchange).
|
|
|
|
### Tool
|
|
|
|
You can also easily load this wrapper as a Tool (to use with an Agent).
|
|
You can do this with:
|
|
```python
|
|
from langchain.agents import load_tools
|
|
tools = load_tools(["stackexchange"])
|
|
```
|
|
|
|
For more information on tools, see [this page](/docs/how_to/tools_builtin).
|