aient 1.1.41__py3-none-any.whl → 1.1.43__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
@@ -239,15 +239,17 @@ async def get_gemini_payload(request, engine, provider, api_key=None):
239
239
  if m:
240
240
  try:
241
241
  val = int(m.group(1))
242
- if val < 0:
243
- val = 0
244
- elif val > 32768 and "gemini-2.5-pro" in original_model:
242
+ if val > 32768 and "gemini-2.5-pro" in original_model:
245
243
  val = 32768
246
244
  elif val < 128 and "gemini-2.5-pro" in original_model:
247
245
  val = 128
246
+ elif val <= 0:
247
+ val = 0
248
248
  elif val > 24576:
249
249
  val = 24576
250
250
  payload["generationConfig"]["thinkingConfig"]["thinkingBudget"] = val
251
+ if val == 0:
252
+ payload["generationConfig"].pop("thinkingConfig", None)
251
253
  except ValueError:
252
254
  # 如果转换为整数失败,忽略思考预算设置
253
255
  pass
@@ -535,15 +537,17 @@ async def get_vertex_gemini_payload(request, engine, provider, api_key=None):
535
537
  if m:
536
538
  try:
537
539
  val = int(m.group(1))
538
- if val < 0:
539
- val = 0
540
- elif val > 32768 and "gemini-2.5-pro" in original_model:
540
+ if val > 32768 and "gemini-2.5-pro" in original_model:
541
541
  val = 32768
542
542
  elif val < 128 and "gemini-2.5-pro" in original_model:
543
543
  val = 128
544
+ elif val <= 0:
545
+ val = 0
544
546
  elif val > 24576:
545
547
  val = 24576
546
548
  payload["generationConfig"]["thinkingConfig"]["thinkingBudget"] = val
549
+ if val == 0:
550
+ payload["generationConfig"].pop("thinkingConfig", None)
547
551
  except ValueError:
548
552
  # 如果转换为整数失败,忽略思考预算设置
549
553
  pass
@@ -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.41
3
+ Version: 1.1.43
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=1iY-GUgbGCt0gXpO91QDEERIfkptI_anCHg9ElDvVVc,71765
7
+ aient/core/request.py,sha256=E2fujOgR8Jxl9kWVZcs7ylz9vftwIye3cbL6HgC-Gn4,71977
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
@@ -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.41.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
41
- aient-1.1.41.dist-info/METADATA,sha256=hMAJ7yUTFHx9-QqfRUy1Vu9BBRZGHKUco1m3nGdQC28,4968
42
- aient-1.1.41.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
- aient-1.1.41.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
44
- aient-1.1.41.dist-info/RECORD,,
40
+ aient-1.1.43.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
41
+ aient-1.1.43.dist-info/METADATA,sha256=6WRDFRezelsI5Kxn3CLIoTSILq3HhnBtzsmkAt9oSC8,4968
42
+ aient-1.1.43.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
+ aient-1.1.43.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
44
+ aient-1.1.43.dist-info/RECORD,,
File without changes