This commit is contained in:
Shuchang Zheng
2026-02-03 10:40:03 -08:00
committed by GitHub
parent 8d0ad3901e
commit 10fa135aa1
18 changed files with 202 additions and 155 deletions

View File

@@ -155,6 +155,7 @@ class Skyvern:
include_action_history_in_verification: typing.Optional[bool] = OMIT,
max_screenshot_scrolls: typing.Optional[int] = OMIT,
browser_address: typing.Optional[str] = OMIT,
run_with: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TaskRunResponse:
"""
@@ -253,6 +254,9 @@ class Skyvern:
browser_address : typing.Optional[str]
The CDP address for the task.
run_with : typing.Optional[str]
Whether to run the task with agent or code.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -293,6 +297,7 @@ class Skyvern:
include_action_history_in_verification=include_action_history_in_verification,
max_screenshot_scrolls=max_screenshot_scrolls,
browser_address=browser_address,
run_with=run_with,
request_options=request_options,
)
return _response.data
@@ -2169,6 +2174,7 @@ class AsyncSkyvern:
include_action_history_in_verification: typing.Optional[bool] = OMIT,
max_screenshot_scrolls: typing.Optional[int] = OMIT,
browser_address: typing.Optional[str] = OMIT,
run_with: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TaskRunResponse:
"""
@@ -2267,6 +2273,9 @@ class AsyncSkyvern:
browser_address : typing.Optional[str]
The CDP address for the task.
run_with : typing.Optional[str]
Whether to run the task with agent or code.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -2315,6 +2324,7 @@ class AsyncSkyvern:
include_action_history_in_verification=include_action_history_in_verification,
max_screenshot_scrolls=max_screenshot_scrolls,
browser_address=browser_address,
run_with=run_with,
request_options=request_options,
)
return _response.data

View File

@@ -22,10 +22,10 @@ class BaseClientWrapper:
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"User-Agent": "skyvern/1.0.11",
"User-Agent": "skyvern/1.0.12",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "skyvern",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.12",
**(self.get_custom_headers() or {}),
}
if self._api_key is not None:

View File

@@ -84,6 +84,7 @@ class RawSkyvern:
include_action_history_in_verification: typing.Optional[bool] = OMIT,
max_screenshot_scrolls: typing.Optional[int] = OMIT,
browser_address: typing.Optional[str] = OMIT,
run_with: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[TaskRunResponse]:
"""
@@ -182,6 +183,9 @@ class RawSkyvern:
browser_address : typing.Optional[str]
The CDP address for the task.
run_with : typing.Optional[str]
Whether to run the task with agent or code.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -216,6 +220,7 @@ class RawSkyvern:
"include_action_history_in_verification": include_action_history_in_verification,
"max_screenshot_scrolls": max_screenshot_scrolls,
"browser_address": browser_address,
"run_with": run_with,
},
headers={
"content-type": "application/json",
@@ -2911,6 +2916,7 @@ class AsyncRawSkyvern:
include_action_history_in_verification: typing.Optional[bool] = OMIT,
max_screenshot_scrolls: typing.Optional[int] = OMIT,
browser_address: typing.Optional[str] = OMIT,
run_with: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[TaskRunResponse]:
"""
@@ -3009,6 +3015,9 @@ class AsyncRawSkyvern:
browser_address : typing.Optional[str]
The CDP address for the task.
run_with : typing.Optional[str]
Whether to run the task with agent or code.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -3043,6 +3052,7 @@ class AsyncRawSkyvern:
"include_action_history_in_verification": include_action_history_in_verification,
"max_screenshot_scrolls": max_screenshot_scrolls,
"browser_address": browser_address,
"run_with": run_with,
},
headers={
"content-type": "application/json",

View File

@@ -2,4 +2,4 @@
import typing
FileType = typing.Union[typing.Literal["csv", "excel", "pdf", "image"], typing.Any]
FileType = typing.Union[typing.Literal["csv", "excel", "pdf"], typing.Any]

View File

@@ -135,6 +135,11 @@ class TaskRunRequest(UniversalBaseModel):
The CDP address for the task.
"""
run_with: typing.Optional[str] = pydantic.Field(default=None)
"""
Whether to run the task with agent or code.
"""
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

View File

@@ -12,6 +12,7 @@ ThoughtScenario = typing.Union[
"extract_loop_values",
"generate_task_in_loop",
"generate_general_task",
"termination",
],
typing.Any,
]

View File

@@ -3,5 +3,6 @@
import typing
ThoughtType = typing.Union[
typing.Literal["plan", "metadata", "user_goal_check", "internal_plan", "failure_describe"], typing.Any
typing.Literal["plan", "metadata", "user_goal_check", "internal_plan", "failure_describe", "termination"],
typing.Any,
]