aient 1.1.17__py3-none-any.whl → 1.1.18__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 +3 -2
- aient/plugins/excute_command.py +3 -0
- {aient-1.1.17.dist-info → aient-1.1.18.dist-info}/METADATA +1 -1
- {aient-1.1.17.dist-info → aient-1.1.18.dist-info}/RECORD +7 -7
- {aient-1.1.17.dist-info → aient-1.1.18.dist-info}/WHEEL +0 -0
- {aient-1.1.17.dist-info → aient-1.1.18.dist-info}/licenses/LICENSE +0 -0
- {aient-1.1.17.dist-info → aient-1.1.18.dist-info}/top_level.txt +0 -0
aient/core/response.py
CHANGED
@@ -54,8 +54,6 @@ async def fetch_gemini_response_stream(client, url, headers, payload, model):
|
|
54
54
|
if line and '\"finishReason\": \"' in line:
|
55
55
|
if "stop" not in line.lower():
|
56
56
|
logger.error(f"finishReason: {line}")
|
57
|
-
sse_string = await generate_sse_response(timestamp, model, stop="stop")
|
58
|
-
yield sse_string
|
59
57
|
is_finish = True
|
60
58
|
if is_finish and '\"promptTokenCount\": ' in line:
|
61
59
|
json_data = parse_json_safely( "{" + line + "}")
|
@@ -117,6 +115,9 @@ async def fetch_gemini_response_stream(client, url, headers, payload, model):
|
|
117
115
|
sse_string = await generate_sse_response(timestamp, model, content=None, tools_id="chatcmpl-9inWv0yEtgn873CxMBzHeCeiHctTV", function_call_name=None, function_call_content=function_full_response)
|
118
116
|
yield sse_string
|
119
117
|
|
118
|
+
sse_string = await generate_sse_response(timestamp, model, stop="stop")
|
119
|
+
yield sse_string
|
120
|
+
|
120
121
|
sse_string = await generate_sse_response(timestamp, model, None, None, None, None, None, totalTokenCount, promptTokenCount, candidatesTokenCount)
|
121
122
|
yield sse_string
|
122
123
|
|
aient/plugins/excute_command.py
CHANGED
@@ -185,6 +185,9 @@ def excute_command(command):
|
|
185
185
|
# print(f"is_same: {is_same}", flush=True)
|
186
186
|
# print(f"\n\n\n", flush=True)
|
187
187
|
new_output_lines.append(line)
|
188
|
+
# 限制输出行数
|
189
|
+
if len(new_output_lines) > 500:
|
190
|
+
new_output_lines = new_output_lines[:250] + new_output_lines[-250:]
|
188
191
|
final_output_log = "\n".join(new_output_lines)
|
189
192
|
# print(f"output_lines: {len(new_output_lines)}")
|
190
193
|
|
@@ -5,7 +5,7 @@ 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
7
|
aient/core/request.py,sha256=nvF_V71svezQ0-UbnC9RB_pXo_wV6QC7WE_SANwQzxE,66195
|
8
|
-
aient/core/response.py,sha256=
|
8
|
+
aient/core/response.py,sha256=YphzhA9jtQKzWb3L4XGTp9xJZ2FOzHr1aAMTsi896FQ,33201
|
9
9
|
aient/core/utils.py,sha256=VQ9uutGRR_JOvECOrjeoRBO2aA6w-pGwoXnnS2UvfPU,27263
|
10
10
|
aient/core/test/test_base_api.py,sha256=pWnycRJbuPSXKKU9AQjWrMAX1wiLC_014Qc9hh5C2Pw,524
|
11
11
|
aient/core/test/test_geminimask.py,sha256=HFX8jDbNg_FjjgPNxfYaR-0-roUrOO-ND-FVsuxSoiw,13254
|
@@ -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=
|
26
|
+
aient/plugins/excute_command.py,sha256=9t7RB8ikltZZRv8NcjoxfaD8FkPuWbJTZ2Vwk7hEwTA,10683
|
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.
|
42
|
-
aient-1.1.
|
43
|
-
aient-1.1.
|
44
|
-
aient-1.1.
|
45
|
-
aient-1.1.
|
41
|
+
aient-1.1.18.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
|
42
|
+
aient-1.1.18.dist-info/METADATA,sha256=pw57vV-QR6cvJTm40eK65Yq0cri4JgypKrGtVecRYYM,4968
|
43
|
+
aient-1.1.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
44
|
+
aient-1.1.18.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
|
45
|
+
aient-1.1.18.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|