beswarm 0.2.40__py3-none-any.whl → 0.2.42__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 beswarm might be problematic. Click here for more details.

beswarm/agents/planact.py CHANGED
@@ -124,10 +124,10 @@ class InstructionAgent(BaseAgent):
124
124
 
125
125
  self.broker.publish({"status": "new_message", "result": "\n🤖 指令智能体:\n" + raw_response}, self.status_topic)
126
126
 
127
- self.last_instruction = raw_response
128
127
  instruction = extract_xml_content(raw_response, "instructions")
129
128
  if instruction:
130
129
  if len(message["conversation"]) == 1:
130
+ instruction = re.sub(r'^<task_complete>([\D\d\s]+)<\/task_complete>$', '', instruction, flags=re.MULTILINE)
131
131
  instruction = (
132
132
  "任务描述:\n"
133
133
  f"<goal>{self.goal}</goal>\n\n"
@@ -145,9 +145,11 @@ class InstructionAgent(BaseAgent):
145
145
  f"{instruction}"
146
146
  )
147
147
  self.broker.publish({"instruction": instruction, "conversation": message["conversation"]}, self.publish_topic)
148
+ self.last_instruction = None
148
149
  else:
149
150
  self.logger.error("\n❌ 指令智能体生成的指令不符合要求,正在重新生成。")
150
151
  self.broker.publish(message, self.error_topic)
152
+ self.last_instruction = raw_response
151
153
 
152
154
 
153
155
  class WorkerAgent(BaseAgent):
beswarm/aient/setup.py CHANGED
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
4
4
 
5
5
  setup(
6
6
  name="aient",
7
- version="1.1.56",
7
+ version="1.1.57",
8
8
  description="Aient: The Awakening of Agent.",
9
9
  long_description=Path.open(Path("README.md"), encoding="utf-8").read(),
10
10
  long_description_content_type="text/markdown",
@@ -501,6 +501,10 @@ class chatgpt(BaseLLM):
501
501
  missing_required_params.append(f"Error: {tool_name} missing required parameters: {missing_required_params}")
502
502
  function_parameter = valid_function_parameters
503
503
 
504
+ # 删除 task_complete 跟其他工具一起调用的情况,因为 task_complete 必须单独调用
505
+ if len(function_parameter) > 1:
506
+ function_parameter = [tool_dict for tool_dict in function_parameter if tool_dict.get("function_name", "") != "task_complete"]
507
+
504
508
  if self.print_log and invalid_tools:
505
509
  self.logger.error(f"invalid_tools: {invalid_tools}")
506
510
  self.logger.error(f"function_parameter: {function_parameter}")
beswarm/prompt.py CHANGED
@@ -106,7 +106,7 @@ instruction_system_prompt = """
106
106
  所有回复必须使用中文。
107
107
  运行工作智能体的系统信息:{os_version}
108
108
  你的工作目录为:{workspace_path},请在指令中使用绝对路径。所有操作必须基于工作目录。
109
- 禁止在工作目录之外进行任何操作。你当前运行目录不一定就是工作目录。禁止默认你当前就在工作目录。
109
+ 除了任务目标里面明确提到的目录,禁止在工作目录之外进行任何操作。你当前运行目录不一定就是工作目录。禁止默认你当前就在工作目录。
110
110
 
111
111
  当前时间:{current_time}
112
112
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beswarm
3
- Version: 0.2.40
3
+ Version: 0.2.42
4
4
  Summary: MAS
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -1,13 +1,13 @@
1
1
  beswarm/__init__.py,sha256=HZjUOJtZR5QhMuDbq-wukQQn1VrBusNWai_ysGo-VVI,20
2
2
  beswarm/broker.py,sha256=RtnQZVbhf25acUHahNBiaS5FGxcrj0rhBhkon9gFY_M,9873
3
3
  beswarm/core.py,sha256=_J_LPc0HZFQTLGHy021OMEh2WbsjL_hc6jxd2engpyY,216
4
- beswarm/prompt.py,sha256=5JMfOuXWHscsaeDzwBn223mj9N85eAQdOHXQZk7zeWE,32238
4
+ beswarm/prompt.py,sha256=n0a1a6NThIxAYSkisg1sEKjvz2w0tozpKL4BIplaAkI,32286
5
5
  beswarm/taskmanager.py,sha256=_v1lNHu9WpKK2ial22hvEVPzMJBUiaKTSUbXOxpEYlU,12119
6
6
  beswarm/utils.py,sha256=S9jEtht0hTZbjZ2Hk24p4Ip41R69BogOkYS6fgPKY2Y,8219
7
7
  beswarm/agents/chatgroup.py,sha256=4QTjTjssFDvS2kI5A58TdN92BWjL-XaNzrcd36pTQGQ,11939
8
- beswarm/agents/planact.py,sha256=BFUbz_e1PxZ-_Z6eYRhqejidmWTFo1CI1JWxFV6nTWo,17299
8
+ beswarm/agents/planact.py,sha256=NyZankMtcivZBvIj_EYCTlQky_E1J8q6D0B2WK9RMlc,17468
9
9
  beswarm/aient/main.py,sha256=SiYAIgQlLJqYusnTVEJOx1WNkSJKMImhgn5aWjfroxg,3814
10
- beswarm/aient/setup.py,sha256=o9Iuwt8drFppkarxF0iEQoiSXIf058yEPft81w_jwaQ,487
10
+ beswarm/aient/setup.py,sha256=Mq1M05mT9_UYBK2jk5mP_sLxKQAolcuh8PYXexfj-XU,487
11
11
  beswarm/aient/src/aient/__init__.py,sha256=SRfF7oDVlOOAi6nGKiJIUK6B_arqYLO9iSMp-2IZZps,21
12
12
  beswarm/aient/src/aient/core/__init__.py,sha256=NxjebTlku35S4Dzr16rdSqSTWUvvwEeACe8KvHJnjPg,34
13
13
  beswarm/aient/src/aient/core/log_config.py,sha256=kz2_yJv1p-o3lUQOwA3qh-LSc3wMHv13iCQclw44W9c,274
@@ -22,7 +22,7 @@ beswarm/aient/src/aient/core/test/test_payload.py,sha256=8jBiJY1uidm1jzL-EiK0s6U
22
22
  beswarm/aient/src/aient/models/__init__.py,sha256=ouNDNvoBBpIFrLsk09Q_sq23HR0GbLAKfGLIFmfEuXE,219
23
23
  beswarm/aient/src/aient/models/audio.py,sha256=kRd-8-WXzv4vwvsTGwnstK-WR8--vr9CdfCZzu8y9LA,1934
24
24
  beswarm/aient/src/aient/models/base.py,sha256=z-Z0pJfTN2x0cuwfvu0BdMRY9O-RmLwHEnBIJN1x4Fg,6719
25
- beswarm/aient/src/aient/models/chatgpt.py,sha256=ZsYC_-HV4TwQY80XhC-Qbu-5xh5HFHxLYajFoaPnh7o,53180
25
+ beswarm/aient/src/aient/models/chatgpt.py,sha256=LXSMwKRIbWIaPa1Ejk8oCEXVmjZ0rpgFLss35Attn-Q,53493
26
26
  beswarm/aient/src/aient/models/claude.py,sha256=JezghW7y0brl4Y5qiSHvnYR5prQCFywX4RViHt39pGI,26037
27
27
  beswarm/aient/src/aient/models/duckduckgo.py,sha256=1l7vYCs9SG5SWPCbcl7q6pCcB5AUF_r-a4l9frz3Ogo,8115
28
28
  beswarm/aient/src/aient/models/gemini.py,sha256=chGLc-8G_DAOxr10HPoOhvVFW1RvMgHd6mt--VyAW98,14730
@@ -143,7 +143,7 @@ beswarm/tools/search_web.py,sha256=LhgXOSHL9fwxg5T2AAOV4TTJkcJVLogsfRJW2faPvDE,1
143
143
  beswarm/tools/subtasks.py,sha256=8RmDhpyjDI3vhwfVhh6HQZIv-OZ0mI3e27zS3FnF09E,7881
144
144
  beswarm/tools/worker.py,sha256=auoAEeg8U_Q59dlyM2nv9cAJIWG3PuR8oy7Bp2cM2S0,1993
145
145
  beswarm/tools/write_csv.py,sha256=-r5OghcvjCg00hY0YQbp6u31VIJLrgaqDIvczAFoqDE,1470
146
- beswarm-0.2.40.dist-info/METADATA,sha256=kuwYIu8MjnA10nMJMiAFc6lJJ5YYtIWHygkpkA0-k-U,3878
147
- beswarm-0.2.40.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
148
- beswarm-0.2.40.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
149
- beswarm-0.2.40.dist-info/RECORD,,
146
+ beswarm-0.2.42.dist-info/METADATA,sha256=76D76l0hTy9sKoCemriewCdrY6hqypBlnGi3X793tgo,3878
147
+ beswarm-0.2.42.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
148
+ beswarm-0.2.42.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
149
+ beswarm-0.2.42.dist-info/RECORD,,