aient 1.0.53__py3-none-any.whl → 1.0.55__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/response.py CHANGED
@@ -59,7 +59,7 @@ async def fetch_gemini_response_stream(client, url, headers, payload, model):
59
59
  totalTokenCount = json_data.get('totalTokenCount', 0)
60
60
 
61
61
  # print(line)
62
- if line and '\"text\": \"' in line:
62
+ if line and '\"text\": \"' in line and is_finish == False:
63
63
  try:
64
64
  json_data = json.loads( "{" + line + "}")
65
65
  content = json_data.get('text', '')
@@ -135,7 +135,7 @@ async def fetch_vertex_claude_response_stream(client, url, headers, payload, mod
135
135
  json_data = parse_json_safely( "{" + line + "}")
136
136
  totalTokenCount = json_data.get('totalTokenCount', 0)
137
137
 
138
- if line and '\"text\": \"' in line:
138
+ if line and '\"text\": \"' in line and is_finish == False:
139
139
  try:
140
140
  json_data = json.loads( "{" + line + "}")
141
141
  content = json_data.get('text', '')
aient/prompt/agent.py CHANGED
@@ -42,8 +42,8 @@ system_prompt = """
42
42
  <communication>
43
43
  1. Format your responses in markdown. Use backticks to format file, directory, function, and class names.
44
44
  2. Always respond in 中文。
45
- 3. 尽力满足user的请求,如果 user 要求你使用工具,请自行根据工具的参数要求,组织参数,将工具调用组织成xml格式,即可触发工具执行流程。
46
- 4. 禁止要求user调用工具,当你需要调用工具时,请自行组织参数,将工具调用组织成xml格式,即可触发工具执行流程。
45
+ 3. 尽力满足user的请求,如果 user 要求你使用工具,请自行根据工具的参数要求,组织参数,将工具调用组织成xml格式,即可触发工具执行流程。如果user提供了明确的xml工具调用,请直接复述user的xml工具调用。你必须复述user的xml工具调用才能真正调用工具。
46
+ 4. 禁止要求user调用工具,当你需要调用工具时,请自行组织参数,将工具调用组织成xml格式,即可触发工具执行流程。禁止自己没有使用xml格式调用工具就假定工具已经调用。
47
47
  </communication>
48
48
 
49
49
  <making_code_changes>
@@ -123,6 +123,7 @@ instruction_system_prompt = """
123
123
  你需要分析工作智能体的对话历史,并生成下一步指令。
124
124
  根据任务目标和当前进度,提供清晰明确的指令。
125
125
  持续引导工作智能体直到任务完成。
126
+ 如果你给出了工具调用明确的指令,但是assistant没有通过xml格式调用工具,却认为自己已经调用了,请提醒他必须自己使用xml格式调用。
126
127
 
127
128
  你需要称呼工作智能体为“你”,指令禁止使用疑问句,必须使用祈使句。
128
129
  所有回复必须使用中文。
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aient
3
- Version: 1.0.53
3
+ Version: 1.0.55
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/__init__.py,sha256=NxjebTlku35S4Dzr16rdSqSTWUvvwEeACe8KvHJnjPg,34
4
4
  aient/core/log_config.py,sha256=kz2_yJv1p-o3lUQOwA3qh-LSc3wMHv13iCQclw44W9c,274
5
5
  aient/core/models.py,sha256=H3_XuWA7aS25MWZPK1c-5RBiiuxWJbTfE3RAk0Pkc9A,7504
6
6
  aient/core/request.py,sha256=c963OuUEBe7j1jxiiwipUyzGrbsCwXQIw_XGF_KdL-4,49491
7
- aient/core/response.py,sha256=uK6a--vHDk61yB4a-0og36S-d4FSO5X6cLeYSxY9G-A,27726
7
+ aient/core/response.py,sha256=iu_sWRWdy-Xs2CpEwhDXC_OLLnOc4sRwg28xZ2Qa69E,27772
8
8
  aient/core/utils.py,sha256=DFpFU8Y-8lzgQlhaDUnao8HmviGoh3-oN8jZR3Dha7E,26150
9
9
  aient/core/test/test_base_api.py,sha256=CjfFzMG26r8C4xCPoVkKb3Ac6pp9gy5NUCbZJHoSSsM,393
10
10
  aient/core/test/test_image.py,sha256=_T4peNGdXKBHHxyQNx12u-NTyFE8TlYI6NvvagsG2LE,319
@@ -30,12 +30,12 @@ aient/plugins/registry.py,sha256=YknzhieU_8nQ3oKlUSSWDB4X7t2Jx0JnqT2Jd9Xsvfk,357
30
30
  aient/plugins/run_python.py,sha256=dgcUwBunMuDkaSKR5bToudVzSdrXVewktDDFUz_iIOQ,4589
31
31
  aient/plugins/websearch.py,sha256=yiBzqXK5X220ibR-zko3VDsn4QOnLu1k6E2YOygCeTQ,15185
32
32
  aient/prompt/__init__.py,sha256=GBtn6-JDT8KHFCcuPpfSNE_aGddg5p4FEyMCy4BfwGs,20
33
- aient/prompt/agent.py,sha256=o5PFBXVEFBRw5N8nbbZaVWL4dU_01MD2EvJG4k5OirM,22973
33
+ aient/prompt/agent.py,sha256=2EWCsoWQQW2IRsCdUN-9GgMeMyPH55gAZDEtTnxhsR0,23379
34
34
  aient/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  aient/utils/prompt.py,sha256=UcSzKkFE4-h_1b6NofI6xgk3GoleqALRKY8VBaXLjmI,11311
36
36
  aient/utils/scripts.py,sha256=n0jR5eXCBIK12W4bIx-xU1FVl1hZ4zDC7hq_BWQHYJU,27537
37
- aient-1.0.53.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
38
- aient-1.0.53.dist-info/METADATA,sha256=PS_WBWzM0fEEQm3ZMx6V0etAF-3LQKG6PErdiNx5oEc,4973
39
- aient-1.0.53.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
40
- aient-1.0.53.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
41
- aient-1.0.53.dist-info/RECORD,,
37
+ aient-1.0.55.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
38
+ aient-1.0.55.dist-info/METADATA,sha256=HkCrGkSj3soFVC-CEGB73OHhXjE6uIkLBu9cm5zirv4,4973
39
+ aient-1.0.55.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
40
+ aient-1.0.55.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
41
+ aient-1.0.55.dist-info/RECORD,,
File without changes