chunkr-ai 0.1.0a1__py3-none-any.whl → 0.1.0a3__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 (46) hide show
  1. chunkr_ai/_client.py +18 -9
  2. chunkr_ai/_files.py +1 -1
  3. chunkr_ai/_version.py +1 -1
  4. chunkr_ai/pagination.py +61 -1
  5. chunkr_ai/resources/__init__.py +27 -13
  6. chunkr_ai/resources/files.py +712 -0
  7. chunkr_ai/resources/tasks/__init__.py +33 -0
  8. chunkr_ai/resources/tasks/parse.py +612 -0
  9. chunkr_ai/resources/tasks/tasks.py +596 -0
  10. chunkr_ai/types/__init__.py +7 -19
  11. chunkr_ai/types/delete.py +10 -0
  12. chunkr_ai/types/file.py +30 -0
  13. chunkr_ai/types/file_create_params.py +17 -0
  14. chunkr_ai/types/file_list_params.py +28 -0
  15. chunkr_ai/types/file_url.py +15 -0
  16. chunkr_ai/types/file_url_params.py +15 -0
  17. chunkr_ai/types/files_page_response.py +20 -0
  18. chunkr_ai/types/task.py +866 -27
  19. chunkr_ai/types/tasks/__init__.py +6 -0
  20. chunkr_ai/types/tasks/parse_create_params.py +844 -0
  21. chunkr_ai/types/tasks/parse_update_params.py +838 -0
  22. {chunkr_ai-0.1.0a1.dist-info → chunkr_ai-0.1.0a3.dist-info}/METADATA +39 -21
  23. chunkr_ai-0.1.0a3.dist-info/RECORD +52 -0
  24. chunkr_ai/resources/task.py +0 -1166
  25. chunkr_ai/types/auto_generation_config.py +0 -39
  26. chunkr_ai/types/auto_generation_config_param.py +0 -39
  27. chunkr_ai/types/bounding_box.py +0 -19
  28. chunkr_ai/types/chunk_processing.py +0 -40
  29. chunkr_ai/types/chunk_processing_param.py +0 -42
  30. chunkr_ai/types/ignore_generation_config.py +0 -39
  31. chunkr_ai/types/ignore_generation_config_param.py +0 -39
  32. chunkr_ai/types/llm_generation_config.py +0 -39
  33. chunkr_ai/types/llm_generation_config_param.py +0 -39
  34. chunkr_ai/types/llm_processing.py +0 -36
  35. chunkr_ai/types/llm_processing_param.py +0 -36
  36. chunkr_ai/types/picture_generation_config.py +0 -39
  37. chunkr_ai/types/picture_generation_config_param.py +0 -39
  38. chunkr_ai/types/segment_processing.py +0 -280
  39. chunkr_ai/types/segment_processing_param.py +0 -281
  40. chunkr_ai/types/table_generation_config.py +0 -39
  41. chunkr_ai/types/table_generation_config_param.py +0 -39
  42. chunkr_ai/types/task_parse_params.py +0 -90
  43. chunkr_ai/types/task_update_params.py +0 -90
  44. chunkr_ai-0.1.0a1.dist-info/RECORD +0 -58
  45. {chunkr_ai-0.1.0a1.dist-info → chunkr_ai-0.1.0a3.dist-info}/WHEEL +0 -0
  46. {chunkr_ai-0.1.0a1.dist-info → chunkr_ai-0.1.0a3.dist-info}/licenses/LICENSE +0 -0
@@ -1,39 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import List, Optional
4
- from typing_extensions import Literal
5
-
6
- from .._models import BaseModel
7
-
8
- __all__ = ["AutoGenerationConfig"]
9
-
10
-
11
- class AutoGenerationConfig(BaseModel):
12
- crop_image: Optional[Literal["All", "Auto"]] = None
13
- """Controls the cropping strategy for an item (e.g. segment, chunk, etc.)
14
-
15
- - `All` crops all images in the item
16
- - `Auto` crops images only if required for post-processing
17
- """
18
-
19
- description: Optional[bool] = None
20
- """Generate LLM descriptions for this segment"""
21
-
22
- embed_sources: Optional[List[Literal["Content", "HTML", "Markdown", "LLM"]]] = None
23
- """**DEPRECATED**: `embed` field is auto populated"""
24
-
25
- extended_context: Optional[bool] = None
26
- """Use the full page image as context for LLM generation"""
27
-
28
- format: Optional[Literal["Html", "Markdown"]] = None
29
-
30
- html: Optional[Literal["LLM", "Auto", "Ignore"]] = None
31
- """**DEPRECATED**: Use `format: html` and `strategy` instead."""
32
-
33
- llm: Optional[str] = None
34
- """**DEPRECATED**: use description instead"""
35
-
36
- markdown: Optional[Literal["LLM", "Auto", "Ignore"]] = None
37
- """**DEPRECATED**: Use `format: markdown` and `strategy` instead."""
38
-
39
- strategy: Optional[Literal["LLM", "Auto", "Ignore"]] = None
@@ -1,39 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing import List, Optional
6
- from typing_extensions import Literal, TypedDict
7
-
8
- __all__ = ["AutoGenerationConfigParam"]
9
-
10
-
11
- class AutoGenerationConfigParam(TypedDict, total=False):
12
- crop_image: Literal["All", "Auto"]
13
- """Controls the cropping strategy for an item (e.g. segment, chunk, etc.)
14
-
15
- - `All` crops all images in the item
16
- - `Auto` crops images only if required for post-processing
17
- """
18
-
19
- description: bool
20
- """Generate LLM descriptions for this segment"""
21
-
22
- embed_sources: List[Literal["Content", "HTML", "Markdown", "LLM"]]
23
- """**DEPRECATED**: `embed` field is auto populated"""
24
-
25
- extended_context: bool
26
- """Use the full page image as context for LLM generation"""
27
-
28
- format: Literal["Html", "Markdown"]
29
-
30
- html: Optional[Literal["LLM", "Auto", "Ignore"]]
31
- """**DEPRECATED**: Use `format: html` and `strategy` instead."""
32
-
33
- llm: Optional[str]
34
- """**DEPRECATED**: use description instead"""
35
-
36
- markdown: Optional[Literal["LLM", "Auto", "Ignore"]]
37
- """**DEPRECATED**: Use `format: markdown` and `strategy` instead."""
38
-
39
- strategy: Literal["LLM", "Auto", "Ignore"]
@@ -1,19 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from .._models import BaseModel
4
-
5
- __all__ = ["BoundingBox"]
6
-
7
-
8
- class BoundingBox(BaseModel):
9
- height: float
10
- """The height of the bounding box."""
11
-
12
- left: float
13
- """The left coordinate of the bounding box."""
14
-
15
- top: float
16
- """The top coordinate of the bounding box."""
17
-
18
- width: float
19
- """The width of the bounding box."""
@@ -1,40 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import Union, Optional
4
- from typing_extensions import Literal, TypeAlias
5
-
6
- from pydantic import Field as FieldInfo
7
-
8
- from .._models import BaseModel
9
-
10
- __all__ = ["ChunkProcessing", "Tokenizer", "TokenizerEnum", "TokenizerString"]
11
-
12
-
13
- class TokenizerEnum(BaseModel):
14
- enum: Literal["Word", "Cl100kBase", "XlmRobertaBase", "BertBaseUncased"] = FieldInfo(alias="Enum")
15
- """Use one of the predefined tokenizer types"""
16
-
17
-
18
- class TokenizerString(BaseModel):
19
- string: str = FieldInfo(alias="String")
20
- """
21
- Use any Hugging Face tokenizer by specifying its model ID Examples:
22
- "Qwen/Qwen-tokenizer", "facebook/bart-large"
23
- """
24
-
25
-
26
- Tokenizer: TypeAlias = Union[TokenizerEnum, TokenizerString]
27
-
28
-
29
- class ChunkProcessing(BaseModel):
30
- ignore_headers_and_footers: Optional[bool] = None
31
- """DEPRECATED: use `segment_processing.ignore` This value will not be used"""
32
-
33
- target_length: Optional[int] = None
34
- """The target number of words in each chunk.
35
-
36
- If 0, each chunk will contain a single segment.
37
- """
38
-
39
- tokenizer: Optional[Tokenizer] = None
40
- """The tokenizer to use for the chunking process."""
@@ -1,42 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing import Union
6
- from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7
-
8
- from .._utils import PropertyInfo
9
-
10
- __all__ = ["ChunkProcessingParam", "Tokenizer", "TokenizerEnum", "TokenizerString"]
11
-
12
-
13
- class TokenizerEnum(TypedDict, total=False):
14
- enum: Required[
15
- Annotated[Literal["Word", "Cl100kBase", "XlmRobertaBase", "BertBaseUncased"], PropertyInfo(alias="Enum")]
16
- ]
17
- """Use one of the predefined tokenizer types"""
18
-
19
-
20
- class TokenizerString(TypedDict, total=False):
21
- string: Required[Annotated[str, PropertyInfo(alias="String")]]
22
- """
23
- Use any Hugging Face tokenizer by specifying its model ID Examples:
24
- "Qwen/Qwen-tokenizer", "facebook/bart-large"
25
- """
26
-
27
-
28
- Tokenizer: TypeAlias = Union[TokenizerEnum, TokenizerString]
29
-
30
-
31
- class ChunkProcessingParam(TypedDict, total=False):
32
- ignore_headers_and_footers: bool
33
- """DEPRECATED: use `segment_processing.ignore` This value will not be used"""
34
-
35
- target_length: int
36
- """The target number of words in each chunk.
37
-
38
- If 0, each chunk will contain a single segment.
39
- """
40
-
41
- tokenizer: Tokenizer
42
- """The tokenizer to use for the chunking process."""
@@ -1,39 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import List, Optional
4
- from typing_extensions import Literal
5
-
6
- from .._models import BaseModel
7
-
8
- __all__ = ["IgnoreGenerationConfig"]
9
-
10
-
11
- class IgnoreGenerationConfig(BaseModel):
12
- crop_image: Optional[Literal["All", "Auto"]] = None
13
- """Controls the cropping strategy for an item (e.g. segment, chunk, etc.)
14
-
15
- - `All` crops all images in the item
16
- - `Auto` crops images only if required for post-processing
17
- """
18
-
19
- description: Optional[bool] = None
20
- """Generate LLM descriptions for this segment"""
21
-
22
- embed_sources: Optional[List[Literal["Content", "HTML", "Markdown", "LLM"]]] = None
23
- """**DEPRECATED**: `embed` field is auto populated"""
24
-
25
- extended_context: Optional[bool] = None
26
- """Use the full page image as context for LLM generation"""
27
-
28
- format: Optional[Literal["Html", "Markdown"]] = None
29
-
30
- html: Optional[Literal["LLM", "Auto", "Ignore"]] = None
31
- """**DEPRECATED**: Use `format: html` and `strategy` instead."""
32
-
33
- llm: Optional[str] = None
34
- """**DEPRECATED**: use description instead"""
35
-
36
- markdown: Optional[Literal["LLM", "Auto", "Ignore"]] = None
37
- """**DEPRECATED**: Use `format: markdown` and `strategy` instead."""
38
-
39
- strategy: Optional[Literal["LLM", "Auto", "Ignore"]] = None
@@ -1,39 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing import List, Optional
6
- from typing_extensions import Literal, TypedDict
7
-
8
- __all__ = ["IgnoreGenerationConfigParam"]
9
-
10
-
11
- class IgnoreGenerationConfigParam(TypedDict, total=False):
12
- crop_image: Literal["All", "Auto"]
13
- """Controls the cropping strategy for an item (e.g. segment, chunk, etc.)
14
-
15
- - `All` crops all images in the item
16
- - `Auto` crops images only if required for post-processing
17
- """
18
-
19
- description: bool
20
- """Generate LLM descriptions for this segment"""
21
-
22
- embed_sources: List[Literal["Content", "HTML", "Markdown", "LLM"]]
23
- """**DEPRECATED**: `embed` field is auto populated"""
24
-
25
- extended_context: bool
26
- """Use the full page image as context for LLM generation"""
27
-
28
- format: Literal["Html", "Markdown"]
29
-
30
- html: Optional[Literal["LLM", "Auto", "Ignore"]]
31
- """**DEPRECATED**: Use `format: html` and `strategy` instead."""
32
-
33
- llm: Optional[str]
34
- """**DEPRECATED**: use description instead"""
35
-
36
- markdown: Optional[Literal["LLM", "Auto", "Ignore"]]
37
- """**DEPRECATED**: Use `format: markdown` and `strategy` instead."""
38
-
39
- strategy: Literal["LLM", "Auto", "Ignore"]
@@ -1,39 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import List, Optional
4
- from typing_extensions import Literal
5
-
6
- from .._models import BaseModel
7
-
8
- __all__ = ["LlmGenerationConfig"]
9
-
10
-
11
- class LlmGenerationConfig(BaseModel):
12
- crop_image: Optional[Literal["All", "Auto"]] = None
13
- """Controls the cropping strategy for an item (e.g. segment, chunk, etc.)
14
-
15
- - `All` crops all images in the item
16
- - `Auto` crops images only if required for post-processing
17
- """
18
-
19
- description: Optional[bool] = None
20
- """Generate LLM descriptions for this segment"""
21
-
22
- embed_sources: Optional[List[Literal["Content", "HTML", "Markdown", "LLM"]]] = None
23
- """**DEPRECATED**: `embed` field is auto populated"""
24
-
25
- extended_context: Optional[bool] = None
26
- """Use the full page image as context for LLM generation"""
27
-
28
- format: Optional[Literal["Html", "Markdown"]] = None
29
-
30
- html: Optional[Literal["LLM", "Auto", "Ignore"]] = None
31
- """**DEPRECATED**: Use `format: html` and `strategy` instead."""
32
-
33
- llm: Optional[str] = None
34
- """**DEPRECATED**: use description instead"""
35
-
36
- markdown: Optional[Literal["LLM", "Auto", "Ignore"]] = None
37
- """**DEPRECATED**: Use `format: markdown` and `strategy` instead."""
38
-
39
- strategy: Optional[Literal["LLM", "Auto", "Ignore"]] = None
@@ -1,39 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing import List, Optional
6
- from typing_extensions import Literal, TypedDict
7
-
8
- __all__ = ["LlmGenerationConfigParam"]
9
-
10
-
11
- class LlmGenerationConfigParam(TypedDict, total=False):
12
- crop_image: Literal["All", "Auto"]
13
- """Controls the cropping strategy for an item (e.g. segment, chunk, etc.)
14
-
15
- - `All` crops all images in the item
16
- - `Auto` crops images only if required for post-processing
17
- """
18
-
19
- description: bool
20
- """Generate LLM descriptions for this segment"""
21
-
22
- embed_sources: List[Literal["Content", "HTML", "Markdown", "LLM"]]
23
- """**DEPRECATED**: `embed` field is auto populated"""
24
-
25
- extended_context: bool
26
- """Use the full page image as context for LLM generation"""
27
-
28
- format: Literal["Html", "Markdown"]
29
-
30
- html: Optional[Literal["LLM", "Auto", "Ignore"]]
31
- """**DEPRECATED**: Use `format: html` and `strategy` instead."""
32
-
33
- llm: Optional[str]
34
- """**DEPRECATED**: use description instead"""
35
-
36
- markdown: Optional[Literal["LLM", "Auto", "Ignore"]]
37
- """**DEPRECATED**: Use `format: markdown` and `strategy` instead."""
38
-
39
- strategy: Literal["LLM", "Auto", "Ignore"]
@@ -1,36 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import Union, Optional
4
- from typing_extensions import Literal, TypeAlias
5
-
6
- from pydantic import Field as FieldInfo
7
-
8
- from .._models import BaseModel
9
-
10
- __all__ = ["LlmProcessing", "FallbackStrategy", "FallbackStrategyModel"]
11
-
12
-
13
- class FallbackStrategyModel(BaseModel):
14
- model: str = FieldInfo(alias="Model")
15
- """Use a specific model as fallback"""
16
-
17
-
18
- FallbackStrategy: TypeAlias = Union[Literal["None", "Default"], FallbackStrategyModel]
19
-
20
-
21
- class LlmProcessing(BaseModel):
22
- fallback_strategy: Optional[FallbackStrategy] = None
23
- """The fallback strategy to use for the LLMs in the task."""
24
-
25
- max_completion_tokens: Optional[int] = None
26
- """The maximum number of tokens to generate."""
27
-
28
- api_model_id: Optional[str] = FieldInfo(alias="model_id", default=None)
29
- """The ID of the model to use for the task.
30
-
31
- If not provided, the default model will be used. Please check the documentation
32
- for the model you want to use.
33
- """
34
-
35
- temperature: Optional[float] = None
36
- """The temperature to use for the LLM."""
@@ -1,36 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing import Union, Optional
6
- from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7
-
8
- from .._utils import PropertyInfo
9
-
10
- __all__ = ["LlmProcessingParam", "FallbackStrategy", "FallbackStrategyModel"]
11
-
12
-
13
- class FallbackStrategyModel(TypedDict, total=False):
14
- model: Required[Annotated[str, PropertyInfo(alias="Model")]]
15
- """Use a specific model as fallback"""
16
-
17
-
18
- FallbackStrategy: TypeAlias = Union[Literal["None", "Default"], FallbackStrategyModel]
19
-
20
-
21
- class LlmProcessingParam(TypedDict, total=False):
22
- fallback_strategy: FallbackStrategy
23
- """The fallback strategy to use for the LLMs in the task."""
24
-
25
- max_completion_tokens: Optional[int]
26
- """The maximum number of tokens to generate."""
27
-
28
- model_id: Optional[str]
29
- """The ID of the model to use for the task.
30
-
31
- If not provided, the default model will be used. Please check the documentation
32
- for the model you want to use.
33
- """
34
-
35
- temperature: float
36
- """The temperature to use for the LLM."""
@@ -1,39 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import List, Optional
4
- from typing_extensions import Literal
5
-
6
- from .._models import BaseModel
7
-
8
- __all__ = ["PictureGenerationConfig"]
9
-
10
-
11
- class PictureGenerationConfig(BaseModel):
12
- crop_image: Optional[Literal["All", "Auto"]] = None
13
- """Controls the cropping strategy for an item (e.g. segment, chunk, etc.)
14
-
15
- - `All` crops all images in the item
16
- - `Auto` crops images only if required for post-processing
17
- """
18
-
19
- description: Optional[bool] = None
20
- """Generate LLM descriptions for this segment"""
21
-
22
- embed_sources: Optional[List[Literal["Content", "HTML", "Markdown", "LLM"]]] = None
23
- """**DEPRECATED**: `embed` field is auto populated"""
24
-
25
- extended_context: Optional[bool] = None
26
- """Use the full page image as context for LLM generation"""
27
-
28
- format: Optional[Literal["Html", "Markdown"]] = None
29
-
30
- html: Optional[Literal["LLM", "Auto", "Ignore"]] = None
31
- """**DEPRECATED**: Use `format: html` and `strategy` instead."""
32
-
33
- llm: Optional[str] = None
34
- """**DEPRECATED**: use description instead"""
35
-
36
- markdown: Optional[Literal["LLM", "Auto", "Ignore"]] = None
37
- """**DEPRECATED**: Use `format: markdown` and `strategy` instead."""
38
-
39
- strategy: Optional[Literal["LLM", "Auto", "Ignore"]] = None
@@ -1,39 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing import List, Optional
6
- from typing_extensions import Literal, TypedDict
7
-
8
- __all__ = ["PictureGenerationConfigParam"]
9
-
10
-
11
- class PictureGenerationConfigParam(TypedDict, total=False):
12
- crop_image: Literal["All", "Auto"]
13
- """Controls the cropping strategy for an item (e.g. segment, chunk, etc.)
14
-
15
- - `All` crops all images in the item
16
- - `Auto` crops images only if required for post-processing
17
- """
18
-
19
- description: bool
20
- """Generate LLM descriptions for this segment"""
21
-
22
- embed_sources: List[Literal["Content", "HTML", "Markdown", "LLM"]]
23
- """**DEPRECATED**: `embed` field is auto populated"""
24
-
25
- extended_context: bool
26
- """Use the full page image as context for LLM generation"""
27
-
28
- format: Literal["Html", "Markdown"]
29
-
30
- html: Optional[Literal["LLM", "Auto", "Ignore"]]
31
- """**DEPRECATED**: Use `format: html` and `strategy` instead."""
32
-
33
- llm: Optional[str]
34
- """**DEPRECATED**: use description instead"""
35
-
36
- markdown: Optional[Literal["LLM", "Auto", "Ignore"]]
37
- """**DEPRECATED**: Use `format: markdown` and `strategy` instead."""
38
-
39
- strategy: Literal["LLM", "Auto", "Ignore"]