aient 1.0.39__py3-none-any.whl → 1.0.41__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.
- aient/models/chatgpt.py +8 -0
- {aient-1.0.39.dist-info → aient-1.0.41.dist-info}/METADATA +1 -1
- {aient-1.0.39.dist-info → aient-1.0.41.dist-info}/RECORD +6 -6
- {aient-1.0.39.dist-info → aient-1.0.41.dist-info}/WHEEL +0 -0
- {aient-1.0.39.dist-info → aient-1.0.41.dist-info}/licenses/LICENSE +0 -0
- {aient-1.0.39.dist-info → aient-1.0.41.dist-info}/top_level.txt +0 -0
aient/models/chatgpt.py
CHANGED
@@ -173,6 +173,9 @@ class chatgpt(BaseLLM):
|
|
173
173
|
and type(self.conversation[convo_id][message_index + 1]["content"]) == str:
|
174
174
|
self.conversation[convo_id][message_index]["content"] = [self.conversation[convo_id][message_index]["content"]]
|
175
175
|
self.conversation[convo_id][message_index + 1]["content"] = [{"type": "text", "text": self.conversation[convo_id][message_index + 1]["content"]}]
|
176
|
+
if type(self.conversation[convo_id][message_index]["content"]) == dict \
|
177
|
+
and type(self.conversation[convo_id][message_index + 1]["content"]) == list:
|
178
|
+
self.conversation[convo_id][message_index]["content"] = [self.conversation[convo_id][message_index]["content"]]
|
176
179
|
self.conversation[convo_id][message_index]["content"] += self.conversation[convo_id][message_index + 1]["content"]
|
177
180
|
self.conversation[convo_id].pop(message_index + 1)
|
178
181
|
conversation_len = conversation_len - 1
|
@@ -259,6 +262,9 @@ class chatgpt(BaseLLM):
|
|
259
262
|
}
|
260
263
|
|
261
264
|
# 添加工具相关信息
|
265
|
+
if kwargs.get("plugins", None):
|
266
|
+
self.plugins = kwargs.get("plugins")
|
267
|
+
|
262
268
|
plugins_status = kwargs.get("plugins", self.plugins)
|
263
269
|
if not (all(value == False for value in plugins_status.values()) or self.use_plugins == False):
|
264
270
|
tools_request_body = []
|
@@ -463,6 +469,7 @@ class chatgpt(BaseLLM):
|
|
463
469
|
function_name=function_call_name, total_tokens=total_tokens,
|
464
470
|
model=model or self.engine, function_arguments=function_full_response,
|
465
471
|
function_call_id=function_call_id, api_key=kwargs.get('api_key', self.api_key),
|
472
|
+
api_url=kwargs.get('api_url', self.api_url.chat_url),
|
466
473
|
plugins=kwargs.get("plugins", self.plugins), system_prompt=system_prompt
|
467
474
|
):
|
468
475
|
yield chunk
|
@@ -472,6 +479,7 @@ class chatgpt(BaseLLM):
|
|
472
479
|
function_name=function_call_name, total_tokens=total_tokens,
|
473
480
|
model=model or self.engine, function_arguments=function_full_response,
|
474
481
|
function_call_id=function_call_id, api_key=kwargs.get('api_key', self.api_key),
|
482
|
+
api_url=kwargs.get('api_url', self.api_url.chat_url),
|
475
483
|
plugins=kwargs.get("plugins", self.plugins), system_prompt=system_prompt
|
476
484
|
):
|
477
485
|
yield chunk
|
@@ -12,7 +12,7 @@ aient/core/test/test_payload.py,sha256=8jBiJY1uidm1jzL-EiK0s6UGmW9XkdsuuKFGrwFhF
|
|
12
12
|
aient/models/__init__.py,sha256=ouNDNvoBBpIFrLsk09Q_sq23HR0GbLAKfGLIFmfEuXE,219
|
13
13
|
aient/models/audio.py,sha256=kRd-8-WXzv4vwvsTGwnstK-WR8--vr9CdfCZzu8y9LA,1934
|
14
14
|
aient/models/base.py,sha256=Loyt2F2WrDMBbK-sdmTtgkLVtdUXxK5tg4qoI6nc0Xo,7527
|
15
|
-
aient/models/chatgpt.py,sha256=
|
15
|
+
aient/models/chatgpt.py,sha256=NeoikE3egtRsDdT8DgvZRq4cW5ylmLsVmrXgdSTJmgg,39168
|
16
16
|
aient/models/claude.py,sha256=thK9P8qkaaoUN3OOJ9Shw4KDs-pAGKPoX4FOPGFXva8,28597
|
17
17
|
aient/models/duckduckgo.py,sha256=1l7vYCs9SG5SWPCbcl7q6pCcB5AUF_r-a4l9frz3Ogo,8115
|
18
18
|
aient/models/gemini.py,sha256=chGLc-8G_DAOxr10HPoOhvVFW1RvMgHd6mt--VyAW98,14730
|
@@ -29,8 +29,8 @@ aient/plugins/websearch.py,sha256=yiBzqXK5X220ibR-zko3VDsn4QOnLu1k6E2YOygCeTQ,15
|
|
29
29
|
aient/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
30
|
aient/utils/prompt.py,sha256=UcSzKkFE4-h_1b6NofI6xgk3GoleqALRKY8VBaXLjmI,11311
|
31
31
|
aient/utils/scripts.py,sha256=7QCR7iQcWtwLgrhRFxQzPeb20N0kB6-T9MxDoSpTsjk,21573
|
32
|
-
aient-1.0.
|
33
|
-
aient-1.0.
|
34
|
-
aient-1.0.
|
35
|
-
aient-1.0.
|
36
|
-
aient-1.0.
|
32
|
+
aient-1.0.41.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
|
33
|
+
aient-1.0.41.dist-info/METADATA,sha256=Fzmy6dlNfk7NHy0zaakRoa-747O_nE6ng1o6jVf6Tco,4986
|
34
|
+
aient-1.0.41.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
35
|
+
aient-1.0.41.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
|
36
|
+
aient-1.0.41.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|