aient 1.1.10__py3-none-any.whl → 1.1.11__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
@@ -306,7 +306,7 @@ async def get_vertex_gemini_payload(request, engine, provider, api_key=None):
306
306
  search_tool = None
307
307
 
308
308
  # https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-0-flash?hl=zh-cn
309
- pro_models = ["gemini-2.5"]
309
+ pro_models = ["gemini-2.5", "gemini-2.0"]
310
310
  if any(pro_model in original_model for pro_model in pro_models):
311
311
  location = gemini2
312
312
  search_tool = {"googleSearch": {}}
aient/utils/scripts.py CHANGED
@@ -440,7 +440,18 @@ def parse_function_xml(xml_content: str, check_line_start: bool = True) -> List[
440
440
  # 如果 '<' 不在行首 (即 tag_start > 0 且其前一个字符不是换行符),
441
441
  # 则将其视为普通文本的一部分,移动 position 并继续搜索
442
442
  if check_line_start:
443
- if tag_start > 0 and xml_content[tag_start - 1] != '\n':
443
+ # 检查标签是否在行首,或者行首到标签之间只有空格
444
+ is_start_of_line_or_only_spaces_before = True
445
+ if tag_start > 0:
446
+ # 从 tag_start - 1 向前检查,直到行首或遇到非空格字符
447
+ check_pos = tag_start - 1
448
+ while check_pos >= 0 and xml_content[check_pos] != '\n':
449
+ if not xml_content[check_pos].isspace():
450
+ is_start_of_line_or_only_spaces_before = False
451
+ break
452
+ check_pos -= 1
453
+
454
+ if not is_start_of_line_or_only_spaces_before:
444
455
  position = tag_start + 1 # 从 '<' 之后继续搜索
445
456
  continue
446
457
 
@@ -666,15 +677,15 @@ if __name__ == "__main__":
666
677
  </read_file>
667
678
  </tool_call>好的,我现在读取 `README.md` 文件。
668
679
  """
669
- test_xml = """首先使用read_file工具读取论文内容,然后使用excute_command工具克隆代码仓库到本地。\n```xml\n<read_file>\n<file_path>/Users/yanyuming/Downloads/GitHub/OceanSynthesis/papers/2412.06410v1.pdf</file_path>\n</read_file>\n\n<excute_command>\n<command>git clone https://github.com/bartbussmann/BatchTopK.git</command>\n</excute_command>\n```"""
680
+ # test_xml = """首先使用read_file工具读取论文内容,然后使用excute_command工具克隆代码仓库到本地。\n```xml\n<read_file>\n<file_path>/Users/yanyuming/Downloads/GitHub/OceanSynthesis/papers/2412.06410v1.pdf</file_path>\n</read_file>\n\n<excute_command>\n<command>git clone https://github.com/bartbussmann/BatchTopK.git</command>\n</excute_command>\n```"""
670
681
  test_xml = """
671
682
  ✅ 好的,我现在读取 `README.md` 文件。
672
- <read_file>
673
- <file_path>README.md</file_path>
674
- </read_file>
675
- <read_file>
676
- <file_path>README.md</file_path>
677
- </read_file>
683
+ <read_file>
684
+ <file_path>README.md</file_path>
685
+ </read_file>
686
+ <read_file>
687
+ <file_path>README.md</file_path>
688
+ </read_file>
678
689
 
679
690
  <tool_call>
680
691
  <read_file>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aient
3
- Version: 1.1.10
3
+ Version: 1.1.11
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=kF-HLi1I2k_G5r153ZHuiGH8_NmpTlFMfK0_myB28YQ,7366
7
- aient/core/request.py,sha256=Sa2muc4buCkSNPQITOvXwQt0CGA_A39TpIoeVqdqwFQ,61929
7
+ aient/core/request.py,sha256=VItemXnWzqzS10W-RuLVrARki1w7MZMBZdyqyA5axw8,61943
8
8
  aient/core/response.py,sha256=BNHLazjfQT8mVg7LnPLzlX429aQM3S03pumPbOpczCI,31518
9
9
  aient/core/utils.py,sha256=n3dyaApN4rrSduI8cjZbeD0mv8_O5LPTTbwRkj1_v4w,26540
10
10
  aient/core/test/test_base_api.py,sha256=pWnycRJbuPSXKKU9AQjWrMAX1wiLC_014Qc9hh5C2Pw,524
@@ -37,9 +37,9 @@ aient/prompt/__init__.py,sha256=GBtn6-JDT8KHFCcuPpfSNE_aGddg5p4FEyMCy4BfwGs,20
37
37
  aient/prompt/agent.py,sha256=y2GETN6ScC5yQVs75VFfzm4YUWzblbqLYz0Sy6JnPRw,24950
38
38
  aient/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  aient/utils/prompt.py,sha256=UcSzKkFE4-h_1b6NofI6xgk3GoleqALRKY8VBaXLjmI,11311
40
- aient/utils/scripts.py,sha256=NXmTxcZqHoRv3S13isLsv7kvqktXnA5ej7uMsxCJUe0,26656
41
- aient-1.1.10.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
42
- aient-1.1.10.dist-info/METADATA,sha256=59vJo7hMpLQ6Y9ZHXoLkZwiHuVpk1B5qLSepbTxXrXc,4968
43
- aient-1.1.10.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
44
- aient-1.1.10.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
45
- aient-1.1.10.dist-info/RECORD,,
40
+ aient/utils/scripts.py,sha256=ATxP7VZvIngYiRB6XgjP1lQHovKzXhpWL3QpsJtZYi8,27245
41
+ aient-1.1.11.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
42
+ aient-1.1.11.dist-info/METADATA,sha256=KlUS47nF_hR_qUuD1wINWwMevIwyzemtM0PUCgTWCkg,4968
43
+ aient-1.1.11.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
44
+ aient-1.1.11.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
45
+ aient-1.1.11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.1)
2
+ Generator: setuptools (80.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5