SDK: small fixes and improvements (#4174)

This commit is contained in:
Stanislav Novosad
2025-12-02 17:34:41 -07:00
committed by GitHub
parent dfbd0a36cf
commit d310c5e39c
2 changed files with 17 additions and 6 deletions

View File

@@ -91,6 +91,7 @@ class SkyvernPageRun:
LOG.info("AI task is running, this may take a while", run_id=task_run.run_id)
task_run = await self._wait_for_run_completion(task_run.run_id, timeout)
LOG.info("AI task finished", run_id=task_run.run_id, status=task_run.status)
return TaskRunResponse.model_validate(task_run.model_dump())
async def login(
@@ -153,6 +154,7 @@ class SkyvernPageRun:
LOG.info("AI login workflow is running, this may take a while", run_id=workflow_run.run_id)
workflow_run = await self._wait_for_run_completion(workflow_run.run_id, timeout)
LOG.info("AI login workflow finished", run_id=workflow_run.run_id, status=workflow_run.status)
return WorkflowRunResponse.model_validate(workflow_run.model_dump())
async def workflow(
@@ -199,6 +201,7 @@ class SkyvernPageRun:
LOG.info("AI workflow is running, this may take a while", run_id=workflow_run.run_id)
workflow_run = await self._wait_for_run_completion(workflow_run.run_id, timeout)
LOG.info("AI workflow finished", run_id=workflow_run.run_id, status=workflow_run.status)
return WorkflowRunResponse.model_validate(workflow_run.model_dump())
async def _wait_for_run_completion(self, run_id: str, timeout: float) -> GetRunResponse: