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

![image](https://github.com/user-attachments/assets/3a6c48cc-937f-4774-979b-b3da64ced247)

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:
Ahmad Elmalah 2025-01-03 02:05:27 +02:00 committed by GitHub
parent 97dc906a18
commit b258ff1930
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -165,6 +165,8 @@
}
],
"source": [
"from typing import Optional\n",
"\n",
"from typing_extensions import Annotated, TypedDict\n",
"\n",
"\n",