ag2 0.9.8.post1__py3-none-any.whl → 0.9.9__py3-none-any.whl

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ag2
3
- Version: 0.9.8.post1
3
+ Version: 0.9.9
4
4
  Summary: A programming framework for agentic AI
5
5
  Project-URL: Homepage, https://ag2.ai/
6
6
  Project-URL: Documentation, https://docs.ag2.ai
@@ -6,14 +6,14 @@ autogen/exception_utils.py,sha256=YpuaczyoZ4wHFhyv1a_UA9CpUN2KKIU4johIRm_mOaQ,24
6
6
  autogen/formatting_utils.py,sha256=5jjz2kk65Cvu8bpglxzrfigdPeIJA4Wug7ccXqIyKo8,2097
7
7
  autogen/function_utils.py,sha256=YnzwNFA49Jbbe4riAY1sinYcKphg5lrHFCXx0POdYbw,481
8
8
  autogen/graph_utils.py,sha256=GoP9s9Bs6PQgfwdKuw0mHsdN-2lfO8rLGOdtKy7VcXk,7871
9
- autogen/import_utils.py,sha256=Ktz61gbfBuIHF8gRJO3B19caYZK1sHy3kzts-Xipvlg,17593
9
+ autogen/import_utils.py,sha256=3glC9nVnLr9tWGCPCgcVEUBOL8G8CYu_aVU2Om2wOrc,18090
10
10
  autogen/json_utils.py,sha256=-TUBPrioWUp_rH0LZ7uLKR7tSk-13IWnVvMw2fp-SwQ,1373
11
11
  autogen/math_utils.py,sha256=Bj6VG1H0W0CwRJnbqL8dH_NBuW_FKHYde6M1H0oVEGA,9500
12
12
  autogen/retrieve_utils.py,sha256=omqOebRN95IJUrvukJR9e7wno4vB1m3sf_gHv4ormN0,20070
13
13
  autogen/runtime_logging.py,sha256=PV4xLXLEscBWVcdGLecN1f8gZqpvqK0E2SH0Y5numUM,4701
14
14
  autogen/token_count_utils.py,sha256=k50Vii75GhjkiYuw0gaWd7PjtiR-ZucNcN0xSJkBRKo,10859
15
15
  autogen/types.py,sha256=-C23PYj5EdwPZxcL3r0wFLAsQTXyVReghsdKV5b9jO4,982
16
- autogen/version.py,sha256=8br98DbuRXVUSJ5Q-C_N7wKZtCt7hc_EUCS-E65jqZg,199
16
+ autogen/version.py,sha256=pubFTFvRVxnFnZerYS_WWu4SYJu3F3DLPCPt9NNnDDw,193
17
17
  autogen/_website/__init__.py,sha256=c8B9TpO07x9neD0zsJWj6AaEdlcP-WvxrvVOGWLtamk,143
18
18
  autogen/_website/generate_api_references.py,sha256=cMzgnapuahybxmGHbddukJA3oZxj1uIktDdOyP4rGzU,14772
19
19
  autogen/_website/generate_mkdocs.py,sha256=VB-bm-9jfv9jtFKmKsGAXPa1Z-lq0g8MwVkLfdTIMJ8,43180
@@ -25,7 +25,7 @@ autogen/agentchat/agent.py,sha256=HgKK4lGxu5sqITMpq3GC4EnrVN_1IqXcKKXY4fxYH6o,57
25
25
  autogen/agentchat/assistant_agent.py,sha256=f6Y32ECsIA4nhEzgFUF8VhUcTg7k_0KOjpAL7CdymaI,5731
26
26
  autogen/agentchat/chat.py,sha256=6Gx2t1-Xa8kP6ZoUihHBNGOqNlrGhhqLPKrckL0n-RI,14003
27
27
  autogen/agentchat/conversable_agent.py,sha256=vQFAF_bRtsVYe4WmweUQxeR3Vp5ypVn0F5XnoTGWE34,193143
28
- autogen/agentchat/groupchat.py,sha256=8GKGOOXeEQwj1uHANwA01uFC4KI3tzvLuhbo6foCQZA,89228
28
+ autogen/agentchat/groupchat.py,sha256=PbOO2eTyKuknl3tcLgrcCi5I7If9XxhNf3V5wNcfzMw,89290
29
29
  autogen/agentchat/user_proxy_agent.py,sha256=jlfda15H2S6KvOF5XwdtjEuBowcJ1vIqJKdutw26JBI,7411
30
30
  autogen/agentchat/utils.py,sha256=eWLFoB2qQBUW44PQiWJ5SRxT1w1UXxwL28JsjOwGqg0,8206
31
31
  autogen/agentchat/contrib/__init__.py,sha256=tOTe4nwbKj7elHpftAy3zS_embMDzncrKL98XKhY6-c,168
@@ -380,8 +380,8 @@ autogen/tools/experimental/wikipedia/wikipedia.py,sha256=phtwNOW5KcvXq-1-3yYjm6E
380
380
  templates/main.jinja2,sha256=mu7z_4NjI1XMEwQx9KaFQixi4ImfwY0FZQaYUJVBnSc,1765
381
381
  templates/client_template/main.jinja2,sha256=9_1pmPNLlPZpfcE0KqXJ6uBVzQtmFqWbxs2xyzCOfxY,2115
382
382
  templates/config_template/config.jinja2,sha256=A-p-YBsnEm1iftBIhuIBfIyCY-qw34KWcxalmM6KPWc,167
383
- ag2-0.9.8.post1.dist-info/METADATA,sha256=De8u0z0GR52E6nT2_c1Erkf4LHbIhz_Wjbh9Lb_VeeI,36130
384
- ag2-0.9.8.post1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
385
- ag2-0.9.8.post1.dist-info/licenses/LICENSE,sha256=GEFQVNayAR-S_rQD5l8hPdgvgyktVdy4Bx5-v90IfRI,11384
386
- ag2-0.9.8.post1.dist-info/licenses/NOTICE.md,sha256=07iCPQGbth4pQrgkSgZinJGT5nXddkZ6_MGYcBd2oiY,1134
387
- ag2-0.9.8.post1.dist-info/RECORD,,
383
+ ag2-0.9.9.dist-info/METADATA,sha256=63Y1E-i_x9rZfDUAczAxhfF5iCSqSxdFa8O7qMZDX_k,36124
384
+ ag2-0.9.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
385
+ ag2-0.9.9.dist-info/licenses/LICENSE,sha256=GEFQVNayAR-S_rQD5l8hPdgvgyktVdy4Bx5-v90IfRI,11384
386
+ ag2-0.9.9.dist-info/licenses/NOTICE.md,sha256=07iCPQGbth4pQrgkSgZinJGT5nXddkZ6_MGYcBd2oiY,1134
387
+ ag2-0.9.9.dist-info/RECORD,,
@@ -575,7 +575,7 @@ class GroupChat:
575
575
  return self.next_agent(last_speaker)
576
576
 
577
577
  # auto speaker selection with 2-agent chat
578
- return self._auto_select_speaker(last_speaker, selector, messages, agents)
578
+ return self._auto_select_speaker(last_speaker, selector, messages if messages else self.messages, agents)
579
579
 
580
580
  async def a_select_speaker(self, last_speaker: Agent, selector: ConversableAgent) -> Agent:
581
581
  """Select the next speaker (with requery), asynchronously."""
@@ -587,7 +587,7 @@ class GroupChat:
587
587
  return self.next_agent(last_speaker)
588
588
 
589
589
  # auto speaker selection with 2-agent chat
590
- return await self.a_auto_select_speaker(last_speaker, selector, messages, agents)
590
+ return await self.a_auto_select_speaker(last_speaker, selector, messages if messages else self.messages, agents)
591
591
 
592
592
  def _finalize_speaker(self, last_speaker: Agent, final: bool, name: str, agents: list[Agent] | None) -> Agent:
593
593
  if not final:
autogen/import_utils.py CHANGED
@@ -14,6 +14,8 @@ from logging import getLogger
14
14
  from pathlib import Path
15
15
  from typing import Any, Generic, Optional, TypeVar
16
16
 
17
+ from packaging import version
18
+
17
19
  __all__ = [
18
20
  "optional_import_block",
19
21
  "patch_object",
@@ -53,25 +55,34 @@ class ModuleInfo:
53
55
  # Aka similarly named module in the autogen or test directory
54
56
  return f"'{self.name}' is not installed."
55
57
 
56
- installed_version = (
58
+ # Ensure that the retrieved version is a string. Some packages might unexpectedly
59
+ # have a __version__ attribute that is not a string (e.g., a module).
60
+ raw_version_attr = (
57
61
  sys.modules[self.name].__version__ if hasattr(sys.modules[self.name], "__version__") else None
58
62
  )
63
+ installed_version = raw_version_attr if isinstance(raw_version_attr, str) else None
59
64
  if installed_version is None and (self.min_version or self.max_version):
60
65
  return f"'{self.name}' is installed, but the version is not available."
61
66
 
62
- if self.min_version:
63
- msg = f"'{self.name}' is installed, but the installed version {installed_version} is too low (required '{self}')."
64
- if not self.min_inclusive and installed_version == self.min_version:
65
- return msg
66
- if self.min_inclusive and installed_version < self.min_version: # type: ignore[operator]
67
- return msg
68
-
69
- if self.max_version:
70
- msg = f"'{self.name}' is installed, but the installed version {installed_version} is too high (required '{self}')."
71
- if not self.max_inclusive and installed_version == self.max_version:
72
- return msg
73
- if self.max_inclusive and installed_version > self.max_version: # type: ignore[operator]
74
- return msg
67
+ if installed_version:
68
+ # Convert to version object for comparison
69
+ installed_ver = version.parse(installed_version)
70
+
71
+ if self.min_version:
72
+ min_ver = version.parse(self.min_version)
73
+ msg = f"'{self.name}' is installed, but the installed version {installed_version} is too low (required '{self}')."
74
+ if not self.min_inclusive and installed_ver == min_ver:
75
+ return msg
76
+ if self.min_inclusive and installed_ver < min_ver:
77
+ return msg
78
+
79
+ if self.max_version:
80
+ max_ver = version.parse(self.max_version)
81
+ msg = f"'{self.name}' is installed, but the installed version {installed_version} is too high (required '{self}')."
82
+ if not self.max_inclusive and installed_ver == max_ver:
83
+ return msg
84
+ if self.max_inclusive and installed_ver > max_ver:
85
+ return msg
75
86
 
76
87
  return None
77
88
 
autogen/version.py CHANGED
@@ -4,4 +4,4 @@
4
4
 
5
5
  __all__ = ["__version__"]
6
6
 
7
- __version__ = "0.9.8.post1"
7
+ __version__ = "0.9.9"
File without changes