current viewpoint screenshot and scrolling n screenshot (#2716)
Co-authored-by: lawyzheng <lawyzheng1106@gmail.com>
This commit is contained in:
@@ -96,6 +96,11 @@ class TaskBase(BaseModel):
|
||||
description="Whether to include the action history when verifying the task is complete",
|
||||
examples=[True, False],
|
||||
)
|
||||
max_screenshot_scrolling_times: int | None = Field(
|
||||
default=None,
|
||||
description="Scroll down n times to get the merged screenshot of the page after taking an action. When it's None or 0, it takes the current viewpoint screenshot.",
|
||||
examples=[10],
|
||||
)
|
||||
|
||||
|
||||
class TaskRequest(TaskBase):
|
||||
@@ -314,6 +319,7 @@ class Task(TaskBase):
|
||||
errors=self.errors,
|
||||
max_steps_per_run=self.max_steps_per_run,
|
||||
workflow_run_id=self.workflow_run_id,
|
||||
max_screenshot_scrolling_times=self.max_screenshot_scrolling_times,
|
||||
)
|
||||
|
||||
|
||||
@@ -337,6 +343,7 @@ class TaskResponse(BaseModel):
|
||||
queued_at: datetime | None = None
|
||||
started_at: datetime | None = None
|
||||
finished_at: datetime | None = None
|
||||
max_screenshot_scrolling_times: int | None = None
|
||||
|
||||
|
||||
class TaskOutput(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user