xparse-client 0.2.16__py3-none-any.whl → 0.2.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.
@@ -248,7 +248,7 @@ class Pipeline:
248
248
  files=files,
249
249
  data=form_data,
250
250
  headers=self.api_headers,
251
- timeout=120
251
+ timeout=630
252
252
  )
253
253
 
254
254
  if response.status_code == 200:
@@ -374,6 +374,14 @@ class Pipeline:
374
374
  print(f" → 读取文件...")
375
375
  file_bytes, data_source = self.source.read_file(file_path)
376
376
  data_source = data_source or {}
377
+
378
+ # 检查文件大小,超过 100MB 则报错
379
+ MAX_FILE_SIZE = 100 * 1024 * 1024 # 100MB
380
+ file_size = len(file_bytes)
381
+ if file_size > MAX_FILE_SIZE:
382
+ file_size_mb = file_size / (1024 * 1024)
383
+ raise ValueError(f"文件大小过大: {file_size_mb:.2f}MB,超过100MB限制")
384
+
377
385
  # 转换为毫秒时间戳字符串
378
386
  timestamp_ms = int(datetime.now(timezone.utc).timestamp() * 1000)
379
387
  data_source['date_processed'] = str(timestamp_ms)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xparse-client
3
- Version: 0.2.16
3
+ Version: 0.2.18
4
4
  Summary: 面向Agent和RAG的新一代文档处理 AI Infra
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://gitlab.intsig.net/xparse1/xparse-pipeline
@@ -2,10 +2,10 @@ xparse_client/__init__.py,sha256=C2XLxkCoONl6_B1FmDhWRw84TqOL4pZF20br-K26SSY,172
2
2
  xparse_client/pipeline/__init__.py,sha256=TVlb2AGCNKP0jrv3p4ZLZCPKp68hTVMFi00DTdi6QAo,49
3
3
  xparse_client/pipeline/config.py,sha256=FFYq2a0dBWBEj70s2aInXOiQ5MwwHimd6SI2_tkp52w,4138
4
4
  xparse_client/pipeline/destinations.py,sha256=QKlNGcpXIqkZS3rlBlhLDoRqIWA21Jgn3GiGhhfE8Rc,20921
5
- xparse_client/pipeline/pipeline.py,sha256=CGT7K7ynwn550w4b-cSN0wkmUAVFAvouvP8CEyF0qy4,27549
5
+ xparse_client/pipeline/pipeline.py,sha256=XuALq_JkMRzt27sYl55ii3ff7O4H5ywDGeJBvGwdOco,27925
6
6
  xparse_client/pipeline/sources.py,sha256=D-kLrSQ-qsFFFq7JC4sL3Y3Q3Q87Wcpv9R5K85YkDjE,22144
7
- xparse_client-0.2.16.dist-info/licenses/LICENSE,sha256=ckIP-MbocsP9nqYnta5KgfAicYF196B5TNdHIR6kOO0,1075
8
- xparse_client-0.2.16.dist-info/METADATA,sha256=FFI7ggmbNMFUX-I_xD0Y8vnGbFOhpQ3yWtOP5tRM1ao,28824
9
- xparse_client-0.2.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- xparse_client-0.2.16.dist-info/top_level.txt,sha256=W5PeQwOyfo_Od3d26-gcOtan7rHYk1q3SP1phYedat4,14
11
- xparse_client-0.2.16.dist-info/RECORD,,
7
+ xparse_client-0.2.18.dist-info/licenses/LICENSE,sha256=ckIP-MbocsP9nqYnta5KgfAicYF196B5TNdHIR6kOO0,1075
8
+ xparse_client-0.2.18.dist-info/METADATA,sha256=CIgUGuD_515Wp-j3lrnZrDMhOvDlA-AaoARjUdrSaFY,28824
9
+ xparse_client-0.2.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
+ xparse_client-0.2.18.dist-info/top_level.txt,sha256=W5PeQwOyfo_Od3d26-gcOtan7rHYk1q3SP1phYedat4,14
11
+ xparse_client-0.2.18.dist-info/RECORD,,