docs: update typing -> typing_extensions for TypedDict (#1871)

This commit is contained in:
Vadym Barda
2024-09-26 18:06:45 -04:00
committed by GitHub
parent fe7e7b9121
commit 29a03309c9
30 changed files with 62 additions and 36 deletions
@@ -352,7 +352,8 @@
"metadata": {},
"outputs": [],
"source": [
"from typing import List, TypedDict\n",
"from typing import List\n",
"from typing_extensions import TypedDict\n",
"\n",
"\n",
"class GraphState(TypedDict):\n",
@@ -208,7 +208,8 @@
"source": [
"import functools\n",
"import operator\n",
"from typing import Sequence, TypedDict\n",
"from typing import Sequence\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langchain_core.messages import BaseMessage\n",
"\n",
@@ -198,7 +198,8 @@
"outputs": [],
"source": [
"import operator\n",
"from typing import Annotated, Sequence, TypedDict\n",
"from typing import Annotated, Sequence\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langchain_openai import ChatOpenAI\n",
"\n",
@@ -211,7 +211,8 @@
"outputs": [],
"source": [
"import operator\n",
"from typing import Annotated, List, Tuple, TypedDict\n",
"from typing import Annotated, List, Tuple\n",
"from typing_extensions import TypedDict\n",
"\n",
"\n",
"class PlanExecute(TypedDict):\n",
@@ -155,7 +155,8 @@
"metadata": {},
"outputs": [],
"source": [
"from typing import Annotated, Sequence, TypedDict\n",
"from typing import Annotated, Sequence\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langchain_core.messages import BaseMessage\n",
"\n",
@@ -223,7 +224,8 @@
}
],
"source": [
"from typing import Annotated, Literal, Sequence, TypedDict\n",
"from typing import Annotated, Literal, Sequence\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langchain import hub\n",
"from langchain_core.messages import BaseMessage, HumanMessage\n",
+2 -1
View File
@@ -109,7 +109,8 @@
"metadata": {},
"outputs": [],
"source": [
"from typing import List, TypedDict\n",
"from typing import List\n",
"from typing_extensions import TypedDict\n",
"\n",
"\n",
"class ReWOO(TypedDict):\n",
@@ -167,7 +167,8 @@
"metadata": {},
"outputs": [],
"source": [
"from typing import Optional, TypedDict\n",
"from typing import Optional\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langchain_core.output_parsers import StrOutputParser\n",
"from langchain_openai import ChatOpenAI\n",
@@ -318,7 +319,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.11.9"
}
},
"nbformat": 4,
@@ -307,7 +307,8 @@
"metadata": {},
"outputs": [],
"source": [
"from typing import List, Optional, TypedDict\n",
"from typing import List, Optional\n",
"from typing_extensions import TypedDict\n",
"\n",
"from langchain_core.messages import BaseMessage, SystemMessage\n",
"from playwright.async_api import Page\n",