beswarm 0.1.69__py3-none-any.whl → 0.1.71__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 +1 -1
- beswarm/aient/src/aient/core/request.py +11 -2
- beswarm/tools/edit_file.py +2 -0
- beswarm/tools/worker.py +2 -2
- {beswarm-0.1.69.dist-info → beswarm-0.1.71.dist-info}/METADATA +1 -1
- {beswarm-0.1.69.dist-info → beswarm-0.1.71.dist-info}/RECORD +8 -8
- {beswarm-0.1.69.dist-info → beswarm-0.1.71.dist-info}/WHEEL +0 -0
- {beswarm-0.1.69.dist-info → beswarm-0.1.71.dist-info}/top_level.txt +0 -0
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.
|
7
|
+
version="1.1.22",
|
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",
|
@@ -352,7 +352,15 @@ async def get_vertex_gemini_payload(request, engine, provider, api_key=None):
|
|
352
352
|
stream=gemini_stream
|
353
353
|
)
|
354
354
|
elif api_key is not None and api_key[2] == ".":
|
355
|
-
|
355
|
+
if provider.get("project_id") and "gemini-2.5-pro-preview-06-05" == original_model:
|
356
|
+
if isinstance(provider.get("project_id"), list):
|
357
|
+
api_key_index = provider.get("api").index(api_key)
|
358
|
+
project_id = provider.get("project_id")[api_key_index]
|
359
|
+
else:
|
360
|
+
project_id = provider.get("project_id")
|
361
|
+
url = f"https://aiplatform.googleapis.com/v1/projects/{project_id}/locations/global/publishers/google/models/{original_model}:{gemini_stream}?key={api_key}"
|
362
|
+
else:
|
363
|
+
url = f"https://aiplatform.googleapis.com/v1/publishers/google/models/{original_model}:{gemini_stream}?key={api_key}"
|
356
364
|
headers.pop("Authorization", None)
|
357
365
|
elif "gemini-2.5-pro-exp-03-25" == original_model:
|
358
366
|
url = "https://aiplatform.googleapis.com/v1/projects/{PROJECT_ID}/locations/{LOCATION}/publishers/google/models/{MODEL_ID}:{stream}".format(
|
@@ -426,7 +434,8 @@ async def get_vertex_gemini_payload(request, engine, provider, api_key=None):
|
|
426
434
|
messages.append({"role": msg.role, "parts": content})
|
427
435
|
elif msg.role == "system":
|
428
436
|
system_prompt = system_prompt + "\n\n" + content[0]["text"]
|
429
|
-
|
437
|
+
if system_prompt.strip():
|
438
|
+
systemInstruction = {"parts": [{"text": system_prompt}]}
|
430
439
|
|
431
440
|
if any(off_model in original_model for off_model in gemini_max_token_65k_models):
|
432
441
|
safety_settings = "OFF"
|
beswarm/tools/edit_file.py
CHANGED
@@ -52,6 +52,8 @@ def edit_file(file_path, diff_content, match_precision=0.8):
|
|
52
52
|
|
53
53
|
if not diff_blocks:
|
54
54
|
return f"错误: 无效的diff格式,未找到搜索和替换块"
|
55
|
+
if len(diff_blocks) > 1:
|
56
|
+
return f"错误: 只支持单次修改,`diff_content`参数中**必须只包含一个** `<<<<<<< SEARCH ... >>>>>>> REPLACE` 块,但找到了 {len(diff_blocks)} 个修改块"
|
55
57
|
|
56
58
|
# 记录修改次数和行数变化
|
57
59
|
edits_count = 0
|
beswarm/tools/worker.py
CHANGED
@@ -137,7 +137,7 @@ async def worker(goal, tools, work_dir, cache_messages=None):
|
|
137
137
|
next_instruction = await instruction_agent_task()
|
138
138
|
|
139
139
|
# 检查任务是否完成
|
140
|
-
if "任务已完成" in next_instruction:
|
140
|
+
if "任务已完成" in next_instruction and len(next_instruction) < 10:
|
141
141
|
print("\n✅ 任务已完成!")
|
142
142
|
break
|
143
143
|
if "find_and_click_element" in str(tools_json):
|
@@ -265,7 +265,7 @@ async def worker_gen(goal, tools, work_dir, cache_messages=None):
|
|
265
265
|
yield {"user": next_instruction}
|
266
266
|
|
267
267
|
# 检查任务是否完成
|
268
|
-
if "任务已完成" in next_instruction:
|
268
|
+
if "任务已完成" in next_instruction and len(next_instruction) < 10:
|
269
269
|
print("\n✅ 任务已完成!")
|
270
270
|
break
|
271
271
|
if "find_and_click_element" in str(tools_json):
|
@@ -1,12 +1,12 @@
|
|
1
1
|
beswarm/__init__.py,sha256=HZjUOJtZR5QhMuDbq-wukQQn1VrBusNWai_ysGo-VVI,20
|
2
2
|
beswarm/utils.py,sha256=Z2Kuus2BLp9EHUC2ZNL9iUsb6NWnPj-MTA7SYzGyg24,1755
|
3
3
|
beswarm/aient/main.py,sha256=SiYAIgQlLJqYusnTVEJOx1WNkSJKMImhgn5aWjfroxg,3814
|
4
|
-
beswarm/aient/setup.py,sha256=
|
4
|
+
beswarm/aient/setup.py,sha256=A0eIXclELhouscHERrqUaRuR9D-nvjGmsOygFVrVsF0,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
|
-
beswarm/aient/src/aient/core/request.py,sha256=
|
9
|
+
beswarm/aient/src/aient/core/request.py,sha256=1t11Ep_MxVtmdkFm-vGNSFWFHgbM2DDemVZSrujT8Pc,67175
|
10
10
|
beswarm/aient/src/aient/core/response.py,sha256=YphzhA9jtQKzWb3L4XGTp9xJZ2FOzHr1aAMTsi896FQ,33201
|
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
|
@@ -121,15 +121,15 @@ beswarm/queries/tree-sitter-languages/scala-tags.scm,sha256=UxQjz80JIrrJ7Pm56uUn
|
|
121
121
|
beswarm/queries/tree-sitter-languages/typescript-tags.scm,sha256=OMdCeedPiA24ky82DpgTMKXK_l2ySTuF2zrQ2fJAi9E,1253
|
122
122
|
beswarm/tools/__init__.py,sha256=IJExt6D58d2yxBOjHVC6wYGhV7Pb7okmX61RvyqSCSY,1150
|
123
123
|
beswarm/tools/click.py,sha256=TygaekCXTmU3fIu6Uom7ZcyzEgYMlCC_GX-5SmWHuLI,20762
|
124
|
-
beswarm/tools/edit_file.py,sha256=
|
124
|
+
beswarm/tools/edit_file.py,sha256=npe_j0FHOtZu8q3cG4oFtaReVC02HY01NjPlSi3pJrE,8369
|
125
125
|
beswarm/tools/planner.py,sha256=lguBCS6kpwNPoXQvqH-WySabVubT82iyWOkJnjt6dXw,1265
|
126
126
|
beswarm/tools/repomap.py,sha256=N09K0UgwjCN7Zjg_5TYlVsulp3n2fztYlS8twalChU8,45003
|
127
127
|
beswarm/tools/screenshot.py,sha256=u6t8FCgW5YHJ_Oc4coo8e0F3wTusWE_-H8dFh1rBq9Q,1011
|
128
128
|
beswarm/tools/search_arxiv.py,sha256=9slwBemXjEqrd7-YgVmyMijPXlkhZCybEDRVhWVQ9B0,7937
|
129
129
|
beswarm/tools/search_web.py,sha256=B24amOnGHnmdV_6S8bw8O2PdhZRRIDtJjg-wXcfP7dQ,11859
|
130
130
|
beswarm/tools/think.py,sha256=WLw-7jNIsnS6n8MMSYUin_f-BGLENFmnKM2LISEp0co,1760
|
131
|
-
beswarm/tools/worker.py,sha256=
|
132
|
-
beswarm-0.1.
|
133
|
-
beswarm-0.1.
|
134
|
-
beswarm-0.1.
|
135
|
-
beswarm-0.1.
|
131
|
+
beswarm/tools/worker.py,sha256=DLYzMgKzpf4UYGNKKJix__DHw6LHtX_T9CLVaexDQMg,12909
|
132
|
+
beswarm-0.1.71.dist-info/METADATA,sha256=vE7fd4W58qHqJA6ilddD5-aZcKdbQ6jUf8R_fhGdhuw,3553
|
133
|
+
beswarm-0.1.71.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
134
|
+
beswarm-0.1.71.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
|
135
|
+
beswarm-0.1.71.dist-info/RECORD,,
|
File without changes
|
File without changes
|