beswarm 0.1.41__py3-none-any.whl → 0.1.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.
- beswarm/aient/setup.py +1 -1
- beswarm/aient/src/aient/models/chatgpt.py +7 -2
- {beswarm-0.1.41.dist-info → beswarm-0.1.42.dist-info}/METADATA +6 -1
- {beswarm-0.1.41.dist-info → beswarm-0.1.42.dist-info}/RECORD +6 -6
- {beswarm-0.1.41.dist-info → beswarm-0.1.42.dist-info}/WHEEL +1 -1
- {beswarm-0.1.41.dist-info → beswarm-0.1.42.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.0.
|
7
|
+
version="1.0.97",
|
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",
|
@@ -150,8 +150,12 @@ class chatgpt(BaseLLM):
|
|
150
150
|
})
|
151
151
|
self.conversation[convo_id].append({"role": role, "tool_call_id": function_call_id, "content": message})
|
152
152
|
else:
|
153
|
-
self.conversation[convo_id]
|
154
|
-
|
153
|
+
last_user_message = self.conversation[convo_id][-1]["content"]
|
154
|
+
if last_user_message != message:
|
155
|
+
self.conversation[convo_id].append({"role": "assistant", "content": convert_functions_to_xml(function_arguments)})
|
156
|
+
self.conversation[convo_id].append({"role": "user", "content": message})
|
157
|
+
else:
|
158
|
+
self.conversation[convo_id].append({"role": "assistant", "content": "我已经执行过这个工具了,接下来我需要做什么?"})
|
155
159
|
|
156
160
|
else:
|
157
161
|
print('\033[31m')
|
@@ -430,6 +434,7 @@ class chatgpt(BaseLLM):
|
|
430
434
|
response_role = "assistant"
|
431
435
|
|
432
436
|
if self.use_plugins == True:
|
437
|
+
full_response = full_response.replace("<tool_code>", "").replace("</tool_code>", "")
|
433
438
|
function_parameter = parse_function_xml(full_response)
|
434
439
|
if function_parameter:
|
435
440
|
invalid_tools = [tool_dict for tool_dict in function_parameter if tool_dict.get("function_name", "") not in self.plugins.keys()]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: beswarm
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.42
|
4
4
|
Summary: MAS
|
5
5
|
Requires-Python: >=3.11
|
6
6
|
Description-Content-Type: text/markdown
|
@@ -70,6 +70,7 @@ cd ~/Downloads/GitHub/beswarm && docker run --rm \
|
|
70
70
|
|
71
71
|
```
|
72
72
|
docker run --gpus all -it --rm --entrypoint nvidia-smi yym68686/beswarm
|
73
|
+
docker run -it --rm --entrypoint "cat /app/beswarm/aient/src/aient/models/chatgpt.py" yym68686/beswarm
|
73
74
|
```
|
74
75
|
|
75
76
|
服务器安装
|
@@ -80,6 +81,10 @@ pipx ensurepath
|
|
80
81
|
source ~/.bashrc
|
81
82
|
pipx install nvitop
|
82
83
|
pip install beswarm -i https://pypi.tuna.tsinghua.edu.cn/simple
|
84
|
+
|
85
|
+
# 升级 从海外官方 pypi 升级
|
86
|
+
pip install --upgrade beswarm -i https://pypi.org/simple
|
87
|
+
pip install --upgrade beswarm -i https://pypi.tuna.tsinghua.edu.cn/simple
|
83
88
|
```
|
84
89
|
|
85
90
|
main.py
|
@@ -1,7 +1,7 @@
|
|
1
1
|
beswarm/__init__.py,sha256=HZjUOJtZR5QhMuDbq-wukQQn1VrBusNWai_ysGo-VVI,20
|
2
2
|
beswarm/utils.py,sha256=AdDCcqAIIKQEMl7PfryVgeT9G5sHe7QNsZnrvmTGA8E,283
|
3
3
|
beswarm/aient/main.py,sha256=SiYAIgQlLJqYusnTVEJOx1WNkSJKMImhgn5aWjfroxg,3814
|
4
|
-
beswarm/aient/setup.py,sha256=
|
4
|
+
beswarm/aient/setup.py,sha256=mPMhSd_IIo8xa60gzJPl4D3S4bSr5JbDsDnW9OOWSes,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
|
@@ -16,7 +16,7 @@ beswarm/aient/src/aient/core/test/test_payload.py,sha256=8jBiJY1uidm1jzL-EiK0s6U
|
|
16
16
|
beswarm/aient/src/aient/models/__init__.py,sha256=ouNDNvoBBpIFrLsk09Q_sq23HR0GbLAKfGLIFmfEuXE,219
|
17
17
|
beswarm/aient/src/aient/models/audio.py,sha256=kRd-8-WXzv4vwvsTGwnstK-WR8--vr9CdfCZzu8y9LA,1934
|
18
18
|
beswarm/aient/src/aient/models/base.py,sha256=z-Z0pJfTN2x0cuwfvu0BdMRY9O-RmLwHEnBIJN1x4Fg,6719
|
19
|
-
beswarm/aient/src/aient/models/chatgpt.py,sha256
|
19
|
+
beswarm/aient/src/aient/models/chatgpt.py,sha256=q8dx4PD57m4a3gJHrzJr7v_Pl8X0RKDBCZHZEtIMxkk,45480
|
20
20
|
beswarm/aient/src/aient/models/claude.py,sha256=JezghW7y0brl4Y5qiSHvnYR5prQCFywX4RViHt39pGI,26037
|
21
21
|
beswarm/aient/src/aient/models/duckduckgo.py,sha256=1l7vYCs9SG5SWPCbcl7q6pCcB5AUF_r-a4l9frz3Ogo,8115
|
22
22
|
beswarm/aient/src/aient/models/gemini.py,sha256=chGLc-8G_DAOxr10HPoOhvVFW1RvMgHd6mt--VyAW98,14730
|
@@ -127,7 +127,7 @@ beswarm/tools/repomap.py,sha256=CwvwoN5Swr42EzrORTTeV8MMb7mPviy4a4b0fxBu50k,4082
|
|
127
127
|
beswarm/tools/search_arxiv.py,sha256=9slwBemXjEqrd7-YgVmyMijPXlkhZCybEDRVhWVQ9B0,7937
|
128
128
|
beswarm/tools/think.py,sha256=WLw-7jNIsnS6n8MMSYUin_f-BGLENFmnKM2LISEp0co,1760
|
129
129
|
beswarm/tools/worker.py,sha256=FfKCx7KFNbMRoAXtjU1_nJQjx9WHny7KBq8OXSYICJs,5334
|
130
|
-
beswarm-0.1.
|
131
|
-
beswarm-0.1.
|
132
|
-
beswarm-0.1.
|
133
|
-
beswarm-0.1.
|
130
|
+
beswarm-0.1.42.dist-info/METADATA,sha256=Oy803Y6RWyApm2aDx7sU_pQxx548uDRF0zvsuHWXLnw,3422
|
131
|
+
beswarm-0.1.42.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
132
|
+
beswarm-0.1.42.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
|
133
|
+
beswarm-0.1.42.dist-info/RECORD,,
|
File without changes
|