aient 1.1.42__py3-none-any.whl → 1.1.44__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/core/request.py CHANGED
@@ -182,9 +182,15 @@ async def get_gemini_payload(request, engine, provider, api_key=None):
182
182
  processed_tools = []
183
183
  for tool in value:
184
184
  function_def = tool["function"]
185
+ # gemini不支持parameters里面的additionalProperties字段,需要删除
186
+ if safe_get(function_def, "parameters", "additionalProperties", default=None) is not None:
187
+ del function_def["parameters"]["additionalProperties"]
188
+
185
189
  # 处理 parameters.properties 中的 default 字段
186
190
  if safe_get(function_def, "parameters", "properties", default=None):
187
191
  for prop_value in function_def["parameters"]["properties"].values():
192
+ if "additionalProperties" in prop_value:
193
+ del prop_value["additionalProperties"]
188
194
  if "default" in prop_value:
189
195
  # 将 default 值添加到 description 中
190
196
  default_value = prop_value["default"]
aient/models/chatgpt.py CHANGED
@@ -570,6 +570,9 @@ class chatgpt(BaseLLM):
570
570
  elif tool_name == "read_image" and "<tool_error>" not in tool_response:
571
571
  tool_info["base64_image"] = tool_response
572
572
  all_responses.append(f"[{tool_name}({tool_args}) Result]:\n\nRead image successfully!")
573
+ elif tool_response.startswith("data:image/") and ";base64," in tool_response and "<tool_error>" not in tool_response:
574
+ tool_info["base64_image"] = tool_response
575
+ all_responses.append(f"[{tool_name}({tool_args}) Result]:\n\nRead image successfully!")
573
576
  else:
574
577
  all_responses.append(f"[{tool_name}({tool_args}) Result]:\n\n{tool_response}")
575
578
 
@@ -383,7 +383,7 @@ if __name__ == "__main__":
383
383
  # result = asyncio.run(docQA("https://yym68686.top", "说一下HSTL pipeline"))
384
384
  # result = asyncio.run(docQA("https://wiki.yym68686.top", "PyTorch to MindSpore翻译思路是什么?"))
385
385
  # print(result['answer'])
386
- # result = asyncio.run(pdfQA("https://api.telegram.org/file/bot5569497961:AAHobhUuydAwD8SPkXZiVFybvZJOmGrST_w/documents/file_1.pdf", "HSTL的pipeline详细讲一下"))
386
+ # result = asyncio.run(pdfQA("https://api.telegram.org/file/bot/documents/file_1.pdf", "HSTL的pipeline详细讲一下"))
387
387
  # print(result)
388
388
  # source_url = set([i.metadata['source'] for i in result["source_documents"]])
389
389
  # source_url = "\n".join(source_url)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aient
3
- Version: 1.1.42
3
+ Version: 1.1.44
4
4
  Summary: Aient: The Awakening of Agent.
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -4,7 +4,7 @@ aient/core/.gitignore,sha256=5JRRlYYsqt_yt6iFvvzhbqh2FTUQMqwo6WwIuFzlGR8,13
4
4
  aient/core/__init__.py,sha256=NxjebTlku35S4Dzr16rdSqSTWUvvwEeACe8KvHJnjPg,34
5
5
  aient/core/log_config.py,sha256=kz2_yJv1p-o3lUQOwA3qh-LSc3wMHv13iCQclw44W9c,274
6
6
  aient/core/models.py,sha256=d4MISNezTSe0ls0-fjuToI2SoT-sk5fWqAJuKVinIlo,7502
7
- aient/core/request.py,sha256=E2fujOgR8Jxl9kWVZcs7ylz9vftwIye3cbL6HgC-Gn4,71977
7
+ aient/core/request.py,sha256=90Mit0vrwoDJYQQVJmBltQdTnMaGKSmZNBMRXsoJ19A,72406
8
8
  aient/core/response.py,sha256=mAVsCnNhWY09DXNe0lyPUJq-1ljtGjC67Az-Uh7ozIw,35166
9
9
  aient/core/utils.py,sha256=NcXdb8zBN0GE01OGaUzg8U34RaraoFf2MaLDDGFvvC4,27492
10
10
  aient/core/test/test_base_api.py,sha256=pWnycRJbuPSXKKU9AQjWrMAX1wiLC_014Qc9hh5C2Pw,524
@@ -14,7 +14,7 @@ aient/core/test/test_payload.py,sha256=8jBiJY1uidm1jzL-EiK0s6UGmW9XkdsuuKFGrwFhF
14
14
  aient/models/__init__.py,sha256=ouNDNvoBBpIFrLsk09Q_sq23HR0GbLAKfGLIFmfEuXE,219
15
15
  aient/models/audio.py,sha256=kRd-8-WXzv4vwvsTGwnstK-WR8--vr9CdfCZzu8y9LA,1934
16
16
  aient/models/base.py,sha256=z-Z0pJfTN2x0cuwfvu0BdMRY9O-RmLwHEnBIJN1x4Fg,6719
17
- aient/models/chatgpt.py,sha256=MKCdstV_gTkcf_bT2mmQVDLgK5f4PUUfEO3_WHzahpE,46665
17
+ aient/models/chatgpt.py,sha256=Yum3_-LgHmFUII0AljfNNfSc8gBhJzyPYAWZJyr4yFo,46969
18
18
  aient/models/claude.py,sha256=JezghW7y0brl4Y5qiSHvnYR5prQCFywX4RViHt39pGI,26037
19
19
  aient/models/duckduckgo.py,sha256=1l7vYCs9SG5SWPCbcl7q6pCcB5AUF_r-a4l9frz3Ogo,8115
20
20
  aient/models/gemini.py,sha256=chGLc-8G_DAOxr10HPoOhvVFW1RvMgHd6mt--VyAW98,14730
@@ -32,13 +32,13 @@ aient/plugins/read_image.py,sha256=4FbIiMNVFUQpNyiH5ApGSRvOD9ujcXGyuqlGTJMd7ac,4
32
32
  aient/plugins/readonly.py,sha256=qK5-kBM3NDH1b-otFxFHpAjV5BXEY_e7cTWBcpP7G5k,710
33
33
  aient/plugins/registry.py,sha256=YknzhieU_8nQ3oKlUSSWDB4X7t2Jx0JnqT2Jd9Xsvfk,3574
34
34
  aient/plugins/run_python.py,sha256=MohvdtZUTDLrHBDtJ9L2_Qu1pWAGrkbzsGmmn5tMN20,4614
35
- aient/plugins/websearch.py,sha256=FsUxM9GL4AAjmYJ8TS2jSqv4qfCAoOkCQZH59whtAXk,15304
35
+ aient/plugins/websearch.py,sha256=51tNjEe3pAElXY3SIxaXFYjRrHdGiY6nkmVPU1lTWoY,15258
36
36
  aient/plugins/write_file.py,sha256=hExFLuoNPtjYxJI3pVbofZRpokvUabpXdEkd3mZJPPc,3778
37
37
  aient/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  aient/utils/prompt.py,sha256=UcSzKkFE4-h_1b6NofI6xgk3GoleqALRKY8VBaXLjmI,11311
39
39
  aient/utils/scripts.py,sha256=h7EA2xBydUF_wdZLsPgjCq4Egdycx1gf2qrdrm0I7y0,40909
40
- aient-1.1.42.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
41
- aient-1.1.42.dist-info/METADATA,sha256=RjHNJ9-ENRswxsI7fPoDt6CszhkD61UcfOdnpPKb9ww,4968
42
- aient-1.1.42.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
- aient-1.1.42.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
44
- aient-1.1.42.dist-info/RECORD,,
40
+ aient-1.1.44.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
41
+ aient-1.1.44.dist-info/METADATA,sha256=bSGcfygihGgS13WzrgiM_-WrFepIRVyIpN_tTiJEYjY,4968
42
+ aient-1.1.44.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
+ aient-1.1.44.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
44
+ aient-1.1.44.dist-info/RECORD,,
File without changes