Skip to content

Commit 36f8b7c

Browse files
committed
More package changes
1 parent d32ae17 commit 36f8b7c

File tree

14 files changed

+463
-278
lines changed

14 files changed

+463
-278
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ dev = [
1616
]
1717

1818
[tool.uv.workspace]
19-
members = ["text_2_sql/text_2_sql_core", "text_2_sql/autogen", "deploy_ai_search", "adi_function_app"]
19+
members = ["text_2_sql/text_2_sql_core", "text_2_sql/autogen", "deploy_ai_search", "adi_function_app", "text_2_sql/semantic_kernel"]

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

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,41 @@
1919
"\n",
2020
"A multi-shot approach is used for SQL generation for more reliable results and reduced token usage. More details can be found in the README.md.\n",
2121
"\n",
22+
"### Dependencies\n",
23+
"\n",
2224
"To install dependencies:\n",
2325
"\n",
24-
"`uv sync --package autogen`"
26+
"`uv sync --package semantic_kernel_text_2_sql`"
2527
]
2628
},
2729
{
2830
"cell_type": "code",
29-
"execution_count": null,
31+
"execution_count": 4,
3032
"metadata": {},
3133
"outputs": [
3234
{
33-
"ename": "",
34-
"evalue": "",
35+
"ename": "ModuleNotFoundError",
36+
"evalue": "No module named 'grpc'",
3537
"output_type": "error",
3638
"traceback": [
37-
"\u001b[1;31mThe kernel failed to start due to the missing module 'pygments.formatters.terminal256'. Consider installing this module.\n",
38-
"\u001b[1;31mClick <a href='https://aka.ms/kernelFailuresMissingModule'>here</a> for more info."
39+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
40+
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
41+
"Cell \u001b[0;32mIn[4], line 4\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mlogging\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mautogen_agentchat\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mtask\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Console\n\u001b[0;32m----> 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msrc\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mautogen\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mautogen_text_2_sql\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m AutoGenText2Sql\n",
42+
"File \u001b[0;32m/workspaces/dstoolkit-text2sql-and-imageprocessing/text_2_sql/autogen/src/autogen/autogen_text_2_sql.py:4\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Copyright (c) Microsoft Corporation.\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# Licensed under the MIT License.\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mautogen_agentchat\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mtask\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m TextMentionTermination, MaxMessageTermination\n\u001b[0;32m----> 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mautogen_agentchat\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mteams\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m SelectorGroupChat\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mcreators\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mllm_model_creator\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m LLMModelCreator\n\u001b[1;32m 6\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mcreators\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mllm_agent_creator\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m LLMAgentCreator\n",
43+
"File \u001b[0;32m/workspaces/dstoolkit-text2sql-and-imageprocessing/.venv/lib/python3.12/site-packages/autogen_agentchat/teams/__init__.py:1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_group_chat\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_base_group_chat\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m BaseGroupChat\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_group_chat\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_magentic_one\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m MagenticOneGroupChat\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_group_chat\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_round_robin_group_chat\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m RoundRobinGroupChat\n",
44+
"File \u001b[0;32m/workspaces/dstoolkit-text2sql-and-imageprocessing/.venv/lib/python3.12/site-packages/autogen_agentchat/teams/_group_chat/_base_group_chat.py:7\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mabc\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ABC, abstractmethod\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mtyping\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m AsyncGenerator, Callable, List\n\u001b[0;32m----> 7\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mautogen_core\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mapplication\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m SingleThreadedAgentRuntime\n\u001b[1;32m 8\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mautogen_core\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mbase\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m (\n\u001b[1;32m 9\u001b[0m AgentId,\n\u001b[1;32m 10\u001b[0m AgentInstantiationContext,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 14\u001b[0m MessageContext,\n\u001b[1;32m 15\u001b[0m )\n\u001b[1;32m 16\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mautogen_core\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcomponents\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ClosureAgent, TypeSubscription\n",
45+
"File \u001b[0;32m/workspaces/dstoolkit-text2sql-and-imageprocessing/.venv/lib/python3.12/site-packages/autogen_core/application/__init__.py:6\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;124;03mThe :mod:`autogen_core.application` module provides implementations of core components that are used to compose an application\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_single_threaded_agent_runtime\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m SingleThreadedAgentRuntime\n\u001b[0;32m----> 6\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_worker_runtime\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m WorkerAgentRuntime\n\u001b[1;32m 7\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_worker_runtime_host\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m WorkerAgentRuntimeHost\n\u001b[1;32m 9\u001b[0m __all__ \u001b[38;5;241m=\u001b[39m [\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mSingleThreadedAgentRuntime\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mWorkerAgentRuntime\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mWorkerAgentRuntimeHost\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n",
46+
"File \u001b[0;32m/workspaces/dstoolkit-text2sql-and-imageprocessing/.venv/lib/python3.12/site-packages/autogen_core/application/_worker_runtime.py:53\u001b[0m\n\u001b[1;32m 51\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_helpers\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m SubscriptionManager, get_impl\n\u001b[1;32m 52\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01m_utils\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m GRPC_IMPORT_ERROR_STR\n\u001b[0;32m---> 53\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mprotos\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m agent_worker_pb2, agent_worker_pb2_grpc\n\u001b[1;32m 54\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mtelemetry\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m MessageRuntimeTracingConfig, TraceHelper, get_telemetry_grpc_metadata\n\u001b[1;32m 56\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n",
47+
"File \u001b[0;32m/workspaces/dstoolkit-text2sql-and-imageprocessing/.venv/lib/python3.12/site-packages/autogen_core/application/protos/agent_worker_pb2_grpc.py:3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;124;03m\"\"\"Client and server classes corresponding to protobuf-defined services.\"\"\"\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mgrpc\u001b[39;00m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01magent_worker_pb2\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01magent__worker__pb2\u001b[39;00m\n\u001b[1;32m 8\u001b[0m \u001b[38;5;28;01mclass\u001b[39;00m \u001b[38;5;21;01mAgentRpcStub\u001b[39;00m(\u001b[38;5;28mobject\u001b[39m):\n",
48+
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'grpc'"
3949
]
4050
}
4151
],
4252
"source": [
4353
"import dotenv\n",
4454
"import logging\n",
4555
"from autogen_agentchat.task import Console\n",
46-
"from autogen_text_2_sql import AutoGenText2Sql"
56+
"from src.autogen.autogen_text_2_sql import AutoGenText2Sql"
4757
]
4858
},
4959
{

text_2_sql/semantic_kernel/plugins/prompt_based_sql_plugin/__init__.py renamed to text_2_sql/autogen/__init__.py

File renamed without changes.

text_2_sql/autogen/pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[project]
2-
name = "autogen"
2+
name = "autogen_text_2_sql"
33
version = "0.1.0"
4-
description = "Add your description here"
4+
description = "AutoGen Based Implementation"
55
readme = "README.md"
66
requires-python = ">=3.12"
77
dependencies = [
88
"autogen-agentchat==0.4.0.dev7",
99
"autogen-core==0.4.0.dev7",
1010
"autogen-ext[azure,openai]==0.4.0.dev7",
11+
"grpcio>=1.68.1",
1112
"pyyaml>=6.0.2",
1213
]
1314

@@ -18,6 +19,7 @@ dev = [
1819
"jupyter>=1.1.1",
1920
"pre-commit>=4.0.1",
2021
"pygments>=2.18.0",
22+
"python-dotenv>=1.0.1",
2123
"ruff>=0.8.1",
2224
]
2325

text_2_sql/semantic_kernel/plugins/vector_based_sql_plugin/__init__.py renamed to text_2_sql/autogen/src/__init__.py

File renamed without changes.

text_2_sql/semantic_kernel/environment.py

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[project]
2+
name = "semantic_kernel_text_2_sql"
3+
version = "0.1.0"
4+
description = "Semantic Kernel Based Implementation"
5+
readme = "README.md"
6+
requires-python = ">=3.12"
7+
dependencies = [
8+
"grpcio>=1.68.1",
9+
"semantic-kernel==1.9.0",
10+
]
11+
12+
[dependency-groups]
13+
dev = [
14+
"black>=24.10.0",
15+
"ipykernel>=6.29.5",
16+
"jupyter>=1.1.1",
17+
"pre-commit>=4.0.1",
18+
"pygments>=2.18.0",
19+
"python-dotenv>=1.0.1",
20+
"ruff>=0.8.1",
21+
]
22+
23+
[tool.uv.sources]
24+
text_2_sql_core = { path = "text_2_sql/text_2_sql_core" }

text_2_sql/semantic_kernel/requirements.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

text_2_sql/semantic_kernel/utils/__init__.py renamed to text_2_sql/semantic_kernel/src/plugins/prompt_based_sql_plugin/__init__.py

File renamed without changes.

text_2_sql/semantic_kernel/plugins/prompt_based_sql_plugin/prompt_based_sql_plugin.py renamed to text_2_sql/semantic_kernel/src/plugins/prompt_based_sql_plugin/prompt_based_sql_plugin.py

File renamed without changes.

0 commit comments

Comments
 (0)