Skip to content

Commit 4f45f70

Browse files
committed
Update notebook sample
1 parent 862d9a1 commit 4f45f70

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
"source": [
5353
"import dotenv\n",
5454
"import logging\n",
55-
"from autogen_text_2_sql import AutoGenText2Sql, UserMessagePayload"
55+
"from autogen_text_2_sql import AutoGenText2Sql, UserMessagePayload\n",
56+
"from autogen_text_2_sql.state_store import InMemoryStateStore"
5657
]
5758
},
5859
{
@@ -86,16 +87,10 @@
8687
"metadata": {},
8788
"outputs": [],
8889
"source": [
89-
"agentic_text_2_sql = AutoGenText2Sql(use_case=\"Analysing sales data\")"
90+
"# The state store allows AutoGen to store the states in memory across invocation. Whilst not neccessary, you can replace it with your own implementation that is backed by a database or file system. \n",
91+
"agentic_text_2_sql = AutoGenText2Sql(state_store=InMemoryStateStore(), use_case=\"Analysing sales data\")"
9092
]
9193
},
92-
{
93-
"cell_type": "code",
94-
"execution_count": null,
95-
"metadata": {},
96-
"outputs": [],
97-
"source": []
98-
},
9994
{
10095
"cell_type": "markdown",
10196
"metadata": {},
@@ -109,7 +104,7 @@
109104
"metadata": {},
110105
"outputs": [],
111106
"source": [
112-
"async for message in agentic_text_2_sql.process_user_message(UserMessagePayload(user_message=\"what are the total sales\")):\n",
107+
"async for message in agentic_text_2_sql.process_user_message(thread_id=\"1\", message_payload=UserMessagePayload(user_message=\"what are the total sales\")):\n",
113108
" logging.info(\"Received %s Message from Text2SQL System\", message)"
114109
]
115110
},
@@ -137,7 +132,7 @@
137132
"name": "python",
138133
"nbconvert_exporter": "python",
139134
"pygments_lexer": "ipython3",
140-
"version": "3.12.8"
135+
"version": "3.11.2"
141136
}
142137
},
143138
"nbformat": 4,

0 commit comments

Comments
 (0)