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

Improve browse_website by using a hidden browser instance #1744

Conversation

jacobtohahn
Copy link
Contributor

Background

Currently, the browse_website command creates a browser instance on top of all windows and then closes it when it's done. In order to prevent the user from being interrupted from other tasks on their computer, we could start a hidden browser instance when the browse_website command is run for the first time and leave it open for the duration of the AutoGPT session.

Changes

The web_selenium.py file was modified to implement the functionality described above. This creates a hidden browser instance when the browse_website command is run for the first time, and it is left open for the duration of the AutoGPT session.

Documentation

Test Plan

After instructing AutoGPT to browse various webpages, the functionality seems to work fine.

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

@jacobtohahn
Copy link
Contributor Author

@BillSchumacher @nponeccop a review would be appreciated, thanks!

Copy link

@azazar azazar left a comment

Choose a reason for hiding this comment

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

Didn't try running it. But it seems that it works exactly as described. Would be nice to see the headless flag was introduced in .env configuration

@yudikubota
Copy link

I tried running it and got the following error:

image

Also, I think it would be prudent to make the hidden browser optional.

@nponeccop
Copy link
Contributor

@jacobtohahn There are conflicts now

@jacobtohahn
Copy link
Contributor Author

@yudikubota Interesting, when I ran it it worked with no errors. I'll look into that.
Making this optional is a good idea. How would you suggest I go about doing that?

@nponeccop Thanks, will resolve

@yudikubota
Copy link

@jacobtohahn PR #1670 proposes the --no-gui argument. We could merge both.

@nponeccop
Copy link
Contributor

@jacobtohahn There are conflicts now

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 17, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@Pwuts Pwuts added function: browse bug Something isn't working labels Apr 18, 2023
@Pwuts
Copy link
Member

Pwuts commented Apr 20, 2023

Is this PR still relevant after the fixes of the past few days? Like #1473

@p-i-
Copy link
Contributor

p-i- commented May 5, 2023

This is a mass message from the AutoGPT core team.
Our apologies for the ongoing delay in processing PRs.
This is because we are re-architecting the AutoGPT core!

For more details (and for infor on joining our Discord), please refer to:
https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting

@anonhostpi
Copy link

anonhostpi commented May 5, 2023

Is this PR still relevant after the fixes of the past few days? Like #1473

probably not... (at least AFAIK)

@Pwuts
Copy link
Member

Pwuts commented May 30, 2023

Support for using a hidden browser was added in #1473. We don't keep the browser open, but I don't see the added value of that overall, since there are plenty of cases in which the browser is not used very much, and keeping it open would just be a waste of resources there.

We might reconsider in the future, but for now I'm closing this PR. Thanks for submitting though!

@Pwuts Pwuts closed this May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working conflicts Automatically applied to PRs with merge conflicts function: browse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants