Skip to content

Commit

Permalink
PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsbatista committed Feb 20, 2024
1 parent da09ea7 commit a6db18d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class UnstructuredFileConverter:
def __init__(
self,
api_url: str = UNSTRUCTURED_HOSTED_API_URL,
api_key: Optional[Secret] = Secret.from_env_var("UNSTRUCTURED_API_KEY"), # noqa: B008
api_key: Optional[Secret] = Secret.from_env_var("UNSTRUCTURED_API_KEY", strict=False), # noqa: B008
document_creation_mode: Literal[
"one-doc-per-file", "one-doc-per-page", "one-doc-per-element"
] = "one-doc-per-file",
Expand Down Expand Up @@ -64,6 +64,7 @@ def __init__(
self.progress_bar = progress_bar

is_hosted_api = api_url == UNSTRUCTURED_HOSTED_API_URL
api_key = api_key.resolve_value() if api_key else None

# we check whether api_key is None or an empty string
if is_hosted_api and not api_key:
Expand Down

0 comments on commit a6db18d

Please sign in to comment.