xparse-client 0.3.0b1__tar.gz → 0.3.0b2__tar.gz
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.
- {xparse_client-0.3.0b1/xparse_client.egg-info → xparse_client-0.3.0b2}/PKG-INFO +1 -1
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/pyproject.toml +1 -1
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/api/local.py +12 -9
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2/xparse_client.egg-info}/PKG-INFO +1 -1
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/CHANGELOG.md +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/LICENSE +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/MANIFEST.in +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/README.md +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/example/1_basic_api_usage.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/example/2_async_job.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/example/3_local_workflow.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/example/4_advanced_workflow.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/example/README.md +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/example/config_example.json +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/setup.cfg +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/conftest.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/__init__.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/api/__init__.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/api/test_extract.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/api/test_local.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/api/test_parse.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/api/test_pipeline.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/api/test_workflows.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/connectors/test_ftp.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/connectors/test_local_connectors.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/connectors/test_milvus.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/connectors/test_qdrant.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/connectors/test_s3.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/connectors/test_smb.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/connectors/test_utils.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/models/test_local.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/models/test_pipeline_stages.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/models/test_workflows.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/test_base.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/test_client.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/test_config.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/test_exceptions.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/test_http.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/__init__.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/_base.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/_client.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/_config.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/_http.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/api/__init__.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/api/extract.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/api/parse.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/api/pipeline.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/api/workflows.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/__init__.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/_utils.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/destinations/__init__.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/destinations/base.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/destinations/local.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/destinations/milvus.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/destinations/qdrant.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/destinations/s3.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/sources/__init__.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/sources/base.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/sources/ftp.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/sources/local.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/sources/s3.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/sources/smb.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/exceptions.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/models/__init__.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/models/chunk.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/models/embed.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/models/extract.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/models/local.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/models/parse.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/models/pipeline.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/models/workflows.py +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client.egg-info/SOURCES.txt +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client.egg-info/dependency_links.txt +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client.egg-info/requires.txt +0 -0
- {xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client.egg-info/top_level.txt +0 -0
|
@@ -125,6 +125,7 @@ class Local(BaseAPI):
|
|
|
125
125
|
|
|
126
126
|
# 调用 Pipeline API
|
|
127
127
|
from .pipeline import PipelineAPI
|
|
128
|
+
|
|
128
129
|
pipeline_api = PipelineAPI(self._config, self._http)
|
|
129
130
|
result = pipeline_api.execute(
|
|
130
131
|
file=file_bytes,
|
|
@@ -135,10 +136,10 @@ class Local(BaseAPI):
|
|
|
135
136
|
|
|
136
137
|
# 准备写入数据
|
|
137
138
|
# 如果是向量数据库,写入 embeddings
|
|
138
|
-
if hasattr(result,
|
|
139
|
+
if hasattr(result, "elements") and result.elements:
|
|
139
140
|
elements_data = []
|
|
140
141
|
for elem in result.elements:
|
|
141
|
-
elem_dict = elem.model_dump() if hasattr(elem,
|
|
142
|
+
elem_dict = elem.model_dump() if hasattr(elem, "model_dump") else elem
|
|
142
143
|
elements_data.append(elem_dict)
|
|
143
144
|
else:
|
|
144
145
|
elements_data = []
|
|
@@ -148,8 +149,8 @@ class Local(BaseAPI):
|
|
|
148
149
|
"filename": filename,
|
|
149
150
|
"file_path": file_path,
|
|
150
151
|
}
|
|
151
|
-
if hasattr(result,
|
|
152
|
-
metadata["record_id"] = result.record_id
|
|
152
|
+
if result.stats and hasattr(result.stats, "record_id"):
|
|
153
|
+
metadata["record_id"] = result.stats.record_id
|
|
153
154
|
|
|
154
155
|
destination.write(elements_data, metadata)
|
|
155
156
|
|
|
@@ -164,11 +165,13 @@ class Local(BaseAPI):
|
|
|
164
165
|
else:
|
|
165
166
|
# continue: 记录失败并继续下一个文件
|
|
166
167
|
failed += 1
|
|
167
|
-
failed_files.append(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
failed_files.append(
|
|
169
|
+
FailedFile(
|
|
170
|
+
file_path=file_path,
|
|
171
|
+
error=error_msg,
|
|
172
|
+
retry_count=0, # HTTP客户端内部已经处理了重试
|
|
173
|
+
)
|
|
174
|
+
)
|
|
172
175
|
|
|
173
176
|
# 计算总耗时
|
|
174
177
|
duration = time.time() - start_time
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/tests/unit/connectors/test_local_connectors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/destinations/__init__.py
RENAMED
|
File without changes
|
{xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/destinations/base.py
RENAMED
|
File without changes
|
{xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/destinations/local.py
RENAMED
|
File without changes
|
{xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/destinations/milvus.py
RENAMED
|
File without changes
|
{xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/destinations/qdrant.py
RENAMED
|
File without changes
|
|
File without changes
|
{xparse_client-0.3.0b1 → xparse_client-0.3.0b2}/xparse_client/connectors/sources/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|