Skip to content

Commit 6886e91

Browse files
committed
PR comments
1 parent a2f2119 commit 6886e91

File tree

1 file changed

+3
-28
lines changed

1 file changed

+3
-28
lines changed

tutorials/28_Structured_Output_With_OpenAI.ipynb

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"source": [
99
"# Tutorial: Generating Structured Output with OpenAIChatGenerator\n",
1010
"\n",
11-
"- **Level**: Intermediate\n",
11+
"- **Level**: Beginner\n",
1212
"- **Time to complete**: 15 minutes\n",
1313
"- **Prerequisites**: You must have an API key from an active OpenAI account as this tutorial is using the gpt-4o-mini model by OpenAI.\n",
1414
"- **Components Used**: `ChatPromptBuilder`, `OpenAIChatGenerator`, `OpenAIResponsesChatGenerator`\n",
@@ -20,31 +20,6 @@
2020
"Note: Only latest model starting with `gpt-4o-mini` can be used for this feature.\n"
2121
]
2222
},
23-
{
24-
"cell_type": "markdown",
25-
"metadata": {
26-
"id": "jmiAHh1oGsKI"
27-
},
28-
"source": [
29-
"## Preparing the Colab Environment\n",
30-
"\n",
31-
"Enable the debug mode of logging:"
32-
]
33-
},
34-
{
35-
"cell_type": "code",
36-
"execution_count": 8,
37-
"metadata": {
38-
"id": "Vor9IHuNRvEh"
39-
},
40-
"outputs": [],
41-
"source": [
42-
"import logging\n",
43-
"\n",
44-
"logging.basicConfig()\n",
45-
"logging.getLogger(\"canals.pipeline.pipeline\").setLevel(logging.DEBUG)"
46-
]
47-
},
4823
{
4924
"cell_type": "markdown",
5025
"metadata": {
@@ -125,7 +100,7 @@
125100
"id": "Cmjfa8CiCeFl"
126101
},
127102
"source": [
128-
"## Structured outputs in OpenAIChatGenerator\n",
103+
"## Structured Outputs with `OpenAIChatGenerator`\n",
129104
"\n",
130105
"### Using Pydantic Models\n",
131106
"First, we'll see how to pass Pydantic model to `OpenAIChatGenerator`. For this purpose, we define two [Pydantic models](https://docs.pydantic.dev/1.10/usage/models/), `City` and `CitiesData`. These models specify the fields and types that represent the data structure we want."
@@ -441,7 +416,7 @@
441416
"cell_type": "markdown",
442417
"metadata": {},
443418
"source": [
444-
"## Structured outputs in OpenAIResponsesChatGenerator\n",
419+
"## Structured Outputs with `OpenAIResponsesChatGenerator`\n",
445420
"\n",
446421
"### Using Pydantic Models\n",
447422
"We'll use the models City and CitiesData defined above. \n",

0 commit comments

Comments
 (0)