Skip to content

Commit

Permalink
docs: update documentation of stackexchange component (#18486)
Browse files Browse the repository at this point in the history
**Description:** Update documentation of the StackExchange component
**Issue:** None
**Dependencies:** None
  • Loading branch information
sepiatone authored Mar 4, 2024
1 parent 5c387a1 commit 7803b97
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions docs/docs/integrations/tools/stackexchange.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +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"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"pip install stackapi"
"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": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": [
"from langchain_community.utilities import StackExchangeAPIWrapper"
"We first have to install the python package stackapi which implements the Stack Exchange API."
]
},
{
Expand All @@ -37,7 +27,7 @@
"metadata": {},
"outputs": [],
"source": [
"stackexchange = StackExchangeAPIWrapper()"
"pip install --upgrade stackapi"
]
},
{
Expand All @@ -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"
},
Expand All @@ -66,7 +60,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.9.6"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 7803b97

Please sign in to comment.