chunkr-ai 0.0.44__tar.gz → 0.0.45__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.
Files changed (22) hide show
  1. {chunkr_ai-0.0.44/src/chunkr_ai.egg-info → chunkr_ai-0.0.45}/PKG-INFO +1 -1
  2. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/pyproject.toml +1 -1
  3. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai/api/configuration.py +5 -0
  4. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai/models.py +2 -0
  5. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45/src/chunkr_ai.egg-info}/PKG-INFO +1 -1
  6. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/tests/test_chunkr.py +9 -1
  7. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/LICENSE +0 -0
  8. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/README.md +0 -0
  9. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/setup.cfg +0 -0
  10. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai/__init__.py +0 -0
  11. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai/api/__init__.py +0 -0
  12. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai/api/auth.py +0 -0
  13. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai/api/chunkr.py +0 -0
  14. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai/api/chunkr_base.py +0 -0
  15. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai/api/decorators.py +0 -0
  16. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai/api/misc.py +0 -0
  17. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai/api/protocol.py +0 -0
  18. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai/api/task_response.py +0 -0
  19. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai.egg-info/SOURCES.txt +0 -0
  20. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai.egg-info/dependency_links.txt +0 -0
  21. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai.egg-info/requires.txt +0 -0
  22. {chunkr_ai-0.0.44 → chunkr_ai-0.0.45}/src/chunkr_ai.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chunkr-ai
3
- Version: 0.0.44
3
+ Version: 0.0.45
4
4
  Summary: Python client for Chunkr: open source document intelligence
5
5
  Author-email: Ishaan Kapoor <ishaan@lumina.sh>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "chunkr-ai"
7
- version = "0.0.44"
7
+ version = "0.0.45"
8
8
  authors = [{"name" = "Ishaan Kapoor", "email" = "ishaan@lumina.sh"}]
9
9
  description = "Python client for Chunkr: open source document intelligence"
10
10
  readme = "README.md"
@@ -126,6 +126,10 @@ class SegmentationStrategy(str, Enum):
126
126
  LAYOUT_ANALYSIS = "LayoutAnalysis"
127
127
  PAGE = "Page"
128
128
 
129
+ class ErrorHandlingStrategy(str, Enum):
130
+ FAIL = "Fail"
131
+ CONTINUE = "Continue"
132
+
129
133
  class BoundingBox(BaseModel):
130
134
  left: float
131
135
  top: float
@@ -189,6 +193,7 @@ class Pipeline(str, Enum):
189
193
  class Configuration(BaseModel):
190
194
  chunk_processing: Optional[ChunkProcessing] = None
191
195
  expires_in: Optional[int] = None
196
+ error_handling: Optional[ErrorHandlingStrategy] = None
192
197
  high_resolution: Optional[bool] = None
193
198
  ocr_strategy: Optional[OcrStrategy] = None
194
199
  segment_processing: Optional[SegmentProcessing] = None
@@ -5,6 +5,7 @@ from .api.configuration import (
5
5
  Configuration,
6
6
  CroppingStrategy,
7
7
  EmbedSource,
8
+ ErrorHandlingStrategy,
8
9
  GenerationStrategy,
9
10
  GenerationConfig,
10
11
  Model,
@@ -29,6 +30,7 @@ __all__ = [
29
30
  "Configuration",
30
31
  "CroppingStrategy",
31
32
  "EmbedSource",
33
+ "ErrorHandlingStrategy",
32
34
  "GenerationConfig",
33
35
  "GenerationStrategy",
34
36
  "Model",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chunkr-ai
3
- Version: 0.0.44
3
+ Version: 0.0.45
4
4
  Summary: Python client for Chunkr: open source document intelligence
5
5
  Author-email: Ishaan Kapoor <ishaan@lumina.sh>
6
6
  License: MIT License
@@ -16,6 +16,7 @@ from chunkr_ai.models import (
16
16
  ChunkProcessing,
17
17
  TaskResponse,
18
18
  EmbedSource,
19
+ ErrorHandlingStrategy,
19
20
  Tokenizer,
20
21
  )
21
22
 
@@ -442,4 +443,11 @@ async def test_embed_sources_with_different_tokenizer(client, sample_path, xlm_r
442
443
  response = await client.upload(sample_path, xlm_roberta_with_html_content_config)
443
444
  assert response.task_id is not None
444
445
  assert response.status == "Succeeded"
445
- assert response.output is not None
446
+ assert response.output is not None
447
+
448
+ @pytest.mark.asyncio
449
+ async def test_error_handling_continue(client, sample_path):
450
+ response = await client.upload(sample_path, Configuration(error_handling=ErrorHandlingStrategy.CONTINUE))
451
+ assert response.task_id is not None
452
+ assert response.status == "Succeeded"
453
+ assert response.output is not None
File without changes
File without changes
File without changes