Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(agents-api & integrations-service): Fix Browserbase/RemoteBrowser integrations #784

Merged
merged 26 commits into from
Oct 31, 2024

Conversation

HamadaSalhab
Copy link
Contributor

@HamadaSalhab HamadaSalhab commented Oct 30, 2024

Important

Fixes Browserbase and RemoteBrowser integrations by adding new fields, making arguments optional, and changing URL types.

  • Behavior:
    • Add project_id, api_url, and connect_url fields to BrowserbaseSetup and BrowserbaseSetupUpdate in Tools.py.
    • Make arguments optional in several IntegrationDef classes in Tools.py.
    • Change connect_url type from AnyUrl to str in RemoteBrowserSetup and RemoteBrowserSetupUpdate in Tools.py.
  • Models:
    • Update SessionInfo, BrowserbaseCreateSessionOutput, and BrowserbaseGetSessionOutput in browserbase.py to allow None for several fields.
    • Add BrowserbaseContextOutput to browserbase.py.
    • Update ExecutionArguments and ExecutionResponse in execution.py to include new Browserbase and RemoteBrowser models.
  • Misc:
    • Remove unused imports in get_integrations.py and execute_integration.py.
    • Add project_id, api_url, and connect_url to get_browserbase_client() in browserbase.py.

This description was created by Ellipsis for 40734ad. It will automatically update as commits are pushed.

Copy link
Contributor

sweep-ai bot commented Oct 30, 2024

Hey @HamadaSalhab, here is an example of how you can ask me to improve this pull request:

@Sweep Add unit tests for the `get_browserbase_client` function in `browserbase.py` to verify it correctly initializes the Browserbase client with the new optional parameters (project_id, api_url, connect_url).

📖 For more information on how to use Sweep, please read our documentation.

@creatorrr creatorrr marked this pull request as ready for review October 31, 2024 04:59
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 90d7b30 in 46 seconds

More details
  • Looked at 877 lines of code in 12 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. agents-api/agents_api/autogen/Tools.py:1147
  • Draft comment:
    Changing connect_url from AnyUrl to str removes automatic URL validation. Ensure URL validation is handled elsewhere to prevent invalid URLs.
  • Reason this comment was not posted:
    Comment did not seem useful.
2. integrations-service/integrations/autogen/Tools.py:1147
  • Draft comment:
    Changing connect_url from AnyUrl to str removes automatic URL validation. Ensure URL validation is handled elsewhere to prevent invalid URLs.
  • Reason this comment was not posted:
    Marked as duplicate.
3. integrations-service/integrations/utils/integrations/browserbase.py:110
  • Draft comment:
    Consider logging the exception details in the except block for better debugging and traceability.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The exception handling in complete_session should log the exception details for better debugging and traceability.

Workflow ID: wflow_wJIVgWLKllCCvs4C


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@creatorrr
Copy link
Contributor

Made some fixes. Tested browserbase.list_sessions integration, which works now. Not tested the rest yet @HamadaSalhab

creatorrr and others added 4 commits October 31, 2024 01:20
Made changes so that a fully typed JSON object is returned by Brave
Search .
This fixes issue #771 
<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Parse Brave Search JSON output into `SearchResult` objects and update
`BraveSearchOutput` to return a list of these objects.
> 
>   - **Behavior**:
> - `search()` in `brave.py` now parses JSON results into `SearchResult`
objects.
> - `BraveSearchOutput` now returns a list of `SearchResult` instead of
a single string.
>   - **Models**:
> - Adds `SearchResult` model in `brave.py` with `title`, `link`, and
`snippet` fields.
> - Updates `BraveSearchOutput` in `brave.py` to use
`List[SearchResult]` for `result`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 61e813a. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Diwank Singh Tomer <[email protected]>
Co-authored-by: vedantsahai18 <[email protected]>
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 9ab7f86 in 22 seconds

More details
  • Looked at 31 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. integrations-service/integrations/models/execution.py:32
  • Draft comment:
    BrowserbaseContextOutput is commented out here and in ExecutionResponse. Ensure this is intentional and not an oversight, as the PR description mentions adding it to browserbase.py.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The comment is about the removal of BrowserbaseContextOutput from the imports and usage in ExecutionResponse. This is consistent with the PR description, which mentions adding BrowserbaseContextOutput to browserbase.py, but it seems to be commented out here. This might be intentional, but it's worth pointing out in case it was overlooked.

Workflow ID: wflow_ETLdqnE3i3CsipE0


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 4e77450 in 30 seconds

More details
  • Looked at 373 lines of code in 8 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_AGUarFvuxTQA0tp6


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on a18f853 in 25 seconds

More details
  • Looked at 77 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. integrations-service/integrations/models/browserbase.py:6
  • Draft comment:
    The import of Session from browserbase is unused and can be removed to clean up the code.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The import statement for Session from browserbase is unnecessary in integrations-service/integrations/models/browserbase.py since it is not used in the file.
2. integrations-service/integrations/utils/integrations/browserbase.py:28
  • Draft comment:
    The import of Session from browserbase is unused and can be removed to clean up the code.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The import statement for Session from browserbase is unnecessary in integrations-service/integrations/utils/integrations/browserbase.py since it is not used in the file.

Workflow ID: wflow_AcF09iyyckkfStS4


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on 40734ad in 32 seconds

More details
  • Looked at 34 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_VxPIDIggKNwYAjRo


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@HamadaSalhab HamadaSalhab merged commit 1f8fe30 into dev Oct 31, 2024
14 checks passed
@HamadaSalhab HamadaSalhab deleted the x/browserbase-integrations branch October 31, 2024 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants