mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-07-09 16:09:13 +00:00
115 lines
3.3 KiB
Python
115 lines
3.3 KiB
Python
# This file was auto-generated by Fern from our API Definition.
|
|
|
|
import typing
|
|
|
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
from ..core.request_options import RequestOptions
|
|
from .raw_client import AsyncRawAgentsClient, RawAgentsClient
|
|
|
|
|
|
class AgentsClient:
|
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
self._raw_client = RawAgentsClient(client_wrapper=client_wrapper)
|
|
|
|
@property
|
|
def with_raw_response(self) -> RawAgentsClient:
|
|
"""
|
|
Retrieves a raw implementation of this client that returns raw responses.
|
|
|
|
Returns
|
|
-------
|
|
RawAgentsClient
|
|
"""
|
|
return self._raw_client
|
|
|
|
def reset_workflow_browser_profile(
|
|
self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
) -> None:
|
|
"""
|
|
Clear the persisted browser profile for a workflow that uses `Save & Reuse Session`. The next run will start from a fresh browser state. Use when a saved profile is corrupted.
|
|
|
|
Parameters
|
|
----------
|
|
workflow_permanent_id : str
|
|
The permanent ID of the workflow. Starts with `wpid_`.
|
|
|
|
request_options : typing.Optional[RequestOptions]
|
|
Request-specific configuration.
|
|
|
|
Returns
|
|
-------
|
|
None
|
|
|
|
Examples
|
|
--------
|
|
from skyvern import Skyvern
|
|
|
|
client = Skyvern(
|
|
api_key="YOUR_API_KEY",
|
|
)
|
|
client.agents.reset_workflow_browser_profile(
|
|
workflow_permanent_id="wpid_123",
|
|
)
|
|
"""
|
|
_response = self._raw_client.reset_workflow_browser_profile(
|
|
workflow_permanent_id, request_options=request_options
|
|
)
|
|
return _response.data
|
|
|
|
|
|
class AsyncAgentsClient:
|
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
self._raw_client = AsyncRawAgentsClient(client_wrapper=client_wrapper)
|
|
|
|
@property
|
|
def with_raw_response(self) -> AsyncRawAgentsClient:
|
|
"""
|
|
Retrieves a raw implementation of this client that returns raw responses.
|
|
|
|
Returns
|
|
-------
|
|
AsyncRawAgentsClient
|
|
"""
|
|
return self._raw_client
|
|
|
|
async def reset_workflow_browser_profile(
|
|
self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
) -> None:
|
|
"""
|
|
Clear the persisted browser profile for a workflow that uses `Save & Reuse Session`. The next run will start from a fresh browser state. Use when a saved profile is corrupted.
|
|
|
|
Parameters
|
|
----------
|
|
workflow_permanent_id : str
|
|
The permanent ID of the workflow. Starts with `wpid_`.
|
|
|
|
request_options : typing.Optional[RequestOptions]
|
|
Request-specific configuration.
|
|
|
|
Returns
|
|
-------
|
|
None
|
|
|
|
Examples
|
|
--------
|
|
import asyncio
|
|
|
|
from skyvern import AsyncSkyvern
|
|
|
|
client = AsyncSkyvern(
|
|
api_key="YOUR_API_KEY",
|
|
)
|
|
|
|
|
|
async def main() -> None:
|
|
await client.agents.reset_workflow_browser_profile(
|
|
workflow_permanent_id="wpid_123",
|
|
)
|
|
|
|
|
|
asyncio.run(main())
|
|
"""
|
|
_response = await self._raw_client.reset_workflow_browser_profile(
|
|
workflow_permanent_id, request_options=request_options
|
|
)
|
|
return _response.data
|