mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-30 10:23:30 +00:00
Docs: Add 'Optional' to installation section to fix an issue (#28902)
Problem: "Optional" object is used in one example without importing, which raises the following error when copying the example into IDE or Jupyter Lab  Solution: Just importing Optional from typing_extensions module, this solves the problem! --------- Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
parent
97dc906a18
commit
b258ff1930
@ -165,6 +165,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
|
"from typing import Optional\n",
|
||||||
|
"\n",
|
||||||
"from typing_extensions import Annotated, TypedDict\n",
|
"from typing_extensions import Annotated, TypedDict\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
@ -206,10 +208,10 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"{'setup': 'Why was the cat sitting on the computer?',\n",
|
"{'setup': 'Why was the cat sitting on the computer?',\n",
|
||||||
" 'punchline': 'Because it wanted to keep an eye on the mouse!',\n",
|
" 'punchline': 'Because it wanted to keep an eye on the mouse!',\n",
|
||||||
" 'rating': 7}"
|
" 'rating': 7}"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 4,
|
"execution_count": 4,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
|
Loading…
Reference in New Issue
Block a user