Skip to content

Commit 6edea62

Browse files
committed
Change the condtion to capture added paths
1 parent 3e7784c commit 6edea62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/unstructured_client/general.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def partition(
5151
# Note(austin): Add a custom check to handle the default server URL
5252
# The SDK globally defaults to the platform URL.
5353
# If that hasn't changed, we need to switch to the partition url here.
54-
if base_url == "https://platform.unstructuredapp.io":
54+
if "https://platform.unstructuredapp.io" in base_url:
5555
base_url = "https://api.unstructuredapp.io"
5656

5757
if not isinstance(request, BaseModel):
@@ -184,7 +184,7 @@ async def partition_async(
184184
# Note(austin): Add a custom check to handle the default server URL
185185
# The SDK globally defaults to the platform URL.
186186
# If that hasn't changed, we need to switch to the partition url here.
187-
if base_url == "https://platform.unstructuredapp.io":
187+
if "https://platform.unstructuredapp.io" in base_url:
188188
base_url = "https://api.unstructuredapp.io"
189189

190190
if not isinstance(request, BaseModel):

0 commit comments

Comments
 (0)