AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Improve browse_website by using a hidden browser instance

Open jacobtohahn opened this issue 2 years ago • 10 comments

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

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

jacobtohahn avatar Apr 15 '23 23:04 jacobtohahn

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

jacobtohahn avatar Apr 15 '23 23:04 jacobtohahn

I tried running it and got the following error:

image

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

yudikubota avatar Apr 16 '23 14:04 yudikubota

@jacobtohahn There are conflicts now

nponeccop avatar Apr 16 '23 16:04 nponeccop

@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

jacobtohahn avatar Apr 16 '23 16:04 jacobtohahn

@jacobtohahn PR https://github.com/Significant-Gravitas/Auto-GPT/pull/1670 proposes the --no-gui argument. We could merge both.

yudikubota avatar Apr 16 '23 16:04 yudikubota

@jacobtohahn There are conflicts now

nponeccop avatar Apr 16 '23 17:04 nponeccop

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

github-actions[bot] avatar Apr 17 '23 15:04 github-actions[bot]

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

Pwuts avatar Apr 20 '23 01:04 Pwuts

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

p-i- avatar May 05 '23 00:05 p-i-

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

probably not... (at least AFAIK)

anonhostpi avatar May 05 '23 05:05 anonhostpi

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 avatar May 30 '23 14:05 Pwuts