Skip to content

Commit 4520da9

Browse files
committed
Update notebook
1 parent 492f41b commit 4520da9

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

text_2_sql/autogen/Iteration 5 - Agentic Vector Based Text2SQL.ipynb

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@
99
"Licensed under the MIT License."
1010
]
1111
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": null,
15+
"metadata": {},
16+
"outputs": [],
17+
"source": [
18+
"# This is only needed for this notebook to work\n",
19+
"import sys\n",
20+
"from pathlib import Path\n",
21+
"\n",
22+
"# Add the parent directory of `src` to the path\n",
23+
"sys.path.append(str(Path.cwd() / \"src\"))"
24+
]
25+
},
1226
{
1327
"cell_type": "markdown",
1428
"metadata": {},
@@ -28,20 +42,6 @@
2842
"`uv add --editable text_2_sql_core`"
2943
]
3044
},
31-
{
32-
"cell_type": "code",
33-
"execution_count": null,
34-
"metadata": {},
35-
"outputs": [],
36-
"source": [
37-
"# This is only needed for this notebook to work\n",
38-
"import sys\n",
39-
"from pathlib import Path\n",
40-
"\n",
41-
"# Add the parent directory of `src` to the path\n",
42-
"sys.path.append(str(Path.cwd() / \"src\"))"
43-
]
44-
},
4545
{
4646
"cell_type": "code",
4747
"execution_count": null,
@@ -50,8 +50,7 @@
5050
"source": [
5151
"import dotenv\n",
5252
"import logging\n",
53-
"from autogen_agentchat.ui import Console\n",
54-
"from autogen_text_2_sql.autogen_text_2_sql import AutoGenText2Sql"
53+
"from autogen_text_2_sql import AutoGenText2Sql"
5554
]
5655
},
5756
{
@@ -101,8 +100,8 @@
101100
"metadata": {},
102101
"outputs": [],
103102
"source": [
104-
"result = await agentic_text_2_sql.process_question(task=\"What total number of orders in June 2008?\")\n",
105-
"await Console(result)\n"
103+
"async for message in agentic_text_2_sql.process_question(question=\"What total number of orders in June 2008?\"):\n",
104+
" logging.info(\"Received %s Message from Text2SQL System\", message)"
106105
]
107106
},
108107
{

0 commit comments

Comments
 (0)