Skip to content

Commit

Permalink
Fix new integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
HamadaSalhab committed Oct 30, 2024
1 parent 730c142 commit 9ed1eb2
Show file tree
Hide file tree
Showing 10 changed files with 179 additions and 64 deletions.
40 changes: 32 additions & 8 deletions agents-api/agents_api/autogen/Tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,18 @@ class BrowserbaseSetup(BaseModel):
"""
API key for the browserbase integration
"""
project_id: str
"""
The project ID. Can be found in Settings.
"""
api_url: str | None = None
"""
The API URL. Defaults to https://www.browserbase.com
"""
connect_url: str | None = None
"""
The connect URL. Defaults to wss://connect.browserbase.com
"""


class BrowserbaseSetupUpdate(BaseModel):
Expand All @@ -556,6 +568,18 @@ class BrowserbaseSetupUpdate(BaseModel):
"""
API key for the browserbase integration
"""
project_id: str | None = None
"""
The project ID. Can be found in Settings.
"""
api_url: str | None = None
"""
The API URL. Defaults to https://www.browserbase.com
"""
connect_url: str | None = None
"""
The connect URL. Defaults to wss://connect.browserbase.com
"""


class ChosenBash20241022(BaseModel):
Expand Down Expand Up @@ -1084,7 +1108,7 @@ class RemoteBrowserIntegrationDef(BaseIntegrationDef):
provider: Literal["remote_browser"] = "remote_browser"
setup: RemoteBrowserSetup
method: Literal["perform_action"] = "perform_action"
arguments: RemoteBrowserArguments
arguments: RemoteBrowserArguments | None = None


class RemoteBrowserIntegrationDefUpdate(BaseIntegrationDefUpdate):
Expand All @@ -1109,7 +1133,7 @@ class RemoteBrowserSetup(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
connect_url: AnyUrl
connect_url: str
"""
The connection URL for the remote browser
"""
Expand All @@ -1131,7 +1155,7 @@ class RemoteBrowserSetupUpdate(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
connect_url: AnyUrl | None = None
connect_url: str | None = None
"""
The connection URL for the remote browser
"""
Expand Down Expand Up @@ -1765,7 +1789,7 @@ class BrowserbaseCompleteSessionIntegrationDef(BaseBrowserbaseIntegrationDef):
populate_by_name=True,
)
method: Literal["complete_session"] = "complete_session"
arguments: BrowserbaseCompleteSessionArguments
arguments: BrowserbaseCompleteSessionArguments | None = None


class BrowserbaseCompleteSessionIntegrationDefUpdate(
Expand Down Expand Up @@ -1827,7 +1851,7 @@ class BrowserbaseCreateSessionIntegrationDef(BaseBrowserbaseIntegrationDef):
populate_by_name=True,
)
method: Literal["create_session"] = "create_session"
arguments: BrowserbaseCreateSessionArguments
arguments: BrowserbaseCreateSessionArguments | None = None
"""
The arguments for the method
"""
Expand Down Expand Up @@ -1893,7 +1917,7 @@ class BrowserbaseGetSessionConnectUrlIntegrationDef(BaseBrowserbaseIntegrationDe
populate_by_name=True,
)
method: Literal["get_connect_url"] = "get_connect_url"
arguments: BrowserbaseGetSessionConnectUrlArguments
arguments: BrowserbaseGetSessionConnectUrlArguments | None = None


class BrowserbaseGetSessionConnectUrlIntegrationDefUpdate(
Expand All @@ -1919,7 +1943,7 @@ class BrowserbaseGetSessionIntegrationDef(BaseBrowserbaseIntegrationDef):
populate_by_name=True,
)
method: Literal["get_session"] = "get_session"
arguments: BrowserbaseGetSessionArguments
arguments: BrowserbaseGetSessionArguments | None = None


class BrowserbaseGetSessionIntegrationDefUpdate(BaseBrowserbaseIntegrationDefUpdate):
Expand All @@ -1943,7 +1967,7 @@ class BrowserbaseGetSessionLiveUrlsIntegrationDef(BaseBrowserbaseIntegrationDef)
populate_by_name=True,
)
method: Literal["get_live_urls"] = "get_live_urls"
arguments: BrowserbaseGetSessionLiveUrlsArguments
arguments: BrowserbaseGetSessionLiveUrlsArguments | None = None


class BrowserbaseGetSessionLiveUrlsIntegrationDefUpdate(
Expand Down
55 changes: 27 additions & 28 deletions agents-api/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 32 additions & 8 deletions integrations-service/integrations/autogen/Tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,18 @@ class BrowserbaseSetup(BaseModel):
"""
API key for the browserbase integration
"""
project_id: str
"""
The project ID. Can be found in Settings.
"""
api_url: str | None = None
"""
The API URL. Defaults to https://www.browserbase.com
"""
connect_url: str | None = None
"""
The connect URL. Defaults to wss://connect.browserbase.com
"""


class BrowserbaseSetupUpdate(BaseModel):
Expand All @@ -556,6 +568,18 @@ class BrowserbaseSetupUpdate(BaseModel):
"""
API key for the browserbase integration
"""
project_id: str | None = None
"""
The project ID. Can be found in Settings.
"""
api_url: str | None = None
"""
The API URL. Defaults to https://www.browserbase.com
"""
connect_url: str | None = None
"""
The connect URL. Defaults to wss://connect.browserbase.com
"""


class ChosenBash20241022(BaseModel):
Expand Down Expand Up @@ -1084,7 +1108,7 @@ class RemoteBrowserIntegrationDef(BaseIntegrationDef):
provider: Literal["remote_browser"] = "remote_browser"
setup: RemoteBrowserSetup
method: Literal["perform_action"] = "perform_action"
arguments: RemoteBrowserArguments
arguments: RemoteBrowserArguments | None = None


class RemoteBrowserIntegrationDefUpdate(BaseIntegrationDefUpdate):
Expand All @@ -1109,7 +1133,7 @@ class RemoteBrowserSetup(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
connect_url: AnyUrl
connect_url: str
"""
The connection URL for the remote browser
"""
Expand All @@ -1131,7 +1155,7 @@ class RemoteBrowserSetupUpdate(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
connect_url: AnyUrl | None = None
connect_url: str | None = None
"""
The connection URL for the remote browser
"""
Expand Down Expand Up @@ -1765,7 +1789,7 @@ class BrowserbaseCompleteSessionIntegrationDef(BaseBrowserbaseIntegrationDef):
populate_by_name=True,
)
method: Literal["complete_session"] = "complete_session"
arguments: BrowserbaseCompleteSessionArguments
arguments: BrowserbaseCompleteSessionArguments | None = None


class BrowserbaseCompleteSessionIntegrationDefUpdate(
Expand Down Expand Up @@ -1827,7 +1851,7 @@ class BrowserbaseCreateSessionIntegrationDef(BaseBrowserbaseIntegrationDef):
populate_by_name=True,
)
method: Literal["create_session"] = "create_session"
arguments: BrowserbaseCreateSessionArguments
arguments: BrowserbaseCreateSessionArguments | None = None
"""
The arguments for the method
"""
Expand Down Expand Up @@ -1893,7 +1917,7 @@ class BrowserbaseGetSessionConnectUrlIntegrationDef(BaseBrowserbaseIntegrationDe
populate_by_name=True,
)
method: Literal["get_connect_url"] = "get_connect_url"
arguments: BrowserbaseGetSessionConnectUrlArguments
arguments: BrowserbaseGetSessionConnectUrlArguments | None = None


class BrowserbaseGetSessionConnectUrlIntegrationDefUpdate(
Expand All @@ -1919,7 +1943,7 @@ class BrowserbaseGetSessionIntegrationDef(BaseBrowserbaseIntegrationDef):
populate_by_name=True,
)
method: Literal["get_session"] = "get_session"
arguments: BrowserbaseGetSessionArguments
arguments: BrowserbaseGetSessionArguments | None = None


class BrowserbaseGetSessionIntegrationDefUpdate(BaseBrowserbaseIntegrationDefUpdate):
Expand All @@ -1943,7 +1967,7 @@ class BrowserbaseGetSessionLiveUrlsIntegrationDef(BaseBrowserbaseIntegrationDef)
populate_by_name=True,
)
method: Literal["get_live_urls"] = "get_live_urls"
arguments: BrowserbaseGetSessionLiveUrlsArguments
arguments: BrowserbaseGetSessionLiveUrlsArguments | None = None


class BrowserbaseGetSessionLiveUrlsIntegrationDefUpdate(
Expand Down
12 changes: 12 additions & 0 deletions integrations-service/integrations/models/browserbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,15 @@ class BrowserbaseGetSessionLiveUrlsOutput(BaseOutput):
pages: list[PageInfo] = Field(
..., description="List of pages associated with the session"
)


class BrowserbaseContextOutput(BaseOutput):
id: str = Field(..., description="Unique identifier for the context")
uploadUrl: str = Field(..., description="The upload URL for the context")
publicKey: str = Field(..., description="The public key for the context")
cipherAlgorithm: str = Field(
..., description="The cipher algorithm for the context"
)
initializationVectorSize: int = Field(
..., description="The size of the initialization vector"
)
Loading

0 comments on commit 9ed1eb2

Please sign in to comment.