Skip to content

Commit aa767e1

Browse files
committed
Release 0.0.45
1 parent 0ef76da commit aa767e1

File tree

2 files changed

+29
-11
lines changed

2 files changed

+29
-11
lines changed

reference.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ client.generic.statement(
577577
</details>
578578

579579
## Document
580-
<details><summary><code>client.document.<a href="src/axiomatic/document/client.py">extract_text</a>(...)</code></summary>
580+
<details><summary><code>client.document.<a href="src/axiomatic/document/client.py">text</a>(...)</code></summary>
581581
<dl>
582582
<dd>
583583

@@ -609,7 +609,7 @@ from axiomatic import Axiomatic
609609
client = Axiomatic(
610610
api_key="YOUR_API_KEY",
611611
)
612-
client.document.extract_text()
612+
client.document.text()
613613

614614
```
615615
</dd>
@@ -635,7 +635,7 @@ core.File` — See core.File for more documentation
635635
<dl>
636636
<dd>
637637

638-
**method:** `typing.Optional[str]` — Method to use for text-only extraction.It uses a very simple pdf parser.
638+
**method:** `typing.Optional[str]` — Method to use for text-only extraction.It uses a very simple pdf text extractor.
639639

640640
</dd>
641641
</dl>
@@ -729,6 +729,14 @@ core.File` — See core.File for more documentation
729729
<dl>
730730
<dd>
731731

732+
**layout_model:** `typing.Optional[str]` — Method for layout parsing
733+
734+
</dd>
735+
</dl>
736+
737+
<dl>
738+
<dd>
739+
732740
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
733741

734742
</dd>

src/axiomatic/document/client.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class DocumentClient:
2121
def __init__(self, *, client_wrapper: SyncClientWrapper):
2222
self._client_wrapper = client_wrapper
2323

24-
def extract_text(
24+
def text(
2525
self,
2626
*,
2727
file: core.File,
@@ -37,7 +37,7 @@ def extract_text(
3737
See core.File for more documentation
3838
3939
method : typing.Optional[str]
40-
Method to use for text-only extraction.It uses a very simple pdf parser.
40+
Method to use for text-only extraction.It uses a very simple pdf text extractor.
4141
4242
request_options : typing.Optional[RequestOptions]
4343
Request-specific configuration.
@@ -54,10 +54,10 @@ def extract_text(
5454
client = Axiomatic(
5555
api_key="YOUR_API_KEY",
5656
)
57-
client.document.extract_text()
57+
client.document.text()
5858
"""
5959
_response = self._client_wrapper.httpx_client.request(
60-
"document/extract_text",
60+
"document/text",
6161
method="POST",
6262
params={
6363
"method": method,
@@ -99,6 +99,7 @@ def parse(
9999
file: core.File,
100100
method: typing.Optional[str] = None,
101101
ocr: typing.Optional[bool] = None,
102+
layout_model: typing.Optional[str] = None,
102103
request_options: typing.Optional[RequestOptions] = None,
103104
) -> ParseResponse:
104105
"""
@@ -115,6 +116,9 @@ def parse(
115116
ocr : typing.Optional[bool]
116117
Whether to use OCR
117118
119+
layout_model : typing.Optional[str]
120+
Method for layout parsing
121+
118122
request_options : typing.Optional[RequestOptions]
119123
Request-specific configuration.
120124
@@ -138,6 +142,7 @@ def parse(
138142
params={
139143
"method": method,
140144
"ocr": ocr,
145+
"layout_model": layout_model,
141146
},
142147
data={},
143148
files={
@@ -175,7 +180,7 @@ class AsyncDocumentClient:
175180
def __init__(self, *, client_wrapper: AsyncClientWrapper):
176181
self._client_wrapper = client_wrapper
177182

178-
async def extract_text(
183+
async def text(
179184
self,
180185
*,
181186
file: core.File,
@@ -191,7 +196,7 @@ async def extract_text(
191196
See core.File for more documentation
192197
193198
method : typing.Optional[str]
194-
Method to use for text-only extraction.It uses a very simple pdf parser.
199+
Method to use for text-only extraction.It uses a very simple pdf text extractor.
195200
196201
request_options : typing.Optional[RequestOptions]
197202
Request-specific configuration.
@@ -213,13 +218,13 @@ async def extract_text(
213218
214219
215220
async def main() -> None:
216-
await client.document.extract_text()
221+
await client.document.text()
217222
218223
219224
asyncio.run(main())
220225
"""
221226
_response = await self._client_wrapper.httpx_client.request(
222-
"document/extract_text",
227+
"document/text",
223228
method="POST",
224229
params={
225230
"method": method,
@@ -261,6 +266,7 @@ async def parse(
261266
file: core.File,
262267
method: typing.Optional[str] = None,
263268
ocr: typing.Optional[bool] = None,
269+
layout_model: typing.Optional[str] = None,
264270
request_options: typing.Optional[RequestOptions] = None,
265271
) -> ParseResponse:
266272
"""
@@ -277,6 +283,9 @@ async def parse(
277283
ocr : typing.Optional[bool]
278284
Whether to use OCR
279285
286+
layout_model : typing.Optional[str]
287+
Method for layout parsing
288+
280289
request_options : typing.Optional[RequestOptions]
281290
Request-specific configuration.
282291
@@ -308,6 +317,7 @@ async def main() -> None:
308317
params={
309318
"method": method,
310319
"ocr": ocr,
320+
"layout_model": layout_model,
311321
},
312322
data={},
313323
files={

0 commit comments

Comments
 (0)