File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 1
1
# https://www.speakeasy.com/docs/customize/code/monkey-patching
2
2
3
- # ignore human-written files and directories
4
- src/unstructured_client/_unstructured
5
3
_jupyter
6
4
_sample_docs
7
5
_test_unstructured_client
8
6
9
7
# ignore Makefile
10
8
Makefile
11
9
12
- # Ignore the general.partition code until we can fix the base_url issue
13
- src/unstructured_client/general.py
14
- src/unstructured_client/destinations.py
15
- src/unstructured_client/sources.py
16
- src/unstructured_client/jobs.py
17
- src/unstructured_client/workflows.py
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ python:
34
34
clientServerStatusCodesAsErrors : true
35
35
defaultErrorName : SDKError
36
36
description : Python Client SDK for Unstructured API
37
- enableCustomCodeRegions : false
37
+ enableCustomCodeRegions : true
38
38
enumFormat : enum
39
39
fixFlags :
40
40
responseRequiredSep2024 : false
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ class PartitionAcceptEnum(str, Enum):
16
16
17
17
18
18
class General (BaseSDK ):
19
+ # region sdk-class-body
19
20
def get_default_server_url (self ) -> str :
20
21
client_url , * _ = self .sdk_configuration .get_server_details ()
21
22
if client_url == SERVERS [SERVER_PLATFORM_API ].rstrip ("/" ):
@@ -24,7 +25,7 @@ def get_default_server_url(self) -> str:
24
25
operations .PARTITION_SERVER_SAAS_API
25
26
].rstrip ("/" )
26
27
return clean_server_url (client_url )
27
-
28
+ # endregion sdk-class-body
28
29
def partition (
29
30
self ,
30
31
* ,
@@ -48,12 +49,13 @@ def partition(
48
49
:param accept_header_override: Override the default accept header for this method
49
50
:param http_headers: Additional headers to set or replace on requests.
50
51
"""
52
+ # endregion sdk-class-body
51
53
base_url = clean_server_url (server_url ) if server_url is not None else self .get_default_server_url ()
52
54
53
55
url_variables = None
54
56
if timeout_ms is None :
55
57
timeout_ms = self .sdk_configuration .timeout_ms
56
-
58
+ # endregion sdk-class-body
57
59
if not isinstance (request , BaseModel ):
58
60
request = utils .unmarshal (request , operations .PartitionRequest )
59
61
request = cast (operations .PartitionRequest , request )
You can’t perform that action at this time.
0 commit comments