From c659231fb95cc44a87eacae41f10ccbdddbb2ae1 Mon Sep 17 00:00:00 2001 From: Ahmad Elmalah Date: Tue, 24 Dec 2024 13:37:01 +0200 Subject: [PATCH 1/3] Fixing Missing Import from typing_extensions --- docs/docs/how_to/structured_output.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/how_to/structured_output.ipynb b/docs/docs/how_to/structured_output.ipynb index 4eaf09d3569ef..eeba0859f3f07 100644 --- a/docs/docs/how_to/structured_output.ipynb +++ b/docs/docs/how_to/structured_output.ipynb @@ -165,7 +165,7 @@ } ], "source": [ - "from typing_extensions import Annotated, TypedDict\n", + "from typing_extensions import Annotated, TypedDict, Optional\n", "\n", "\n", "# TypedDict\n", From d76a49ad43fee6907d48964fef1b35ab568e014f Mon Sep 17 00:00:00 2001 From: Ahmad Elmalah Date: Tue, 24 Dec 2024 14:00:10 +0200 Subject: [PATCH 2/3] Sorting imported objects --- docs/docs/how_to/structured_output.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/how_to/structured_output.ipynb b/docs/docs/how_to/structured_output.ipynb index eeba0859f3f07..3f8cb7e6b26c4 100644 --- a/docs/docs/how_to/structured_output.ipynb +++ b/docs/docs/how_to/structured_output.ipynb @@ -165,7 +165,7 @@ } ], "source": [ - "from typing_extensions import Annotated, TypedDict, Optional\n", + "from typing_extensions import Annotated, Optional, TypedDict\n", "\n", "\n", "# TypedDict\n", From 04006bd921db8cbf77524cb1ae3b6875d0c39552 Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Thu, 2 Jan 2025 15:56:09 -0800 Subject: [PATCH 3/3] x --- docs/docs/how_to/structured_output.ipynb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/docs/how_to/structured_output.ipynb b/docs/docs/how_to/structured_output.ipynb index 99620fc223fae..66d961491d265 100644 --- a/docs/docs/how_to/structured_output.ipynb +++ b/docs/docs/how_to/structured_output.ipynb @@ -165,7 +165,9 @@ } ], "source": [ - "from typing_extensions import Annotated, Optional, TypedDict\n", + "from typing import Optional\n", + "\n", + "from typing_extensions import Annotated, TypedDict\n", "\n", "\n", "# TypedDict\n", @@ -206,10 +208,10 @@ { "data": { "text/plain": [ - "{'setup': 'Why was the cat sitting on the computer?',\n", - " 'punchline': 'Because it wanted to keep an eye on the mouse!',\n", - " 'rating': 7}" - ] + "{'setup': 'Why was the cat sitting on the computer?',\n", + " 'punchline': 'Because it wanted to keep an eye on the mouse!',\n", + " 'rating': 7}" + ] }, "execution_count": 4, "metadata": {},