chunkr-ai 0.1.0a6__py3-none-any.whl → 0.1.0a8__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.
Files changed (69) hide show
  1. chunkr_ai/__init__.py +2 -0
  2. chunkr_ai/_base_client.py +3 -3
  3. chunkr_ai/_client.py +31 -3
  4. chunkr_ai/_compat.py +48 -48
  5. chunkr_ai/_constants.py +5 -5
  6. chunkr_ai/_exceptions.py +4 -0
  7. chunkr_ai/_models.py +41 -41
  8. chunkr_ai/_types.py +35 -1
  9. chunkr_ai/_utils/__init__.py +9 -2
  10. chunkr_ai/_utils/_compat.py +45 -0
  11. chunkr_ai/_utils/_datetime_parse.py +136 -0
  12. chunkr_ai/_utils/_transform.py +11 -1
  13. chunkr_ai/_utils/_typing.py +6 -1
  14. chunkr_ai/_utils/_utils.py +0 -1
  15. chunkr_ai/_version.py +1 -1
  16. chunkr_ai/resources/__init__.py +14 -0
  17. chunkr_ai/resources/files.py +3 -3
  18. chunkr_ai/resources/tasks/__init__.py +14 -0
  19. chunkr_ai/resources/tasks/extract.py +393 -0
  20. chunkr_ai/resources/tasks/parse.py +110 -286
  21. chunkr_ai/resources/tasks/tasks.py +64 -32
  22. chunkr_ai/resources/webhooks.py +193 -0
  23. chunkr_ai/types/__init__.py +27 -1
  24. chunkr_ai/types/bounding_box.py +19 -0
  25. chunkr_ai/types/cell.py +39 -0
  26. chunkr_ai/types/cell_style.py +28 -0
  27. chunkr_ai/types/chunk.py +40 -0
  28. chunkr_ai/types/chunk_processing.py +40 -0
  29. chunkr_ai/types/chunk_processing_param.py +42 -0
  30. chunkr_ai/types/extract_configuration.py +24 -0
  31. chunkr_ai/types/extract_output_response.py +62 -0
  32. chunkr_ai/types/file_create_params.py +2 -1
  33. chunkr_ai/types/file_info.py +21 -0
  34. chunkr_ai/types/generation_config.py +29 -0
  35. chunkr_ai/types/generation_config_param.py +29 -0
  36. chunkr_ai/types/llm_processing.py +36 -0
  37. chunkr_ai/types/llm_processing_param.py +36 -0
  38. chunkr_ai/types/ocr_result.py +28 -0
  39. chunkr_ai/types/page.py +27 -0
  40. chunkr_ai/types/parse_configuration.py +64 -0
  41. chunkr_ai/types/parse_configuration_param.py +65 -0
  42. chunkr_ai/types/parse_output_response.py +29 -0
  43. chunkr_ai/types/segment.py +109 -0
  44. chunkr_ai/types/segment_processing.py +228 -0
  45. chunkr_ai/types/segment_processing_param.py +229 -0
  46. chunkr_ai/types/task_extract_updated_webhook_event.py +22 -0
  47. chunkr_ai/types/task_get_params.py +0 -3
  48. chunkr_ai/types/task_list_params.py +7 -1
  49. chunkr_ai/types/task_parse_updated_webhook_event.py +22 -0
  50. chunkr_ai/types/task_response.py +68 -0
  51. chunkr_ai/types/tasks/__init__.py +7 -1
  52. chunkr_ai/types/tasks/extract_create_params.py +47 -0
  53. chunkr_ai/types/tasks/extract_create_response.py +67 -0
  54. chunkr_ai/types/tasks/extract_get_params.py +18 -0
  55. chunkr_ai/types/tasks/extract_get_response.py +67 -0
  56. chunkr_ai/types/tasks/parse_create_params.py +25 -793
  57. chunkr_ai/types/tasks/parse_create_response.py +55 -0
  58. chunkr_ai/types/tasks/parse_get_params.py +18 -0
  59. chunkr_ai/types/tasks/parse_get_response.py +55 -0
  60. chunkr_ai/types/unwrap_webhook_event.py +11 -0
  61. chunkr_ai/types/version_info.py +31 -0
  62. chunkr_ai/types/webhook_url_response.py +9 -0
  63. {chunkr_ai-0.1.0a6.dist-info → chunkr_ai-0.1.0a8.dist-info}/METADATA +14 -13
  64. chunkr_ai-0.1.0a8.dist-info/RECORD +88 -0
  65. chunkr_ai/types/task.py +0 -1225
  66. chunkr_ai/types/tasks/parse_update_params.py +0 -845
  67. chunkr_ai-0.1.0a6.dist-info/RECORD +0 -52
  68. {chunkr_ai-0.1.0a6.dist-info → chunkr_ai-0.1.0a8.dist-info}/WHEEL +0 -0
  69. {chunkr_ai-0.1.0a6.dist-info → chunkr_ai-0.1.0a8.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,67 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from ..._models import BaseModel
8
+ from ..file_info import FileInfo
9
+ from ..version_info import VersionInfo
10
+ from ..extract_configuration import ExtractConfiguration
11
+ from ..extract_output_response import ExtractOutputResponse
12
+
13
+ __all__ = ["ExtractCreateResponse"]
14
+
15
+
16
+ class ExtractCreateResponse(BaseModel):
17
+ configuration: ExtractConfiguration
18
+
19
+ created_at: datetime
20
+ """The date and time when the task was created and queued."""
21
+
22
+ file_info: FileInfo
23
+ """Information about the input file."""
24
+
25
+ message: str
26
+ """A message describing the task's status or any errors that occurred."""
27
+
28
+ status: Literal["Starting", "Processing", "Succeeded", "Failed", "Cancelled"]
29
+ """The status of the task."""
30
+
31
+ task_id: str
32
+ """The unique identifier for the task."""
33
+
34
+ task_type: Literal["Parse", "Extract"]
35
+
36
+ version_info: VersionInfo
37
+ """Version information for the task."""
38
+
39
+ expires_at: Optional[datetime] = None
40
+ """The date and time when the task will expire."""
41
+
42
+ finished_at: Optional[datetime] = None
43
+ """The date and time when the task was finished."""
44
+
45
+ input_file_url: Optional[str] = None
46
+ """The presigned URL of the input file. Deprecated use `file_info.url` instead."""
47
+
48
+ output: Optional[ExtractOutputResponse] = None
49
+ """The processed results of a document extraction task.
50
+
51
+ Shapes:
52
+
53
+ - `results`: JSON matching the user-provided schema.
54
+ - `citations`: mirror of `results`; only leaf positions (primitive or
55
+ array-of-primitives) contain a `Vec<Citation>` supporting that field.
56
+ - `metrics`: mirror of `results`; only leaf positions contain a `Metrics` object
57
+ for that field.
58
+ """
59
+
60
+ source_task_id: Optional[str] = None
61
+ """The ID of the source `parse` task that was used for extraction"""
62
+
63
+ started_at: Optional[datetime] = None
64
+ """The date and time when the task was started."""
65
+
66
+ task_url: Optional[str] = None
67
+ """The presigned URL of the task."""
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["ExtractGetParams"]
8
+
9
+
10
+ class ExtractGetParams(TypedDict, total=False):
11
+ base64_urls: bool
12
+ """Whether to return base64 encoded URLs.
13
+
14
+ If false, the URLs will be returned as presigned URLs.
15
+ """
16
+
17
+ include_chunks: bool
18
+ """Whether to include chunks in the output response"""
@@ -0,0 +1,67 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from ..._models import BaseModel
8
+ from ..file_info import FileInfo
9
+ from ..version_info import VersionInfo
10
+ from ..extract_configuration import ExtractConfiguration
11
+ from ..extract_output_response import ExtractOutputResponse
12
+
13
+ __all__ = ["ExtractGetResponse"]
14
+
15
+
16
+ class ExtractGetResponse(BaseModel):
17
+ configuration: ExtractConfiguration
18
+
19
+ created_at: datetime
20
+ """The date and time when the task was created and queued."""
21
+
22
+ file_info: FileInfo
23
+ """Information about the input file."""
24
+
25
+ message: str
26
+ """A message describing the task's status or any errors that occurred."""
27
+
28
+ status: Literal["Starting", "Processing", "Succeeded", "Failed", "Cancelled"]
29
+ """The status of the task."""
30
+
31
+ task_id: str
32
+ """The unique identifier for the task."""
33
+
34
+ task_type: Literal["Parse", "Extract"]
35
+
36
+ version_info: VersionInfo
37
+ """Version information for the task."""
38
+
39
+ expires_at: Optional[datetime] = None
40
+ """The date and time when the task will expire."""
41
+
42
+ finished_at: Optional[datetime] = None
43
+ """The date and time when the task was finished."""
44
+
45
+ input_file_url: Optional[str] = None
46
+ """The presigned URL of the input file. Deprecated use `file_info.url` instead."""
47
+
48
+ output: Optional[ExtractOutputResponse] = None
49
+ """The processed results of a document extraction task.
50
+
51
+ Shapes:
52
+
53
+ - `results`: JSON matching the user-provided schema.
54
+ - `citations`: mirror of `results`; only leaf positions (primitive or
55
+ array-of-primitives) contain a `Vec<Citation>` supporting that field.
56
+ - `metrics`: mirror of `results`; only leaf positions contain a `Metrics` object
57
+ for that field.
58
+ """
59
+
60
+ source_task_id: Optional[str] = None
61
+ """The ID of the source `parse` task that was used for extraction"""
62
+
63
+ started_at: Optional[datetime] = None
64
+ """The date and time when the task was started."""
65
+
66
+ task_url: Optional[str] = None
67
+ """The presigned URL of the task."""