retab 0.0.85__tar.gz → 0.0.87__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 (72) hide show
  1. {retab-0.0.85 → retab-0.0.87}/PKG-INFO +1 -1
  2. {retab-0.0.85 → retab-0.0.87}/retab/resources/edit/agent/client.py +11 -0
  3. {retab-0.0.85 → retab-0.0.87}/retab/resources/edit/templates/client.py +10 -0
  4. retab-0.0.87/retab/resources/workflows/client.py +28 -0
  5. retab-0.0.87/retab/resources/workflows/runs/__init__.py +3 -0
  6. {retab-0.0.85/retab/resources/workflows → retab-0.0.87/retab/resources/workflows/runs}/client.py +26 -26
  7. {retab-0.0.85 → retab-0.0.87}/retab/types/documents/classify.py +1 -0
  8. {retab-0.0.85 → retab-0.0.87}/retab/types/documents/edit.py +6 -0
  9. {retab-0.0.85 → retab-0.0.87}/retab/types/edit/templates.py +2 -1
  10. {retab-0.0.85 → retab-0.0.87}/retab.egg-info/PKG-INFO +1 -1
  11. {retab-0.0.85 → retab-0.0.87}/retab.egg-info/SOURCES.txt +2 -0
  12. {retab-0.0.85 → retab-0.0.87}/setup.py +1 -1
  13. {retab-0.0.85 → retab-0.0.87}/README.md +0 -0
  14. {retab-0.0.85 → retab-0.0.87}/pyproject.toml +0 -0
  15. {retab-0.0.85 → retab-0.0.87}/retab/__init__.py +0 -0
  16. {retab-0.0.85 → retab-0.0.87}/retab/_resource.py +0 -0
  17. {retab-0.0.85 → retab-0.0.87}/retab/client.py +0 -0
  18. {retab-0.0.85 → retab-0.0.87}/retab/generate_types.py +0 -0
  19. {retab-0.0.85 → retab-0.0.87}/retab/py.typed +0 -0
  20. {retab-0.0.85 → retab-0.0.87}/retab/resources/__init__.py +0 -0
  21. {retab-0.0.85 → retab-0.0.87}/retab/resources/documents/__init__.py +0 -0
  22. {retab-0.0.85 → retab-0.0.87}/retab/resources/documents/client.py +0 -0
  23. {retab-0.0.85 → retab-0.0.87}/retab/resources/edit/__init__.py +0 -0
  24. {retab-0.0.85 → retab-0.0.87}/retab/resources/edit/agent/__init__.py +0 -0
  25. {retab-0.0.85 → retab-0.0.87}/retab/resources/edit/client.py +0 -0
  26. {retab-0.0.85 → retab-0.0.87}/retab/resources/edit/templates/__init__.py +0 -0
  27. {retab-0.0.85 → retab-0.0.87}/retab/resources/extractions/__init__.py +0 -0
  28. {retab-0.0.85 → retab-0.0.87}/retab/resources/extractions/client.py +0 -0
  29. {retab-0.0.85 → retab-0.0.87}/retab/resources/models.py +0 -0
  30. {retab-0.0.85 → retab-0.0.87}/retab/resources/projects/__init__.py +0 -0
  31. {retab-0.0.85 → retab-0.0.87}/retab/resources/projects/client.py +0 -0
  32. {retab-0.0.85 → retab-0.0.87}/retab/resources/schemas.py +0 -0
  33. {retab-0.0.85 → retab-0.0.87}/retab/resources/workflows/__init__.py +0 -0
  34. {retab-0.0.85 → retab-0.0.87}/retab/types/__init__.py +0 -0
  35. {retab-0.0.85 → retab-0.0.87}/retab/types/chat.py +0 -0
  36. {retab-0.0.85 → retab-0.0.87}/retab/types/documents/__init__.py +0 -0
  37. {retab-0.0.85 → retab-0.0.87}/retab/types/documents/correct_orientation.py +0 -0
  38. {retab-0.0.85 → retab-0.0.87}/retab/types/documents/create_messages.py +0 -0
  39. {retab-0.0.85 → retab-0.0.87}/retab/types/documents/extract.py +0 -0
  40. {retab-0.0.85 → retab-0.0.87}/retab/types/documents/parse.py +0 -0
  41. {retab-0.0.85 → retab-0.0.87}/retab/types/documents/split.py +0 -0
  42. {retab-0.0.85 → retab-0.0.87}/retab/types/edit/__init__.py +0 -0
  43. {retab-0.0.85 → retab-0.0.87}/retab/types/extractions/__init__.py +0 -0
  44. {retab-0.0.85 → retab-0.0.87}/retab/types/extractions/types.py +0 -0
  45. {retab-0.0.85 → retab-0.0.87}/retab/types/inference_settings.py +0 -0
  46. {retab-0.0.85 → retab-0.0.87}/retab/types/mime.py +0 -0
  47. {retab-0.0.85 → retab-0.0.87}/retab/types/modality.py +0 -0
  48. {retab-0.0.85 → retab-0.0.87}/retab/types/pagination.py +0 -0
  49. {retab-0.0.85 → retab-0.0.87}/retab/types/projects/__init__.py +0 -0
  50. {retab-0.0.85 → retab-0.0.87}/retab/types/projects/metrics.py +0 -0
  51. {retab-0.0.85 → retab-0.0.87}/retab/types/projects/model.py +0 -0
  52. {retab-0.0.85 → retab-0.0.87}/retab/types/projects/predictions.py +0 -0
  53. {retab-0.0.85 → retab-0.0.87}/retab/types/schemas/__init__.py +0 -0
  54. {retab-0.0.85 → retab-0.0.87}/retab/types/schemas/chat.py +0 -0
  55. {retab-0.0.85 → retab-0.0.87}/retab/types/schemas/generate.py +0 -0
  56. {retab-0.0.85 → retab-0.0.87}/retab/types/schemas/layout.py +0 -0
  57. {retab-0.0.85 → retab-0.0.87}/retab/types/schemas/model.py +0 -0
  58. {retab-0.0.85 → retab-0.0.87}/retab/types/schemas/templates.py +0 -0
  59. {retab-0.0.85 → retab-0.0.87}/retab/types/standards.py +0 -0
  60. {retab-0.0.85 → retab-0.0.87}/retab/types/workflows/__init__.py +0 -0
  61. {retab-0.0.85 → retab-0.0.87}/retab/types/workflows/model.py +0 -0
  62. {retab-0.0.85 → retab-0.0.87}/retab/utils/__init__.py +0 -0
  63. {retab-0.0.85 → retab-0.0.87}/retab/utils/display.py +0 -0
  64. {retab-0.0.85 → retab-0.0.87}/retab/utils/hashing.py +0 -0
  65. {retab-0.0.85 → retab-0.0.87}/retab/utils/json_schema.py +0 -0
  66. {retab-0.0.85 → retab-0.0.87}/retab/utils/mime.py +0 -0
  67. {retab-0.0.85 → retab-0.0.87}/retab/utils/stream_context_managers.py +0 -0
  68. {retab-0.0.85 → retab-0.0.87}/retab.egg-info/dependency_links.txt +0 -0
  69. {retab-0.0.85 → retab-0.0.87}/retab.egg-info/requires.txt +0 -0
  70. {retab-0.0.85 → retab-0.0.87}/retab.egg-info/top_level.txt +0 -0
  71. {retab-0.0.85 → retab-0.0.87}/setup.cfg +0 -0
  72. {retab-0.0.85 → retab-0.0.87}/tests/test_projects.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: retab
3
- Version: 0.0.85
3
+ Version: 0.0.87
4
4
  Summary: Retab official python library
5
5
  Home-page: https://github.com/retab-dev/retab
6
6
  Author: Retab
@@ -12,6 +12,7 @@ from pydantic import HttpUrl
12
12
  from ...._resource import AsyncAPIResource, SyncAPIResource
13
13
  from ....utils.mime import prepare_mime_document
14
14
  from ....types.documents.edit import (
15
+ EditConfig,
15
16
  EditRequest,
16
17
  EditResponse,
17
18
  )
@@ -27,6 +28,7 @@ class BaseAgentMixin:
27
28
  instructions: str,
28
29
  document: Path | str | IOBase | MIMEData | PIL.Image.Image | HttpUrl | None = None,
29
30
  model: str = FieldUnset,
31
+ color: str = FieldUnset,
30
32
  **extra_body: Any,
31
33
  ) -> PreparedRequest:
32
34
  request_dict: dict[str, Any] = {
@@ -40,6 +42,9 @@ class BaseAgentMixin:
40
42
  if model is not FieldUnset:
41
43
  request_dict["model"] = model
42
44
 
45
+ if color is not FieldUnset:
46
+ request_dict["config"] = EditConfig(color=color)
47
+
43
48
  # Merge any extra fields provided by the caller
44
49
  if extra_body:
45
50
  request_dict.update(extra_body)
@@ -63,6 +68,7 @@ class Agent(SyncAPIResource, BaseAgentMixin):
63
68
  instructions: str,
64
69
  document: Path | str | IOBase | MIMEData | PIL.Image.Image | HttpUrl | None = None,
65
70
  model: str = FieldUnset,
71
+ color: str = FieldUnset,
66
72
  **extra_body: Any,
67
73
  ) -> EditResponse:
68
74
  """
@@ -79,6 +85,7 @@ class Agent(SyncAPIResource, BaseAgentMixin):
79
85
  document: The document to edit. Can be a file path (Path or str), file-like object,
80
86
  MIMEData, PIL Image, or URL.
81
87
  model: The LLM model to use for inference. Defaults to "retab-small".
88
+ color: Hex color code for filled text (e.g. "#000080"). Defaults to dark blue.
82
89
 
83
90
  Returns:
84
91
  EditResponse: Response containing:
@@ -98,6 +105,7 @@ class Agent(SyncAPIResource, BaseAgentMixin):
98
105
  instructions=instructions,
99
106
  document=document,
100
107
  model=model,
108
+ color=color,
101
109
  **extra_body,
102
110
  )
103
111
  response = self._client._prepared_request(request)
@@ -115,6 +123,7 @@ class AsyncAgent(AsyncAPIResource, BaseAgentMixin):
115
123
  instructions: str,
116
124
  document: Path | str | IOBase | MIMEData | PIL.Image.Image | HttpUrl | None = None,
117
125
  model: str = FieldUnset,
126
+ color: str = FieldUnset,
118
127
  **extra_body: Any,
119
128
  ) -> EditResponse:
120
129
  """
@@ -131,6 +140,7 @@ class AsyncAgent(AsyncAPIResource, BaseAgentMixin):
131
140
  document: The document to edit. Can be a file path (Path or str), file-like object,
132
141
  MIMEData, PIL Image, or URL.
133
142
  model: The LLM model to use for inference. Defaults to "retab-small".
143
+ color: Hex color code for filled text (e.g. "#000080"). Defaults to dark blue.
134
144
 
135
145
  Returns:
136
146
  EditResponse: Response containing:
@@ -150,6 +160,7 @@ class AsyncAgent(AsyncAPIResource, BaseAgentMixin):
150
160
  instructions=instructions,
151
161
  document=document,
152
162
  model=model,
163
+ color=color,
153
164
  **extra_body,
154
165
  )
155
166
  response = await self._client._prepared_request(request)
@@ -12,6 +12,7 @@ from pydantic import HttpUrl
12
12
  from ...._resource import AsyncAPIResource, SyncAPIResource
13
13
  from ....utils.mime import prepare_mime_document
14
14
  from ....types.documents.edit import (
15
+ EditConfig,
15
16
  FormField,
16
17
  InferFormSchemaRequest,
17
18
  InferFormSchemaResponse,
@@ -163,6 +164,7 @@ class BaseTemplatesMixin:
163
164
  template_id: str,
164
165
  instructions: str,
165
166
  model: str = FieldUnset,
167
+ color: str = FieldUnset,
166
168
  **extra_body: Any,
167
169
  ) -> PreparedRequest:
168
170
  request_dict: dict[str, Any] = {
@@ -172,6 +174,8 @@ class BaseTemplatesMixin:
172
174
 
173
175
  if model is not FieldUnset:
174
176
  request_dict["model"] = model
177
+ if color is not FieldUnset:
178
+ request_dict["config"] = EditConfig(color=color)
175
179
  if extra_body:
176
180
  request_dict.update(extra_body)
177
181
 
@@ -368,6 +372,7 @@ class Templates(SyncAPIResource, BaseTemplatesMixin):
368
372
  template_id: str,
369
373
  instructions: str,
370
374
  model: str = FieldUnset,
375
+ color: str = FieldUnset,
371
376
  **extra_body: Any,
372
377
  ) -> EditResponse:
373
378
  """
@@ -380,6 +385,7 @@ class Templates(SyncAPIResource, BaseTemplatesMixin):
380
385
  template_id: The template ID to use for filling
381
386
  instructions: Instructions describing how to fill the form fields
382
387
  model: The LLM model to use for inference (default: "retab-small")
388
+ color: Hex color code for filled text (e.g. "#000080"). Defaults to dark blue.
383
389
 
384
390
  Returns:
385
391
  EditResponse: Response containing:
@@ -395,6 +401,7 @@ class Templates(SyncAPIResource, BaseTemplatesMixin):
395
401
  template_id=template_id,
396
402
  instructions=instructions,
397
403
  model=model,
404
+ color=color,
398
405
  **extra_body,
399
406
  )
400
407
  response = self._client._prepared_request(request)
@@ -586,6 +593,7 @@ class AsyncTemplates(AsyncAPIResource, BaseTemplatesMixin):
586
593
  template_id: str,
587
594
  instructions: str,
588
595
  model: str = FieldUnset,
596
+ color: str = FieldUnset,
589
597
  **extra_body: Any,
590
598
  ) -> EditResponse:
591
599
  """
@@ -598,6 +606,7 @@ class AsyncTemplates(AsyncAPIResource, BaseTemplatesMixin):
598
606
  template_id: The template ID to use for filling
599
607
  instructions: Instructions describing how to fill the form fields
600
608
  model: The LLM model to use for inference (default: "retab-small")
609
+ color: Hex color code for filled text (e.g. "#000080"). Defaults to dark blue.
601
610
 
602
611
  Returns:
603
612
  EditResponse: Response containing:
@@ -613,6 +622,7 @@ class AsyncTemplates(AsyncAPIResource, BaseTemplatesMixin):
613
622
  template_id=template_id,
614
623
  instructions=instructions,
615
624
  model=model,
625
+ color=color,
616
626
  **extra_body,
617
627
  )
618
628
  response = await self._client._prepared_request(request)
@@ -0,0 +1,28 @@
1
+ from typing import Any
2
+
3
+ from ..._resource import AsyncAPIResource, SyncAPIResource
4
+ from .runs import WorkflowRuns, AsyncWorkflowRuns
5
+
6
+
7
+ class Workflows(SyncAPIResource):
8
+ """Workflows API wrapper for synchronous operations.
9
+
10
+ Sub-clients:
11
+ runs: Workflow run operations (create, get)
12
+ """
13
+
14
+ def __init__(self, client: Any) -> None:
15
+ super().__init__(client=client)
16
+ self.runs = WorkflowRuns(client=client)
17
+
18
+
19
+ class AsyncWorkflows(AsyncAPIResource):
20
+ """Workflows API wrapper for asynchronous operations.
21
+
22
+ Sub-clients:
23
+ runs: Workflow run operations (create, get)
24
+ """
25
+
26
+ def __init__(self, client: Any) -> None:
27
+ super().__init__(client=client)
28
+ self.runs = AsyncWorkflowRuns(client=client)
@@ -0,0 +1,3 @@
1
+ from .client import AsyncWorkflowRuns, WorkflowRuns
2
+
3
+ __all__ = ["WorkflowRuns", "AsyncWorkflowRuns"]
@@ -5,20 +5,20 @@ from typing import Any, Dict
5
5
  import PIL.Image
6
6
  from pydantic import HttpUrl
7
7
 
8
- from ..._resource import AsyncAPIResource, SyncAPIResource
9
- from ...utils.mime import MIMEData, prepare_mime_document
10
- from ...types.standards import PreparedRequest
11
- from ...types.workflows import WorkflowRun
8
+ from ...._resource import AsyncAPIResource, SyncAPIResource
9
+ from ....utils.mime import MIMEData, prepare_mime_document
10
+ from ....types.standards import PreparedRequest
11
+ from ....types.workflows import WorkflowRun
12
12
 
13
13
 
14
14
  # Type alias for document inputs
15
15
  DocumentInput = Path | str | bytes | IOBase | MIMEData | PIL.Image.Image | HttpUrl
16
16
 
17
17
 
18
- class WorkflowsMixin:
19
- """Mixin providing shared methods for workflow operations."""
18
+ class WorkflowRunsMixin:
19
+ """Mixin providing shared methods for workflow run operations."""
20
20
 
21
- def prepare_run(
21
+ def prepare_create(
22
22
  self,
23
23
  workflow_id: str,
24
24
  documents: Dict[str, DocumentInput],
@@ -33,9 +33,9 @@ class WorkflowsMixin:
33
33
 
34
34
  Returns:
35
35
  PreparedRequest: The prepared request
36
-
36
+
37
37
  Example:
38
- >>> client.workflows.run(
38
+ >>> client.workflows.runs.create(
39
39
  ... workflow_id="wf_abc123",
40
40
  ... documents={
41
41
  ... "start-node-1": Path("invoice.pdf"),
@@ -56,7 +56,7 @@ class WorkflowsMixin:
56
56
  data = {"documents": documents_payload}
57
57
  return PreparedRequest(method="POST", url=f"/v1/workflows/{workflow_id}/run", data=data)
58
58
 
59
- def prepare_get_run(self, run_id: str) -> PreparedRequest:
59
+ def prepare_get(self, run_id: str) -> PreparedRequest:
60
60
  """Prepare a request to get a workflow run by ID.
61
61
 
62
62
  Args:
@@ -68,13 +68,13 @@ class WorkflowsMixin:
68
68
  return PreparedRequest(method="GET", url=f"/v1/workflows/runs/{run_id}")
69
69
 
70
70
 
71
- class Workflows(SyncAPIResource, WorkflowsMixin):
72
- """Workflows API wrapper for synchronous operations."""
71
+ class WorkflowRuns(SyncAPIResource, WorkflowRunsMixin):
72
+ """Workflow Runs API wrapper for synchronous operations."""
73
73
 
74
74
  def __init__(self, *args, **kwargs):
75
75
  super().__init__(*args, **kwargs)
76
76
 
77
- def run(
77
+ def create(
78
78
  self,
79
79
  workflow_id: str,
80
80
  documents: Dict[str, DocumentInput],
@@ -82,7 +82,7 @@ class Workflows(SyncAPIResource, WorkflowsMixin):
82
82
  """Run a workflow with the provided input documents.
83
83
 
84
84
  This creates a workflow run and starts execution in the background.
85
- The returned WorkflowRun will have status "running" - use get_run()
85
+ The returned WorkflowRun will have status "running" - use get()
86
86
  to check for updates on the run status.
87
87
 
88
88
  Args:
@@ -99,7 +99,7 @@ class Workflows(SyncAPIResource, WorkflowsMixin):
99
99
  missing input documents for start nodes)
100
100
 
101
101
  Example:
102
- >>> run = client.workflows.run(
102
+ >>> run = client.workflows.runs.create(
103
103
  ... workflow_id="wf_abc123",
104
104
  ... documents={
105
105
  ... "start-node-1": Path("invoice.pdf"),
@@ -108,11 +108,11 @@ class Workflows(SyncAPIResource, WorkflowsMixin):
108
108
  ... )
109
109
  >>> print(f"Run started: {run.id}, status: {run.status}")
110
110
  """
111
- request = self.prepare_run(workflow_id=workflow_id, documents=documents)
111
+ request = self.prepare_create(workflow_id=workflow_id, documents=documents)
112
112
  response = self._client._prepared_request(request)
113
113
  return WorkflowRun.model_validate(response)
114
114
 
115
- def get_run(self, run_id: str) -> WorkflowRun:
115
+ def get(self, run_id: str) -> WorkflowRun:
116
116
  """Get a workflow run by ID.
117
117
 
118
118
  Args:
@@ -124,18 +124,18 @@ class Workflows(SyncAPIResource, WorkflowsMixin):
124
124
  Raises:
125
125
  HTTPException: If the request fails (e.g., run not found)
126
126
  """
127
- request = self.prepare_get_run(run_id)
127
+ request = self.prepare_get(run_id)
128
128
  response = self._client._prepared_request(request)
129
129
  return WorkflowRun.model_validate(response)
130
130
 
131
131
 
132
- class AsyncWorkflows(AsyncAPIResource, WorkflowsMixin):
133
- """Workflows API wrapper for asynchronous operations."""
132
+ class AsyncWorkflowRuns(AsyncAPIResource, WorkflowRunsMixin):
133
+ """Workflow Runs API wrapper for asynchronous operations."""
134
134
 
135
135
  def __init__(self, *args, **kwargs):
136
136
  super().__init__(*args, **kwargs)
137
137
 
138
- async def run(
138
+ async def create(
139
139
  self,
140
140
  workflow_id: str,
141
141
  documents: Dict[str, DocumentInput],
@@ -143,7 +143,7 @@ class AsyncWorkflows(AsyncAPIResource, WorkflowsMixin):
143
143
  """Run a workflow with the provided input documents.
144
144
 
145
145
  This creates a workflow run and starts execution in the background.
146
- The returned WorkflowRun will have status "running" - use get_run()
146
+ The returned WorkflowRun will have status "running" - use get()
147
147
  to check for updates on the run status.
148
148
 
149
149
  Args:
@@ -160,7 +160,7 @@ class AsyncWorkflows(AsyncAPIResource, WorkflowsMixin):
160
160
  missing input documents for start nodes)
161
161
 
162
162
  Example:
163
- >>> run = await client.workflows.run(
163
+ >>> run = await client.workflows.runs.create(
164
164
  ... workflow_id="wf_abc123",
165
165
  ... documents={
166
166
  ... "start-node-1": Path("invoice.pdf"),
@@ -169,11 +169,11 @@ class AsyncWorkflows(AsyncAPIResource, WorkflowsMixin):
169
169
  ... )
170
170
  >>> print(f"Run started: {run.id}, status: {run.status}")
171
171
  """
172
- request = self.prepare_run(workflow_id=workflow_id, documents=documents)
172
+ request = self.prepare_create(workflow_id=workflow_id, documents=documents)
173
173
  response = await self._client._prepared_request(request)
174
174
  return WorkflowRun.model_validate(response)
175
175
 
176
- async def get_run(self, run_id: str) -> WorkflowRun:
176
+ async def get(self, run_id: str) -> WorkflowRun:
177
177
  """Get a workflow run by ID.
178
178
 
179
179
  Args:
@@ -185,6 +185,6 @@ class AsyncWorkflows(AsyncAPIResource, WorkflowsMixin):
185
185
  Raises:
186
186
  HTTPException: If the request fails (e.g., run not found)
187
187
  """
188
- request = self.prepare_get_run(run_id)
188
+ request = self.prepare_get(run_id)
189
189
  response = await self._client._prepared_request(request)
190
190
  return WorkflowRun.model_validate(response)
@@ -7,6 +7,7 @@ class ClassifyRequest(BaseModel):
7
7
  document: MIMEData = Field(..., description="The document to classify")
8
8
  categories: list[Category] = Field(..., description="The categories to classify the document into")
9
9
  model: str = Field(default="retab-small", description="The model to use for classification")
10
+ first_n_pages: int | None = Field(default=None, description="Only use the first N pages of the document for classification. Useful for large documents where classification can be determined from early pages.")
10
11
 
11
12
 
12
13
  class ClassifyResult(BaseModel):
@@ -111,6 +111,11 @@ class InferFormSchemaRequest(BaseModel):
111
111
  model: str = Field(default="retab-small", description="LLM model to use for inference")
112
112
 
113
113
 
114
+ class EditConfig(BaseModel):
115
+ """Configuration for edit requests."""
116
+ color: str = Field(default="#000080", description="Hex code of the color to use for the filled text")
117
+
118
+
114
119
  class EditRequest(BaseModel):
115
120
  """Request for the infer_and_fill_schema endpoint.
116
121
 
@@ -122,6 +127,7 @@ class EditRequest(BaseModel):
122
127
  model: str = Field(default="retab-small", description="LLM model to use for inference")
123
128
  instructions: str = Field(..., description="Instructions to fill the form")
124
129
  template_id: Optional[str] = Field(default=None, description="Template ID to use for filling. When provided, uses the template's pre-defined form fields and empty PDF. Only works for PDF documents. Mutually exclusive with document.")
130
+ config: EditConfig = Field(default_factory=EditConfig, description="Configuration for the edit request")
125
131
 
126
132
  class EditResponse(BaseModel):
127
133
  """Response from the fill_form endpoint.
@@ -5,7 +5,7 @@ from pydantic import BaseModel, Field
5
5
  import datetime
6
6
 
7
7
  from ..mime import BaseMIMEData, MIMEData
8
- from ..documents.edit import FormField
8
+ from ..documents.edit import FormField, EditConfig
9
9
 
10
10
 
11
11
  class EditTemplate(BaseModel):
@@ -48,3 +48,4 @@ class FillTemplateRequest(BaseModel):
48
48
  model: str = Field(default="retab-small", description="LLM model to use for inference")
49
49
  instructions: str = Field(..., description="Instructions to fill the form")
50
50
  template_id: str = Field(..., description="Template ID to use for filling. When provided, uses the template's pre-defined form fields and empty PDF. Only works for PDF documents. Mutually exclusive with document.")
51
+ config: EditConfig = Field(default_factory=EditConfig, description="Configuration for the fill request")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: retab
3
- Version: 0.0.85
3
+ Version: 0.0.87
4
4
  Summary: Retab official python library
5
5
  Home-page: https://github.com/retab-dev/retab
6
6
  Author: Retab
@@ -28,6 +28,8 @@ retab/resources/projects/__init__.py
28
28
  retab/resources/projects/client.py
29
29
  retab/resources/workflows/__init__.py
30
30
  retab/resources/workflows/client.py
31
+ retab/resources/workflows/runs/__init__.py
32
+ retab/resources/workflows/runs/client.py
31
33
  retab/types/__init__.py
32
34
  retab/types/chat.py
33
35
  retab/types/inference_settings.py
@@ -6,7 +6,7 @@ with open("requirements.txt") as f:
6
6
 
7
7
  setup(
8
8
  name="retab",
9
- version="0.0.85",
9
+ version="0.0.87",
10
10
  author="Retab",
11
11
  author_email="contact@retab.com",
12
12
  description="Retab official python library",
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