chunkr-ai 0.0.15__py3-none-any.whl → 0.0.17__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- chunkr_ai/api/config.py +3 -0
- chunkr_ai/api/misc.py +1 -0
- chunkr_ai/api/task_base.py +3 -1
- chunkr_ai/models.py +2 -0
- {chunkr_ai-0.0.15.dist-info → chunkr_ai-0.0.17.dist-info}/METADATA +1 -1
- {chunkr_ai-0.0.15.dist-info → chunkr_ai-0.0.17.dist-info}/RECORD +9 -9
- {chunkr_ai-0.0.15.dist-info → chunkr_ai-0.0.17.dist-info}/LICENSE +0 -0
- {chunkr_ai-0.0.15.dist-info → chunkr_ai-0.0.17.dist-info}/WHEEL +0 -0
- {chunkr_ai-0.0.15.dist-info → chunkr_ai-0.0.17.dist-info}/top_level.txt +0 -0
chunkr_ai/api/config.py
CHANGED
@@ -127,6 +127,8 @@ class Model(str, Enum):
|
|
127
127
|
FAST = "Fast"
|
128
128
|
HIGH_QUALITY = "HighQuality"
|
129
129
|
|
130
|
+
class PipelineType(str, Enum):
|
131
|
+
AZURE = "Azure"
|
130
132
|
|
131
133
|
class Configuration(BaseModel):
|
132
134
|
chunk_processing: Optional[ChunkProcessing] = Field(default=None)
|
@@ -139,6 +141,7 @@ class Configuration(BaseModel):
|
|
139
141
|
ocr_strategy: Optional[OcrStrategy] = Field(default=None)
|
140
142
|
segment_processing: Optional[SegmentProcessing] = Field(default=None)
|
141
143
|
segmentation_strategy: Optional[SegmentationStrategy] = Field(default=None)
|
144
|
+
pipeline: Optional[PipelineType] = Field(default=None)
|
142
145
|
|
143
146
|
@model_validator(mode="before")
|
144
147
|
def map_deprecated_fields(cls, values: Dict) -> Dict:
|
chunkr_ai/api/misc.py
CHANGED
chunkr_ai/api/task_base.py
CHANGED
@@ -7,7 +7,6 @@ from datetime import datetime
|
|
7
7
|
|
8
8
|
T = TypeVar("T", bound="TaskBase")
|
9
9
|
|
10
|
-
|
11
10
|
class TaskBase(BaseModel, ABC, Generic[T]):
|
12
11
|
configuration: Configuration
|
13
12
|
created_at: datetime
|
@@ -63,12 +62,15 @@ class TaskBase(BaseModel, ABC, Generic[T]):
|
|
63
62
|
return None
|
64
63
|
|
65
64
|
def html(self) -> str:
|
65
|
+
"""Get the full HTML of the task"""
|
66
66
|
return self._get_content("html")
|
67
67
|
|
68
68
|
def markdown(self) -> str:
|
69
|
+
"""Get the full markdown of the task"""
|
69
70
|
return self._get_content("markdown")
|
70
71
|
|
71
72
|
def content(self) -> str:
|
73
|
+
"""Get the full content of the task"""
|
72
74
|
return self._get_content("content")
|
73
75
|
|
74
76
|
def _get_content(self, t: str) -> str:
|
chunkr_ai/models.py
CHANGED
@@ -12,6 +12,7 @@ from .api.config import (
|
|
12
12
|
OCRResult,
|
13
13
|
OcrStrategy,
|
14
14
|
OutputResponse,
|
15
|
+
PipelineType,
|
15
16
|
Property,
|
16
17
|
Segment,
|
17
18
|
SegmentProcessing,
|
@@ -37,6 +38,7 @@ __all__ = [
|
|
37
38
|
"OCRResult",
|
38
39
|
"OcrStrategy",
|
39
40
|
"OutputResponse",
|
41
|
+
"PipelineType",
|
40
42
|
"Property",
|
41
43
|
"Segment",
|
42
44
|
"SegmentProcessing",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
chunkr_ai/__init__.py,sha256=q5YosvCNXPNGjV10pZY1gcvdosqUh38nVQTQA9g8EuM,110
|
2
|
-
chunkr_ai/models.py,sha256=
|
2
|
+
chunkr_ai/models.py,sha256=hahbtxtTyzE_ygFgmlZwbfM6Vj2k5uSDEP02psxDOSQ,924
|
3
3
|
chunkr_ai/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
chunkr_ai/api/api.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
chunkr_ai/api/auth.py,sha256=hlv0GiUmlsbFO1wLL9sslqOnsBSoBqkL_6Mk2SDvxgE,413
|
@@ -7,15 +7,15 @@ chunkr_ai/api/base.py,sha256=QvHl8FInKHYKPLWDeEPpCchB1uktzOwTW7iPnyXccUc,6449
|
|
7
7
|
chunkr_ai/api/chunkr.py,sha256=0extAWVeZtI7B-g14smTfFZD_csdJNCcVNXx2_L69OQ,2617
|
8
8
|
chunkr_ai/api/chunkr_async.py,sha256=aa0s_tnYoujHBsfe8uLiPpVEnb2l9A3CXwPP34w9Mk8,4127
|
9
9
|
chunkr_ai/api/chunkr_base.py,sha256=k34Dyt1f21NBWZvZJ3w6Svvpg4SKnzr2ldGQ4ib96Wc,4951
|
10
|
-
chunkr_ai/api/config.py,sha256=
|
11
|
-
chunkr_ai/api/misc.py,sha256=
|
10
|
+
chunkr_ai/api/config.py,sha256=TWl0Az6acKQCS1LIpKD4qr_lQ_63wqQ5M6calpLOlDM,5040
|
11
|
+
chunkr_ai/api/misc.py,sha256=bQpURc7soT5GL2ZpY7EiYyvPYWEzDM9qaX-UHa-oFeI,4909
|
12
12
|
chunkr_ai/api/protocol.py,sha256=lxIR_qoCA2a1OXjpq3LrWMdS0jRHct1bEmBlUzV8gvE,526
|
13
13
|
chunkr_ai/api/schema.py,sha256=yYesvueGgtmRa7Fi_Tpdv8A2bzHlx-B-5DxRAPlaDHo,4926
|
14
14
|
chunkr_ai/api/task.py,sha256=28J4dR8BDjvtkh3CQjW_YUEkgPXhCHBGu0wH6AQKKuE,2474
|
15
15
|
chunkr_ai/api/task_async.py,sha256=K5hTEOnmD42snPZg_JtJsVWg6QBUFZ1aBz1Abwv58-A,2529
|
16
|
-
chunkr_ai/api/task_base.py,sha256=
|
17
|
-
chunkr_ai-0.0.
|
18
|
-
chunkr_ai-0.0.
|
19
|
-
chunkr_ai-0.0.
|
20
|
-
chunkr_ai-0.0.
|
21
|
-
chunkr_ai-0.0.
|
16
|
+
chunkr_ai/api/task_base.py,sha256=KLiMhvvbCgcilguQKrtEPMlNs8oaatfQUtn8pYt9t6g,2467
|
17
|
+
chunkr_ai-0.0.17.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
+
chunkr_ai-0.0.17.dist-info/METADATA,sha256=giy1xeKYXk18W5U-baNoAAlvXciJldhA_EBi87NqKpA,4839
|
19
|
+
chunkr_ai-0.0.17.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
20
|
+
chunkr_ai-0.0.17.dist-info/top_level.txt,sha256=0IZY7PZIiS8bw5r4NUQRUQ-ATi-L_3vLQVq3ZLouOW8,10
|
21
|
+
chunkr_ai-0.0.17.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|