aient 1.1.20__py3-none-any.whl → 1.1.22__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
@@ -352,7 +352,15 @@ async def get_vertex_gemini_payload(request, engine, provider, api_key=None):
352
352
  stream=gemini_stream
353
353
  )
354
354
  elif api_key is not None and api_key[2] == ".":
355
- url = f"https://aiplatform.googleapis.com/v1/publishers/google/models/{original_model}:{gemini_stream}?key={api_key}"
355
+ if provider.get("project_id") and "gemini-2.5-pro-preview-06-05" == original_model:
356
+ if isinstance(provider.get("project_id"), list):
357
+ api_key_index = provider.get("api").index(api_key)
358
+ project_id = provider.get("project_id")[api_key_index]
359
+ else:
360
+ project_id = provider.get("project_id")
361
+ url = f"https://aiplatform.googleapis.com/v1/projects/{project_id}/locations/global/publishers/google/models/{original_model}:{gemini_stream}?key={api_key}"
362
+ else:
363
+ url = f"https://aiplatform.googleapis.com/v1/publishers/google/models/{original_model}:{gemini_stream}?key={api_key}"
356
364
  headers.pop("Authorization", None)
357
365
  elif "gemini-2.5-pro-exp-03-25" == original_model:
358
366
  url = "https://aiplatform.googleapis.com/v1/projects/{PROJECT_ID}/locations/{LOCATION}/publishers/google/models/{MODEL_ID}:{stream}".format(
@@ -426,7 +434,8 @@ async def get_vertex_gemini_payload(request, engine, provider, api_key=None):
426
434
  messages.append({"role": msg.role, "parts": content})
427
435
  elif msg.role == "system":
428
436
  system_prompt = system_prompt + "\n\n" + content[0]["text"]
429
- systemInstruction = {"parts": [{"text": system_prompt}]}
437
+ if system_prompt.strip():
438
+ systemInstruction = {"parts": [{"text": system_prompt}]}
430
439
 
431
440
  if any(off_model in original_model for off_model in gemini_max_token_65k_models):
432
441
  safety_settings = "OFF"
@@ -178,13 +178,13 @@ def excute_command(command):
178
178
  if line.strip() == "":
179
179
  continue
180
180
  # aaa = last_line.strip()
181
- is_same = compare_line(repr(line.strip()))
182
- if not is_same:
183
- # print(f"{repr(aaa)}", flush=True)
184
- # print(f"{repr(line.strip())}", flush=True)
185
- # print(f"is_same: {is_same}", flush=True)
186
- # print(f"\n\n\n", flush=True)
187
- new_output_lines.append(line)
181
+ # is_same = compare_line(repr(line.strip()))
182
+ # if not is_same:
183
+ # # print(f"{repr(aaa)}", flush=True)
184
+ # # print(f"{repr(line.strip())}", flush=True)
185
+ # # print(f"is_same: {is_same}", flush=True)
186
+ # # print(f"\n\n\n", flush=True)
187
+ new_output_lines.append(line)
188
188
  # 限制输出行数
189
189
  if len(new_output_lines) > 500:
190
190
  new_output_lines = new_output_lines[:250] + new_output_lines[-250:]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aient
3
- Version: 1.1.20
3
+ Version: 1.1.22
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=g6rUcNwSTHwmBzt1epsu_2Re8YRFKVCSXRUIFJZpAb4,7432
7
- aient/core/request.py,sha256=qKj_w9UpXZePCGhhMuE-rX7rCPUdCx8GJ-HUXiurBho,66589
7
+ aient/core/request.py,sha256=1t11Ep_MxVtmdkFm-vGNSFWFHgbM2DDemVZSrujT8Pc,67175
8
8
  aient/core/response.py,sha256=YphzhA9jtQKzWb3L4XGTp9xJZ2FOzHr1aAMTsi896FQ,33201
9
9
  aient/core/utils.py,sha256=zidsBUBd3KskzcxQcPB1y5x1RhtWcbZeWvmgb4LAadA,27318
10
10
  aient/core/test/test_base_api.py,sha256=pWnycRJbuPSXKKU9AQjWrMAX1wiLC_014Qc9hh5C2Pw,524
@@ -23,7 +23,7 @@ aient/models/vertex.py,sha256=qVD5l1Q538xXUPulxG4nmDjXE1VoV4yuAkTCpIeJVw0,16795
23
23
  aient/plugins/__init__.py,sha256=p3KO6Aa3Lupos4i2SjzLQw1hzQTigOAfEHngsldrsyk,986
24
24
  aient/plugins/arXiv.py,sha256=yHjb6PS3GUWazpOYRMKMzghKJlxnZ5TX8z9F6UtUVow,1461
25
25
  aient/plugins/config.py,sha256=Vp6CG9ocdC_FAlCMEGtKj45xamir76DFxdJVvURNtog,6539
26
- aient/plugins/excute_command.py,sha256=9t7RB8ikltZZRv8NcjoxfaD8FkPuWbJTZ2Vwk7hEwTA,10683
26
+ aient/plugins/excute_command.py,sha256=i5AUSfnYe05cS4YZuNIhuCy-Cfxil7RJG372YwzteXs,10691
27
27
  aient/plugins/get_time.py,sha256=Ih5XIW5SDAIhrZ9W4Qe5Hs1k4ieKPUc_LAd6ySNyqZk,654
28
28
  aient/plugins/image.py,sha256=ZElCIaZznE06TN9xW3DrSukS7U3A5_cjk1Jge4NzPxw,2072
29
29
  aient/plugins/list_directory.py,sha256=JZVuImecMSfEv6jLqii-0uQJ1UCsrpMNmYlwW3PEDg4,1374
@@ -38,8 +38,8 @@ aient/prompt/agent.py,sha256=ZNsbgXRyvYzAFTRRziAnNVqcTyAnxrGcsGfGrt72j6k,25427
38
38
  aient/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  aient/utils/prompt.py,sha256=UcSzKkFE4-h_1b6NofI6xgk3GoleqALRKY8VBaXLjmI,11311
40
40
  aient/utils/scripts.py,sha256=LD8adnfuRrJoY2tWKseXOPJXaxbrUmz4czsnUvHswNY,29096
41
- aient-1.1.20.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
42
- aient-1.1.20.dist-info/METADATA,sha256=zB89M1NsKLrqut5NuQyjOVeMCYCLaT4p6hpKfvZp9gw,4968
43
- aient-1.1.20.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
- aient-1.1.20.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
45
- aient-1.1.20.dist-info/RECORD,,
41
+ aient-1.1.22.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
42
+ aient-1.1.22.dist-info/METADATA,sha256=sFiobRMyPCjvaMyWZk4GCwe2_KFCzHSLNKEeJ75HSUI,4968
43
+ aient-1.1.22.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
+ aient-1.1.22.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
45
+ aient-1.1.22.dist-info/RECORD,,
File without changes