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 11# https://www.speakeasy.com/docs/customize/code/monkey-patching
22
3- # ignore human-written files and directories
4- src/unstructured_client/_unstructured
53_jupyter
64_sample_docs
75_test_unstructured_client
86
97# ignore Makefile
108Makefile
119
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:
3434 clientServerStatusCodesAsErrors : true
3535 defaultErrorName : SDKError
3636 description : Python Client SDK for Unstructured API
37- enableCustomCodeRegions : false
37+ enableCustomCodeRegions : true
3838 enumFormat : enum
3939 fixFlags :
4040 responseRequiredSep2024 : false
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ class PartitionAcceptEnum(str, Enum):
1616
1717
1818class General (BaseSDK ):
19+ # region sdk-class-body
1920 def get_default_server_url (self ) -> str :
2021 client_url , * _ = self .sdk_configuration .get_server_details ()
2122 if client_url == SERVERS [SERVER_PLATFORM_API ].rstrip ("/" ):
@@ -24,7 +25,7 @@ def get_default_server_url(self) -> str:
2425 operations .PARTITION_SERVER_SAAS_API
2526 ].rstrip ("/" )
2627 return clean_server_url (client_url )
27-
28+ # endregion sdk-class-body
2829 def partition (
2930 self ,
3031 * ,
@@ -48,12 +49,13 @@ def partition(
4849 :param accept_header_override: Override the default accept header for this method
4950 :param http_headers: Additional headers to set or replace on requests.
5051 """
52+ # endregion sdk-class-body
5153 base_url = clean_server_url (server_url ) if server_url is not None else self .get_default_server_url ()
5254
5355 url_variables = None
5456 if timeout_ms is None :
5557 timeout_ms = self .sdk_configuration .timeout_ms
56-
58+ # endregion sdk-class-body
5759 if not isinstance (request , BaseModel ):
5860 request = utils .unmarshal (request , operations .PartitionRequest )
5961 request = cast (operations .PartitionRequest , request )
You can’t perform that action at this time.
0 commit comments