Skip to content

Commit 0c48834

Browse files
committed
ci: regenerated with OpenAPI Doc 0.0.1, Speakeasy CLI 1.114.1
1 parent 0ab27cf commit 0c48834

20 files changed

+252
-67
lines changed

README.md

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,176 @@ s = unstructured_client.UnstructuredClient(client: http_client)
116116
```
117117
<!-- End Custom HTTP Client -->
118118

119+
120+
121+
<!-- Start Retries -->
122+
# Retries
123+
124+
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
125+
126+
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
127+
128+
129+
## Example
130+
131+
```python
132+
import unstructured_client
133+
from undefined.utils import BackoffStrategy, RetryConfig
134+
from unstructured_client.models import shared
135+
136+
s = unstructured_client.UnstructuredClient(
137+
api_key_auth="YOUR_API_KEY",
138+
)
139+
140+
req = shared.PartitionParameters(
141+
chunking_strategy='by_title',
142+
combine_under_n_chars=500,
143+
encoding='utf-8',
144+
files=shared.Files(
145+
content='0x2cC94b2FEF'.encode(),
146+
file_name='um.shtml',
147+
),
148+
gz_uncompressed_content_type='application/pdf',
149+
hi_res_model_name='yolox',
150+
languages=[
151+
'[',
152+
'e',
153+
'n',
154+
'g',
155+
']',
156+
],
157+
max_characters=1500,
158+
new_after_n_chars=1500,
159+
output_format='application/json',
160+
skip_infer_table_types=[
161+
'p',
162+
'd',
163+
'f',
164+
],
165+
strategy='hi_res',
166+
)
167+
168+
res = s.general.partition(req,
169+
RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False))
170+
171+
if res.elements is not None:
172+
# handle response
173+
pass
174+
```
175+
176+
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
177+
178+
179+
## Example
180+
181+
```python
182+
import unstructured_client
183+
from undefined.utils import BackoffStrategy, RetryConfig
184+
from unstructured_client.models import shared
185+
186+
s = unstructured_client.UnstructuredClient(
187+
retry_config=RetryConfig('backoff', BackoffStrategy(1, 50, 1.1, 100), False)
188+
api_key_auth="YOUR_API_KEY",
189+
)
190+
191+
req = shared.PartitionParameters(
192+
chunking_strategy='by_title',
193+
combine_under_n_chars=500,
194+
encoding='utf-8',
195+
files=shared.Files(
196+
content='0x2cC94b2FEF'.encode(),
197+
file_name='um.shtml',
198+
),
199+
gz_uncompressed_content_type='application/pdf',
200+
hi_res_model_name='yolox',
201+
languages=[
202+
'[',
203+
'e',
204+
'n',
205+
'g',
206+
']',
207+
],
208+
max_characters=1500,
209+
new_after_n_chars=1500,
210+
output_format='application/json',
211+
skip_infer_table_types=[
212+
'p',
213+
'd',
214+
'f',
215+
],
216+
strategy='hi_res',
217+
)
218+
219+
res = s.general.partition(req)
220+
221+
if res.elements is not None:
222+
# handle response
223+
pass
224+
```
225+
226+
227+
<!-- End Retries -->
228+
229+
230+
231+
<!-- Start Authentication -->
232+
233+
# Authentication
234+
235+
## Per-Client Security Schemes
236+
237+
Your SDK supports the following security scheme globally:
238+
239+
| Name | Type | Scheme |
240+
| -------------- | -------------- | -------------- |
241+
| `api_key_auth` | apiKey | API key |
242+
243+
To authenticate with the API the `api_key_auth` parameter must be set when initializing the SDK client instance. For example:
244+
245+
```python
246+
import unstructured_client
247+
from unstructured_client.models import shared
248+
249+
s = unstructured_client.UnstructuredClient(
250+
api_key_auth="YOUR_API_KEY",
251+
)
252+
253+
req = shared.PartitionParameters(
254+
chunking_strategy='by_title',
255+
combine_under_n_chars=500,
256+
encoding='utf-8',
257+
files=shared.Files(
258+
content='0x2cC94b2FEF'.encode(),
259+
file_name='um.shtml',
260+
),
261+
gz_uncompressed_content_type='application/pdf',
262+
hi_res_model_name='yolox',
263+
languages=[
264+
'[',
265+
'e',
266+
'n',
267+
'g',
268+
']',
269+
],
270+
max_characters=1500,
271+
new_after_n_chars=1500,
272+
output_format='application/json',
273+
skip_infer_table_types=[
274+
'p',
275+
'd',
276+
'f',
277+
],
278+
strategy='hi_res',
279+
)
280+
281+
res = s.general.partition(req)
282+
283+
if res.elements is not None:
284+
# handle response
285+
pass
286+
```
287+
<!-- End Authentication -->
288+
119289
<!-- Placeholder for Future Speakeasy SDK Sections -->
120290

121291
### Maturity

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,14 @@ Based on:
234234
### Generated
235235
- [python v0.12.2] .
236236
### Releases
237-
- [PyPI v0.12.2] https://pypi.org/project/unstructured-client/0.12.2 - .
237+
- [PyPI v0.12.2] https://pypi.org/project/unstructured-client/0.12.2 - .
238+
239+
## 2023-11-07 00:18:31
240+
### Changes
241+
Based on:
242+
- OpenAPI Doc 0.0.1
243+
- Speakeasy CLI 1.114.1 (2.181.1) https://github.com/speakeasy-api/speakeasy
244+
### Generated
245+
- [python v0.13.0] .
246+
### Releases
247+
- [PyPI v0.13.0] https://pypi.org/project/unstructured-client/0.13.0 - .

USAGE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ req = shared.PartitionParameters(
1313
chunking_strategy='by_title',
1414
combine_under_n_chars=500,
1515
encoding='utf-8',
16-
files=shared.PartitionParametersFiles(
17-
content='+WmI5Q)|yy'.encode(),
18-
files='string',
16+
files=shared.Files(
17+
content='0x2cC94b2FEF'.encode(),
18+
file_name='um.shtml',
1919
),
2020
gz_uncompressed_content_type='application/pdf',
2121
hi_res_model_name='yolox',

docs/models/errors/httpvalidationerror.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
## Fields
55

6-
| Field | Type | Required | Description |
7-
| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
8-
| `detail` | List[[ValidationError](../../models/errors/validationerror.md)] | :heavy_minus_sign: | N/A |
6+
| Field | Type | Required | Description |
7+
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
8+
| `detail` | List[[errors.ValidationError](../../models/errors/validationerror.md)] | :heavy_minus_sign: | N/A |

docs/models/errors/loc.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Loc
2+
3+
4+
## Supported Types
5+
6+
###
7+
8+
```python
9+
loc: str = /* values here */
10+
```
11+
12+
###
13+
14+
```python
15+
loc: int = /* values here */
16+
```
17+

docs/models/errors/validationerror.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
## Fields
55

6-
| Field | Type | Required | Description |
7-
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
8-
| `loc` | List[[Union[str, int]](../../models/errors/validationerrorloc.md)] | :heavy_check_mark: | N/A |
9-
| `msg` | *str* | :heavy_check_mark: | N/A |
10-
| `type` | *str* | :heavy_check_mark: | N/A |
6+
| Field | Type | Required | Description |
7+
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
8+
| `loc` | List[[Union[str, int]](../../models/errors/loc.md)] | :heavy_check_mark: | N/A |
9+
| `msg` | *str* | :heavy_check_mark: | N/A |
10+
| `type` | *str* | :heavy_check_mark: | N/A |

docs/models/errors/validationerrorloc.md

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# PartitionParametersFiles
1+
# Files
22

33

44
## Fields
55

66
| Field | Type | Required | Description |
77
| ------------------ | ------------------ | ------------------ | ------------------ |
88
| `content` | *bytes* | :heavy_check_mark: | N/A |
9-
| `files` | *str* | :heavy_check_mark: | N/A |
9+
| `file_name` | *str* | :heavy_check_mark: | N/A |

docs/models/shared/partitionparameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| `combine_under_n_chars` | *Optional[int]* | :heavy_minus_sign: | If chunking strategy is set, combine elements until a section reaches a length of n chars. Default: 500 | 500 |
1010
| `coordinates` | *Optional[bool]* | :heavy_minus_sign: | If true, return coordinates for each element. Default: false | |
1111
| `encoding` | *Optional[str]* | :heavy_minus_sign: | The encoding method used to decode the text input. Default: utf-8 | utf-8 |
12-
| `files` | [Optional[PartitionParametersFiles]](../../models/shared/partitionparametersfiles.md) | :heavy_minus_sign: | The file to extract | |
12+
| `files` | [Optional[shared.Files]](../../models/shared/files.md) | :heavy_minus_sign: | The file to extract | |
1313
| `gz_uncompressed_content_type` | *Optional[str]* | :heavy_minus_sign: | If file is gzipped, use this content type after unzipping | application/pdf |
1414
| `hi_res_model_name` | *Optional[str]* | :heavy_minus_sign: | The name of the inference model used when strategy is hi_res | yolox |
1515
| `include_page_breaks` | *Optional[bool]* | :heavy_minus_sign: | If True, the output will include page breaks if the filetype supports it. Default: false | |

docs/sdks/general/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# General
2-
(*general*)
2+
(*.general*)
33

44
### Available Operations
55

@@ -23,9 +23,9 @@ req = shared.PartitionParameters(
2323
chunking_strategy='by_title',
2424
combine_under_n_chars=500,
2525
encoding='utf-8',
26-
files=shared.PartitionParametersFiles(
27-
content='+WmI5Q)|yy'.encode(),
28-
files='string',
26+
files=shared.Files(
27+
content='0x2cC94b2FEF'.encode(),
28+
file_name='um.shtml',
2929
),
3030
gz_uncompressed_content_type='application/pdf',
3131
hi_res_model_name='yolox',

0 commit comments

Comments
 (0)