Skip to content

Commit

Permalink
docs: improved docs for playwright install, added instructions for ly…
Browse files Browse the repository at this point in the history
…nx browser backend
  • Loading branch information
ErikBjare committed Dec 18, 2024
1 parent 1b752ca commit a9bd44f
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions gptme/tools/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,39 @@
Tools to let the assistant control a browser, including:
- loading pages
- reading their contents
- viewing them through screenshots
- searching
- searching the web
- taking screenshots (Playwright only)
.. note::
Two backends are available:
This is an experimental feature. It needs some work to be more robust and useful.
Playwright backend:
- Full browser automation with screenshots
- Installation:
.. code-block:: bash
pipx install 'gptme[browser]'
# We need to use the same version of Playwright as the one installed by gptme
# when downloading the browser binaries.
PW_VERSION=$(pipx runpip gptme show playwright | grep Version | cut -d' ' -f2)
pipx run playwright==$PW_VERSION install chromium
To use the browser tool, you need to have the `playwright` Python package installed along with gptme, which you can install with:
Lynx backend:
- Text-only browser for basic page reading and searching
- No screenshot support
- Installation:
.. code-block:: bash
.. code-block:: bash
pipx install 'gptme[browser]'
gptme '/shell playwright install chromium'
# On Ubuntu
sudo apt install lynx
# On macOS
brew install lynx
# or any other way that gets you the `lynx` command
.. note::
This is an experimental feature. It needs some work to be more robust and useful.
"""

import importlib.util
Expand Down

0 comments on commit a9bd44f

Please sign in to comment.