Skip to content

Commit b83d39f

Browse files
apply review remarks
1 parent 20550ef commit b83d39f

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/askui/models/askui/inference_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _http_client(self) -> httpx.Client:
3636
"Content-Type": "application/json",
3737
"Authorization": self._settings.authorization_header,
3838
},
39-
verify=self._settings.disable_ssl_verification,
39+
verify=self._settings.verify_ssl,
4040
)
4141

4242
@retry(

src/askui/models/askui/inference_api_settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class AskUiInferenceApiSettings(BaseSettings):
3838
validation_alias="ASKUI_WORKSPACE_ID",
3939
)
4040

41-
disable_ssl_verification: bool = Field(
42-
default=(os.environ.get("ASKUI_DISABLE_SSL_VERIFICATION", "False") == "True"),
43-
description="Whether to disable SSL verification for the AskUI Inference API.",
41+
verify_ssl: bool = Field(
42+
default=(os.environ.get("ASKUI_HTTP_SSL_VERIFICATION", "True") == "True"),
43+
description="Whether to use SSL verification for the AskUI Inference API.",
4444
)
4545

4646
@model_validator(mode="after")

src/askui/telemetry/user_identification.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class UserIdentificationSettings(BaseModel):
2727
# env_prefix
2828
askui_token: SecretStr | None = Field(default=get_askui_token_from_env())
2929
askui_workspace_id: str | None = Field(default=os.environ.get("ASKUI_WORKSPACE_ID"))
30-
disable_ssl_verification: bool = Field(
31-
default=(os.environ.get("ASKUI_DISABLE_SSL_VERIFICATION", "False") == "True"),
32-
description="Whether to disable SSL verification for the AskUI Workspaces API.",
30+
verify_ssl: bool = Field(
31+
default=(os.environ.get("ASKUI_HTTP_SSL_VERIFICATION", "True") == "True"),
32+
description="Whether to use SSL verification for the AskUI Workspaces API.",
3333
)
3434

3535
@cached_property
@@ -53,7 +53,7 @@ def __init__(self, settings: UserIdentificationSettings):
5353

5454
self._client = httpx.Client(
5555
timeout=30.0,
56-
verify=not self._settings.disable_ssl_verification,
56+
verify=self._settings.verify_ssl,
5757
)
5858

5959
def __enter__(self) -> Self:

0 commit comments

Comments
 (0)