Skip to content

Commit

Permalink
Added info about Tabs in the ActionOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuynh95 committed Oct 3, 2024
1 parent 5b194b9 commit eef5b99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions lavague-sdk/lavague/sdk/action/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ActionParser,
DEFAULT_PARSER,
UnhandledTypeException,
Tab,
)

from lavague.sdk.action.navigation import WebNavigationAction
Expand Down
6 changes: 5 additions & 1 deletion lavague-sdk/lavague/sdk/action/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ class ActionType(str, Enum):
NAVIGATION = "web_navigation"
EXTRACTION = "web_extraction"

class Tab(BaseModel):
url: str
title: str

T = TypeVar("T")

Expand All @@ -23,7 +26,8 @@ class Action(BaseModel, Generic[T]):
step_id: str = Field(default_factory=lambda: str(uuid4()))
action_type: ActionType
action_output: List[T]
url: str
tabs: List[Tab]
focused_tab: int
status: ActionStatus
instruction: str

Expand Down

0 comments on commit eef5b99

Please sign in to comment.