beswarm 0.1.78__py3-none-any.whl → 0.1.80__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.
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.28",
7
+ version="1.1.30",
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",
@@ -86,7 +86,7 @@ async def fetch_gemini_response_stream(client, url, headers, payload, model):
86
86
  if is_thinking:
87
87
  sse_string = await generate_sse_response(timestamp, model, reasoning_content=content)
88
88
  yield sse_string
89
- elif not image_base64:
89
+ elif not image_base64 and content:
90
90
  sse_string = await generate_sse_response(timestamp, model, content=content)
91
91
  yield sse_string
92
92
  except json.JSONDecodeError:
@@ -16,9 +16,9 @@ async def get_tools_result_async(function_call_name, function_full_response, fun
16
16
  invalid_args = [arg_name for arg_name in call_args_name_list if arg_name not in required_args]
17
17
  if invalid_args:
18
18
  function_response = (
19
- "function_response:"
19
+ "function_response: "
20
20
  "<tool_error>"
21
- f"无效的参数: {invalid_args}"
21
+ f"无效的参数: {invalid_args} "
22
22
  f"{function_call_name} 只允许使用以下参数: {required_args}"
23
23
  "</tool_error>"
24
24
  )
beswarm/tools/worker.py CHANGED
@@ -116,7 +116,7 @@ async def worker(goal, tools, work_dir, cache_messages=None):
116
116
  if "任务已完成" == next_instruction.strip():
117
117
  break
118
118
  if "<instructions>" in next_instruction and "</instructions>" not in next_instruction:
119
- next_instruction = next_instruction + "</instructions>"
119
+ next_instruction = next_instruction + "\n</instructions>"
120
120
  next_instruction = extract_xml_content(next_instruction, "instructions")
121
121
  if not next_instruction:
122
122
  print("\n❌ 指令智能体生成的指令不符合要求,请重新生成。")
@@ -244,7 +244,7 @@ async def worker_gen(goal, tools, work_dir, cache_messages=None):
244
244
  if "任务已完成" == next_instruction.strip():
245
245
  break
246
246
  if "<instructions>" in next_instruction and "</instructions>" not in next_instruction:
247
- next_instruction = next_instruction + "</instructions>"
247
+ next_instruction = next_instruction + "\n</instructions>"
248
248
  next_instruction = extract_xml_content(next_instruction, "instructions")
249
249
  if not next_instruction:
250
250
  print("\n❌ 指令智能体生成的指令不符合要求,请重新生成。")
beswarm/utils.py CHANGED
@@ -44,4 +44,9 @@ async def get_current_screen_image_message(prompt):
44
44
  image_message = await get_image_message(f"data:{IMAGE_MIME_TYPE};base64," + base64_encoded_image, engine_type)
45
45
  message_list.append(text_message)
46
46
  message_list.append(image_message)
47
- return message_list
47
+ return message_list
48
+
49
+ if __name__ == "__main__":
50
+ print(extract_xml_content("<instructions>\n123</instructions>", "instructions"))
51
+
52
+ # python -m beswarm.utils
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beswarm
3
- Version: 0.1.78
3
+ Version: 0.1.80
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
- beswarm/utils.py,sha256=Z2Kuus2BLp9EHUC2ZNL9iUsb6NWnPj-MTA7SYzGyg24,1755
2
+ beswarm/utils.py,sha256=YBuoJC240LNKTTCvkoZjohylT71PM6QZLpZofXWLaJ0,1895
3
3
  beswarm/aient/main.py,sha256=SiYAIgQlLJqYusnTVEJOx1WNkSJKMImhgn5aWjfroxg,3814
4
- beswarm/aient/setup.py,sha256=Gq_GJudeaB2dhYFR6-KUFW40TKhARnt1_h4JlOBJ6eQ,487
4
+ beswarm/aient/setup.py,sha256=JOpHzSrDIRNFL3Bq4eRHzZRMsUsAOiPg_zBg65UiJbE,487
5
5
  beswarm/aient/src/aient/__init__.py,sha256=SRfF7oDVlOOAi6nGKiJIUK6B_arqYLO9iSMp-2IZZps,21
6
6
  beswarm/aient/src/aient/core/__init__.py,sha256=NxjebTlku35S4Dzr16rdSqSTWUvvwEeACe8KvHJnjPg,34
7
7
  beswarm/aient/src/aient/core/log_config.py,sha256=kz2_yJv1p-o3lUQOwA3qh-LSc3wMHv13iCQclw44W9c,274
8
8
  beswarm/aient/src/aient/core/models.py,sha256=g6rUcNwSTHwmBzt1epsu_2Re8YRFKVCSXRUIFJZpAb4,7432
9
9
  beswarm/aient/src/aient/core/request.py,sha256=Zp5Q6iZp3OWZt95cZLh0VmbwvF18jXQB88UfA_3AKt8,67279
10
- beswarm/aient/src/aient/core/response.py,sha256=YphzhA9jtQKzWb3L4XGTp9xJZ2FOzHr1aAMTsi896FQ,33201
10
+ beswarm/aient/src/aient/core/response.py,sha256=WIJhvf3Th3-XW3MsDq8QdzxXcNe5q1mCKcCZx8pzm2A,33213
11
11
  beswarm/aient/src/aient/core/utils.py,sha256=zidsBUBd3KskzcxQcPB1y5x1RhtWcbZeWvmgb4LAadA,27318
12
12
  beswarm/aient/src/aient/core/test/test_base_api.py,sha256=pWnycRJbuPSXKKU9AQjWrMAX1wiLC_014Qc9hh5C2Pw,524
13
13
  beswarm/aient/src/aient/core/test/test_geminimask.py,sha256=HFX8jDbNg_FjjgPNxfYaR-0-roUrOO-ND-FVsuxSoiw,13254
@@ -24,7 +24,7 @@ beswarm/aient/src/aient/models/groq.py,sha256=eXfSOaPxgQEtk4U8qseArN8rFYOFBfMsPw
24
24
  beswarm/aient/src/aient/models/vertex.py,sha256=qVD5l1Q538xXUPulxG4nmDjXE1VoV4yuAkTCpIeJVw0,16795
25
25
  beswarm/aient/src/aient/plugins/__init__.py,sha256=p3KO6Aa3Lupos4i2SjzLQw1hzQTigOAfEHngsldrsyk,986
26
26
  beswarm/aient/src/aient/plugins/arXiv.py,sha256=yHjb6PS3GUWazpOYRMKMzghKJlxnZ5TX8z9F6UtUVow,1461
27
- beswarm/aient/src/aient/plugins/config.py,sha256=QGyI9LlNaU36GUpY531o7UbTFBB39u7LfS6rrx_RTWw,7103
27
+ beswarm/aient/src/aient/plugins/config.py,sha256=2DXH-LP9KGl_P4467chJu3q4AAbX5nSn4DIkdI0aYH8,7105
28
28
  beswarm/aient/src/aient/plugins/excute_command.py,sha256=XEGg1AX8U8iUBaHBqoCmZHLCpI_wQiDSmHDFvqG6ONE,10243
29
29
  beswarm/aient/src/aient/plugins/get_time.py,sha256=Ih5XIW5SDAIhrZ9W4Qe5Hs1k4ieKPUc_LAd6ySNyqZk,654
30
30
  beswarm/aient/src/aient/plugins/image.py,sha256=ZElCIaZznE06TN9xW3DrSukS7U3A5_cjk1Jge4NzPxw,2072
@@ -129,8 +129,8 @@ beswarm/tools/screenshot.py,sha256=u6t8FCgW5YHJ_Oc4coo8e0F3wTusWE_-H8dFh1rBq9Q,1
129
129
  beswarm/tools/search_arxiv.py,sha256=GpuIOYX8T0iRC-X-hmuR9AUJVn15WWZq864DaoC7BUc,8004
130
130
  beswarm/tools/search_web.py,sha256=B24amOnGHnmdV_6S8bw8O2PdhZRRIDtJjg-wXcfP7dQ,11859
131
131
  beswarm/tools/think.py,sha256=WLw-7jNIsnS6n8MMSYUin_f-BGLENFmnKM2LISEp0co,1760
132
- beswarm/tools/worker.py,sha256=Gx_xMuqFApBLBjfyuHcpMvK76k94f89CYMRyQaPw2UU,13251
133
- beswarm-0.1.78.dist-info/METADATA,sha256=wQJj1Fcb63MZ-fEaUb6lSRb8LxMQIs7qRKFWCWY3Xmw,3553
134
- beswarm-0.1.78.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
135
- beswarm-0.1.78.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
136
- beswarm-0.1.78.dist-info/RECORD,,
132
+ beswarm/tools/worker.py,sha256=RXR4cuq0klK6psrFRJZXgQGxvRMlpMu6Vxw6a5bqZo0,13255
133
+ beswarm-0.1.80.dist-info/METADATA,sha256=wKaME4JZs7TxW0TEM2gZ2JudfClX7MaBAYolprWIsN4,3553
134
+ beswarm-0.1.80.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
135
+ beswarm-0.1.80.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
136
+ beswarm-0.1.80.dist-info/RECORD,,