ag2 0.8.0b1__tar.gz → 0.8.2rc0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ag2 might be problematic. Click here for more details.
- {ag2-0.8.0b1/ag2.egg-info → ag2-0.8.2rc0}/PKG-INFO +4 -1
- {ag2-0.8.0b1 → ag2-0.8.2rc0/ag2.egg-info}/PKG-INFO +4 -1
- ag2-0.8.2rc0/ag2.egg-info/requires.txt +154 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/pyproject.toml +60 -22
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/setup_ag2.py +3 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/test/test_code_utils.py +12 -47
- ag2-0.8.2rc0/test/test_import_utils.py +451 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/test/test_logging.py +4 -4
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/test/test_notebook.py +21 -21
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/test/test_retrieve_utils.py +10 -4
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/test/test_token_count.py +2 -2
- ag2-0.8.0b1/ag2.egg-info/requires.txt +0 -145
- ag2-0.8.0b1/test/test_import_utils.py +0 -200
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/LICENSE +0 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/NOTICE.md +0 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/README.md +0 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/ag2.egg-info/SOURCES.txt +0 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/ag2.egg-info/dependency_links.txt +0 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/ag2.egg-info/top_level.txt +0 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/setup.cfg +0 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/test/test_browser_utils.py +0 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/test/test_conftest.py +0 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/test/test_graph_utils.py +0 -0
- {ag2-0.8.0b1 → ag2-0.8.2rc0}/test/test_import.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ag2
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.2rc0
|
|
4
4
|
Summary: Alias package for pyautogen
|
|
5
5
|
Home-page: https://github.com/ag2ai/ag2
|
|
6
6
|
Author: Chi Wang & Qingyun Wu
|
|
@@ -25,6 +25,7 @@ Provides-Extra: graph-rag-falkor-db
|
|
|
25
25
|
Provides-Extra: rag
|
|
26
26
|
Provides-Extra: crawl4ai
|
|
27
27
|
Provides-Extra: browser-use
|
|
28
|
+
Provides-Extra: google-search
|
|
28
29
|
Provides-Extra: neo4j
|
|
29
30
|
Provides-Extra: twilio
|
|
30
31
|
Provides-Extra: interop-crewai
|
|
@@ -39,6 +40,7 @@ Provides-Extra: teachable
|
|
|
39
40
|
Provides-Extra: lmm
|
|
40
41
|
Provides-Extra: graph
|
|
41
42
|
Provides-Extra: gemini
|
|
43
|
+
Provides-Extra: gemini-realtime
|
|
42
44
|
Provides-Extra: together
|
|
43
45
|
Provides-Extra: websurfer
|
|
44
46
|
Provides-Extra: redis
|
|
@@ -52,6 +54,7 @@ Provides-Extra: groq
|
|
|
52
54
|
Provides-Extra: cohere
|
|
53
55
|
Provides-Extra: ollama
|
|
54
56
|
Provides-Extra: bedrock
|
|
57
|
+
Provides-Extra: deepseek
|
|
55
58
|
Provides-Extra: commsagent-discord
|
|
56
59
|
Provides-Extra: commsagent-slack
|
|
57
60
|
Provides-Extra: commsagent-telegram
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ag2
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.2rc0
|
|
4
4
|
Summary: Alias package for pyautogen
|
|
5
5
|
Home-page: https://github.com/ag2ai/ag2
|
|
6
6
|
Author: Chi Wang & Qingyun Wu
|
|
@@ -25,6 +25,7 @@ Provides-Extra: graph-rag-falkor-db
|
|
|
25
25
|
Provides-Extra: rag
|
|
26
26
|
Provides-Extra: crawl4ai
|
|
27
27
|
Provides-Extra: browser-use
|
|
28
|
+
Provides-Extra: google-search
|
|
28
29
|
Provides-Extra: neo4j
|
|
29
30
|
Provides-Extra: twilio
|
|
30
31
|
Provides-Extra: interop-crewai
|
|
@@ -39,6 +40,7 @@ Provides-Extra: teachable
|
|
|
39
40
|
Provides-Extra: lmm
|
|
40
41
|
Provides-Extra: graph
|
|
41
42
|
Provides-Extra: gemini
|
|
43
|
+
Provides-Extra: gemini-realtime
|
|
42
44
|
Provides-Extra: together
|
|
43
45
|
Provides-Extra: websurfer
|
|
44
46
|
Provides-Extra: redis
|
|
@@ -52,6 +54,7 @@ Provides-Extra: groq
|
|
|
52
54
|
Provides-Extra: cohere
|
|
53
55
|
Provides-Extra: ollama
|
|
54
56
|
Provides-Extra: bedrock
|
|
57
|
+
Provides-Extra: deepseek
|
|
55
58
|
Provides-Extra: commsagent-discord
|
|
56
59
|
Provides-Extra: commsagent-slack
|
|
57
60
|
Provides-Extra: commsagent-telegram
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
pyautogen==0.8.2rc0
|
|
2
|
+
|
|
3
|
+
[anthropic]
|
|
4
|
+
pyautogen[anthropic]==0.8.2rc0
|
|
5
|
+
|
|
6
|
+
[autobuild]
|
|
7
|
+
pyautogen[autobuild]==0.8.2rc0
|
|
8
|
+
|
|
9
|
+
[bedrock]
|
|
10
|
+
pyautogen[bedrock]==0.8.2rc0
|
|
11
|
+
|
|
12
|
+
[blendsearch]
|
|
13
|
+
pyautogen[blendsearch]==0.8.2rc0
|
|
14
|
+
|
|
15
|
+
[browser-use]
|
|
16
|
+
pyautogen[browser-use]==0.8.2rc0
|
|
17
|
+
|
|
18
|
+
[captainagent]
|
|
19
|
+
pyautogen[captainagent]==0.8.2rc0
|
|
20
|
+
|
|
21
|
+
[cerebras]
|
|
22
|
+
pyautogen[cerebras]==0.8.2rc0
|
|
23
|
+
|
|
24
|
+
[cohere]
|
|
25
|
+
pyautogen[cohere]==0.8.2rc0
|
|
26
|
+
|
|
27
|
+
[commsagent-discord]
|
|
28
|
+
pyautogen[commsagent-discord]==0.8.2rc0
|
|
29
|
+
|
|
30
|
+
[commsagent-slack]
|
|
31
|
+
pyautogen[commsagent-slack]==0.8.2rc0
|
|
32
|
+
|
|
33
|
+
[commsagent-telegram]
|
|
34
|
+
pyautogen[commsagent-telegram]==0.8.2rc0
|
|
35
|
+
|
|
36
|
+
[cosmosdb]
|
|
37
|
+
pyautogen[cosmosdb]==0.8.2rc0
|
|
38
|
+
|
|
39
|
+
[crawl4ai]
|
|
40
|
+
pyautogen[crawl4ai]==0.8.2rc0
|
|
41
|
+
|
|
42
|
+
[deepseek]
|
|
43
|
+
pyautogen[deepseek]==0.8.2rc0
|
|
44
|
+
|
|
45
|
+
[dev]
|
|
46
|
+
pyautogen[dev]==0.8.2rc0
|
|
47
|
+
|
|
48
|
+
[docs]
|
|
49
|
+
pyautogen[docs]==0.8.2rc0
|
|
50
|
+
|
|
51
|
+
[flaml]
|
|
52
|
+
pyautogen[flaml]==0.8.2rc0
|
|
53
|
+
|
|
54
|
+
[gemini]
|
|
55
|
+
pyautogen[gemini]==0.8.2rc0
|
|
56
|
+
|
|
57
|
+
[gemini-realtime]
|
|
58
|
+
pyautogen[gemini-realtime]==0.8.2rc0
|
|
59
|
+
|
|
60
|
+
[google-search]
|
|
61
|
+
pyautogen[google-search]==0.8.2rc0
|
|
62
|
+
|
|
63
|
+
[graph]
|
|
64
|
+
pyautogen[graph]==0.8.2rc0
|
|
65
|
+
|
|
66
|
+
[graph-rag-falkor-db]
|
|
67
|
+
pyautogen[graph-rag-falkor-db]==0.8.2rc0
|
|
68
|
+
|
|
69
|
+
[groq]
|
|
70
|
+
pyautogen[groq]==0.8.2rc0
|
|
71
|
+
|
|
72
|
+
[interop]
|
|
73
|
+
pyautogen[interop]==0.8.2rc0
|
|
74
|
+
|
|
75
|
+
[interop-crewai]
|
|
76
|
+
pyautogen[interop-crewai]==0.8.2rc0
|
|
77
|
+
|
|
78
|
+
[interop-langchain]
|
|
79
|
+
pyautogen[interop-langchain]==0.8.2rc0
|
|
80
|
+
|
|
81
|
+
[interop-pydantic-ai]
|
|
82
|
+
pyautogen[interop-pydantic-ai]==0.8.2rc0
|
|
83
|
+
|
|
84
|
+
[jupyter-executor]
|
|
85
|
+
pyautogen[jupyter-executor]==0.8.2rc0
|
|
86
|
+
|
|
87
|
+
[lint]
|
|
88
|
+
pyautogen[lint]==0.8.2rc0
|
|
89
|
+
|
|
90
|
+
[lmm]
|
|
91
|
+
pyautogen[lmm]==0.8.2rc0
|
|
92
|
+
|
|
93
|
+
[long-context]
|
|
94
|
+
pyautogen[long-context]==0.8.2rc0
|
|
95
|
+
|
|
96
|
+
[mathchat]
|
|
97
|
+
pyautogen[mathchat]==0.8.2rc0
|
|
98
|
+
|
|
99
|
+
[mistral]
|
|
100
|
+
pyautogen[mistral]==0.8.2rc0
|
|
101
|
+
|
|
102
|
+
[neo4j]
|
|
103
|
+
pyautogen[neo4j]==0.8.2rc0
|
|
104
|
+
|
|
105
|
+
[ollama]
|
|
106
|
+
pyautogen[ollama]==0.8.2rc0
|
|
107
|
+
|
|
108
|
+
[openai]
|
|
109
|
+
pyautogen[openai]==0.8.2rc0
|
|
110
|
+
|
|
111
|
+
[openai-realtime]
|
|
112
|
+
pyautogen[openai-realtime]==0.8.2rc0
|
|
113
|
+
|
|
114
|
+
[rag]
|
|
115
|
+
pyautogen[rag]==0.8.2rc0
|
|
116
|
+
|
|
117
|
+
[redis]
|
|
118
|
+
pyautogen[redis]==0.8.2rc0
|
|
119
|
+
|
|
120
|
+
[retrievechat]
|
|
121
|
+
pyautogen[retrievechat]==0.8.2rc0
|
|
122
|
+
|
|
123
|
+
[retrievechat-couchbase]
|
|
124
|
+
pyautogen[retrievechat-couchbase]==0.8.2rc0
|
|
125
|
+
|
|
126
|
+
[retrievechat-mongodb]
|
|
127
|
+
pyautogen[retrievechat-mongodb]==0.8.2rc0
|
|
128
|
+
|
|
129
|
+
[retrievechat-pgvector]
|
|
130
|
+
pyautogen[retrievechat-pgvector]==0.8.2rc0
|
|
131
|
+
|
|
132
|
+
[retrievechat-qdrant]
|
|
133
|
+
pyautogen[retrievechat-qdrant]==0.8.2rc0
|
|
134
|
+
|
|
135
|
+
[teachable]
|
|
136
|
+
pyautogen[teachable]==0.8.2rc0
|
|
137
|
+
|
|
138
|
+
[test]
|
|
139
|
+
pyautogen[test]==0.8.2rc0
|
|
140
|
+
|
|
141
|
+
[together]
|
|
142
|
+
pyautogen[together]==0.8.2rc0
|
|
143
|
+
|
|
144
|
+
[twilio]
|
|
145
|
+
pyautogen[twilio]==0.8.2rc0
|
|
146
|
+
|
|
147
|
+
[types]
|
|
148
|
+
pyautogen[types]==0.8.2rc0
|
|
149
|
+
|
|
150
|
+
[websockets]
|
|
151
|
+
pyautogen[websockets]==0.8.2rc0
|
|
152
|
+
|
|
153
|
+
[websurfer]
|
|
154
|
+
pyautogen[websurfer]==0.8.2rc0
|
|
@@ -60,8 +60,9 @@ dependencies = [
|
|
|
60
60
|
"docker",
|
|
61
61
|
"packaging",
|
|
62
62
|
"asyncer==0.0.8",
|
|
63
|
-
"fast-depends>=2.4.12,<3",
|
|
63
|
+
# "fast-depends>=2.4.12,<3", # integrated into the package
|
|
64
64
|
"httpx>=0.28.1,<1",
|
|
65
|
+
"anyio>=3.0.0,<5.0.0" # needed by the internal fast-depends
|
|
65
66
|
]
|
|
66
67
|
|
|
67
68
|
[project.optional-dependencies]
|
|
@@ -76,11 +77,11 @@ flaml = [
|
|
|
76
77
|
# public distributions
|
|
77
78
|
|
|
78
79
|
openai = [
|
|
79
|
-
"openai>=1.
|
|
80
|
+
"openai>=1.66.2",
|
|
80
81
|
]
|
|
81
82
|
|
|
82
83
|
openai-realtime = [
|
|
83
|
-
"
|
|
84
|
+
"pyautogen[openai]",
|
|
84
85
|
"openai[realtime]",
|
|
85
86
|
]
|
|
86
87
|
|
|
@@ -139,6 +140,10 @@ rag = [
|
|
|
139
140
|
"chromadb>=0.5,<1",
|
|
140
141
|
"llama-index>=0.12,<1",
|
|
141
142
|
"llama-index-vector-stores-chroma==0.4.1",
|
|
143
|
+
"llama-index-vector-stores-mongodb==0.6.0",
|
|
144
|
+
"llama-index-embeddings-huggingface==0.5.2",
|
|
145
|
+
"llama-index-llms-langchain==0.6.0",
|
|
146
|
+
"requests>=2.32.3,<3",
|
|
142
147
|
]
|
|
143
148
|
|
|
144
149
|
|
|
@@ -152,12 +157,16 @@ browser-use = [
|
|
|
152
157
|
"browser-use==0.1.37",
|
|
153
158
|
]
|
|
154
159
|
|
|
160
|
+
google-search = [
|
|
161
|
+
"google-api-python-client>=2.163.0,<3.0",
|
|
162
|
+
]
|
|
163
|
+
|
|
155
164
|
neo4j = [
|
|
156
165
|
"docx2txt==0.8",
|
|
157
|
-
"llama-index==0.12.
|
|
166
|
+
"llama-index==0.12.22",
|
|
158
167
|
"llama-index-graph-stores-neo4j==0.4.6",
|
|
159
|
-
"llama-index-core==0.12.
|
|
160
|
-
"llama-index-readers-web==0.3.
|
|
168
|
+
"llama-index-core==0.12.22",
|
|
169
|
+
"llama-index-readers-web==0.3.7",
|
|
161
170
|
]
|
|
162
171
|
|
|
163
172
|
# used for agentchat_realtime_swarm notebook and realtime agent twilio demo
|
|
@@ -172,13 +181,12 @@ interop-crewai = [
|
|
|
172
181
|
"weaviate-client>=4,<5; python_version>='3.10' and python_version<'3.13'",
|
|
173
182
|
]
|
|
174
183
|
interop-langchain = ["langchain-community>=0.3.12,<1"]
|
|
175
|
-
interop-pydantic-ai = ["pydantic-ai==0.0.
|
|
184
|
+
interop-pydantic-ai = ["pydantic-ai==0.0.31"]
|
|
176
185
|
interop =[
|
|
177
186
|
"pyautogen[interop-crewai, interop-langchain, interop-pydantic-ai]",
|
|
178
187
|
]
|
|
179
188
|
|
|
180
|
-
|
|
181
|
-
autobuild = ["chromadb", "sentence-transformers", "huggingface-hub", "pysqlite3-binary"]
|
|
189
|
+
autobuild = ["chromadb", "sentence-transformers", "huggingface-hub"]
|
|
182
190
|
|
|
183
191
|
blendsearch = ["flaml[blendsearch]"]
|
|
184
192
|
mathchat = ["sympy", "wolframalpha"]
|
|
@@ -188,7 +196,7 @@ lmm = ["replicate", "pillow"]
|
|
|
188
196
|
graph = ["networkx", "matplotlib"]
|
|
189
197
|
gemini = [
|
|
190
198
|
"google-api-core",
|
|
191
|
-
"google-genai>=1.2.0
|
|
199
|
+
"google-genai>=1.2.0",
|
|
192
200
|
"google-cloud-aiplatform",
|
|
193
201
|
"google-auth",
|
|
194
202
|
"pillow",
|
|
@@ -196,11 +204,16 @@ gemini = [
|
|
|
196
204
|
"jsonref>=1,<2",
|
|
197
205
|
]
|
|
198
206
|
|
|
207
|
+
gemini-realtime = [
|
|
208
|
+
"pyautogen[gemini]",
|
|
209
|
+
"pyautogen[websockets]",
|
|
210
|
+
]
|
|
211
|
+
|
|
199
212
|
together = ["together>=1.2"]
|
|
200
213
|
websurfer = ["beautifulsoup4", "markdownify", "pdfminer.six", "pathvalidate"]
|
|
201
214
|
redis = ["redis"]
|
|
202
215
|
cosmosdb = ["azure-cosmos>=4.2.0"]
|
|
203
|
-
websockets = ["websockets>=14.0,<
|
|
216
|
+
websockets = ["websockets>=14.0,<16"]
|
|
204
217
|
long-context = ["llmlingua<0.3"]
|
|
205
218
|
anthropic = ["anthropic[vertex]>=0.23.1"]
|
|
206
219
|
cerebras = ["cerebras_cloud_sdk>=1.0.0"]
|
|
@@ -209,8 +222,9 @@ groq = ["groq>=0.9.0"]
|
|
|
209
222
|
cohere = ["cohere>=5.13.5"]
|
|
210
223
|
ollama = ["ollama>=0.4.5", "fix_busted_json>=0.0.18"]
|
|
211
224
|
bedrock = ["boto3>=1.34.149"]
|
|
225
|
+
deepseek = ["pyautogen[openai]"]
|
|
212
226
|
|
|
213
|
-
commsagent-discord = ["discord.py>=2.4.0,<2.
|
|
227
|
+
commsagent-discord = ["discord.py>=2.4.0,<2.6"]
|
|
214
228
|
commsagent-slack = ["slack_sdk>=3.33.0,<3.40"]
|
|
215
229
|
commsagent-telegram = ["telethon>=1.38.1, <2"]
|
|
216
230
|
|
|
@@ -223,23 +237,25 @@ test = [
|
|
|
223
237
|
"nbformat==5.10.4",
|
|
224
238
|
"pytest-cov==6.0.0",
|
|
225
239
|
"pytest-asyncio==0.25.3",
|
|
226
|
-
"pytest==8.3.
|
|
240
|
+
"pytest==8.3.5",
|
|
227
241
|
"mock==5.1.0",
|
|
228
242
|
"pandas==2.2.3",
|
|
229
|
-
"fastapi==0.115.
|
|
243
|
+
"fastapi==0.115.11",
|
|
244
|
+
"dirty-equals==0.9.0",
|
|
230
245
|
]
|
|
231
246
|
|
|
232
247
|
docs = [
|
|
233
|
-
"mkdocs-material==9.6.
|
|
234
|
-
"mkdocstrings[python]==0.28.
|
|
248
|
+
"mkdocs-material==9.6.7",
|
|
249
|
+
"mkdocstrings[python]==0.28.2",
|
|
235
250
|
"mkdocs-literate-nav==0.6.1",
|
|
236
251
|
"mdx-include==1.4.2",
|
|
237
252
|
"mkdocs-git-revision-date-localized-plugin==1.3.0",
|
|
238
253
|
"mike==2.1.3",
|
|
239
|
-
"typer==0.15.
|
|
254
|
+
"typer==0.15.2",
|
|
240
255
|
"mkdocs-minify-plugin==0.8.0",
|
|
241
256
|
"mkdocs-macros-plugin==1.3.7", # includes with variables
|
|
242
257
|
"mkdocs-glightbox==0.4.0", # img zoom
|
|
258
|
+
"mkdocs-ezlinks-plugin==0.1.14", # converts abs links to rel links
|
|
243
259
|
"pillow", # required for mkdocs-glightbo
|
|
244
260
|
"cairosvg", # required for mkdocs-glightbo
|
|
245
261
|
"pdoc3==0.11.5",
|
|
@@ -255,7 +271,7 @@ types = [
|
|
|
255
271
|
]
|
|
256
272
|
|
|
257
273
|
lint = [
|
|
258
|
-
"ruff==0.9.
|
|
274
|
+
"ruff==0.9.9",
|
|
259
275
|
"codespell==2.4.1",
|
|
260
276
|
"pyupgrade-directories==0.3.0",
|
|
261
277
|
]
|
|
@@ -265,7 +281,7 @@ dev = [
|
|
|
265
281
|
"pyautogen[lint,test,types,docs]",
|
|
266
282
|
"pre-commit==4.1.0",
|
|
267
283
|
"detect-secrets==1.5.0",
|
|
268
|
-
"uv==0.6.
|
|
284
|
+
"uv==0.6.4",
|
|
269
285
|
]
|
|
270
286
|
|
|
271
287
|
|
|
@@ -294,23 +310,31 @@ exclude = ["test", "notebook"]
|
|
|
294
310
|
"autogen" = "autogen"
|
|
295
311
|
"autogen/agentchat/contrib/captainagent/tools" = "autogen/agentchat/contrib/captainagent/tools"
|
|
296
312
|
|
|
297
|
-
|
|
298
313
|
[tool.pytest.ini_options]
|
|
299
314
|
addopts = '--cov=autogen --cov-append --cov-branch --cov-report=xml -m "not conda"'
|
|
300
315
|
testpaths = [
|
|
301
316
|
"test",
|
|
302
317
|
]
|
|
318
|
+
|
|
303
319
|
markers = [
|
|
304
320
|
"conda: test related to conda forge distribution",
|
|
305
321
|
"all",
|
|
306
322
|
"openai",
|
|
323
|
+
"openai_realtime",
|
|
307
324
|
"gemini",
|
|
325
|
+
"gemini_realtime",
|
|
308
326
|
"anthropic",
|
|
309
327
|
"deepseek",
|
|
328
|
+
"cosmosdb",
|
|
329
|
+
"ollama",
|
|
330
|
+
"bedrock",
|
|
331
|
+
"cerebras",
|
|
332
|
+
"aux_neg_flag",
|
|
333
|
+
# optional deps
|
|
310
334
|
"redis",
|
|
311
335
|
"docker",
|
|
312
336
|
"docs",
|
|
313
|
-
|
|
337
|
+
"rag",
|
|
314
338
|
"jupyter_executor",
|
|
315
339
|
"retrievechat",
|
|
316
340
|
"retrievechat_pgvector",
|
|
@@ -322,7 +346,12 @@ markers = [
|
|
|
322
346
|
"interop",
|
|
323
347
|
"browser_use",
|
|
324
348
|
"crawl4ai",
|
|
349
|
+
"google_search",
|
|
325
350
|
"websockets",
|
|
351
|
+
"commsagent_discord",
|
|
352
|
+
"commsagent_slack",
|
|
353
|
+
"commsagent-telegram",
|
|
354
|
+
"lmm",
|
|
326
355
|
]
|
|
327
356
|
|
|
328
357
|
[tool.black]
|
|
@@ -379,6 +408,8 @@ select = [
|
|
|
379
408
|
# "UP", # pyupgrade https://docs.astral.sh/ruff/rules/#pydocstyle-d
|
|
380
409
|
]
|
|
381
410
|
|
|
411
|
+
extend-select = ["D417"]
|
|
412
|
+
|
|
382
413
|
ignore = ["E501", "F403", "C901",
|
|
383
414
|
"E402",
|
|
384
415
|
"E721",
|
|
@@ -404,12 +435,16 @@ convention = "google"
|
|
|
404
435
|
|
|
405
436
|
[tool.mypy]
|
|
406
437
|
files = [
|
|
438
|
+
"autogen/agentchat/agent.py",
|
|
407
439
|
"autogen/agentchat/contrib/rag",
|
|
408
440
|
"autogen/agentchat/contrib/graph_rag",
|
|
441
|
+
"autogen/agentchat/contrib/swarm_agent.py",
|
|
409
442
|
"autogen/agentchat/realtime_agent",
|
|
443
|
+
"autogen/agentchat/utils.py",
|
|
410
444
|
"autogen/agents",
|
|
411
445
|
"autogen/coding",
|
|
412
446
|
"autogen/exception_utils.py",
|
|
447
|
+
"autogen/fast_depends",
|
|
413
448
|
"autogen/import_utils.py",
|
|
414
449
|
"autogen/interop",
|
|
415
450
|
"autogen/io",
|
|
@@ -418,12 +453,15 @@ files = [
|
|
|
418
453
|
"autogen/oai/oai_models",
|
|
419
454
|
"autogen/oai/openai_utils.py",
|
|
420
455
|
"autogen/tools",
|
|
456
|
+
"autogen/_website",
|
|
421
457
|
"website/*.py",
|
|
458
|
+
"test/agentchat/contrib/rag",
|
|
422
459
|
"test/agentchat/contrib/graph_rag",
|
|
423
|
-
|
|
460
|
+
"test/agentchat/contrib/test_swarm.py",
|
|
424
461
|
"test/agentchat/realtime_agent",
|
|
425
462
|
"test/agents",
|
|
426
463
|
"test/conftest.py",
|
|
464
|
+
# "test/fast_depends",
|
|
427
465
|
"test/interop",
|
|
428
466
|
"test/io",
|
|
429
467
|
"test/messages",
|
|
@@ -41,6 +41,7 @@ setuptools.setup(
|
|
|
41
41
|
"rag": ["pyautogen[rag]==" + __version__],
|
|
42
42
|
"crawl4ai": ["pyautogen[crawl4ai]==" + __version__],
|
|
43
43
|
"browser-use": ["pyautogen[browser-use]==" + __version__],
|
|
44
|
+
"google-search": ["pyautogen[google-search]==" + __version__],
|
|
44
45
|
"neo4j": ["pyautogen[neo4j]==" + __version__],
|
|
45
46
|
"twilio": ["pyautogen[twilio]==" + __version__],
|
|
46
47
|
"interop-crewai": ["pyautogen[interop-crewai]==" + __version__],
|
|
@@ -55,6 +56,7 @@ setuptools.setup(
|
|
|
55
56
|
"lmm": ["pyautogen[lmm]==" + __version__],
|
|
56
57
|
"graph": ["pyautogen[graph]==" + __version__],
|
|
57
58
|
"gemini": ["pyautogen[gemini]==" + __version__],
|
|
59
|
+
"gemini-realtime": ["pyautogen[gemini-realtime]==" + __version__],
|
|
58
60
|
"together": ["pyautogen[together]==" + __version__],
|
|
59
61
|
"websurfer": ["pyautogen[websurfer]==" + __version__],
|
|
60
62
|
"redis": ["pyautogen[redis]==" + __version__],
|
|
@@ -68,6 +70,7 @@ setuptools.setup(
|
|
|
68
70
|
"cohere": ["pyautogen[cohere]==" + __version__],
|
|
69
71
|
"ollama": ["pyautogen[ollama]==" + __version__],
|
|
70
72
|
"bedrock": ["pyautogen[bedrock]==" + __version__],
|
|
73
|
+
"deepseek": ["pyautogen[deepseek]==" + __version__],
|
|
71
74
|
"commsagent-discord": ["pyautogen[commsagent-discord]==" + __version__],
|
|
72
75
|
"commsagent-slack": ["pyautogen[commsagent-slack]==" + __version__],
|
|
73
76
|
"commsagent-telegram": ["pyautogen[commsagent-telegram]==" + __version__],
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import os
|
|
10
10
|
import tempfile
|
|
11
|
-
import unittest
|
|
12
11
|
from io import StringIO
|
|
13
12
|
from types import SimpleNamespace
|
|
14
13
|
from unittest.mock import patch
|
|
@@ -24,15 +23,10 @@ from autogen.code_utils import (
|
|
|
24
23
|
execute_code,
|
|
25
24
|
extract_code,
|
|
26
25
|
get_powershell_command,
|
|
27
|
-
improve_code,
|
|
28
|
-
improve_function,
|
|
29
26
|
in_docker_container,
|
|
30
27
|
infer_lang,
|
|
31
28
|
is_docker_running,
|
|
32
29
|
)
|
|
33
|
-
from autogen.import_utils import skip_on_missing_imports
|
|
34
|
-
|
|
35
|
-
from .conftest import Credentials
|
|
36
30
|
|
|
37
31
|
here = os.path.abspath(os.path.dirname(__file__))
|
|
38
32
|
|
|
@@ -387,69 +381,40 @@ def test_create_virtual_env_with_extra_args():
|
|
|
387
381
|
assert venv_context.env_name == os.path.split(temp_dir)[1]
|
|
388
382
|
|
|
389
383
|
|
|
390
|
-
|
|
391
|
-
def _test_improve(credentials_all: Credentials):
|
|
392
|
-
config_list = credentials_all.config_list
|
|
393
|
-
improved, _ = improve_function(
|
|
394
|
-
"autogen/math_utils.py",
|
|
395
|
-
"solve_problem",
|
|
396
|
-
"Solve math problems accurately, by avoiding calculation errors and reduce reasoning errors.",
|
|
397
|
-
config_list=config_list,
|
|
398
|
-
)
|
|
399
|
-
with open(f"{here}/math_utils.py.improved", "w") as f:
|
|
400
|
-
f.write(improved)
|
|
401
|
-
suggestion, _ = improve_code(
|
|
402
|
-
["autogen/code_utils.py", "autogen/math_utils.py"],
|
|
403
|
-
"leverage generative AI smartly and cost-effectively",
|
|
404
|
-
config_list=config_list,
|
|
405
|
-
)
|
|
406
|
-
print(suggestion)
|
|
407
|
-
improvement, cost = improve_code(
|
|
408
|
-
["autogen/code_utils.py", "autogen/math_utils.py"],
|
|
409
|
-
"leverage generative AI smartly and cost-effectively",
|
|
410
|
-
suggest_only=False,
|
|
411
|
-
config_list=config_list,
|
|
412
|
-
)
|
|
413
|
-
print(cost)
|
|
414
|
-
with open(f"{here}/suggested_improvement.txt", "w") as f:
|
|
415
|
-
f.write(improvement)
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
class TestContentStr(unittest.TestCase):
|
|
384
|
+
class TestContentStr:
|
|
419
385
|
def test_string_content(self):
|
|
420
|
-
|
|
386
|
+
assert content_str("simple string") == "simple string"
|
|
421
387
|
|
|
422
388
|
def test_list_of_text_content(self):
|
|
423
389
|
content = [{"type": "text", "text": "hello"}, {"type": "text", "text": " world"}]
|
|
424
|
-
|
|
390
|
+
assert content_str(content) == "hello world"
|
|
425
391
|
|
|
426
392
|
def test_mixed_content(self):
|
|
427
393
|
content = [{"type": "text", "text": "hello"}, {"type": "image_url", "url": "http://example.com/image.png"}]
|
|
428
|
-
|
|
394
|
+
assert content_str(content) == "hello<image>"
|
|
429
395
|
|
|
430
396
|
def test_invalid_content(self):
|
|
431
397
|
content = [{"type": "text", "text": "hello"}, {"type": "wrong_type", "url": "http://example.com/image.png"}]
|
|
432
|
-
with
|
|
398
|
+
with pytest.raises(ValueError):
|
|
433
399
|
content_str(content)
|
|
434
|
-
self.assertIn("Wrong content format", str(context.exception))
|
|
435
400
|
|
|
436
401
|
def test_empty_list(self):
|
|
437
|
-
|
|
402
|
+
assert content_str([]) == ""
|
|
438
403
|
|
|
439
404
|
def test_non_dict_in_list(self):
|
|
440
405
|
content = ["string", {"type": "text", "text": "text"}]
|
|
441
|
-
with
|
|
406
|
+
with pytest.raises(TypeError):
|
|
442
407
|
content_str(content)
|
|
443
408
|
|
|
444
409
|
|
|
445
|
-
class TestGetPowerShellCommand
|
|
410
|
+
class TestGetPowerShellCommand:
|
|
446
411
|
@patch("subprocess.run")
|
|
447
412
|
def test_get_powershell_command_powershell(self, mock_subprocess_run):
|
|
448
413
|
# Set up the mock to return a successful result for 'powershell'
|
|
449
414
|
mock_subprocess_run.return_value.returncode = 0
|
|
450
415
|
mock_subprocess_run.return_value.stdout = StringIO("5")
|
|
451
416
|
|
|
452
|
-
|
|
417
|
+
assert get_powershell_command() == "powershell"
|
|
453
418
|
|
|
454
419
|
@patch("subprocess.run")
|
|
455
420
|
def test_get_powershell_command_pwsh(self, mock_subprocess_run):
|
|
@@ -458,18 +423,18 @@ class TestGetPowerShellCommand(unittest.TestCase):
|
|
|
458
423
|
mock_subprocess_run.return_value.returncode = 0
|
|
459
424
|
mock_subprocess_run.return_value.stdout = StringIO("7")
|
|
460
425
|
|
|
461
|
-
|
|
426
|
+
assert get_powershell_command() == "pwsh"
|
|
462
427
|
|
|
463
428
|
@patch("subprocess.run")
|
|
464
429
|
def test_get_powershell_command_not_found(self, mock_subprocess_run):
|
|
465
430
|
mock_subprocess_run.side_effect = [FileNotFoundError, FileNotFoundError]
|
|
466
|
-
with
|
|
431
|
+
with pytest.raises(FileNotFoundError):
|
|
467
432
|
get_powershell_command()
|
|
468
433
|
|
|
469
434
|
@patch("subprocess.run")
|
|
470
435
|
def test_get_powershell_command_no_permission(self, mock_subprocess_run):
|
|
471
436
|
mock_subprocess_run.side_effect = [PermissionError, FileNotFoundError]
|
|
472
|
-
with
|
|
437
|
+
with pytest.raises(PermissionError):
|
|
473
438
|
get_powershell_command()
|
|
474
439
|
|
|
475
440
|
|