Skip to content

Commit d4ea0d8

Browse files
Merge branch 'main' into chore/modelrouter
2 parents d8ce5b2 + 39ec572 commit d4ea0d8

7 files changed

Lines changed: 20 additions & 5 deletions

File tree

src/askui/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""AskUI Vision Agent"""
22

3-
__version__ = "0.22.12"
3+
__version__ = "0.23.0"
44

55
import logging
66
import os

src/askui/models/askui/inference_api.py

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

4142
@retry(

src/askui/models/askui/inference_api_settings.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import base64
22
import logging
3+
import os
34

45
from anthropic import Omit, omit
56
from pydantic import UUID4, Field, HttpUrl, SecretStr, model_validator
@@ -37,6 +38,11 @@ class AskUiInferenceApiSettings(BaseSettings):
3738
validation_alias="ASKUI_WORKSPACE_ID",
3839
)
3940

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.",
44+
)
45+
4046
@model_validator(mode="after")
4147
def check_authorization(self) -> "Self":
4248
if self.authorization == omit and self.token == omit:

src/askui/models/shared/prompts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def __str__(self) -> str:
7575
if self.prompt:
7676
return self.prompt
7777

78-
parts = []
78+
parts: list[str] = []
7979

8080
if self.system_capabilities:
8181
parts.append(

src/askui/telemetry/user_identification.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ 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+
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.",
33+
)
3034

3135
@cached_property
3236
def askui_token_encoded(self) -> str | None:
@@ -47,7 +51,10 @@ def __init__(self, settings: UserIdentificationSettings):
4751
)
4852
return
4953

50-
self._client = httpx.Client(timeout=30.0)
54+
self._client = httpx.Client(
55+
timeout=30.0,
56+
verify=self._settings.verify_ssl,
57+
)
5158

5259
def __enter__(self) -> Self:
5360
return self

src/askui/web_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
MessageSettings,
88
)
99
from askui.models.shared.tools import Tool
10-
from askui.prompts.act_prompts import WEB_AGENT_SYSTEM_PROMPT
10+
from askui.prompts.act_prompts import create_web_agent_prompt
1111
from askui.tools.exception_tool import ExceptionTool
1212
from askui.tools.playwright.agent_os import PlaywrightAgentOs
1313
from askui.tools.playwright.tools import (
@@ -57,7 +57,7 @@ def __init__(
5757
)
5858
self.act_settings = ActSettings(
5959
messages=MessageSettings(
60-
system=WEB_AGENT_SYSTEM_PROMPT,
60+
system=create_web_agent_prompt(),
6161
thinking={"type": "enabled", "budget_tokens": 2048},
6262
),
6363
)

src/askui/web_testing_agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from pydantic import ConfigDict, validate_call
44

5+
from askui.models.shared.prompts import ActSystemPrompt
56
from askui.models.shared.settings import (
67
ActSettings,
78
MessageSettings,

0 commit comments

Comments
 (0)