mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-05 21:12:48 +00:00
improved arxiv (#3495)
Improved `arxiv/tool.py` by adding more specific information to the `description`. It would help with selecting `arxiv` tool between other tools. Improved `arxiv.ipynb` with more useful descriptions.
This commit is contained in:
@@ -40,15 +40,19 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "2a50dd27",
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
"cell_type": "markdown",
|
||||
"id": "c89c110c-96ac-4fe1-ba3e-6056543d1a59",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"arxiv = ArxivAPIWrapper()"
|
||||
"Run a query to get information about some `scientific article`/articles. The query text is limited to 300 characters.\n",
|
||||
"\n",
|
||||
"It returns these article fields:\n",
|
||||
"- Publishing date\n",
|
||||
"- Title\n",
|
||||
"- Authors\n",
|
||||
"- Summary\n",
|
||||
"\n",
|
||||
"Next query returns information about one article with arxiv Id equal \"1605.08386\". "
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -75,6 +79,16 @@
|
||||
"docs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "840f70c9-8f80-4680-bb38-46198e931bcf",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now, we want to get information about one author, `Caprice Stanley`.\n",
|
||||
"\n",
|
||||
"This query returns information about three articles. By default, query returns information only about three top articles."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
@@ -99,6 +113,14 @@
|
||||
"docs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "2d9b6292-a47d-4f99-9827-8e9f244bf887",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now, we are trying to find information about non-existing article. In this case, the response is \"No good Arxiv Result was found\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
@@ -122,14 +144,6 @@
|
||||
"docs = arxiv.run(\"1605.08386WWW\")\n",
|
||||
"docs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "4f4e9602",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
@@ -148,7 +162,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.1"
|
||||
"version": "3.10.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
Reference in New Issue
Block a user