mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-06 05:08:20 +00:00
docs: update documentation of stackexchange component (#18486)
**Description:** Update documentation of the StackExchange component **Issue:** None **Dependencies:** None
This commit is contained in:
parent
5c387a173f
commit
7803b973c7
@ -6,11 +6,19 @@
|
||||
"source": [
|
||||
"# StackExchange\n",
|
||||
"\n",
|
||||
"This notebook goes over how to use the stack exchange component.\n",
|
||||
">[Stack Exchange](https://stackexchange.com/) 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. The reputation system allows the sites to be self-moderating.\n",
|
||||
"\n",
|
||||
"All you need to do is install stackapi:\n",
|
||||
"1. pip install stackapi\n",
|
||||
"\n"
|
||||
"The ``StackExchange`` component integrates the StackExchange API into LangChain allowing access to the [StackOverflow](https://stackoverflow.com/) site of the Stack Excchange network. Stack Overflow focuses on computer programming.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"This notebook goes over how to use the ``StackExchange`` component."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We first have to install the python package stackapi which implements the Stack Exchange API."
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -19,25 +27,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"pip install stackapi"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_community.utilities import StackExchangeAPIWrapper"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"stackexchange = StackExchangeAPIWrapper()"
|
||||
"pip install --upgrade stackapi"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -46,13 +36,17 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_community.utilities import StackExchangeAPIWrapper\n",
|
||||
"\n",
|
||||
"stackexchange = StackExchangeAPIWrapper()\n",
|
||||
"\n",
|
||||
"stackexchange.run(\"zsh: command not found: python\")"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
@ -66,7 +60,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
"version": "3.9.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
Loading…
Reference in New Issue
Block a user