beswarm 0.1.80__py3-none-any.whl → 0.1.81__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/tools/worker.py +14 -1
- {beswarm-0.1.80.dist-info → beswarm-0.1.81.dist-info}/METADATA +1 -1
- {beswarm-0.1.80.dist-info → beswarm-0.1.81.dist-info}/RECORD +5 -5
- {beswarm-0.1.80.dist-info → beswarm-0.1.81.dist-info}/WHEEL +0 -0
- {beswarm-0.1.80.dist-info → beswarm-0.1.81.dist-info}/top_level.txt +0 -0
beswarm/tools/worker.py
CHANGED
@@ -27,6 +27,7 @@ async def worker(goal, tools, work_dir, cache_messages=None):
|
|
27
27
|
Returns:
|
28
28
|
str: 当任务成功完成时,返回字符串 "任务已完成"。
|
29
29
|
"""
|
30
|
+
start_time = datetime.now()
|
30
31
|
|
31
32
|
tools_json = [value for _, value in get_function_call_list(tools).items()]
|
32
33
|
work_agent_system_prompt = system_prompt.format(
|
@@ -152,9 +153,15 @@ async def worker(goal, tools, work_dir, cache_messages=None):
|
|
152
153
|
print("✅ 工作智能体回复:", result)
|
153
154
|
need_instruction = True
|
154
155
|
|
156
|
+
end_time = datetime.now()
|
157
|
+
total_time = end_time - start_time
|
158
|
+
print(f"\n任务开始时间: {start_time.strftime('%Y-%m-%d %H:%M:%S')}")
|
159
|
+
print(f"\n任务结束时间: {end_time.strftime('%Y-%m-%d %H:%M:%S')}")
|
160
|
+
print(f"总用时: {total_time}")
|
155
161
|
return "任务已完成"
|
156
162
|
|
157
163
|
async def worker_gen(goal, tools, work_dir, cache_messages=None):
|
164
|
+
start_time = datetime.now()
|
158
165
|
tools_json = [value for _, value in get_function_call_list(tools).items()]
|
159
166
|
work_agent_system_prompt = system_prompt.format(
|
160
167
|
os_version=platform.platform(),
|
@@ -281,4 +288,10 @@ async def worker_gen(goal, tools, work_dir, cache_messages=None):
|
|
281
288
|
continue
|
282
289
|
yield {"assistant": result}
|
283
290
|
print("✅ 工作智能体回复:", result)
|
284
|
-
need_instruction = True
|
291
|
+
need_instruction = True
|
292
|
+
|
293
|
+
end_time = datetime.now()
|
294
|
+
total_time = end_time - start_time
|
295
|
+
print(f"\n任务开始时间: {start_time.strftime('%Y-%m-%d %H:%M:%S')}")
|
296
|
+
print(f"\n任务结束时间: {end_time.strftime('%Y-%m-%d %H:%M:%S')}")
|
297
|
+
print(f"总用时: {total_time}")
|
@@ -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=
|
133
|
-
beswarm-0.1.
|
134
|
-
beswarm-0.1.
|
135
|
-
beswarm-0.1.
|
136
|
-
beswarm-0.1.
|
132
|
+
beswarm/tools/worker.py,sha256=dhhr17Uarq6fyqV4m2DLpv-xj4Vy3pT3XcB3i7ztQFo,13846
|
133
|
+
beswarm-0.1.81.dist-info/METADATA,sha256=mTfVDC4hBNnacdlmGnL4cLWuijjlq2VV9Nqh3thg4jQ,3553
|
134
|
+
beswarm-0.1.81.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
135
|
+
beswarm-0.1.81.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
|
136
|
+
beswarm-0.1.81.dist-info/RECORD,,
|
File without changes
|
File without changes
|